Mathematics 161                                  Laboratory 5                             October 1, 1992
	  
Name: _____________________________   Lab Partner: ___________________________
	  
Consulted with:  ____________________________________________________________

© Lafayette College, 1994

Properties of Derivatives

In this laboratory you will use Mathematica's symbolic differentiation and graphing facilities to begin exploring some properties of derivatives.

Part 0: Differentiation by Rules

Preliminaries

As in last week's lab, we will use some special commands contained in the "DerivativeGraphics" package; recall, we input the package as follows:

<<i:\course\root\math161\derivative.m

Syntax for Differentiation in Mathematica

Let's define a function to differentiate.  We will begin with one whose derivative we know:  f(x) = x2 – 4 x + 4.  In Mathematica we enter f[x_] := x^2 - 4 x + 4.  What is the derivative of this function?



To compute the derivative in Mathematica, there are two basic notations:  corresponding to Dx f(x) is the notation

D[f[x],x]

This is the most reliable method of differentiating in Mathematica, since it spells out exactly which derivative to take.  Prime notation can be used as well:

f'[x]

The prime is a single quote mark, the key between the semicolon and the Enter keys.

Part 1:  Symbolic Differentiation

Define the quadratic function q[x_] := a x^2 + b x + c in Mathematica.  What is the derivative of this function of x?

Enter the following differentiation commands, and explain what the results mean.

D[q[x], x]

D[q[t], x]

D[q[t], t]

D[q[x], a]

Enter the assignment y = q[x], and then the following differentiation commands, and explain the results.

D[y, x]

D[y, t]

q'[t]

y'

Part 2: The Sign of the Derivative

(a) Plot the graph of the function c(x) = x3 – 3x + 2 over the interval [–3,3].  Notice that as we move from left to right along the x-axis, the graph of c "rises" until we reach x = –1, then the graph "falls" until we reach x = 1, where the graph begins to "rise" again.  In different words, c(x) is increasing for x < –1 and for x > 1, while c(x) is decreasing for –1 < x < 1.

(b) Use Plot[{c[x],c'[x]}, {x,-3,3}, PlotStyle->{Red, Blue}]  to plot the graphs of c and c' on the same set of axes.  Use the plot to answer the following questions:

i)	What is the sign of c' in the intervals where c(x) is increasing?

ii)	What is the sign of c' in the interval where c(x) is decreasing?

(c)	Modify the Plot command from part (b) for the function g(x) = x2 – 2x – 3 and its derivative.  Use the interval [–2,4] for your plot.

i)  On what interval(s) is g increasing? What is the sign of g' there?

ii)  On what interval(s) is g decreasing? What is the sign of g' there?

Based on your investigations in this part, make a conjecture on the relationship between graph of any function f and the sign of its derivative.  Support your conjecture with reasoning beyond the "empirical evidence" you collected above.

Part 3:  Tangent Lines, Secant Lines, & Velocity

In this part of the lab, h is the function h(t) = t/(t+1).  Define it in Mathematica now.

(a) The command SecantLine[h, 0, 5, {x, -1/2, 6}] will generate a plot of the graph of h and the secant line for the graph passing through (0, h(0)) and (5, h(5)).  Assign this plot the name plot1 by entering plot1 = %.  (Mathematica will respond with -Graphics-, indicating it has assigned a graphic image as the "value" of plot1.)

(b)	Use Mathematica to determine the exact slope of the secant line in this plot. (Do not try to read coordinates off the plot; use the two points on the line whose coordinates you know.)  The slope is:

(c) Then find a point c in the interval 0 < t < 5 where the tangent line to the graph of h is parallel to that secant line.  (Use Mathematica's Solve command for this computation.  Recall, this command has the form  Solve[expr1 == expr2, var]  where you are trying to solve the equation  expr1 = expr2  for the variable var.)  A satisfactory c is:

(d)	The command TangentLine[h, c, {x, -1/2, 6}] will generate a plot of the graph of h and the tangent line at the point c.  (You must substitute the value for c you have found in order for the command to work.)  Assign this plot the name plot2.  To see the secant line and the tangent line on the same plot, enter Show[plot1, plot2].  Print out this plot and, based on the plot, answer the following question: do the two lines have the same slope?  Explain how you can tell.

(e)	Suppose now that the function h(t) is the position function of an object moving along a coordinate line.  Interpret the equality of slopes of the two lines in terms of the velocity of that object.  Your response should require only one or two sentences.