Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - Português

Change language to:
English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Ajuda do Scilab >> Polinômios > polyint

polyint

Polynomial integration

Syntax

polyint // example
Q = polyint(P)
Q = polyint(P, Const)

Arguments

P, Q
arrays (from scalars to hypermatrices) of polynomials with real or complex coefficients, of same size.

Const
Set of real or complex constants of integration. length(Const) sets the number of consecutive integrations to perform. By default, 0 is used. Const can be one of the following:
  • a scalar: then only the first antiderivatives are computed, and all use the same Const value.
  • an array of size size(P): then only the first antiderivatives are computed, with the respective Const(i) for Q(i).
  • a list that can mix scalars, arrays of size size(P), or undefined elements. Then Const(i) is used for the ith antiderivatives. Undefined elements are equivalent to 0.

Description

polyint(..) computes the first or any nth antiderivative of each polynomial of the input array.

Examples

Single integration (first order):

s = %s;
P = [-2, s ; s^2-3, s-2*s^3]
polyint(P)
polyint(P, 1)
polyint(P, [1 2 ; 3 4])
--> P = [-2, s ; s^2-3, s-2*s^3]
 P  =
  -2      s
  -3 +s²  s -2s³

--> polyint(P)
 ans  =
  -2s               0.5s²
  -3s +0.3333333s³  0.5s² -0.5s⁴

--> polyint(P, 1)
 ans  =
  1 -2s               1 +0.5s²
  1 -3s +0.3333333s³  1 +0.5s² -0.5s⁴

--> polyint(P, [1 2 ; 3 4])
 ans  =
  1 -2s               2 +0.5s²
  3 -3s +0.3333333s³  4 +0.5s² -0.5s⁴

Multiple integrations:

s = %s;
polyint(1-3*s, list(-1,1))
P = [3 ; 1-s ; 6*s^2-2]
polyint(P, list(2, [-2 1 0]))
polyint(P, list(, [-2 1 0]))

k = list(); k(5) = 0;
polyint(1+0*s, k)
1 / factorial(5)
--> polyint(1-3*s, list(-1,1))
 ans  =
  1 -s +0.5s² -0.5s³

--> P = [3 ; 1-s ; 6*s^2-2]
 P  =
  3
  1 -s
  -2 +6s²

--> polyint(P, list(2, [-2 1 0]))
 ans  =
  -2 +2s +1.5s²
  1 +2s +0.5s² -0.1666667s³
  2s -s² +0.5s⁴

--> polyint(P, list(, [-2 1 0]))
 ans  =
  -2 +1.5s²
  1 +0.5s² -0.1666667s³
  -s² +0.5s⁴


--> k = list(); k(5) = 0;
--> polyint(1+0*s, k)
 ans  =
  0.0083333s⁵

--> 1 / factorial(5)
 ans  =
   0.0083333

See also

  • derivat — derivada de matriz de razões de polinômios

History

VersãoDescrição
6.1.1 polyint() introduced.
Report an issue
<< poly Polinômios residu >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:35:23 CET 2022