Polynomial integration
polyint // example Q = polyint(P) Q = polyint(P, Const)
length(Const)
sets the number of consecutive integrations
to perform. By default, 0 is used.
Const
can be one of the following:
Const
value.Const(i)
for Q(i)
.Const(i)
is used for the ith
antiderivatives. Undefined elements are equivalent to 0.polyint(..) computes the first or any nth antiderivative of each polynomial of the input array.
Single integration (first order):
--> 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
Version | Description |
6.1.1 | polyint() introduced. |