next up previous
Next: About this document ... Up: lab_template Previous: lab_template


First and second derivative tests

Critical points

To find critical points you use the first derivative to find where the slope is zero or undefined.
> f:=x->x^3-3*x+1;
> plot(f(x),x=-3..3);
> solve(D(f)(x)=0,x);
Where the function has a denominator remember to check where the derivative is undefine as well as zero.
> g:=x->x^4/(7*x+5);
> plot(g(x),x=-3..3,y=-3..3);
> solve(D(g)(x)=0,x);
> solve(D(g)(x)=infinity);
The above command doesn't work so enter the denominator (using the denom command to single out the denominator) or reciprocal equal to zero. That is the same as the equation equal to infinity.
> solve(denom((D(g))(x)) = 0, x);
> solve(1/D(g)(x)=0,x);
So, the function $f$ has two critical values and the function $g$ has three critical values.

First derivative test

To check for maximum and minimum values using the first-derivative test, check the INTERVALS between the critival values. Using $g(x)$ as our example, we know there are three critical values therefore there are four intervals that need to be checked. You want to know if the function is going uphill or downhill on the interval so you must plug into the slope which is the FIRST derivative.
> D(g)(-5); D(g)(-6/7); D(g)(-1/2); D(g)(5);
It is only the positive or negative sign that is important. The function increases on the interval $x = ( - \infty, - \frac{20}{21})$, then decreases on the interval $x =( - \frac{20}{21}, 0)$, and finally increases on the interval $x = (0, \infty)$. Therefore, there is a maximum at $x= -\frac{10}{7}$ and a minimum at $x=0$.

Second derivative test

To find the same maximum and minimum values using the second-derivative test simply plug the critical points into the SECOND derivative to check concavity. (Do not use interval values.)
> D[1,1](g)(-20/21); D[1,1](g)(-5/7); D[1,1](g)(0);
(Note the [1,1] is the syntax for the second derivative NOT the point) Only $x = -\frac{20}{21}$ and $x=0$ have concavity. Therefore, there is a maximum at $x = -\frac{20}{21}$ and a minimum at $x=0$.

Absolute Extrema

Absolute extrema is the easiest because all that is important is what is the highest and lowest $y$ value. The surrounding slope and concavity are not important. Therefore all you need to do is check the y-values. Using $f(x)$ as our example, this time the question will be what is the ABSOLUTE extrema of $f(x)$ on the interval $-2.5 \leq x \leq 1.5$. Using the critical points:
> solve(D(f)(x)=0,x);
and the two endpoints $x = -2.5$ and $x = 1.5$.Simply find the four y values and pick the highest and lowest value.
> f(-2.5); f(-1); f(1); f(1.5);
Therefore, the ABSOLUTE extrema are (-2.5, -7.13) and (-1, 3).


  1. For the function $\displaystyle f(x) = \frac{x^2-3x+5}{x^2-1}$
    Find ALL critical values and state them in text.
    Use the first derivative test to find intervals on which $f$ is increasing and intervals on which it is decreasing without looking at a plot of the function.

  2. Without plotting the function $\displaystyle g(x)=\frac{x^4+3}{x^2+1}$, find all critical points and then classify each point as a relative maximum or a relative minimum using the second derivative test. Be sure to find corresponding $y$ values for each critical value. (You do not need to consider where the derivative is undefined here because there could never be a relative extrema at a point where $g'$ is undefined.)

  3. Find the absolute extrema for the function $\displaystyle h(x)=x\cos(x)-\frac{x^2}{3}+x+7$ on the closed interval $[1,7]$ without plotting the function. Plot the derivative of the function and use fsolve to help you find critical values.

next up previous
Next: About this document ... Up: lab_template Previous: lab_template
Jane E Bouchard