Last Updated 10/28/2022

Sage Essentials
Section 9: Vector Calculus

The diff Command

Sage can find the derivatives of a function with one or more variables.

Example 1

Find the derivatives of f( x )=xcosx .

Here are two ways of finding the second derivative of f( x )=xcosx .

Method I: Use the diff()command twice.

 

 

Method II: Use the diff()command with an optional argument indicating the order of the derivative.

 

Try this!

Compute f ( 4 ) ( x )  if  f( x )=xsinx .


← Previous Example Next Example →