# Calculus/Extrema and Points of Inflection

 ← L'Hôpital's rule Calculus Newton's Method → Extrema and Points of Inflection
The four types of extrema.

Maxima and minima are points where a function reaches a highest or lowest value, respectively. There are two kinds of extrema (a word meaning maximum or minimum): global and local, sometimes referred to as "absolute" and "relative", respectively. A global maximum is a point that takes the largest value on the entire range of the function, while a global minimum is the point that takes the smallest value on the range of the function. On the other hand, local extrema are the largest or smallest values of the function in the immediate vicinity.

In many cases, extrema look like the crest of a hill or the bottom of a bowl on a graph of the function. A global extremum is always a local extremum too, because it is the largest or smallest value on the entire range of the function, and therefore also its vicinity. It is also possible to have a function with no extrema, global or local: ${\displaystyle y=x}$ is a simple example.

At any extremum, the slope of the graph is necessarily 0 (or is undefined, as in the case of ${\displaystyle -|x|}$), as the graph must stop rising or falling at an extremum, and begin to head in the opposite direction. Because of this, extrema are also commonly called stationary points or turning points. Therefore, the first derivative of a function is equal to 0 at extrema. If the graph has one or more of these stationary points, these may be found by setting the first derivative equal to 0 and finding the roots of the resulting equation.

The function ${\displaystyle f(x)=x^{3}}$ , which contains a saddle point at the point ${\displaystyle (0,0)}$.

However, a slope of zero does not guarantee a maximum or minimum: there is a third class of stationary point called a saddle point. Consider the function

${\displaystyle f(x)=x^{3}}$

The derivative is

${\displaystyle f'(x)=3x^{2}}$

The slope at ${\displaystyle x=0}$ is 0. We have a slope of 0, but while this makes it a stationary point, this doesn't mean that it is a maximum or minimum. Looking at the graph of the function you will see that ${\displaystyle x=0}$ is neither, it's just a spot at which the function flattens out. True extrema require a sign change in the first derivative. This makes sense - you have to rise (positive slope) to and fall (negative slope) from a maximum. In between rising and falling, on a smooth curve, there will be a point of zero slope - the maximum. A minimum would exhibit similar properties, just in reverse.

Good (B and C, green) and bad (D and E, blue) points to check in order to classify the extremum (A, black). The bad points lead to an incorrect classification of A as a minimum.

This leads to a simple method to classify a stationary point - plug x values slightly left and right into the derivative of the function. If the results have opposite signs then it is a true maximum/minimum. You can also use these slopes to figure out if it is a maximum or a minimum: the left side slope will be positive for a maximum and negative for a minimum. However, you must exercise caution with this method, as, if you pick a point too far from the extremum, you could take it on the far side of another extremum and incorrectly classify the point.

## The Extremum TestEdit

A more rigorous method to classify a stationary point is called the extremum test, or 2nd Derivative Test. As we mentioned before, the sign of the first derivative must change for a stationary point to be a true extremum. Now, the second derivative of the function tells us the rate of change of the first derivative. It therefore follows that if the second derivative is positive at the stationary point, then the gradient is increasing. The fact that it is a stationary point in the first place means that this can only be a minimum. Conversely, if the second derivative is negative at that point, then it is a maximum.

Now, if the second derivative is 0, we have a problem. It could be a point of inflexion, or it could still be an extremum. Examples of each of these cases are below - all have a second derivative equal to 0 at the stationary point in question:

• ${\displaystyle y=x^{3}}$  has a point of inflexion at ${\displaystyle x=0}$
• ${\displaystyle y=x^{4}}$  has a minimum at ${\displaystyle x=0}$
• ${\displaystyle y=-x^{4}}$  has a maximum at ${\displaystyle x=0}$

However, this is not an insoluble problem. What we must do is continue to differentiate until we get, at the ${\displaystyle (n+1)}$ th derivative, a non-zero result at the stationary point:

${\displaystyle f'(x)=0\ ,\ f''(x)=0\ ,\ \ldots \ ,\ f^{(n)}(x)=0\ ,\ f^{(n+1)}(x)\neq 0}$

If ${\displaystyle n}$  is odd, then the stationary point is a true extremum. If the ${\displaystyle (n+1)}$ th derivative is positive, it is a minimum; if the ${\displaystyle (n+1)}$ th derivative is negative, it is a maximum. If ${\displaystyle n}$  is even, then the stationary point is a point of inflexion.

As an example, let us consider the function

${\displaystyle f(x)=-x^{4}}$

We now differentiate until we get a non-zero result at the stationary point at ${\displaystyle x=0}$  (assume we have already found this point as usual):

${\displaystyle f'(x)=-4x^{3}}$
${\displaystyle f''(x)=-12x^{2}}$
${\displaystyle f'''(x)=-24x}$
${\displaystyle f^{(4)}(x)=-24}$

Therefore, ${\displaystyle n+1}$  is 4, so ${\displaystyle n}$  is 3. This is odd, and the fourth derivative is negative, so we have a maximum. Note that none of the methods given can tell you if this is a global extremum or just a local one. To do this, you would have to set the function equal to the height of the extremum and look for other roots.

## Critical PointsEdit

Critical points are the points where a function's derivative is 0 or not defined. Suppose we are interested in finding the maximum or minimum on given closed interval of a function that is continuous on that interval. The extreme values of the function on that interval will be at one or more of the critical points and/or at one or both of the endpoints. We can prove this by contradiction. Suppose that the function ${\displaystyle f(x)}$  has maximum at a point ${\displaystyle x=c}$  in the interval ${\displaystyle (a,b)}$  where the derivative of the function is defined and not ${\displaystyle 0}$  . If the derivative is positive, then ${\displaystyle x}$  values slightly greater than ${\displaystyle c}$  will cause the function to increase. Since ${\displaystyle c}$  is not an endpoint, at least some of these values are in ${\displaystyle [a,b]}$  . But this contradicts the assumption that ${\displaystyle f(c)}$  is the maximum of ${\displaystyle f(x)}$  for ${\displaystyle x}$  in ${\displaystyle [a,b]}$  . Similarly, if the derivative is negative, then ${\displaystyle x}$  values slightly less than ${\displaystyle c}$  will cause the function to increase. Since ${\displaystyle c}$  is not an endpoint, at least some of these values are in ${\displaystyle [a,b]}$  . This contradicts the assumption that ${\displaystyle f(c)}$  is the maximum of ${\displaystyle f(x)}$  for ${\displaystyle x}$  in ${\displaystyle [a,b]}$  . A similar argument could be made for the minimum.

### Example 1Edit

Consider the function ${\displaystyle f(x)=x}$  on the interval ${\displaystyle [-1,1]}$  . The unrestricted function ${\displaystyle f(x)=x}$  has no maximum or minimum. On the interval ${\displaystyle [-1,1]}$  , however, it is obvious that the minimum will be ${\displaystyle -1}$  , which occurs at ${\displaystyle =-1}$  and the maximum will be ${\displaystyle 1}$ , which occurs at ${\displaystyle x=1}$  . Since there are no critical points (${\displaystyle f'(x)}$  exists and equals ${\displaystyle 1}$  everywhere), the extreme values must occur at the endpoints.

### Example 2Edit

Find the maximum and minimum of the function ${\displaystyle f(x)=x^{3}-2x^{2}-5x+6}$  on the interval ${\displaystyle [-3,3]}$  .
First start by finding the roots of the function derivative:

${\displaystyle f'(x)=3x^{2}-4x-5=0}$
${\displaystyle x={\frac {2\pm {\sqrt {19}}}{3}}}$
Now evaluate the function at all critical points and endpoints to find the extreme values.
${\displaystyle f(-3)=-24}$
${\displaystyle f({\frac {2-{\sqrt {19}}}{3}})={\frac {56+38{\sqrt {19}}}{27}}\approx 8.2088}$
${\displaystyle f({\frac {2+{\sqrt {19}}}{3}})={\frac {56-38{\sqrt {19}}}{27}}\approx -4.0607}$
${\displaystyle f(3)=0}$
From this we can see that the minimum on the interval is -24 when ${\displaystyle x=-3}$  and the maximum on the interval is ${\displaystyle {\frac {56+38{\sqrt {19}}}{27}}}$  when ${\displaystyle x={\frac {2-{\sqrt {19}}}{3}}}$

See "Optimization" for a common application of these principles.

 ← L'Hôpital's rule Calculus Newton's Method → Extrema and Points of Inflection