
D - differential operator

Calling sequence:

D(expr)
D([integer ...], expr)

Parameter:
expr      --  expression
integer   --  non-negative integer

Overloading:

1

Summary:

D as a differential operator calculates the derivative of a function.

 o  If f is a function with one argument then D(f) returns the derivative of
    f.

 o  If f is a function with more than one argument then D([i], f) returns
    the i-th partial derivative of f.

An expression with the form D([i,j], f) is equivalent to D([i], D([j],
f)). It is assumed that the partial derivatives commute. Furthermore D([],
f) = f.

The argument expr must be an expression that can be used as a function.
Such an expression can contain identifiers, functions, procedures and constants.
Furthermore the operators +, *, ^ and @ can be used. When differentiating
expressions the rules for sums and products and the chain rule are used.

For a function environmentan own differential procedure can be given. This
must be entered as an attribute under the index "D" in the function environment:
compare to the function funcattr . The procedure is called exactly like D with
the index list and the function environment as parameters.

>>  D(sin);

      cos

>>  D(exp + ln);

      exp + proc(X1) begin 1/X1 end_proc

>>  D(f @ (g+h));

      (D(g)+D(h)) * (D(f) @ (g+h))

>>  D([1,2], func(sin(x*y), x, y));

      proc(x,y)
      begin
        cos(x*y) - x*y*sin(x*y)
      end_proc

See also:  diff, funcattr

