Spline Toolbox    
fnder

Differentiate a function

Syntax

Description

fnder(f,dorder) is the description of the dorderth derivative of the function whose description is contained in f. The default value of dorder is 1. For negative dorder, the particular |dorder|-th indefinite integral is returned that vanishes |dorder|-fold at the left endpoint of the basic interval.

The output is of the same form as the input, i.e., they are both ppforms or both B-forms.

If the function in f is multivariate, say m-variate, then dorder must be given, and must be of length m.

Examples

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 is its left-most knot, then, up to rounding errors, fnint(fnder(f)) contains the B-form of  . However, its left-most 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 of f in f doesn't.

Here is an illustration of this last fact. The spline in 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. Now integrate its derivative: spdi = fnint(fnder(sp)). As you can check, the spline in spdi 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 demos spalldem and ppalldem for examples.

Algorithm

For differentiation of either form, the derivatives are found in the piecewise-polynomial sense. This means that, in effect, each polynomial piece is differentiated separately, and jump discontinuities between polynomial pieces are ignored during differentiation.

For the B-form, the formulas [PGS; (X.10)] for differentiation are used.

See Also

fndir, fnint, fnval, fnplt, ppalldem, spalldem


 fncmb fndir