LemmaGuides › Jensen's inequality: how to set one up on a competition problem
Guide

Jensen's inequality: how to set one up on a competition problem

7 September 2026

Jensen's inequality is one sentence long and almost nobody gets it wrong. What people get wrong is everything either side of it: noticing that a problem wants it, choosing the function, and checking that the function is convex where the variables actually live.

So this is not a proof of Jensen. It is the setup procedure, in the order you should run it under time pressure, with the two places the setup silently fails.

The one line, so we agree on it

For a convex ff and any inputs x1,,xnx_1, \dots, x_n in its domain,

f(x1)++f(xn)n  f ⁣(x1++xnn)\frac{f(x_1) + \dots + f(x_n)}{n} \ \ge\ f\!\left(\frac{x_1 + \dots + x_n}{n}\right)

with equality exactly when all the xix_i coincide. A concave ff runs the same statement with the inequality reversed. That is the whole theorem: the average of the values beats the value at the average, and curvature decides which way "beats" points.

The shape that calls for Jensen

Competition problems do not announce this. They announce it structurally, and the structure is easy to see once you know it. Reach for Jensen when both of these hold:

Those two together are the signature, because Jensen is precisely the theorem that trades a fixed sum for a bound on a symmetric sum. If the constraint fixes a product rather than a sum, you are usually one logarithm away from the shape rather than in it.

A useful reframing of the whole technique: Jensen says that when the total is pinned, the balanced configuration is the extreme one. Convex targets are minimised at balance, concave targets maximised there. If a problem's answer smells like "all variables equal", this is the machine that proves it.

The three lines of setup

Write these three lines before any algebra. They are short on purpose, and skipping the second is the single most common way a Jensen attempt dies.

  1. Name the function and its variables. Rewrite the expression until it is literally f(xi)\sum f(x_i) with one function and one list of inputs. This step is where the work is, and it usually means a substitution.
  2. Fix the interval, then check convexity on it. Compute ff'' and state the interval where the xix_i can actually sit. Convexity is a property of a function and a domain, never a function alone.
  3. Apply, and evaluate at the average. The constraint hands you the average for free. The bound is nf(xˉ)n f(\bar{x}), and equality is the balanced point.

Step two is not bureaucracy. Take f(x)=x3f(x) = x^3. It is convex on x0x \ge 0 and the conclusion holds there, but f=6xf'' = 6x is negative for x<0x < 0, and at (2,1,1)(-2, 1, 1) the average of the cubes is 2-2 while the cube of the average is 00. The inequality points the wrong way. Nothing in the algebra warns you; only the domain does.

Reading the direction off the curvature

The other half of step two is which way the sign goes, and it is worth internalising two anchors rather than re-deriving them.

That second one is worth pausing on, because it collapses a list into a parent. AM–GM is not a separate fact to memorise next to Jensen; it is Jensen with ln\ln. AM–HM is Jensen with 1/x1/x. So proving a+b+c3a+b+c \ge 3 when abc=1abc = 1 and proving (a+b)(b+c)(c+a)8abc(a+b)(b+c)(c+a) \ge 8abc are both convexity arguments wearing a different hat, and once you see that, the equality case stops being something you check at the end and becomes something you predicted at the start.

The same logic settles a geometry classic. Sine is concave on (0,π)(0, \pi), so for a triangle's angles the sum sinA+sinB+sinC\sin A + \sin B + \sin C is largest when all three are π/3\pi/3, giving 332\tfrac{3\sqrt3}{2}. And the equilateral triangle maximising area for a given perimeter is the same argument through Heron: with the semiperimeter fixed, the three quantities sas-a, sbs-b, scs-c have a fixed sum, so their product peaks when they are equal.

Watching the substitution do the work

Nesbitt's inequality, ab+c+bc+a+ca+b32\tfrac{a}{b+c} + \tfrac{b}{c+a} + \tfrac{c}{a+b} \ge \tfrac32, does not look like Jensen's shape. The summands are functions of two letters each, and there is no constraint at all.

Both objections dissolve at once. The expression is homogeneous of degree zero, so scaling a,b,ca, b, c changes nothing and you may impose a+b+c=1a+b+c = 1. Now b+c=1ab+c = 1-a, and the sum is

f(a)+f(b)+f(c),f(x)=x1xf(a) + f(b) + f(c), \qquad f(x) = \frac{x}{1-x}

one function, three inputs, fixed sum. Step two: f(x)=2/(1x)3f''(x) = 2/(1-x)^3, positive on (0,1)(0,1), which is exactly where the variables live. Step three: the average is 13\tfrac13, so the sum is at least 3f(13)=323 f(\tfrac13) = \tfrac32.

The lesson is in the normalisation, not in the answer. Homogeneity is what lets you invent the constraint you need, and a great many inequalities that appear constraint-free are one scaling away from Jensen's shape.

When the shape is genuinely missing

Sometimes no substitution produces a convex ff on the right interval, and the packaged theorem does not reach. The fallback is the tangent line trick, which is Jensen's own proof carried out by hand.

Guess the equality point, write the tangent to ff there, prove the resulting one-variable inequality, and sum. For the Nesbitt function above the tangent at x=13x = \tfrac13 is y=94x14y = \tfrac94 x - \tfrac14, and x1x94x14\tfrac{x}{1-x} \ge \tfrac94 x - \tfrac14 holds across the whole interval with equality only at 13\tfrac13. Adding the three copies gives 94134=32\tfrac94 \cdot 1 - \tfrac34 = \tfrac32 again, without ever invoking the theorem.

Two things make this worth having. It survives on functions that are only convex near the equality point, and the one-variable inequality it leaves you is usually a quadratic you can finish by factoring. The cost is that you must guess the equality point first, so it works on symmetric problems and fights you on asymmetric ones.

What to do with this

The bottleneck here is not the theorem. Take a dozen inequalities you have already seen solved, and for each one write only the three setup lines: the function, the interval and its curvature, the average. Do not finish them. You will discover that a surprising fraction of what you were taught as separate named inequalities are the same argument with a different ff, and that is the compression worth having.

Lemma teaches this as convexity and Jensen rather than as a trick that appears twice, sitting alongside the classical inequalities it generates. The problem archive has the statements above in full with difficulty and expected time on each, and the daily problem posts a new one every day in three tiers, no account needed.

Train it on Lemma

Every technique here is taught explicitly, in order. 125 lessons, 1206 curated problems and unlimited generated practice at six difficulties. Free to start, no card, and every paid plan opens with 3 free days.

Find your level