On this page
This is one of the first optimisation problems you meet in Class 12, and it comes with two harder cousins. In the current NCERT Class 12 Mathematics Part I textbook, chapter 6 (Application of Derivatives), Questions 13 to 15 of Exercise 6.3 sit side by side: find two numbers whose sum is 24 and whose product is as large as possible; find positive x and y with x + y = 60 and xy³ maximum; find two positive numbers with sum 35 and x²y⁵ maximum. One rule answers all three, with one trap to avoid.
How do you find two numbers whose sum is 24 and product is maximum?
Call one number x. The other is 24 − x, so the product is P(x) = x(24 − x) = 24x − x². Three ways to finish:
Derivative. P′(x) = 24 − 2x is zero at x = 12, and P″(x) = −2 is negative, so this is a maximum. The numbers are 12 and 12; the product is 144.
Completing the square. P(x) = 144 − (x − 12)², so P never exceeds 144 and reaches it only at x = 12. Our guide to the maximum and minimum value of a quadratic shows this method in full.
AM-GM. For non-negative numbers, the arithmetic mean is at least the geometric mean, with equality only when the numbers are equal (AM-GM inequality). So √(xy) ≤ (x + y)/2 = 12, giving xy ≤ 144.
Move d away from 12 and you lose exactly d²: 11 × 13 = 143, 10 × 14 = 140.
Why does an equal split give the biggest product?
Picture x and y as the sides of a rectangle: a fixed sum is a fixed perimeter, and the product is the area. The square wins, the same idea as the maximum area rectangle with 40 m of fence. This balance holds only because x and y play identical roles in xy. Change the powers and it moves.
What changes when the product is x²y or xy³?
Find positive x and y with x + y = 24 so that x²y is as large as possible.
Now f(x) = x²(24 − x) = 24x² − x³, so f′(x) = 48x − 3x² = 3x(16 − x). The only positive critical point is x = 16, which gives y = 8 and x²y = 256 × 8 = 2048. The equal split, 12 and 12, gives only 144 × 12 = 1728. Nearby values confirm the peak: x = 14 gives 196 × 10 = 1960, and x = 18 gives 324 × 6 = 1944.
Notice the answer: 16 and 8 split 24 in the ratio 2 : 1, the same ratio as the powers. That is the general rule.
Ratio rule. To maximise x^m y^n for positive x and y with x + y = S, take x = mS/(m + n) and y = nS/(m + n).
Why it works: write S as m copies of x/m plus n copies of y/n. AM-GM applied to these m + n pieces says their product is largest when every piece is equal (AM-GM inequality), so x/m = y/n.
Now the two NCERT questions take one line each.
x + y = 60, maximise xy³: ratio 1 : 3, so x = 15 and y = 45. The derivative agrees: f(x) = x(60 − x)³ gives f′(x) = (60 − x)²(60 − 4x), zero inside the range only at x = 15.
x + y = 35, maximise x²y⁵: ratio 2 : 5, so x = 10 and y = 25.
Why does the word positive matter?
For xy with sum 24, the product is a downward parabola, so 144 is the largest value over all real numbers. But x²(24 − x) is a cubic with no largest value if negatives are allowed: x = −10, y = 34 gives 100 × 34 = 3400, more than 2048, and it keeps growing as x goes more negative. So over all real numbers x = 16 is only a local maximum; the word positive, which NCERT uses in Questions 14 and 15, is what makes it the answer. Before differentiating, underline the domain.
A 60-second check before you write the answer
Write the product in one variable, using the fixed sum.
Note the domain: positive, whole numbers, or any real number.
Predict the answer with the ratio rule.
Confirm with the derivative and the sign of the second derivative, or a sign chart.
Plug in one value on each side of your answer and check both products are smaller.
If your prediction and your working disagree, find the step where they split. The Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer, so you can compare your line of working with each step. If AM-GM itself feels shaky, the Fermi Concept Library gives each mathematics concept its own lesson. For more ways AM-GM shortens JEE algebra, read the AM-GM inequality in JEE maths.



