The First- and Second-Derivative Tests #
We prove the first-derivative test from calculus, in the strong form given on Wikipedia.
The test is proved over the real numbers ℝ
using monotoneOn_of_deriv_nonneg from Mathlib/Analysis/Calculus/Deriv/MeanValue.lean.
We prove the second-derivative test using the first-derivative test. Source: Wikipedia.
Main results #
isLocalMax_of_deriv_Ioo: Supposefis a real-valued function of a real variable defined on some interval containing the pointa. Further suppose thatfis continuous ataand differentiable on some open interval containinga, except possibly ataitself.If there exists a positive number
r > 0such that for everyxinIoo (a − r) awe havef′(x) ≥ 0, and for everyxinIoo a (a + r)we havef′(x) ≤ 0, thenfhas a local maximum ata.isLocalMin_of_deriv_Ioo: The dual offirst_derivative_max, for minima.isLocalMax_of_deriv: 1st derivative test for maxima using filters.isLocalMin_of_deriv: 1st derivative test for minima using filters.isLocalMin_of_deriv_deriv_pos: The second-derivative test, minimum version.
Tags #
derivative test, first-derivative test, second-derivative test, calculus
Suppose f : ℝ → ℝ is continuous at b, the derivative f' is nonnegative on Ioo a b and
nonpositive on Ioo b c. Then f attains its maximum on Ioo a c at b.
Suppose f : ℝ → ℝ is continuous at b and c, the derivative f' is nonnegative on
Ioo a b and nonpositive on Ioo b c. Then f attains its maximum on Ioc a c at b.
Suppose f : ℝ → ℝ is continuous at a and b, the derivative f' is nonnegative on
Ioo a b and nonpositive on Ioo b c. Then f attains its maximum on Ico a c at b.
Suppose f : ℝ → ℝ is continuous at a, b, and c, the derivative f' is nonnegative on
Ioo a b and nonpositive on Ioo b c. Then f attains its maximum on Icc a c at b.
Suppose f : ℝ → ℝ is continuous at b, the derivative f' is nonnegative on Ioo a b and
nonpositive on Ioi b. Then f attains its maximum on Ioi a at b.
Suppose f : ℝ → ℝ is continuous at a and b, the derivative f' is nonnegative on
Ioo a b and nonpositive on Ioi b. Then f attains its maximum on Ici a at b.
Suppose f : ℝ → ℝ is continuous at b, the derivative f' is nonnegative on Iio b and
nonpositive on Ioo b c. Then f attains its maximum on Iio c at b.
Suppose f : ℝ → ℝ is continuous at b and c, the derivative f' is nonnegative on
Iio b and nonpositive on Ioo b c. Then f attains its maximum on Iic c at b.
Suppose f : ℝ → ℝ is continuous at b, the derivative f' is nonnegative on Iio b and
nonpositive on Ioi b. Then f attains its maximum on ℝ at b.
The First-Derivative Test from calculus, maxima version.
Suppose a < b < c, f : ℝ → ℝ is continuous at b, the derivative f' is nonnegative on
Ioo a b and nonpositive on Ioo b c. Then f has a local maximum at b.
Suppose f : ℝ → ℝ is continuous at b, the derivative f' is nonpositive on Ioo a b and
nonnegative on Ioo b c. Then f attains its minimum on Ioo a c at b.
Suppose f : ℝ → ℝ is continuous at b and c, the derivative f' is nonpositive on
Ioo a b and nonnegative on Ioo b c. Then f attains its minimum on Ioc a c at b.
Suppose f : ℝ → ℝ is continuous at a and b, the derivative f' is nonpositive on
Ioo a b and nonnegative on Ioo b c. Then f attains its minimum on Ico a c at b.
Suppose f : ℝ → ℝ is continuous at a, b, and c, the derivative f' is nonpositive on
Ioo a b and nonnegative on Ioo b c. Then f attains its minimum on Icc a c at b.
Suppose f : ℝ → ℝ is continuous at b, the derivative f' is nonpositive on Ioo a b and
nonnegative on Ioi b. Then f attains its minimum on Ioi a at b.
Suppose f : ℝ → ℝ is continuous at a and b, the derivative f' is nonpositive on
Ioo a b and nonnegative on Ioi b. Then f attains its minimum on Ici a at b.
Suppose f : ℝ → ℝ is continuous at b, the derivative f' is nonpositive on Iio b and
nonnegative on Ioo b c. Then f attains its minimum on Iio c at b.
Suppose f : ℝ → ℝ is continuous at b and c, the derivative f' is nonpositive on
Iio b and nonnegative on Ioo b c. Then f attains its minimum on Iic c at b.
Suppose f : ℝ → ℝ is continuous at b, the derivative f' is nonpositive on Iio b and
nonnegative on Ioi b. Then f attains its minimum on ℝ at b.
The First-Derivative Test from calculus, minima version.
The First-Derivative Test from calculus, maxima version, expressed in terms of left and right filters.
The First-Derivative Test from calculus, minima version, expressed in terms of left and right filters.
The First Derivative test, maximum version.
The First Derivative test, minimum version.
The First Derivative test with a hypothesis on the sign of the derivative, maximum version.
The First Derivative test with a hypothesis on the sign of the derivative, minimum version.
The Second-Derivative Test from calculus, minimum version.
Applies to functions like x^2 + 1[x ≥ 0] as well as twice differentiable
functions.
The Second-Derivative Test from calculus, maximum version.