---
tag: 01A2EGXJEM
kind: statement
role: proposition
name: First derivative test
msc: [26A24]
uses: [0NS8BP96QX, 026BJBQNGJ]
sources:
  - url: https://en.wikipedia.org/wiki/Derivative_test
    locator: Precise statement of first-derivative test
---

## Statement

Let $f$ be a real function on an open interval $(c - \delta, c + \delta)$ with $\delta > 0$, continuous at $c$ and differentiable at each $x \ne c$.
If $f'(x) \le 0$ for $c - \delta < x < c$ and $f'(x) \ge 0$ for $c < x < c + \delta$, then $f$ has a [[local minimum|0NS8BP96QX]] at $c$.
If the inequalities are reversed, then $f$ has a local maximum at $c$.

## Remarks

The function is [[decreasing on the left and increasing on the right|026BJBQNGJ]] of $c$.
The test needs no derivative at $c$. It works for $|x|$ at $0$.
Mathlib states the minimum case as `isLocalMin_of_deriv`.

## Explanations

### L1 human

If the graph goes down until $c$ and then goes up, the point $c$ is the bottom of a valley.
