# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/derivative-function/extrema-maximum-and-minimum-value
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/derivative-function/extrema-maximum-and-minimum-value/en.mdx

Learn finding extrema using derivatives. Learn first and second derivative tests to identify critical points, maximum and minimum values with visual examples.

---

## Understanding Extreme Points

In everyday life, we often look for the "best" value, like the biggest profit, the smallest cost, or the shortest distance. In mathematics, these optimal values are known as **extreme values**, which consist of **maximum values** and **minimum values**. The points where these values occur are called **extreme points**.

These extreme points are closely related to stationary points, which are points where the gradient of the curve is zero (<InlineMath math="f'(x)=0" />). There are two main ways to test and determine the type of a stationary point: the First Derivative Test and the Second Derivative Test.

## First Derivative Test

This method focuses on the change in the function's behavior, i.e., whether it's increasing or decreasing, around a stationary point. By observing the sign of <InlineMath math="f'(x)" />, we can identify the type of stationary point.

-   **Maximum Turning Point:** Occurs if the function changes from **increasing to decreasing**. This means the sign of <InlineMath math="f'(x)" /> changes from **positive (+) to negative (-)**. Think of it as the peak of a hill.

-   **Minimum Turning Point:** Occurs if the function changes from **decreasing to increasing**. The sign of <InlineMath math="f'(x)" /> changes from **negative (-) to positive (+)**. This is like the bottom of a valley.

-   **Horizontal Inflection Point:** Occurs if the function does not change direction (it continues to increase or decrease). The sign of <InlineMath math="f'(x)" /> does not change (positive to positive or negative to negative).

Visible text: - **Maximum Turning Point:** Occurs if the function changes from **increasing to decreasing**. This means the sign of <InlineMath math="f'(x)" /> changes from **positive (+) to negative (-)**. Think of it as the peak of a hill.

- **Minimum Turning Point:** Occurs if the function changes from **decreasing to increasing**. The sign of <InlineMath math="f'(x)" /> changes from **negative (-) to positive (+)**. This is like the bottom of a valley.

- **Horizontal Inflection Point:** Occurs if the function does not change direction (it continues to increase or decrease). The sign of <InlineMath math="f'(x)" /> does not change (positive to positive or negative to negative).

Take a look at the visualization below to understand the concept of turning points.

Component: LineEquation
Props:
- title: First Derivative Test Visualization
- description: A visualization of the turning point concept. The horizontal helper lines
show a zero gradient at the maximum and minimum points.
- showZAxis: false
- cameraPosition: [0, 2, 18]
- data: [
{
points: Array.from({ length: 41 }, (_, i) => {
const x = -2 + i * 0.1;
return { x: x - 3, y: -(x ** 2) + 4, z: 0 };
}),
color: getColor("TEAL"),
showPoints: false,
},
{
points: [{ x: -3, y: 4, z: 0 }],
color: getColor("AMBER"),
showPoints: true,
labels: [{ text: "Maximum", offset: [0, 0.5, 0] }],
},
{
points: [
{ x: -4, y: 4, z: 0 },
{ x: -2, y: 4, z: 0 },
],
color: getColor("VIOLET"),
showPoints: false,
smooth: false,
},
{
points: Array.from({ length: 41 }, (_, i) => {
const x = -2 + i * 0.1;
return { x: x + 3, y: x ** 2, z: 0 };
}),
color: getColor("INDIGO"),
showPoints: false,
},
{
points: [{ x: 3, y: 0, z: 0 }],
color: getColor("ROSE"),
showPoints: true,
labels: [{ text: "Minimum", offset: [0, -0.75, 0] }],
},
{
points: [
{ x: 2, y: 0, z: 0 },
{ x: 4, y: 0, z: 0 },
],
color: getColor("VIOLET"),
showPoints: false,
smooth: false,
},
]

Let's apply this to an example. Determine the stationary values of the function $$f(x) = x(x-3)^2$$.

Visible text: Let's apply this to an example. Determine the stationary values of the function .

**Solution:**

**Step** $$1$$: Find the first derivative

Visible text: **Step** : Find the first derivative

First, let's expand the function: $$f(x) = x(x^2 - 6x + 9) = x^3 - 6x^2 + 9x$$.

Visible text: First, let's expand the function: .

Its derivative is:

```math
f'(x) = 3x^2 - 12x + 9
```

**Step** $$2$$: Find the stationary points

Visible text: **Step** : Find the stationary points

Set <InlineMath math="f'(x) = 0" />.

Component: MathContainer
Children:

```math
3x^2 - 12x + 9 = 0
```

```math
x^2 - 4x + 3 = 0
```

```math
(x-1)(x-3) = 0
```

The stationary points occur at $$x = 1$$ and $$x = 3$$.

Visible text: The stationary points occur at and .

**Step** $$3$$: Test the sign around the stationary points

Visible text: **Step** : Test the sign around the stationary points

-   **Around $$x = 1$$:** For $$x < 1$$ (e.g., $$x=0$$), <InlineMath math="f'(0) = 9" /> (positive). For $$x > 1$$ (e.g., $$x=2$$), <InlineMath math="f'(2) = -3" /> (negative). Since the sign changes from (+) to (-), $$x=1$$ is a maximum turning point.

-   **Around $$x = 3$$:** For $$x < 3$$ (e.g., $$x=2$$), <InlineMath math="f'(2) = -3" /> (negative). For $$x > 3$$ (e.g., $$x=4$$), <InlineMath math="f'(4) = 9" /> (positive). Since the sign changes from (-) to (+), $$x=3$$ is a minimum turning point.

Visible text: - **Around :** For (e.g., ), <InlineMath math="f'(0) = 9" /> (positive). For (e.g., ), <InlineMath math="f'(2) = -3" /> (negative). Since the sign changes from (+) to (-), is a maximum turning point.

- **Around :** For (e.g., ), <InlineMath math="f'(2) = -3" /> (negative). For (e.g., ), <InlineMath math="f'(4) = 9" /> (positive). Since the sign changes from (-) to (+), is a minimum turning point.

**Step** $$4$$: Determine the stationary values

Visible text: **Step** : Determine the stationary values

To get the turning point values ($$y$$-values), substitute the stationary point $$x$$-coordinates ($$x = 1$$ and $$x = 3$$) back into the *original* function $$f(x)$$.

Visible text: To get the turning point values (-values), substitute the stationary point -coordinates ( and ) back into the *original* function .

-   Maximum value: $$f(1) = 1(1-3)^2 = 4$$.

-   Minimum value: $$f(3) = 3(3-3)^2 = 0$$.

Visible text: - Maximum value: .

- Minimum value: .

So, the maximum turning point value of the function is $$4$$, which occurs at the point $$(1,4)$$, and its minimum turning point value is $$0$$, which occurs at the point $$(3,0)$$.

Visible text: So, the maximum turning point value of the function is , which occurs at the point , and its minimum turning point value is , which occurs at the point .

Component: LineEquation
Props:
- title: Extreme Points Visualization
- description: A visualization of the curve $$f(x) = x(x-3)^2$$ with
horizontal tangent lines at its maximum and minimum points.
  Visible text: A visualization of the curve with
horizontal tangent lines at its maximum and minimum points.
- showZAxis: false
- cameraPosition: [1.5, 2, 15]
- data: [
{
points: Array.from({ length: 101 }, (_, i) => {
const x = -0.5 + i * 0.05;
const y = x * Math.pow(x - 3, 2);
return { x, y, z: 0 };
}),
color: getColor("CYAN"),
showPoints: false,
},
{
points: [{ x: 1, y: 4, z: 0 }],
color: getColor("AMBER"),
showPoints: true,
labels: [{ text: "Maximum (1, 4)", offset: [0, 1, 0] }],
},
{
points: [
{ x: 0, y: 4, z: 0 },
{ x: 2, y: 4, z: 0 },
],
color: getColor("VIOLET"),
showPoints: false,
smooth: false,
},
{
points: [{ x: 3, y: 0, z: 0 }],
color: getColor("ROSE"),
showPoints: true,
labels: [{ text: "Minimum (3, 0)", offset: [0, -1, 0] }],
},
{
points: [
{ x: 2, y: 0, z: 0 },
{ x: 4, y: 0, z: 0 },
],
color: getColor("VIOLET"),
showPoints: false,
smooth: false,
},
]

## Second Derivative Test

This method is often faster because it doesn't require testing intervals. It uses the second derivative, <InlineMath math="f''(x)" />, to determine the concavity of the curve at a stationary point.

Suppose <InlineMath math="f'(c) = 0" />.

-   If <InlineMath math="f''(c) < 0" />, then $$f(c)$$ is a **maximum turning point value**. This means the curve is concave down at that point, like an upside-down bowl.

-   If <InlineMath math="f''(c) > 0" />, then $$f(c)$$ is a **minimum turning point value**. This means the curve is concave up at that point, like an open bowl.

-   If <InlineMath math="f''(c) = 0" />, this test **fails**, and we must go back to using the First Derivative Test. This point is likely an inflection point.

Visible text: - If <InlineMath math="f''(c) < 0" />, then is a **maximum turning point value**. This means the curve is concave down at that point, like an upside-down bowl.

- If <InlineMath math="f''(c) > 0" />, then is a **minimum turning point value**. This means the curve is concave up at that point, like an open bowl.

- If <InlineMath math="f''(c) = 0" />, this test **fails**, and we must go back to using the First Derivative Test. This point is likely an inflection point.

Determine the extreme values of $$f(x) = \frac{1}{3}x^3 - x^2 - 3x + 2$$ using the second derivative test.

Visible text: Determine the extreme values of using the second derivative test.

**Solution:**

**Step** $$1$$: Find the first and second derivatives

Visible text: **Step** : Find the first and second derivatives

Component: MathContainer
Children:

```math
f'(x) = x^2 - 2x - 3
```

```math
f''(x) = 2x - 2
```

**Step** $$2$$: Find the stationary points

Visible text: **Step** : Find the stationary points

Component: MathContainer
Children:

```math
x^2 - 2x - 3 = 0
```

```math
(x-3)(x+1) = 0
```

The stationary points occur at $$x = 3$$ and $$x = -1$$.

Visible text: The stationary points occur at and .

**Step** $$3$$: Test the stationary points with the second derivative

Visible text: **Step** : Test the stationary points with the second derivative

-   For $$x = 3$$: <InlineMath math="f''(3) = 2(3) - 2 = 4" />. Since $$4 > 0$$, this is a **minimum turning point value**.

-   For $$x = -1$$: <InlineMath math="f''(-1) = 2(-1) - 2 = -4" />. Since $$-4 < 0$$, this is a **maximum turning point value**.

Visible text: - For : <InlineMath math="f''(3) = 2(3) - 2 = 4" />. Since , this is a **minimum turning point value**.

- For : <InlineMath math="f''(-1) = 2(-1) - 2 = -4" />. Since , this is a **maximum turning point value**.

**Step** $$4$$: Calculate the extreme values

Visible text: **Step** : Calculate the extreme values

Substitute $$x=3$$ and $$x=-1$$ into the original function to get their extreme values.

Visible text: Substitute and into the original function to get their extreme values.

-   Minimum value: $$f(3) = \frac{1}{3}(3)^3 - (3)^2 - 3(3) + 2 = 9 - 9 - 9 + 2 = -7$$.

-   Maximum value: $$f(-1) = \frac{1}{3}(-1)^3 - (-1)^2 - 3(-1) + 2 = -\frac{1}{3} - 1 + 3 + 2 = \frac{11}{3}$$.

Visible text: - Minimum value: .

- Maximum value: .

If we look at the visualization below, the curve is concave down at the point $$x=-1$$ and concave up at the point $$x=3$$.

Visible text: If we look at the visualization below, the curve is concave down at the point and concave up at the point .

Component: LineEquation
Props:
- title: Second Derivative Test Visualization
- description: A graph of $$f(x) = \frac{1}{3}x^3 - x^2 - 3x + 2$$.
The helper lines mark the maximum point, where the curve is concave down, and the minimum point, where the curve is concave up.
The curve is concave down at the point $$x=-1$$ and concave up at the point $$x=3$$.
  Visible text: A graph of .
The helper lines mark the maximum point, where the curve is concave down, and the minimum point, where the curve is concave up.
The curve is concave down at the point and concave up at the point .
- showZAxis: false
- cameraPosition: [1, -2, 20]
- data: [
{
points: Array.from({ length: 101 }, (_, i) => {
const x = -2.5 + i * 0.08;
const y = (1 / 3) * x ** 3 - x ** 2 - 3 * x + 2;
return { x, y, z: 0 };
}),
color: getColor("SKY"),
showPoints: false,
},
{
points: [{ x: -1, y: 11 / 3, z: 0 }],
color: getColor("AMBER"),
showPoints: true,
labels: [{ text: "Maximum (-1, 11/3)", offset: [-1, 1, 0] }],
},
{
points: [
{ x: -2, y: 11 / 3, z: 0 },
{ x: 0, y: 11 / 3, z: 0 },
],
color: getColor("VIOLET"),
showPoints: false,
smooth: false,
},
{
points: [{ x: 3, y: -7, z: 0 }],
color: getColor("ROSE"),
showPoints: true,
labels: [{ text: "Minimum (3, -7)", offset: [1, -1, 0] }],
},
{
points: [
{ x: 2, y: -7, z: 0 },
{ x: 4, y: -7, z: 0 },
],
color: getColor("VIOLET"),
showPoints: false,
smooth: false,
},
]

## Exercises

1. Determine the stationary point for the function $$y = x^2 + 2x - 3$$.

Visible text: 1. Determine the stationary point for the function .

### Answer Key

1.  **Solution:**

    **Step** $$1$$: Find the first derivative

    <BlockMath math="f'(x) = 2x + 2" />

    **Step** $$2$$: Find the stationary point

    Set <InlineMath math="f'(x) = 0" />.

    
    
    ```math
    2x + 2 = 0 \implies x = -1
    ```

    **Step** $$3$$: Find the y-value

    Substitute $$x = -1$$ into the original function.

    
    
    ```math
    y = (-1)^2 + 2(-1) - 3 = 1 - 2 - 3 = -4
    ```

    So, the stationary point is $$(-1, -4)$$. With the Second Derivative Test (<InlineMath math="f''(x)=2 > 0" />), this point is a minimum.

Visible text: 1. **Solution:**

 **Step** : Find the first derivative

 <BlockMath math="f'(x) = 2x + 2" />

 **Step** : Find the stationary point

 Set <InlineMath math="f'(x) = 0" />.

 
 

 **Step** : Find the y-value

 Substitute into the original function.

 
 

 So, the stationary point is . With the Second Derivative Test (<InlineMath math="f''(x)=2 > 0" />), this point is a minimum.