Spline Toolbox
  Go to function:
    Search    Help Desk 
fnder    Examples   See Also

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 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 differentiation of either form, the derivatives are found in the pp 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

fnint, fnval, fnplt, ppalldm2, spalldm2



[ Previous | Help Desk | Next ]