Intro to Derivatives

0. Objective

In this lab we use Mathematica to explore the concepts of differentiation.  If you have not already done so, read the appropriate section in the text describing the introduction to derivatives.

1. Narrative

One of the key ideas you should take away from the chapter on derivatives is that, as long as the limit exists, the value of

f'(x)=(lim_(h→0))((f(x+h)-f(x))/h)

for any given value of x, is the slope of the tangent line to the graph of f at x.  In this lab we introduce the Mathematica commands for differentiating functions.  But first let’s look at this definition of a derivative on several functions.  In the following examples, pay close attention to the form that the derivative takes:

f[x_]=x^(3/2)
Limit[(f[x+h]-f[x])/h,h->0]

Limit[(Sin[x+h]-Sin[x])/h,h->0]

Note that this last one was the derivative of the Sin function.

Limit[(Exp[x+h]-Exp[x])/h,h->0]

Note that the derivative of (e^x) is (e^x).  This is the only function that is it’s own derivative.

Next, let’s look at the built in Mathematica commands for taking derivatives.  Look up the D command in the documentation center.  Note the form that the command takes.  For example:

D[f[x],x]

is the derivative of the function we fist defined above.  Note that we get the same answer from the D command as we did from the limit-quotient.  Now look up the Derivative command in the help.  Note that this command differentiates functions, while the D command differentiates expressions.

Derivative[1][f]
Derivative[1][f][x]

Note the form of output for the Derivative command is a function that can be evaluated.  Also note that the “prime” notation works in Mathematica:

f'[x]

Name: 
PIN:

Task

Now you try some.  Remember that you can open a new notebook to do your work, clear all previous definitions by Quitting the Kernel and use print preview to print only this part of this notebook.

1a.  Define the function f(x)=(1/((x^2)+4))in Mathematica.
1b.  Use Mathematica’s Simplify command on the quotient ((f(x+h)-f(x))/h) and copy the result in the blank below:




1c.  Now use Mathematica to fine the limit as h→0 of the result in 1b and write the result:




1d.  Verify that the commands D and Derivative return the same result and then use the Plot command to graph both the function and it’s derivative on the same axis.  Sketch the graphs below (label the axes and mark which graph is f and which is f’ ):

2a.  Now define g(x)=(x^4)+3(x^2)+2 in Mathematica and use the derivative commands to find g', g'', and g'''.  Write the results below.







2b.  Graph these four functions with x∈[-2, 2] and sketch the graph below (label each graph).