Sub topic 12
AM-GM Inequality for Maxima and Minima
What this chapter assumes
You should already know how to compute the arithmetic mean (AM), geometric mean (GM) and harmonic mean (HM) of two numbers. This is covered in the previous chapter. You should also be comfortable solving simple equations and working with squares and square roots.
This chapter turns the AM ≥ GM relation into a method. The method finds the largest or smallest value of an expression without calculus and without trial and error.
The inequality
For positive numbers, the arithmetic mean is never smaller than the geometric mean:
- Two numbers: (x + y) / 2 ≥ √(xy)
- n numbers: (a₁ + a₂ + ... + aₙ) / n ≥ (a₁ · a₂ · ... · aₙ)^(1/n)
Equality holds only when all the numbers are equal.
For two numbers the proof takes one line. A square is never negative, so (√x − √y)² ≥ 0. Expanding gives x − 2√(xy) + y ≥ 0, which rearranges to (x + y)/2 ≥ √(xy). The square is zero only when √x = √y, which is why equality needs x = y.
Together with the earlier result GM² = AM · HM for two numbers, this gives the chain AM ≥ GM ≥ HM.
Two rules that do the work
The inequality gives two rules for positive numbers.
- Fixed sum, maximise the product. If x + y = S, then xy ≤ (S/2)². The maximum is reached at x = y = S/2.
- Fixed product, minimise the sum. If xy = P, then x + y ≥ 2√P. The minimum is reached at x = y = √P.
The same holds for n numbers. Equal parts give the largest product for a given sum, and the smallest sum for a given product.
Worked examples
Fixed sum
Two positive numbers add to 20. Find the largest possible product.
By rule 1, xy ≤ (20/2)² = 100. Equality needs x = y = 10, so the maximum is 100.
Fixed product
Two positive numbers have product 36. Find the smallest possible sum.
By rule 2, x + y ≥ 2√36 = 12, with equality at x = y = 6.
A sum that hides a constant product
Find the minimum of 2x + 18/x for x > 0.
The product of the two terms is 2x · (18/x) = 36, which is constant. So the AM of the two terms is at least √36 = 6, and the sum is at least 12. Equality needs 2x = 18/x, so x² = 9 and x = 3. Check: 6 + 6 = 12.
The same idea gives the basic result x + 1/x ≥ 2 for x > 0, with equality at x = 1.
Splitting a term to create a constant
Maximise x²y when x + y = 12 and x, y > 0.
The sum x + y is constant, but the product we want is x²y, not xy. Split x into two halves. Then the three numbers x/2, x/2 and y have the constant sum 12, so their AM is 4. By AM-GM, (x/2)(x/2)y ≤ 4³ = 64, so x²y ≤ 256.
Equality needs x/2 = y = 4, so x = 8 and y = 4. Check: 8² · 4 = 256.
The rule behind this: to maximise xᵖyᑫ with x + y fixed, split x into p equal pieces and y into q equal pieces. This makes the pieces sum to a constant.
Splitting to cancel a variable
Minimise x + 4/x² for x > 0.
The product x · 4/x² = 4/x is not constant. Split x into x/2 + x/2 and use three terms: x/2, x/2 and 4/x². Their product is (x²/4)(4/x²) = 1, which is constant. So the sum is at least 3 · 1^(1/3) = 3.
Equality needs x/2 = 4/x², so x³ = 8 and x = 2. Check: 2 + 4/4 = 3.
The splitting is chosen so the variable cancels in the product. If you cannot make the powers of x cancel, the method will not work.
A common CAT result
For positive a, b and c, the sum a + b + c has AM ≥ GM, and the reciprocals 1/a, 1/b, 1/c do too. Multiplying the two inequalities gives:
(a + b + c)(1/a + 1/b + 1/c) ≥ 9
Equality holds when a = b = c. For two numbers the bound is 4. This also follows from AM ≥ HM.
Quick reference
| Expression (x, y > 0) | What is constant | Result | Equality at |
|---|---|---|---|
| xy, with x + y = S | the sum | max xy = S²/4 | x = y = S/2 |
| x + y, with xy = P | the product | min x + y = 2√P | x = y = √P |
| x + 1/x | the product, 1 | min = 2 | x = 1 |
| ax + b/x | the product, ab | min = 2√(ab) | ax = b/x |
| x²y, with x + y = S | split x into halves | max = 4(S/3)³ · ... see below | x = 2S/3 |
For the last row, the maximum of x²y is (2S/3)² · (S/3) = 4S³/27. For S = 12 this is 4 · 1728 / 27 = 256, matching the worked example.
Traps
The method fails silently if you skip its conditions. Check three things before you trust an answer.
- Positivity. Every term you apply AM-GM to must be positive.
- A constant on the right. The sum or the product must be a fixed number, not something that still depends on the variable. A bound such as x + 4/x² ≥ 2√(4/x) is useless, because the right side still contains x.
- Equality must be reachable. The terms must be able to become equal. If they cannot, the bound is not the true extreme value.
The third trap appears often in CAT questions that ask for integers. If x + y = 15 and both must be integers, the AM-GM bound is 56.25, but the numbers cannot both be 7.5. The best integer pair is 7 and 8, with product 56. In such cases, test the integers nearest to the equality point.
Checking the traps with code
The program below compares the AM-GM bound with brute-force search over integers.
import math
def max_product_int(total):
return max(x * (total - x) for x in range(1, total))
print(max_product_int(20)) # 100, equals the bound 20**2 / 4
print(max_product_int(15)) # 56, bound is 56.25
print(min(x + 20 / x for x in range(1, 21))) # 9.0, integers only
print(2 * math.sqrt(20)) # about 8.944, the AM-GM boundFor sum 20, the bound is reached because 10 is an integer. For sum 15, the bound 56.25 is not reached. For x + 20/x with whole-number x, the bound 2√20 ≈ 8.944 needs x ≈ 4.47. The nearest integers 4 and 5 both give 9.
Time-saving habits
- Look first for the pair of terms whose product is free of the variable, as in 2x + 18/x.
- When both a sum and a product appear, decide which one is fixed by the question, then apply the matching rule.
- State the equality condition early. It tells you the answer point and often removes options in multiple-choice questions.
- If a question gives integer constraints, compute the AM-GM point first, then check the integers on both sides of it.
Exercises
Exercise
For x > 0, find the minimum value of 3x + 12/x and the value of x where it occurs.
Show answer
The product of the two terms is 3x · 12/x = 36, which is constant. So 3x + 12/x ≥ 2√36 = 12. Equality needs 3x = 12/x, so x² = 4 and x = 2. The minimum is 12, at x = 2.
Exercise
A rectangle has a perimeter of 40 units. What is the largest possible area, and what are the sides then?
Show answer
The two adjacent sides add to 20, so the sum is fixed. The area xy is at most (20/2)² = 100, with equality when x = y = 10. The largest area is 100, and the rectangle is a square with side 10.
Exercise
Positive numbers x and y satisfy x + y = 9. Find the largest value of xy² and the values of x and y where it occurs.
Show answer
Split y into two halves, so the three numbers x, y/2 and y/2 have the constant sum 9 and their AM is 3. By AM-GM, x · (y/2) · (y/2) ≤ 27, so xy² ≤ 108. Equality needs x = y/2 = 3, so x = 3 and y = 6. Check: 3 · 36 = 108.