Mathwords logoMathwords

Hermite-Hadamard Inequality — Definition, Formula & Example

The Hermite-Hadamard Inequality is a double inequality for convex functions. It says that the average value of a convex function over an interval is at least its value at the midpoint and at most the average of its two endpoint values.

Let ff be convex on the closed interval [a,b][a, b] with a<ba < b. Then f(a+b2)≤1b−a∫abf(x) dx≤f(a)+f(b)2f\left(\frac{a+b}{2}\right) \le \frac{1}{b-a}\int_a^b f(x)\,dx \le \frac{f(a)+f(b)}{2}. If ff is concave, both inequalities reverse. If ff is linear, both become equalities.

Key Formula

f(a+b2)≤1b−a∫abf(x) dx≤f(a)+f(b)2f\left(\frac{a+b}{2}\right) \le \frac{1}{b-a}\int_a^b f(x)\,dx \le \frac{f(a)+f(b)}{2}
Where:
  • ff = A convex function on the interval
  • a,ba, b = Endpoints of the interval, with a < b
  • 1b−a∫abf(x) dx\frac{1}{b-a}\int_a^b f(x)\,dx = The average value of f on [a, b]

How It Works

Each half has a short geometric proof. For the right half, convexity means the chord from (a,f(a))(a, f(a)) to (b,f(b))(b, f(b)) lies on or above the graph. Integrate both and divide by b−ab - a, and the chord's average value is exactly f(a)+f(b)2\frac{f(a)+f(b)}{2}. For the left half, pair each xx with its mirror point a+b−xa + b - x. Convexity gives f(a+b2)≤f(x)+f(a+b−x)2f\left(\frac{a+b}{2}\right) \le \frac{f(x) + f(a+b-x)}{2}, and integrating over [a,b][a, b] gives the result. You can also use a supporting line at the midpoint, which lies on or below the graph.

Worked Example

Problem: Use the Hermite-Hadamard Inequality with f(x)=1xf(x) = \frac{1}{x} on [1,2][1, 2] to bound ln⁡2\ln 2.
Step 1: Check convexity. For x>0x > 0, f′′(x)=2x3>0f''(x) = \frac{2}{x^3} > 0, so ff is convex on [1,2][1, 2]. Evaluate ff at the midpoint 32\frac{3}{2}.
f(32)=23f\left(\tfrac{3}{2}\right) = \frac{2}{3}
Step 2: Find the average value. Here b−a=1b - a = 1, so the average equals the integral.
12−1∫121x dx=ln⁡2\frac{1}{2-1}\int_1^2 \frac{1}{x}\,dx = \ln 2
Step 3: Average the endpoint values and combine all three.
f(1)+f(2)2=1+122=34⇒23≤ln⁡2≤34\frac{f(1)+f(2)}{2} = \frac{1 + \frac{1}{2}}{2} = \frac{3}{4} \quad\Rightarrow\quad \frac{2}{3} \le \ln 2 \le \frac{3}{4}
Answer: 23≤ln⁡2≤34\frac{2}{3} \le \ln 2 \le \frac{3}{4}, that is, 0.667≤ln⁡2≤0.750.667 \le \ln 2 \le 0.75. The true value ln⁡2≈0.693\ln 2 \approx 0.693 sits between them.

Why It Matters

In numerical analysis, the left side is the midpoint rule and the right side is the trapezoidal rule. So for a convex function, the midpoint rule underestimates the integral and the trapezoidal rule overestimates it. Real analysis and inequality courses use the result to bound integrals and logarithmic or other means.

Common Mistakes

Mistake: Applying the inequality in the same direction to a concave function such as x\sqrt{x} or ln⁡x\ln x.
Correction: For a concave function, the chord lies below the graph, so both inequalities flip. Check the sign of f′′f'' on the interval before you choose a direction.

Related Terms