There are two ways in which to compute the derivative. Let's start with the easier way: Define the function, let's say f(x), then evaluate f '(x).
When you define a function, it is essential to include the "_"-character on the left side of the definition; this is the signal for Mathematica to treat the "x" as a variable.
![[Graphics:Images/Derive_gr_1.gif]](Images/Derive_gr_1.gif)
![[Graphics:Images/Derive_gr_3.gif]](Images/Derive_gr_3.gif)
![[Graphics:Images/Derive_gr_5.gif]](Images/Derive_gr_5.gif)
![[Graphics:Images/Derive_gr_7.gif]](Images/Derive_gr_7.gif)
You can also compute higher derivatives this way:
![[Graphics:Images/Derive_gr_9.gif]](Images/Derive_gr_9.gif)
![[Graphics:Images/Derive_gr_11.gif]](Images/Derive_gr_11.gif)
![[Graphics:Images/Derive_gr_13.gif]](Images/Derive_gr_13.gif)
This method uses the command "D" to compute derivatives.
![[Graphics:Images/Derive_gr_15.gif]](Images/Derive_gr_15.gif)
You can indicate also that you want to find higher derivatives. Here is the third derivative of :
![[Graphics:Images/Derive_gr_18.gif]](Images/Derive_gr_18.gif)
This works nicely for partial derivatives you encounter in Calculus III or Differential Equations. The next command evaluates the partial derivative of the function with respect to y:
![[Graphics:Images/Derive_gr_20.gif]](Images/Derive_gr_20.gif)
Here is a mixed derivative
![[Graphics:Images/Derive_gr_23.gif]](Images/Derive_gr_23.gif)
How do you evaluate the derivative at a point? (In the next command. read "/.{x->2}" as "afterwards replace x by 2")
![[Graphics:Images/Derive_gr_25.gif]](Images/Derive_gr_25.gif)
![[Graphics:Images/Derive_gr_27.gif]](Images/Derive_gr_27.gif)
Let's create a list of the first 10 derivatives of the following function:
![[Graphics:Images/Derive_gr_29.gif]](Images/Derive_gr_29.gif)
Here is the - for instance - the second derivative:
![[Graphics:Images/Derive_gr_31.gif]](Images/Derive_gr_31.gif)
Here is the whole list, using the "Table" command. ("n" is a dummy variable, "{n,1,10,1}" means that n will take all values from 1 to 10, incrementing by 1.)
![[Graphics:Images/Derive_gr_33.gif]](Images/Derive_gr_33.gif)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
What about the derivatives evaluated at 0? Here we go:
![[Graphics:Images/Derive_gr_44.gif]](Images/Derive_gr_44.gif)
0 |
![]() |
0 |
12 |
0 |
![]() |
0 |
1680 |
0 |
![]() |