Function: makediff - produce a `diff/...` procedure

Calling sequence:

makediff(g)
makediff(g,vars)

Parameters:

g - a procedure name
vars - set or list of variable names

Description:

Examples:

Defining f using defined function g :

> f:= x -> x*g(x^2);
g:= x -> 1 + x^2;

f := proc (x) options operator, arrow; x*g(x^2) end...

g := proc (x) options operator, arrow; 1+x^2 end pr...

D(f) does not work:

> D(f);

D(f)

Using makediff(g) to make this work:

> makediff(g); D(f);

proc (x) options operator, arrow; g(x^2)+4*x^4 end ...

In the following case, it makes no sense to differentiate h with respect to n . Therefore we must use the two-argument form of makediff .

> h:= (x,n) -> sum(1/(1+x^j),j=1..n):
f:= t -> h(t^2,5):
makediff(h,{x});
D(f);

proc (t) options operator, arrow; 2*(-1/((1+t^2)^2)...

See also:

D , diff , fixD , Problems with D

Maple Advisor Database R. Israel, 2001