---
tag: 0Z41C17TGP
kind: statement
role: corollary
name: A function with nonnegative second derivative is convex
msc: [26A51]
uses: [005JT76HCK, 026BJBQNGJ, 0Y9D2FJRQ4]
sources:
  - url: https://en.wikipedia.org/wiki/Convex_function
    locator: Functions of one variable
---

## Statement

Let $I$ be an open interval and let $f \colon I \to \mathbb{R}$ be twice differentiable.
If $f''(x) \ge 0$ for all $x \in I$, then $f$ is [[convex|0VV0HSW1ZS]].

## Remarks

The derivative $f'$ has a nonnegative derivative, so $f'$ is [[increasing|026BJBQNGJ]]. Then [[convexity follows|005JT76HCK]].
If $f'' > 0$ on $I$, then $f$ is strictly convex. The converse fails: $x^4$ is strictly convex, but its second derivative at $0$ is $0$.
Mathlib states it as `convexOn_of_deriv2_nonneg`.

## Explanations

### L1 human

A nonnegative [[second derivative|0Y9D2FJRQ4]] means that the slope never decreases.
So the graph bends upward everywhere.
