]>
Book Contents Previous Section 1.10 Series Next Section 1.12 Integration Book Index

## 1.11 Derivatives

Use the Axiom function D to differentiate an derivative expression. differentiation

To find the derivative of an expression f with respect to a variable x, enter D(f, x).

f := exp exp x

e e x

Type: Expression Integer
D(f, x)

e x e e x

Type: Expression Integer

An optional third argument n in D asks Axiom for the n-th derivative of f. This finds the fourth derivative of f with respect to x.

D(f, x, 4)

(e x 4+6 e x 3+7 e x 2+e x)e e x

Type: Expression Integer

You can also compute partial derivatives by specifying the order of differentiation:partial differentiation.

g := sin(x**2 + y)

sin(y+x 2)

Type: Expression Integer
D(g, y)

cos(y+x 2)

Type: Expression Integer
D(g, [y, y, x, x])

4 x 2 sin(y+x 2)-2 cos(y+x 2)

Type: Expression Integer

Axiom can manipulate the derivatives (partial and iterated) of differentiation:formal expressions involving formal operators. All the dependencies must be explicit.

This returns 0 since F (so far) does not explicitly depend on x.

D(F,x)

0

Type: Polynomial Integer

Suppose that we have F a function of x, y, and z, where x and y are themselves functions of z.

Start by declaring that F, x, and y are operators. operator

F := operator 'F; x := operator 'x; y := operator 'y

y

Type: BasicOperator

You can use F, x, and y in expressions.

a := F(x z, y z, z**2) + x y(z+1)

x(y(z+1))+F(x(z),y(z),z 2)

Type: Expression Integer

Differentiate formally with respect to z. The formal derivatives appearing in dadz are not just formal symbols, but do represent the derivatives of x, y, and F.

dadz := D(a, z)

2 z F,3(x(z),y(z),z 2)+y′(z)F,2(x(z),y(z),z 2)+x′(z)F,1(x(z),y(z),z 2)+x′(y(z+1))y′(z+1)

Type: Expression Integer

You can evaluate the above for particular functional values of F, x, and y. If x(z) is exp(z) and y(z) is log(z+1), then evaluates dadz.

eval(eval(dadz, 'x, z +-> exp z), 'y, z +-> log(z+1))

((2 z 2+2 z)F,3(e z,log(z+1),z 2)+F,2(e z,log(z+1),z 2)+(z+1)e z F,1(e z,log(z+1),z 2)+z+1)z+1

Type: Expression Integer

You obtain the same result by first evaluating a and then differentiating.

eval(eval(a, 'x, z +-> exp z), 'y, z +-> log(z+1))

F(e z,log(z+1),z 2)+z+2

Type: Expression Integer
D(%, z)

((2 z 2+2 z)F,3(e z,log(z+1),z 2)+F,2(e z,log(z+1),z 2)+(z+1)e z F,1(e z,log(z+1),z 2)+z+1)z+1

Type: Expression Integer
Book Contents Previous Section 1.10 Series Next Section 1.12 Integration Book Index