Integrate function
intgrf = fnint(f,value)
fnint(f)
intgrf = fnint(f,value)
is the description of anindefinite integral of theunivariatefunction whose description is contained inf
. The integral is normalized to have the specifiedvalue
at the left endpoint of the function'sbasic interval, with the default value being zero.
The output is of the same type as the input, i.e., they are both ppforms or both B-forms.fnint
does not work for rational splines nor for functions in stform.
fnint(f)
is the same asfnint(f,0)
.
Indefinite integration of amultivariatefunction, in coordinate directions only, is available viafnder
(f,dorder)
withdorder
having nonpositive entries.
The statementdiff(fnval(fnint(f),[a b]))
provides the definite integral over the interval [a
..b
] of the function described byf
.
Iff
is in ppform, or in B-form with its last knot of sufficiently high multiplicity, then, up to rounding errors,f
andfnder(fnint(f))
are the same.
Iff
is in ppform andfa
is the value of the function inf
at the left end of its basic interval, then, up to rounding errors,f
andfnint(fnder(f),fa)
are the same, unless the function described byf
has jump discontinuities.
Iff
contains the B-form off, andt1is its leftmost knot, then, up to rounding errors,fnint(fnder(f))
contains the B-form off–f(t1). However, its leftmost knot will have lost one multiplicity (if it had multiplicity > 1 to begin with). Also, its rightmost knot will have full multiplicity even if the rightmost knot for the B-form offinf
doesn't.
这是一个例子last fact. The spline insp = spmak([0 0 1], 1)
is, on its basic interval [0
..1
], the straight line that is 1 at 0 and 0 at 1. Now integrate its derivative:spdi = fnint(fnder(sp))
. As you can check, the spline inspdi
has the same basic interval, but, on that interval, it agrees with the straight line that is 0 at 0 and -1 at 1.
See the examples “Intro to B-form” and “Intro to ppform” for examples.
For the B-form, the formula [PGS; (X.22)] for integration is used.