Previous Up Next

13.2.1  Derivatives and partial derivatives

The diff or derive or deriver command computes derivatives and partial derivatives of expressions.

Examples

Compute ∂/∂ z(x y2 z3+x y z).

diff(x*y^2*z^3+x*y*z,z)
     
x y2 z2+x y           

Compute the first order partial derivatives of x y2 z3+x y z.

diff(x*y^2*z^3+x*y,[x,y,z])
     

y2 z3+y,2 x y z3+x,3 x y2 z2
          

Compute ∂3/∂ y ∂2 z(x y2 z3+x y z).

diff(x*y ^2*z^3+x*y*z,y,z$2)
     
12 x y z           

Compute ∂2/∂ xz(x y2 z3+x y z).

diff(x*y^2*z^3+x*y*z,x,z)
     
y2 z2+y           

Compute ∂3/∂ x2 z(x y2 z3+x y z).

diff(x*y^2*z^3+x*y*z,x,z,z)

or:

diff(x*y^2*z^3+x*y*z,x,z$2)
     
y2 z           

Compute the third derivative of 1/x2+2.

normal(diff((1)/(x^2+2),x,x,x))

or:

normal(diff((1)/(x^2+2),x$3))
     
−24 x3+48 x
x8+8 x6+24 x4+32 x2+16
          
Remarks.

Previous Up Next