# Critical Points

This is a Helper Page for:

## Critical Points in Single Variable Calculus

In this section, we will assume that we're working with differentiable functions only.

In single-variable calculus, a critical point is a point where a function's first derivative is zero or undefined.

### First derivative as slope

To understand critical points, we need have a sense of what a derivative is.

The derivative of a function describes the way one quantity changes in relationship to another. Let's say we have a function that gives the population size of a community of rabbits based on the number of wolves living in the region. The derivative of this function would tell us how the rabbit population changes as the wolf population changes. If the derivative is negative for some number of wolves, that means that as more wolves enter the area, the rabbit population goes down. If the derivative is positive, it means that as more wolves enter the area, the rabbit population goes up. If the derivative is zero, as it is at a critical point, that wolf population produces a stable rabbit population - an equilibrium.

When we graph functions, we usually think of the first derivative as being the slope of the tangent line. A tangent line is a line that shares only one point in common with the function you're looking at. The tangent line measures the way the y value changes with respect to the x value. The image below is a graph of the parabola $y = x^2$, with tangent lines drawn in at the points $(-2.5, 6.25)$, $(0,0)$, and $(2.5, 6.25)$. If we connect this image to our population example, the x values would be the size of the wolf population, the y values would be the size of the rabbit population, and the derivatives give us the rates of change.

At $x = -2.5$, the first derivative is $-5$, and so is the slope of the tangent line. At $x = 2.5$, the derivative and the slope are both $5$. At $x = 0$, the line is horizontal, demonstrating that the derivative at this point is $0$. Since the tangent line there has a slope of $0$, the point $(0,0)$ is a critical point of the function $f(x) = x^2$.

A good way to find critical points on a graph, therefore, is to find points where a tangent line would have a slope of $0$, or where a tangent line would be vertical (this corresponds to the derivative being undefined).

### First derivative test

Critical points are closely related to the first derivative test, which uses critical points and slopes to find local maximums and minimums of a function without graphing the function.

If we have a function $f(x)$, we can use calculus to find its derivative function $f'(x)$. The derivative function is related to the tangent lines we talked about in the last section: when you plug an $x$ value into $f'(x)$, the output is the slope of the line that is tangent to our original function at that x value. In our example above, the derivative function for our parabola returns $5$ when $x = 2.5$ and $-5$ when $x = -2.5$.

We begin the first derivative test by solving the equation $f'(x) = 0$ to find all the points where the slope of the tangent line is zero - these are our critical points. We also check for points where $f'(x)$ is undefined, as these are critical points as well.

Next, we plot the critical points on a number line. We then test each interval between the critical points by finding the derivative of any point in that interval, and mark whether the derivative was positive or negative on the number line. Since the signs correspond to the slope of the tangent lines in this interval, and slope can't change from positive to negative without going through zero, we only need to test one point in each interval.

Let's work with the function $f(x) = \frac{x^4}{4} + \frac{x^3}{3} - 3x^2 + 2$. The derivative of this function is $f'(x) = x^3 + x^2 - 6x$, which in factored form is $f'(x) = (x+3)(x)(x-2)$. The derivative is a polynomial, so it exists everywhere, and we only have to worry about critical points occurring where $f'(x) = 0$. This happens whenever one of the three factors is zero, so $f'(x)=0$ at $x=-3$, $x=0$, and $x=2$. We plug these three values for $x$ into $f(x)$ to find the y-coordinates of our critical points. The picture below shows these three critical points plotted on a number line:

Next, we test a point in each interval. When we plug $x = -3.5$ into $f'(x)$, we get a negative derivative as our result. When we plug in $x = -2$, the derivative is positive. For $x = 1$, the derivative is negative, and for $x = 2.5$, it's positive. These positives and negatives are shown above the number line in the image above, and lines with positive and negative slopes (representing the lines that are tangent to the function in that interval) are shown above the signs.

Now that we know how the function behaves on either side of every critical point, we can figure out if each critical point is a local maximum or a local minimum. If the slopes to the left of a critical point are positive and the slopes to the right are negative, then the critical point is a maximum. If the slopes to the left are negative and the slopes to the right are positive, then the critical point is a minimum.

Our number line tells us that the points $(-3, -\frac{55}{4})$ and $(2, -\frac{10}{3})$ are local minimums, and that the point $(0, 2)$ is a local maximum. The image below shows our function, $f(x) = \frac{x^4}{4} + \frac{x^3}{3} - 3x^2 + 2$, graphed along with its tangent lines at the critical points and the test points we used:

Sometimes the slopes on either side of a point have the same sign. In this case, the first derivative test tells us that the point is neither a maximum nor a minimum, and other methods must be used to fully understand what's happening at the point.

## Critical Points in Multivariable Calculus

In multivariable calculus, a critical point is a point where a function's gradient is either 0 or undefined.

### Finding critical points

To find the critical points of a function in several variables, we first find the function's gradient. Points for which the gradient is zero or undefined are critical points. If the partial derivatives are defined everywhere, we can simply set each partial derivative in the gradient equal to zero, and solve the system of equations. If the partials aren't defined everywhere, we need to identify every point where either one is undefined.

Let's try this with the function below:

$f(x,y) = x^2 - 2x + y^2 - 6y + 12$

$\nabla f = \left( \frac{\partial f}{\partial x} , \frac{\partial f}{\partial y}\right)$
$= (2x - 2 ,~ 2y - 6)$

Since both partials are polynomials, they're defined everywhere, so we set them equal to zero and solve:

 $2x - 2 = 0$ $2x = 2$ $x = 1$ $2y - 6 = 0$ $2y = 6$ $y = 3$

So our function has a critical point where $x = 1$ and $y = 3$. To identify the actual point, we plug these values back into $f(x,y)$ and solve for the $z$ coordinate of that point:

$f(x,y) = x^2 - 2x + y^2 - 6y + 12$
$f(1,3) = 1^2 - 2(1) + 3^2 - 6(3) + 12$
$= 1 - 2 + 9 - 18 + 12$
$= 2$

The critical point, then, is at $(1,3,2)$. This point is shown in the graph below:

### Classifying critical points

As in single variable calculus, multivariable critical points are typically local maximums or minimums of the function.

One way to determine whether a point is a maximum or a minimum is to graph the function. In the previous section, the graph showed us that the critical point we found was a minimum, because all the points around it were higher than it. If the graph shows that all of the points around a critical point are lower than it, then that point is a maximum.

Some critical points are neither maximums nor minimums. In the picture below, the point $(0,0,0)$ is a critical point for the function $f(x,y) = y^2 - x^2$, but we can see that this point is not a maximum or a minimum. If we look at the cross section along the line $y = 0$, we get the parabola $f(x) = -x^2$, for which the point $(0,0)$ is a maximum. But if we look at the cross section along the line $x = 0$, we get the parabola $f(y) = y^2$, for which the point $(0,0)$ is a minimum. A point like this, which is a maximum along some cross sections but a minimum along others, is called a saddle point.