The derivative is a calculus superpower that gives great insights into functions. The first and second derivatives allow us to find the function’s local minima and maxima, known as critical points, as well as the function’s inflection points. This article will show you exactly how to use derivatives to find critical points and the importance of it.
A critical point of a function is a point at which the first derivative of this function either equals zero or is undefined. Local extrema always occur at critical points, while inflection points may or may not occur at critical points. Let’s take a moment to consider why this actually makes sense with the help of some images.
Let’s start with a very simple function, $f(x)=x^2-1$. We see that the function’s minimum is at the point $(0,-1)$.
Now let’s take a look at the first derivative of this function, $f’(x)=2x$, and see how it behaves at $x=0$.
As we can see, the first derivative equals 0 at $x=0$, the function’s minimum.
So why is this the case? The derivative of a function is equal to its slope, so when the derivative equals zero, the function’s slope also equals zero. A slope of zero means that the curve is flat at that point, and a parabola is “flat” only at the vertex, which is a local minimum if the parabola opens up and a local maximum if the parabola opens down.
This example is relatively simple, as it only has one critical point, but together we will work through some more difficult problems with greater numbers of critical points to understand how to calculate critical points using derivatives.
Step One: Finding Zeros of the First Derivative
The first step in finding critical points is to find the points at which a function’s derivative equals zero. As an example problem, let’s use the function:
$$f(x)=x^3+4x^2-3x+4$$
First, we will use the power rule to find the first derivative of this function:
$$f'(x)=3x^2+8x-3$$
Now factor f'(x) in order to find its roots:
$$f'(x)=(3x-1)(x+3)=0$$
$$x=\frac{1}{3}, -3$$
These two values are the $x$-coordinates of the critical points.
Step Two: Find Where Derivative is Undefined
Critical points also occur at points where the first derivative is undefined. An example of this could be a sharp corner or a discontinuity.
Polynomials have continuous first derivatives which are defined everywhere, so we do not need to do anything for this step, but it is always important to check so that you don’t miss a critical point.
Step Three: Classify Critical Points
Now that we have calculated the $x$-coordinates of our two critical points, we can use the second derivative test to classify critical points as local maxima or local minima and find the inflection points. To do this, we must find the second derivative of our function:
$$f’’(x)=6x+8$$
The Second Derivative Test states that if $f’(a)=0$ and $f’’(a)<0$, then $a$ is a local maximum, and if $f’(a)=0$ and $f’’(a)>0$, then $a$ is a local minimum. This makes sense, because if the second derivative is negative, then the slope of the function is decreasing, so a local maximum occurs. When the second derivative is positive, the slope is increasing, so a local minimum occurs. If the second derivative equals zero, then the first derivative is neither increasing nor decreasing, so the test is inconclusive. For example, the second derivative of a straight line is $0$ everywhere and a line has no extrema. Let’s use the second derivative on our polynomial function:
$$f’’(-3)=6(-3)+8=-10<0$$
$$f’’(\frac{1}{3})=6(\frac{1}{3})+8=10>0$$
As you can see, through the second derivative test we have shown that our first critical point, $x=-3$, is a local maximum, and our second, $x=\frac{1}{3}$, is a local minimum.
Now let’s graph the function to confirm our results. Here is a graph with the original function in red and its first derivative in blue:
As you can see, at $x=-3$ $f(x)$ has a local maximum, and $f’(x)=0$ and at $x=\frac{1}{3}$ $f(x)$ has a local minimum and $f’(x)=0$. We were correct!
Optional Step: Inflection Points
Inflection points are the points where the second derivative changes sign. These can be found by solving for when the second derivative equals zero. Inflection points are important for understanding the shape of a graph, as they can show how the overall trend of a function begins to change. Let’s use the previous example with a second derivative of $f’’(x)=6x+8$. We can now solve for the zeros:
$$0=6x+8\Rightarrow -8=6x\Rightarrow \frac{-4}{3}=x$$
If we look at the graph of $f(x)$, $x = \frac{-4}{3}$ corresponds to where the function begins to slope back up to the local minima. This is useful when attempting to sketch the function given just the equation.
Additional Example
Now let’s take a look at a function that will present us with a different kind of critical point:
$$f(x)=\left|2x+6\right|$$
We know that this is a transformation of the graph of $y = |x|$, which has a local extremum at a corner. If we’re careful in examining the graph, we see that we can describe the function piecewise:
$$ f(x) = \begin{cases} -2x + 6 & \text{if } x < -3 \\ 2x + 6 & \text{if } x \geq -3 \end{cases} $$
It is clear that $f’(x) = -2 < 0$ for $x < -3$ and $f’(x) = 2 > 0$ for $x>0$. However, $f’(x)$ is undefined at $x = -3$, see the graph below. This is an example of a case when $f’(x)$ fails to exist, yet the function has an extremum (local minimum, in this case).
There is a way to take this derivative more formally that can be applicable to other situations, but it is very complicated. First, we write $\frac{df}{dx}=\frac{x}{\left|x\right|}$. Using this we can make a $u$-substitution where $u=2x+6$ and then use the Chain Rule:
$$\frac{df}{dx}=\frac{df}{du}*\frac{du}{dx}=\frac{u}{\left|u\right|}*2=\frac{2u}{\left|u\right|}$$
Now if we substitute $u=2x+6$ back into the expression we get:
$$\frac{df}{dx}=\frac{4x+12}{\left|2x+6\right|}$$
The numerator is equal to $0$ only at $x=-3$, but at this point the denominator is also equal to $0$. This means that at $x=-3$, $\dfrac{df}{dx}$ is undefined and, therefore, our function has a critical point, which happens to be a local minimum, but we wouldn’t be able to determine this by using the second derivative test.
Let’s take a look at the graphs to again see how this works visually. In this picture, $y=\left|2x+6\right|$ is in red and $y=\frac{df}{dx}$ is in blue:
As expected, $\frac{df}{dx}$ is discontinuous at $x=-3$ and that is reflected in both the original equation, with a sharp turn, and in the jump in the graph of the derivative.
Conclusion
In conclusion, we would like to summarize that the first and second derivative can be used to help sketch a function by identifying its local maxima and minima, inflection points and a rough shape of the function.