| Spline Toolbox | Search  Help Desk |
| fnint | Examples See Also |
Syntax
intgrf = fnint(f) intgrf = fnint(f,value)
Description
fnint(f,value) is the description of an indefinite integral of the univariate function whose description is contained in f. The integral is normalized to have the specified value at the left endpoint of the function's basic 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.
Indefinite integration of a multivariate function, in coordinate directions only, is available via fnder(f,dorder) with dorder having nonpositive entries.
Examples
The statementfnval(fnint(f),[a b])*[-1;1] provides the definite integral over the interval [a .. b] of the function described by f.
If f is in ppform, or in B-form with its last knot of sufficiently high multiplicity, then, up to rounding errors, f and fnint(fnder(f)) are the same.
If f is in ppform, then, up to rounding errors, f and fnder(fnint(f)) are the same, unless the function described by f has jump discontinuities.
If f contains the B-form of f, and t1 is its left-most knot, then, up to rounding errors, fnint(fnder(f)) contains the B-form of f-f(t1), but its left-most knot will have lost one multiplicity (if it had multiplicity > 1 to begin with), and its rightmost knot will have full multiplicity even if the rightmost knot for the B-form of f in f doesn't.
As an illustration of this last fact, since sp = spmak([0 0 1],1) is, on its basic interval [0..1], the straight line that is 1 at 0 and 0 at 1, the subsequent statement spdi = fnint(fnder(sp)) gives a spline with 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 demos spalldm2 and ppalldm2 for examples.
Algorithm
For the B-form, the formula [PGS; (X.22)] for integration is used.See Also
fnder, fnval, fnplt, ppalldm2, spalldm2