Convexity of functions and derivatives #
Here we relate convexity of functions ℝ → ℝ
to properties of their derivatives.
Main results #
MonotoneOn.convexOn_of_deriv
,convexOn_of_deriv2_nonneg
: if the derivative of a function is increasing or its second derivative is nonnegative, then the original function is convex.ConvexOn.monotoneOn_deriv
: if a function is convex and differentiable, then its derivative is monotone.
Monotonicity of f'
implies convexity of f
#
If a function f
is continuous on a convex set D ⊆ ℝ
, is differentiable on its interior,
and f'
is monotone on the interior, then f
is convex on D
.
If a function f
is continuous on a convex set D ⊆ ℝ
, is differentiable on its interior,
and f'
is antitone on the interior, then f
is concave on D
.
If a function f
is continuous on a convex set D ⊆ ℝ
, and f'
is strictly monotone on the
interior, then f
is strictly convex on D
.
Note that we don't require differentiability, since it is guaranteed at all but at most
one point by the strict monotonicity of f'
.
If a function f
is continuous on a convex set D ⊆ ℝ
and f'
is strictly antitone on the
interior, then f
is strictly concave on D
.
Note that we don't require differentiability, since it is guaranteed at all but at most
one point by the strict antitonicity of f'
.
If a function f
is differentiable and f'
is monotone on ℝ
then f
is convex.
If a function f
is differentiable and f'
is antitone on ℝ
then f
is concave.
If a function f
is continuous and f'
is strictly monotone on ℝ
then f
is strictly
convex. Note that we don't require differentiability, since it is guaranteed at all but at most
one point by the strict monotonicity of f'
.
If a function f
is continuous and f'
is strictly antitone on ℝ
then f
is strictly
concave. Note that we don't require differentiability, since it is guaranteed at all but at most
one point by the strict antitonicity of f'
.
If a function f
is continuous on a convex set D ⊆ ℝ
, is twice differentiable on its
interior, and f''
is nonnegative on the interior, then f
is convex on D
.
If a function f
is continuous on a convex set D ⊆ ℝ
, is twice differentiable on its
interior, and f''
is nonpositive on the interior, then f
is concave on D
.
If a function f
is continuous on a convex set D ⊆ ℝ
, is twice differentiable on its
interior, and f''
is nonnegative on the interior, then f
is convex on D
.
If a function f
is continuous on a convex set D ⊆ ℝ
, is twice differentiable on its
interior, and f''
is nonpositive on the interior, then f
is concave on D
.
If a function f
is continuous on a convex set D ⊆ ℝ
and f''
is strictly positive on the
interior, then f
is strictly convex on D
.
Note that we don't require twice differentiability explicitly as it is already implied by the second
derivative being strictly positive, except at at most one point.
If a function f
is continuous on a convex set D ⊆ ℝ
and f''
is strictly negative on the
interior, then f
is strictly concave on D
.
Note that we don't require twice differentiability explicitly as it already implied by the second
derivative being strictly negative, except at at most one point.
If a function f
is twice differentiable on an open convex set D ⊆ ℝ
and
f''
is nonnegative on D
, then f
is convex on D
.
If a function f
is twice differentiable on an open convex set D ⊆ ℝ
and
f''
is nonpositive on D
, then f
is concave on D
.
If a function f
is continuous on a convex set D ⊆ ℝ
and f''
is strictly positive on D
,
then f
is strictly convex on D
.
Note that we don't require twice differentiability explicitly as it is already implied by the second
derivative being strictly positive, except at at most one point.
If a function f
is continuous on a convex set D ⊆ ℝ
and f''
is strictly negative on D
,
then f
is strictly concave on D
.
Note that we don't require twice differentiability explicitly as it is already implied by the second
derivative being strictly negative, except at at most one point.
If a function f
is twice differentiable on ℝ
, and f''
is nonnegative on ℝ
,
then f
is convex on ℝ
.
If a function f
is twice differentiable on ℝ
, and f''
is nonpositive on ℝ
,
then f
is concave on ℝ
.
If a function f
is continuous on ℝ
, and f''
is strictly positive on ℝ
,
then f
is strictly convex on ℝ
.
Note that we don't require twice differentiability explicitly as it is already implied by the second
derivative being strictly positive, except at at most one point.
If a function f
is continuous on ℝ
, and f''
is strictly negative on ℝ
,
then f
is strictly concave on ℝ
.
Note that we don't require twice differentiability explicitly as it is already implied by the second
derivative being strictly negative, except at at most one point.
Convexity of f
implies monotonicity of f'
#
In this section we prove inequalities relating derivatives of convex functions to slopes of secant
lines, and deduce that if f
is convex then its derivative is monotone (and similarly for strict
convexity / strict monotonicity).
If f : 𝕜 → 𝕜
is convex on s
, then for any point x ∈ s
the slope of the secant line of f
through x
is monotone on s \ {x}
.
If f : 𝕜 → 𝕜
is concave on s
, then for any point x ∈ s
the slope of the secant line of f
through x
is antitone on s \ {x}
.
Convex functions, derivative at left endpoint of secant #
If f : ℝ → ℝ
is convex on S
and right-differentiable at x ∈ S
, then the slope of any
secant line with left endpoint at x
is bounded below by the right derivative of f
at x
.
Reformulation of ConvexOn.le_slope_of_hasDerivWithinAt_Ioi
using derivWithin
.
If f : ℝ → ℝ
is convex on S
and differentiable within S
at x
, then the slope of any
secant line with left endpoint at x
is bounded below by the derivative of f
within S
at x
.
This is fractionally weaker than ConvexOn.le_slope_of_hasDerivWithinAt_Ioi
but simpler to apply
under a DifferentiableOn S
hypothesis.
Reformulation of ConvexOn.le_slope_of_hasDerivWithinAt
using derivWithin
.
If f : ℝ → ℝ
is convex on S
and differentiable at x ∈ S
, then the slope of any secant
line with left endpoint at x
is bounded below by the derivative of f
at x
.
Convex functions, derivative at right endpoint of secant #
If f : ℝ → ℝ
is convex on S
and left-differentiable at y ∈ S
, then the slope of any secant
line with right endpoint at y
is bounded above by the left derivative of f
at y
.
Reformulation of ConvexOn.slope_le_of_hasDerivWithinAt_Iio
using derivWithin
.
If f : ℝ → ℝ
is convex on S
and differentiable within S
at y
, then the slope of any
secant line with right endpoint at y
is bounded above by the derivative of f
within S
at y
.
This is fractionally weaker than ConvexOn.slope_le_of_hasDerivWithinAt_Iio
but simpler to apply
under a DifferentiableOn S
hypothesis.
Reformulation of ConvexOn.slope_le_of_hasDerivWithinAt
using derivWithin
.
If f : ℝ → ℝ
is convex on S
and differentiable at y ∈ S
, then the slope of any secant
line with right endpoint at y
is bounded above by the derivative of f
at y
.
Convex functions, monotonicity of derivative #
If f
is convex on S
and differentiable on S
, then its derivative within S
is monotone
on S
.
If f
is convex on S
and differentiable at all points of S
, then its derivative is monotone
on S
.
Strict convex functions, derivative at left endpoint of secant #
If f : ℝ → ℝ
is strictly convex on S
and right-differentiable at x ∈ S
, then the slope of
any secant line with left endpoint at x
is strictly greater than the right derivative of f
at
x
.
If f : ℝ → ℝ
is strictly convex on S
and differentiable within S
at x ∈ S
, then the
slope of any secant line with left endpoint at x
is strictly greater than the derivative of f
within S
at x
.
This is fractionally weaker than StrictConvexOn.lt_slope_of_hasDerivWithinAt_Ioi
but simpler to
apply under a DifferentiableOn S
hypothesis.
If f : ℝ → ℝ
is strictly convex on S
and differentiable at x ∈ S
, then the slope of any
secant line with left endpoint at x
is strictly greater than the derivative of f
at x
.
Strict convex functions, derivative at right endpoint of secant #
If f : ℝ → ℝ
is strictly convex on S
and differentiable at y ∈ S
, then the slope of any
secant line with right endpoint at y
is strictly less than the left derivative at y
.
If f : ℝ → ℝ
is strictly convex on S
and differentiable within S
at y ∈ S
, then the
slope of any secant line with right endpoint at y
is strictly less than the derivative of f
within S
at y
.
This is fractionally weaker than StrictConvexOn.slope_lt_of_hasDerivWithinAt_Iio
but simpler to
apply under a DifferentiableOn S
hypothesis.
If f : ℝ → ℝ
is strictly convex on S
and differentiable at y ∈ S
, then the slope of any
secant line with right endpoint at y
is strictly less than the derivative of f
at y
.
Strict convex functions, strict monotonicity of derivative #
If f
is convex on S
and differentiable on S
, then its derivative within S
is monotone
on S
.
If f
is convex on S
and differentiable at all points of S
, then its derivative is monotone
on S
.
Concave functions, derivative at left endpoint of secant #
Concave functions, derivative at right endpoint of secant #
Concave functions, anti-monotonicity of derivative #
If f
is concave on S
and differentiable at all points of S
, then its derivative is
antitone (monotone decreasing) on S
.