Class 12 Maths, Worked in Full Past papersGet updates
Chapter 6 · Application of Derivatives

Exercise 6.3 · Q13: Sum 24, largest product: the numbers 1212 and 1212

Exercise 6.3Optimisation · Section 6.4
The question

Find two numbers whose sum is 24 and whose product is as large as possible.

Exam answer

Let the numbers be xx and 24−x24 - x (xx real). Their product is

P(x)=x(24−x)=24x−x2P(x) = x(24 - x) = 24x - x^2

P′(x)=24−2x=0P'(x) = 24 - 2x = 0 gives x=12x = 12⁠.

P′′(x)=−2<0P''(x) = -2 < 0 for all xx⁠, so P′′(12)<0P''(12) < 0⁠: x=12x = 12 is a point of maxima.

The numbers are 1212 and 1212⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

The condition "sum is 24" ties the two numbers together: once one is chosen, the other is fixed. So the product is a function of one variable, and we can maximise it with derivatives. Because the question does not say the numbers are positive, the variable may be any real number; we must show the answer beats every real choice, not just nearby ones.

Given, to find, and the plan
Given
Two (real) numbers with sum 24.
To find
The two numbers whose product is the largest possible.
Plan
Call the numbers xx and 24−x24 - x⁠; write the product P(x)P(x)⁠; find where P′(x)=0P'(x) = 0⁠; use the second derivative test for a local maximum and the sign of P′P' on the whole real line to show it is the largest product of all.

Basics you need

1One variable from a condition

A condition such as "x+y=24x + y = 24" lets us replace yy by 24−x24 - x⁠, so the quantity to optimise depends on xx alone. Basics: building the function to optimise

2Second derivative test (Theorem 4, Section 6.4)

If f′(c)=0f'(c) = 0 and f′′(c)<0f''(c) < 0⁠, then cc is a point of local maxima. Lesson: derivative tests

3Local versus largest

To show a value is the largest on the whole allowed range, show ff increases up to that point and decreases after it (sign of f′f'⁠, Theorem 1, Section 6.3). Lesson: optimisation problems

Solution

  1. Choose the variable and its allowed range

    Let one number be xx⁠. Since the sum is 24, the other number is 24−x24 - x⁠. The question puts no other restriction on the numbers, so

    x∈R(any real number).x \in \mathbf{R}\quad(\text{any real number}).
    Every pair of numbers with sum 24 has the form xx and 24−x24 - x for exactly one xx (take xx to be the first number). So maximising over all real xx is the same as maximising over all such pairs.
    From x+y=24x + y = 24⁠, subtract xx⁠: y=24−xy = 24 - x⁠. Basics: building the function
  2. The product as a function of xx

    P(x)=x(24−x)=24x−x2.P(x) = x(24 - x) = 24x - x^2.
    Product means multiply the two numbers. Expanding makes it easy to differentiate term by term.
    x(24−x)=24x−x2x(24 - x) = 24x - x^2 by the distributive law. Basics: algebra
  3. Critical point

    P′(x)=24−2x,P′′(x)=−2.P'(x) = 24 - 2x, \qquad P''(x) = -2. P′(x)=0  ⟺  2x=24  ⟺  x=12.P'(x) = 0 \iff 2x = 24 \iff x = 12.
    PP is a polynomial, differentiable everywhere, so its only critical point is where P′(x)=0P'(x) = 0⁠, namely x=12x = 12⁠.
    Critical point: f′(c)=0f'(c) = 0 or ff not differentiable (Note after Theorem 2, Section 6.4). Lesson: maxima and minima
  4. Second derivative test

    P′′(12)=−2<0P''(12) = -2 < 0⁠, so by the second derivative test (Theorem 4) x=12x = 12 is a point of local maxima of PP⁠.

    P′(12)=0P'(12) = 0 and P′′(12)<0P''(12) < 0⁠: the graph is flat at x=12x = 12 and bends downward there, so it is a peak.
    Theorem 4(i), Section 6.4. Lesson: derivative tests
  5. It is the largest product of all

    The sign of P′(x)=2(12−x)P'(x) = 2(12 - x) is the sign of 12−x12 - x⁠:

    • for x<12x < 12⁠: P′(x)>0P'(x) > 0⁠, so PP is increasing on (−∞,12](-\infty, 12]⁠;
    • for x>12x > 12⁠: P′(x)<0P'(x) < 0⁠, so PP is decreasing on [12,∞)[12, \infty)⁠.

    Hence P(x)<P(12)P(x) < P(12) for every real x≠12x \ne 12⁠. The same fact can be seen without calculus by completing the square:

    P(x)=144−(x−12)2≤144,P(x) = 144 - (x - 12)^2 \le 144,

    with equality only at x=12x = 12⁠.

    −4 12 24 28 −100 50 100 150 x P(x) largest: P(12) = 144 P′ > 0 P′ < 0 P < 0 outside 0 < x < 24
    P(x)=x(24−x)P(x) = x(24 - x) is a parabola opening downward with its vertex at (12,144)(12, 144)⁠. Every other choice of xx⁠, including negative numbers, gives a smaller product.
    The second derivative test only speaks about points near 12. The question asks for the largest product overall, so we need the global argument: PP rises all the way up to 12 and falls all the way after it.
    144−(x−12)2144 - (x - 12)^2 =144−x2+24x−144= 144 - x^2 + 24x - 144 =24x−x2= 24x - x^2⁠. Basics: sign of a product
  6. Answer the question

    x=12x = 12⁠, and the other number is 24−12=1224 - 12 = 12⁠. The largest product is P(12)=12×12=144P(12) = 12 \times 12 = 144⁠.

    The question asks for the two numbers, so state both, with the product as a check.
    Answer in the words of the question. Basics: building the function
Result

The numbers are 12 and 12; their product 144 is larger than that of any other pair with sum 24. (Textbook answer: 12, 12.)

Check it with numbers

11×13=14311 \times 13 = 143⁠, 10×14=14010 \times 14 = 140⁠, 11.5×12.5=143.7511.5 \times 12.5 = 143.75 and −2×26=−52-2 \times 26 = -52⁠: all smaller than 12×12=14412 \times 12 = 144⁠. Each falls short of 144 by exactly the square of its distance from 12: for example 144−143.75=0.25=0.52144 - 143.75 = 0.25 = 0.5^2⁠.

Common mistakes
  1. Assuming the numbers must be positive. The question does not say so. The argument above covers every real number, so the answer stands either way.
  2. Stopping at the second derivative test. It proves a local maximum; the sign of P′P' (or the completed square) proves it is the largest.
  3. Answering 144. The question asks for the two numbers.
What to take away
  1. For a fixed sum, the product is largest when the two numbers are equal.
  2. Two-number problems: use the condition to write one number in terms of the other, then optimise a function of one variable over its allowed range.
  3. Variations with powers and positivity: Question 14, Question 15, and the sum of cubes in Question 16.

Every fact used, and where it comes from

FactUsed inSource
Writing the quantity as a function of one variableSteps 1, 2Section 6.4 examples (Lesson: optimisation problems)
Critical pointStep 3Note after Theorem 2, Section 6.4 (Lesson: maxima and minima)
Second derivative testStep 4Theorem 4, Section 6.4 (Lesson: derivative tests)
Sign of f′f' decides increasing or decreasingStep 5Theorem 1 and the Remark after it, Section 6.3 (Lesson: increasing and decreasing)
Completing the squareStep 5Algebra (Basics: algebra)
Answer 12, 12ResultAnswers to Exercise 6.3, Question 13
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →