# Nakafa Framework: LLM

URL: /en/subject/high-school/12/mathematics/derivative-function/extrema-maximum-and-minimum-value
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/12/mathematics/derivative-function/extrema-maximum-and-minimum-value/en.mdx

Output docs content for large language models.

---

import { LineEquation } from "@repo/design-system/components/contents/line-equation";
import { getColor } from "@repo/design-system/lib/color";

export const metadata = {
  title: "Extreme Points, Maximum and Minimum Turning Points",
  description: "Master finding extrema using derivatives. Learn first and second derivative tests to identify critical points, maximum and minimum values with visual examples.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "05/26/2025",
  subject: "Derivative Functions",
};

## 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).

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

<LineEquation
  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 <InlineMath math="f(x) = x(x-3)^2" />.

**Solution:**

**Step 1: Find the first derivative**

First, let's expand the function: <InlineMath math="f(x) = x(x^2 - 6x + 9) = x^3 - 6x^2 + 9x" />.

Its derivative is:

<BlockMath math="f'(x) = 3x^2 - 12x + 9" />

**Step 2: Find the stationary points**

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

<div className="flex flex-col gap-4">
    <BlockMath math="3x^2 - 12x + 9 = 0" />
    <BlockMath math="x^2 - 4x + 3 = 0" />
    <BlockMath math="(x-1)(x-3) = 0" />
</div>

The stationary points occur at <InlineMath math="x = 1" /> and <InlineMath math="x = 3" />.

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

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

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

**Step 4: Determine the stationary values**

To get the turning point values (y-values), substitute the stationary point x-coordinates (<InlineMath math="x=1" /> and <InlineMath math="x=3" />) back into the *original* function <InlineMath math="f(x)" />.

-   Maximum value: <InlineMath math="f(1) = 1(1-3)^2 = 4" />.

-   Minimum value: <InlineMath math="f(3) = 3(3-3)^2 = 0" />.

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).

<LineEquation
  title={<>Extreme Points Visualization</>}
  description={
    <>
      A visualization of the curve <InlineMath math="f(x) = x(x-3)^2" /> 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 <InlineMath math="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 <InlineMath math="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.

Determine the extreme values of <InlineMath math="f(x) = \frac{1}{3}x^3 - x^2 - 3x + 2" /> using the second derivative test.

**Solution:**

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

<div className="flex flex-col gap-4">
    <BlockMath math="f'(x) = x^2 - 2x - 3" />
    <BlockMath math="f''(x) = 2x - 2" />
</div>

**Step 2: Find the stationary points**

<div className="flex flex-col gap-4">
    <BlockMath math="x^2 - 2x - 3 = 0" />
    <BlockMath math="(x-3)(x+1) = 0" />
</div>

The stationary points occur at <InlineMath math="x = 3" /> and <InlineMath math="x = -1" />.

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

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

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

**Step 4: Calculate the extreme values**

Substitute <InlineMath math="x=3" /> and <InlineMath math="x=-1" /> into the original function to get their extreme values.

-   Minimum value: <InlineMath math="f(3) = \frac{1}{3}(3)^3 - (3)^2 - 3(3) + 2 = 9 - 9 - 9 + 2 = -7" />.

-   Maximum value: <InlineMath math="f(-1) = \frac{1}{3}(-1)^3 - (-1)^2 - 3(-1) + 2 = -\frac{1}{3} - 1 + 3 + 2 = \frac{11}{3}" />.

If we look at the visualization below, the curve is concave down at the point <InlineMath math="x=-1" /> and concave up at the point <InlineMath math="x=3" />.

<LineEquation
  title={<>Second Derivative Test Visualization</>}
  description={
    <>
      A graph of <InlineMath math="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 <InlineMath math="x=-1" /> and concave up at the point <InlineMath math="x=3" />.
    </>
  }
  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 <InlineMath math="y = x^2 + 2x - 3" />.

### 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" />.

    <BlockMath math="2x + 2 = 0 \implies x = -1" />

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

    Substitute <InlineMath math="x = -1" /> into the original function.

    <BlockMath math="y = (-1)^2 + 2(-1) - 3 = 1 - 2 - 3 = -4" />

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