Skip to content
Advanced Topics · Chapter 40

Inequalities

Squares are never negative, averages beat geometric means, and dot products never beat lengths: three inequalities that find every maximum and minimum on the AMC.

You'll need
open on YouTube
40.10%

Trivial Inequality

In this section you will be able to use the fact that squares are never negative to find the lowest (or highest) value of a quadratic.

(xy−1)2+(x+y)2(xy - 1)^2 + (x + y)^2 can’t be negative: it’s a sum of squares. But how small can it actually get?

Every inequality in this chapter grows out of one fact: a real number squared is never negative.

To find the lowest point of a quadratic, complete the square. Write it as a square plus a constant. The square is at least 00, so the constant is the minimum, and it happens when the square is 00.

The trick also works on bigger expressions. Look for a substitution that turns the expression into “something squared, plus a number”.

Exploreplay first, formulas later

P(x) = x² − 6x + 13; roots 3 + 2i, 3 − 2i; sum of roots 6, product 13

Degree2
Lead a1
P(x)=(x2−6x+13)=x2−6x+13P(x) = (x^{2} - 6x + 13) = x^{2} - 6x + 13
P(x)=ax2+bx+c=a(x−r1)⋯(x−r2)P(x) = ax^2 + bx + c = a(x - r_1)\cdots(x - r_2)
r1,r2=3±2ir_1, r_2 = 3 \pm 2i
x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
vertex(h,k)=(3,4),  P(x)=(x−3)2+4(h, k) = (3, 4),\; P(x) = (x - 3)^2 + 4k=c−b24ak = c - \frac{b^2}{4a}
lowest pointP(x)≥4 at x≈3P(x) \ge 4 \text{ at } x \approx 3

P(x) = x² − 6x + 13; roots 3 + 2i, 3 − 2i; sum 6; product 13; lowest value 4

Name it

Theorem 40.1.1 · Trivial Inequality

For real xx,

x2≥0.x^2 \ge 0.

This means all perfect squares are 00 or more.

Corollary 40.1.2 · Completing the Square

In a quadratic Q(x)=ax2+bx+cQ(x) = ax^2 + bx + c,

  • If a>0a > 0, then the minimum value of Q(x)Q(x) is c−b24ac - \frac{b^2}{4a} and occurs when x=−b2ax = -\frac{b}{2a}.
  • If a<0a < 0, then the maximum value of Q(x)Q(x) is c−b24ac - \frac{b^2}{4a} and occurs when x=−b2ax = -\frac{b}{2a}.

Try it

Problem 40.4.3

AMC 10/12

What is the least possible value of (xy−1)2+(x+y)2(xy - 1)^2 + (x + y)^2 for real numbers xx and yy?

Problem 40.4.2

AMC 10

What is the least possible value of

(x+1)(x+2)(x+3)(x+4)+2019(x + 1)(x + 2)(x + 3)(x + 4) + 2019

where xx is a real number?

P(x) = x⁴ + 10x³ + 35x² + 50x + 24; roots −4, −3, −2, −1; sum of roots −10, product 24

Degree4
Lead a1
r₁r₂r₃r₄
P(x)=(x+4)(x+3)(x+2)(x+1)=x4+10x3+35x2+50x+24P(x) = (x + 4)(x + 3)(x + 2)(x + 1) = x^{4} + 10x^{3} + 35x^{2} + 50x + 24
r1=−4,  r2=−3,  r3=−2,  r4=−1r_1 = -4,\; r_2 = -3,\; r_3 = -2,\; r_4 = -1
lowest pointP(x)≥? at x≈?P(x) \ge ? \text{ at } x \approx ?

P(x) = x⁴ + 10x³ + 35x² + 50x + 24; roots −4, −3, −2, −1; sum −10; product 24; lowest value ?

Contest cornerreal contest problems

Problem 40.4.1

AMC 10

Define

P(x)=(x−12)(x−22)⋯(x−1002).P(x) = (x - 1^2)(x - 2^2) \cdots (x - 100^2).

How many integers nn are there such that P(n)≤0P(n) \le 0?

Checkpoint for section 40.1

Get 2 of 3 right to master this section. One try each, no hints.
1

What is the minimum value of x2−6x+13x^2 - 6x + 13?

2

At which xx does −2x2+8x+1-2x^2 + 8x + 1 reach its maximum?

3

What is the least possible value of x2+y2−4x+6y+20x^2 + y^2 - 4x + 6y + 20 for real xx and yy?

40.20%

AM-GM

In this section you will be able to use AM-GM to make products as big as possible and sums as small as possible, and check when equality holds.

A+M+C=12A + M + C = 12. How big can you make AMC+AM+MC+CAAMC + AM + MC + CA? Hint: equal parts win.

Look:From here on, the inequalities are optional for the AMC 10 but common on the AMC 12 and AIME.

The arithmetic mean of non-negative numbers is never smaller than their geometric mean. With a fixed sum, the product is biggest when all the numbers are equal. With a fixed product, the sum is smallest when they are equal.

The hard part is setting it up. You need a constant sum (to bound a product) or a constant product (to bound a sum). If the terms don’t cooperate, multiply some of them by weights until they do, then divide back at the end.

Always check the equality case: the bound only counts if equal parts are actually allowed.

Exploreplay first, formulas later

a + b = 10: a = 3, b = 7, area 21; the square gives 25

area ab = 21the square gives 25

Not a square yet: you can still do better.

Drag the dot on the graph (or focus it and use the arrow keys).

a + b = 10: a = 3, b = 7, area 21; the square gives 25

Name it

Theorem 40.2.1 · AM-GM Inequality For 2 variables

For non-negative reals aa and bb,

a+b2≥ab.\frac{a+b}{2} \ge \sqrt{ab}.

Basically, this means the average of 2 non-negative numbers (arithmetic mean) is always at least as big as the square root of the product of the 2 numbers (the geometric mean).

Equality holds when a=ba = b.

a = 2, b = 8: AM 5 ≥ GM 4

a2
b8
AM > GM

Drag the split point P along the diameter (or focus it and use the arrow keys).

a = 2, b = 8: AM 5 ≥ GM 4

Corollary 40.2.2

For x>0x > 0, the minimum value of x+1xx + \frac{1}{x} is 22 and occurs when x=1x = 1.

  • The minimum value of a+ba + b (if abab remains constant) occurs when a=ba = b.
  • The maximum value of abab (if a+ba + b remains constant) occurs when a=ba = b.

Theorem 40.2.3 · AM-GM Inequality For More Variables

For non-negative reals a1,a2,…,ana_1, a_2, \ldots, a_n,

a1+a2+⋯+ann≥a1⋅a2⋅a3⋯ann.\frac{a_1 + a_2 + \cdots + a_n}{n} \ge \sqrt[n]{a_1 \cdot a_2 \cdot a_3 \cdots a_n}.

Equality occurs when a1=a2=⋯=ana_1 = a_2 = \cdots = a_n (all the variables are equal).

Another way to say this is

Average of n numbers≥product of all n numbersn.\text{Average of } n \text{ numbers} \ge \sqrt[n]{\text{product of all } n \text{ numbers}}.

Remark 40.2.5

Generally, we use AM-GM to maximize products or minimize sums.

ab = 36: a = 2, b = 18, a + b = 20; the square gives 12

a + b = 20the square gives 12

Not a square yet: you can still do better.

Drag the dot on the graph (or focus it and use the arrow keys).

ab = 36: a = 2, b = 18, a + b = 20; the square gives 12

Theorem 40.2.6 · Weighted AM-GM Inequality

For non-negative reals aia_i, cic_i,

c1a1+c2a2+⋯+cnanc1+c2+⋯+cn≥a1c1⋅a2c2⋅a3c3⋯ancnc1+c2+⋯+cn.\frac{c_1 a_1 + c_2 a_2 + \cdots + c_n a_n}{c_1 + c_2 + \cdots + c_n} \ge \sqrt[c_1 + c_2 + \cdots + c_n]{a_1^{c_1} \cdot a_2^{c_2} \cdot a_3^{c_3} \cdots a_n^{c_n}}.

Remark 40.2.8

We use weighted AM-GM when we are trying to make the sum of all terms a constant by multiplying weights to all (or some) of the terms. Remember to divide by the weights you multiplied at the end.

Watch itpredict, then reveal

Example 40.1

AMC 12

Let AA, MM, and CC be non-negative integers such that A+M+C=12A + M + C = 12. What is the maximum value of A⋅M⋅C+A⋅M+M⋅C+A⋅CA \cdot M \cdot C + A \cdot M + M \cdot C + A \cdot C?

AM-GM rectangle (its total is revealed at the end of the example)

3 × 5 × 7 = 105AMC+AM+MC+CAAMC + AM + MC + CA = 105 − 13 = 92

Parts not equal: the product is below the ceiling.

Drag the round handles under the strip (or focus one and use the arrow keys).

Total 15 in 3 pieces: 3 × 5 × 7 = 105; best ?

  1. 1

    AMC+AM+MC+CAAMC + AM + MC + CA looks like part of an expanded product. Expand (A+1)(M+1)(C+1)(A+1)(M+1)(C+1). What extra terms appear?

open on YouTube

Example 40.2

Find the maximum value of x3(4−x)x^3(4 - x).

AM-GM rectangle (its total is revealed at the end of the example)

2³ × 6 = 48x3(4−x)x^3(4-x) = 48 ÷ 3 = 16

Parts not equal: the product is below the ceiling.

Drag the round handles under the strip (or focus one and use the arrow keys).

Total 12 in 4 pieces: 2³ × 6 = 48; best ?

  1. 1

    Think of x3(4−x)x^3(4-x) as the product x⋅x⋅x⋅(4−x)x \cdot x \cdot x \cdot (4 - x). Is the sum x+x+x+(4−x)x + x + x + (4-x) constant?

    Predict first:
    Click a choice or type its letter (A–E).
open on YouTube

Example 40.3

AMC 12

What is the maximum value of (2t−3t)t4t\frac{(2^t - 3t)t}{4^t} for real values of tt?

  1. 1

    Split the fraction: (2t−3t)t4t=t2t−3t24t\frac{(2^t - 3t)t}{4^t} = \frac{t}{2^t} - \frac{3t^2}{4^t}. Let u=t2tu = \frac{t}{2^t}. Write the expression in terms of uu.

    Predict first:
open on YouTube

Try it

Problem 40.4.6

AMC 12

How many ordered pairs of positive real numbers (a,b)(a, b) satisfy the equation

(1+2a)(2+2b)(2a+b)=32ab?(1 + 2a)(2 + 2b)(2a + b) = 32ab?

Contest cornerreal contest problems

Problem 40.4.8

AIMEChallenge

Let B\mathcal{B} be the set of rectangular prisms that have volume 2323 and surface area 5454. Suppose rr is the least possible radius of a sphere that can fit any element of B\mathcal{B} inside it. Then r2r^2 can be expressed as pq\frac{p}{q}, where pp and qq are relatively prime positive integers. Find p+qp + q.

Problem 40.5.4(additional)

AMC 12

There is a smallest positive real number aa such that there exists a positive real number bb such that all the roots of the polynomial x3−ax2+bx−ax^3 - ax^2 + bx - a are real. In fact, for this value of aa the value of bb is unique. What is this value of bb?

Problem 40.5.5(additional)

AIME

Let x1,x2,…,x6x_1, x_2, \ldots, x_6 be non-negative real numbers such that x1+x2+x3+x4+x5+x6=1x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 1, and x1x3x5+x2x4x6≥1540x_1x_3x_5 + x_2x_4x_6 \ge \frac{1}{540}. Let pp and qq be positive relatively prime integers such that pq\frac{p}{q} is the maximum possible value of x1x2x3+x2x3x4+x3x4x5+x4x5x6+x5x6x1+x6x1x2x_1x_2x_3 + x_2x_3x_4 + x_3x_4x_5 + x_4x_5x_6 + x_5x_6x_1 + x_6x_1x_2. Find p+qp + q.

Checkpoint for section 40.2

Get 2 of 3 right to master this section. One try each, no hints.
1

For positive xx, what is the minimum value of x+9xx + \frac{9}{x}?

2

Non-negative aa and bb have a+b=10a + b = 10. What is the largest possible value of abab?

3

Positive xx, yy, zz have xyz=8xyz = 8. What is the smallest possible value of x+y+zx + y + z?

40.30%

Cauchy-Schwarz

In this section you will be able to use Cauchy-Schwarz (and Titu's Lemma) to link a sum with a sum of squares.

a+b+c=2a + b + c = 2 and a2+b2+c2=12a^2 + b^2 + c^2 = 12. How far apart can the largest and smallest possible cc be?

Think of (a1,a2)(a_1, a_2) and (b1,b2)(b_1, b_2) as arrows. Their dot product a1b1+a2b2a_1b_1 + a_2b_2 is the product of their lengths times cos⁡θ\cos\theta. Since cos⁡2θ≤1\cos^2\theta \le 1, the squared dot product can’t beat the product of the squared lengths.

That is Cauchy-Schwarz. It turns a plain sum like a+ba + b into a sum of squares: pair (a,b)(a, b) with (1,1)(1, 1). Equality happens when the arrows point the same way, that is when the ratios match.

Finding an extreme value always takes two steps: prove the bound, then show some numbers reach it.

Exploreplay first, formulas later

a = (1, 2), b = (3, 4): (a·b)² = 121 ≤ |a|²|b|² = 125, gap 4

a₁1
a₂2
b₁3
b₂4
abθ = 10.3°(a·b)²121|a|²|b|²125
(a·b)² = 121 ≤ |a|²|b|² = 125gap = |a|²|b|² sin²θ = 4angle θ = 10.3°

Not parallel: the left side is smaller.

Drag an arrow tip, or use the steppers.

a = (1, 2), b = (3, 4): (a·b)² = 121 ≤ |a|²|b|² = 125, gap 4

Name it

Theorem 40.3.1 · Cauchy-Schwarz

For reals aia_i and bib_i,

(a1b1+a2b2+⋯+anbn)2≤(a12+a22+⋯+an2)(b12+b22+⋯+bn2).(a_1 b_1 + a_2 b_2 + \cdots + a_n b_n)^2 \le \left(a_1^2 + a_2^2 + \cdots + a_n^2\right)\left(b_1^2 + b_2^2 + \cdots + b_n^2\right).

This means: (the sum of the products of all aka_k and bkb_k)2^2 ≤\le the product of the sums of squares of all aka_k and all bkb_k.

Equality holds when the ratio aibi\frac{a_i}{b_i} is the same for all ii.

Remark 40.3.3

You generally want to apply Cauchy-Schwarz when you are dealing with sums of squares.

Corollary 40.3.4 · Titu's Lemma

For reals aia_i and positive reals bib_i,

a12b1+a22b2+⋯+an2bn≥(a1+a2+⋯+an)2b1+b2+⋯+bn.\frac{a_1^2}{b_1} + \frac{a_2^2}{b_2} + \cdots + \frac{a_n^2}{b_n} \ge \frac{(a_1 + a_2 + \cdots + a_n)^2}{b_1 + b_2 + \cdots + b_n}.

Alternately (for non-negative aia_i),

a1b1+a2b2+⋯+anbn≥(a1+a2+⋯+an)2b1+b2+⋯+bn.\frac{a_1}{b_1} + \frac{a_2}{b_2} + \cdots + \frac{a_n}{b_n} \ge \frac{\left(\sqrt{a_1} + \sqrt{a_2} + \cdots + \sqrt{a_n}\right)^2}{b_1 + b_2 + \cdots + b_n}.

This is a direct consequence of Cauchy-Schwarz.

Concept 40.3.5 · Techniques For Optimization Problems

Steps to find the maximum/minimum of expressions:

  1. Find another simple expression that is greater than or equal to the given expression (for a maximization) or less than or equal to it (for a minimization), using one (or possibly more) of these inequalities:
    • Trivial Inequality
    • AM-GM
    • Weighted AM-GM (AM-GM, weighted and unweighted, is useful for maximizing products and minimizing sums)
    • Cauchy-Schwarz (useful when dealing with sums of squares)
  2. Verify that the equality case of your inequality can hold under your problem's conditions.
  3. Simplify your equality case and solve for the answer.

Watch itpredict, then reveal

Example 40.4

AMC 12

Let aa, bb, and cc be real numbers such that

a+b+c=2,anda2+b2+c2=12.a + b + c = 2, \quad \text{and} \quad a^2 + b^2 + c^2 = 12.

What is the difference between the maximum and minimum possible values of cc?

Cauchy vectors (its total is revealed at the end of the example)

v₁4
v₂-2
uvθ = 71.6°(u·v)²4|u|²|v|²40gap
(u·v)² = 4 ≤ |u|²|v|² = 40gap = |u|²|v|² sin²θ = 36angle θ = 71.6°

Not parallel: the left side is smaller.

Drag an arrow tip, or use the steppers.

u = (1, 1), v = (4, -2): (u·v)² = 4 ≤ |u|²|v|² = 40, gap 36

  1. 1

    Treat cc as fixed and move it across. What is a+ba + b in terms of cc?

    Predict first:
open on YouTube

Contest cornerreal contest problems

Problem 40.5.2(additional)

AIME

Suppose that ∣xi∣<1|x_i| < 1 for i=1,2,…,ni = 1, 2, \ldots, n. Suppose further that ∣x1∣+∣x2∣+⋯+∣xn∣=19+∣x1+x2+⋯+xn∣|x_1| + |x_2| + \cdots + |x_n| = 19 + |x_1 + x_2 + \cdots + x_n|. What is the smallest possible value of nn?

Problem 40.5.3(additional)

AIME

This problem also appears in the book as 12.6.16.

Let x1≤x2≤⋯≤x100x_1 \le x_2 \le \cdots \le x_{100} be real numbers such that ∣x1∣+∣x2∣+⋯+∣x100∣=1|x_1| + |x_2| + \cdots + |x_{100}| = 1 and x1+x2+⋯+x100=0x_1 + x_2 + \cdots + x_{100} = 0. Among all such 100-tuples of numbers, the greatest value that x76−x16x_{76} - x_{16} can achieve is mn\frac{m}{n}, where mm and nn are relatively prime positive integers. Find m+nm + n.

Checkpoint for section 40.3

Get 2 of 3 right to master this section. One try each, no hints.
1

Real xx and yy satisfy x2+y2=5x^2 + y^2 = 5. What is the largest possible value of x+2yx + 2y?

2

Positive xx and yy have x+y=3x + y = 3. What is the minimum value of 1x+4y\frac{1}{x} + \frac{4}{y}?

3

Real aa, bb, cc have a+b+c=6a + b + c = 6. What is the smallest possible value of a2+b2+c2a^2 + b^2 + c^2?

40.4

Practice Problems

In this section you will be able to bound expressions and count solutions of inequality systems.

These practice problems mix inequalities with counting and functions. Each one has three hints if you get stuck.

The other practice problems (40.4.1–40.4.3, 40.4.6, 40.4.8) sit in the lessons they use. Want them all on one page? Open the problem set.

Contest cornerreal contest problems

Problem 40.4.4

AMC 10

How many ordered triples of integers (x,y,z)(x, y, z) satisfy the following system of inequalities?

−x−y−z≤−2−x+y+z≤2x−y+z≤2x+y−z≤2\begin{aligned} -x - y - z &\le -2 \\ -x + y + z &\le 2 \\ x - y + z &\le 2 \\ x + y - z &\le 2 \end{aligned}

Problem 40.4.5

AMC 10

Consider functions ff that satisfy ∣f(x)−f(y)∣≤12∣x−y∣|f(x) - f(y)| \le \frac12 |x - y| for all real numbers xx and yy. Of all such functions that also satisfy the equation f(300)=f(900)f(300) = f(900), what is the greatest possible value of

f(f(800))−f(f(400))?f(f(800)) - f(f(400))?
Click a choice or type its letter (A–E).

Problem 40.4.7

AMC 12

A real-valued function ff has the property that for all real numbers aa and bb,

f(a+b)+f(a−b)=2f(a)f(b).f(a + b) + f(a - b) = 2f(a)f(b).

Which one of the following cannot be the value of f(1)f(1)?

Click a choice or type its letter (A–E).
40.5

Additional Problems

In this section you will be able to mix bounding and equality cases on harder contest problems.

The additional problems. Most are AIME: first find a bound, then build numbers that reach it.

Problems 40.5.2–40.5.5 sit in the lessons they use (AM-GM and Cauchy-Schwarz).

Contest cornerreal contest problems

Problem 40.5.1(additional)

AMC 10/12

This problem also appears in the book as 40.4.3.

What is the least possible value of (xy−1)2+(x+y)2(xy - 1)^2 + (x + y)^2 for real numbers xx and yy?

Problem 40.5.6(additional)

AIME

Alpha and Beta both took part in a two-day problem-solving competition. At the end of the second day, each had attempted questions worth a total of 500 points. Alpha scored 160 points out of 300 points attempted on the first day, and scored 140 points out of 200 points attempted on the second day. Beta, who did not attempt 300 points on the first day, had a positive integer score on each of the two days, and Beta's daily success rate (points scored divided by points attempted) on each day was less than Alpha's on that day. Alpha's two-day success ratio was 300500=35\frac{300}{500} = \frac35. The largest possible two-day success ratio that Beta could achieve is mn\frac{m}{n}, where mm and nn are relatively prime positive integers. What is m+nm + n?