Graphical Relationship Between Polynomial Functions and the Derivative

by Daniel C. Jones

Brief Description

The purpose of this lesson is to show the relationship between the first derivative and the graph of the polynomial function.  Mathematica  will allow us to plot the function, the derivative, and the slope of the graph at several discrete points.

Polynomial Functions

We'll begin by using the equation f(x) = (x^3)- 6 (x^2)- 45 x +162, and showing the graph of f(x).

f[x_] = (x^3) - 6 (x^2) - 45 x + 162; Plot[{f[x]}, {x, -8.3, 11.7}, 
      PlotStyle 
        -> {RGBColor[1, 0, 0], PlotRange -> {-400, 400}, 
          AspectRatio -> 0.5}];

Notice that the graph crosses the x-axis three time indicating that the function has three real zeros.  Can you think of a relationship between the order of the function and the number of real zeros of a polynomial function?

If the function has order n, it can have no more than n real roots.

The Derivative

Now lets take a look at the derivative of the function.  What is the derivative of 
f(x) =     (x^3) - 6  (x^2) - 45x + 162 ?

f'[x]

The first derivative of the function is 3  (x^2) - 12x - 45.

Now let's graph the derivative with the function.

Plot[{f[x],f'[x]},{x, -10, 15},PlotStyle -> {RGBColor[1, 0, 0], RGBColor[0, 1, 0]},PlotRange -> {-400, 400},AspectRatio ->  .9];

Note that the function is plotted in red and the first derivative appears in green.  Do you notice any relationships between the value of the first derivative and the slope of the function?

Right, where the first derivative of the function is positive, the slope of the graph is also positive and where the value of the first derivative is negative, the slope is negative.

What happens where the graph of the derivative equals zero?

Where the first derivative equals zero a critical point occurs, and the slope equals zero.  Three possibilities can occur:

1.  The slope changes from positive to negative, a maximum occurs, and looks like this at x = 2:

Clear[p, x]p[x_] = -(x^2) + 4 x - 2; Plot[p[x], {x, 0, 4}, PlotStyle -> RGBColor[0, 1, 0]];

2.  The slope changes from negative to positive, a minimum occurs, and looks like this at x = 2:

Clear[p, x]p[x_] = (x^2) - 4 x + 2; Plot[p[x], {x, 0, 4}, PlotStyle -> RGBColor[0, 1, 0]];

3.  The slope goes from positive (negative) to zero and back to positive (negative), called an inflection point, looks like this at x = 0:

Clear[p, x]p[x_] = (x^3); Plot[p[x], {x, -2, 2}, AspectRatio ->  .9, 
      PlotStyle -> RGBColor[0, 1, 0]];

Tangent Lines

And now back to our function!  Finally, we'll select points along the graph of our function, and plot the derivative at those points.

Notice the value of the slope and its the  relationship with the blue tangent lines.  What happens when we plot the points and slope of the curve at those points?

Low and behold, we get tangent lines at those points!  Therefore, the first derivative at points along our function give us a tangent line at that point.