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

Example 22: Sum 15, least sum of squares: both numbers 152\tfrac{15}{2}

ExamplesOptimisation · Section 6.4
The question

Find two positive numbers whose sum is 15 and the sum of whose squares is minimum.

Exam answer

Let the numbers be xx and 15−x15 - x⁠, where 0<x<150 < x < 15⁠. Let

S(x)=x2+(15−x)2=2x2−30x+225\begin{aligned} S(x) &= x^2 + (15 - x)^2 \\ &= 2x^2 - 30x + 225 \end{aligned} S′(x)=4x−30,S′′(x)=4S'(x) = 4x - 30, \quad S''(x) = 4

S′(x)=0⇒x=152S'(x) = 0 \Rightarrow x = \frac{15}{2}⁠, which lies in (0,15)(0, 15)⁠.

S′′(152)=4>0S''\left(\frac{15}{2}\right) = 4 > 0⁠. So SS has a local minimum at x=152x = \frac{15}{2}⁠, its only critical point in (0,15)(0, 15)⁠; hence SS is least there.

Hence the numbers are 152\dfrac{15}{2} and 152\dfrac{15}{2}⁠.

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

The one idea this problem is built on

Two unknowns tied together by one condition is really one unknown: once the first number is xx⁠, the second must be 15−x15 - x⁠. The sum of squares then becomes a function of xx alone, a quadratic opening upward, and calculus finds the bottom of it. Splitting a total into two equal parts keeps both squares as small as possible.

Given, to find, and the plan
Given
Two positive numbers with sum 15.
To find
The two numbers for which the sum of their squares is least.
Plan
Name the first number xx and find its allowed range. Write the sum of squares S(x)S(x)⁠. Find the critical point, apply the second derivative test, then show the local minimum is the least value on the whole range. State the numbers.

Basics you need

1Turning words into a function

Choose one variable, express every quantity in the problem through it, and write the quantity to be made smallest (or largest) as a function of that variable, with its allowed range. Basics: building the function to optimise

2Second derivative test (Theorem 4, Section 6.4)

If S′(c)=0S'(c) = 0 and S′′(c)>0S''(c) > 0⁠, then cc is a point of local minima. Lesson: first and second derivative tests

3Increasing and decreasing (Theorem 1, Section 6.3)

If S′<0S' < 0 on an interval, SS is decreasing there; if S′>0S' > 0⁠, increasing. We use this to show the local minimum is the least value on the whole range. Lesson: increasing and decreasing functions

4Open intervals

0<x<150 < x < 15⁠, written (0,15)(0, 15)⁠, contains neither 0 nor 15. Basics: interval notation

Solution

  1. One variable and its allowed range

    Let the first number be xx⁠. The sum is 15, so the second number is 15−x15 - x⁠. Both must be positive:

    x>0and15−x>0  ⟺  0<x<15.x > 0 \quad\text{and}\quad 15 - x > 0 \iff 0 < x < 15.
    The condition "sum is 15" removes one unknown. The word "positive" fixes the range of xx⁠; we need the range later to be sure that our answer is the least value over all allowed choices, not just near one point.
    15−x>015 - x > 0 rearranges to x<15x < 15⁠. Basics: interval notation
  2. Write the sum of squares as a function of xx

    S(x)=x2+(15−x)2=x2+225−30x+x2=2x2−30x+225,0<x<15.\begin{aligned} S(x) &= x^2 + (15 - x)^2 \\ &= x^2 + 225 - 30x + x^2 \\ &= 2x^2 - 30x + 225, \quad 0 < x < 15. \end{aligned}
    This is the quantity the question wants as small as possible. Expanding makes it easy to differentiate.
    (a−b)2=a2−2ab+b2(a - b)^2 = a^2 - 2ab + b^2 with a=15a = 15⁠, b=xb = x⁠. Basics: building the function to optimise
  3. Differentiate and find the critical point

    S′(x)=4x−30,S′′(x)=4.S'(x) = 4x - 30, \qquad S''(x) = 4. S′(x)=0  ⟺  x=304=152.S'(x) = 0 \iff x = \frac{30}{4} = \frac{15}{2}.

    152=7.5\frac{15}{2} = 7.5 lies inside (0,15)(0, 15)⁠, so it is an allowed value. SS is a polynomial, differentiable everywhere, so this is the only critical point.

    By Theorem 2 the smallest value at an interior point can only occur where S′=0S' = 0 (or SS is not differentiable, which never happens here). Checking that 152\frac{15}{2} is inside the range matters: a critical point outside the range would be useless.
    Power rule: ddx(2x2)=4x\frac{d}{dx}(2x^2) = 4x⁠, ddx(−30x)=−30\frac{d}{dx}(-30x) = -30⁠, ddx225=0\frac{d}{dx}225 = 0⁠.
  4. Second derivative test: a local minimum

    S′′ ⁣(152)=4>0.S''\!\left(\tfrac{15}{2}\right) = 4 > 0.

    By the second derivative test, x=152x = \frac{15}{2} is a point of local minima of SS⁠.

    A positive second derivative means the slope S′S' is increasing: negative before 152\frac{15}{2}⁠, zero at it, positive after. That is the shape of a valley.
    Theorem 4(ii): S′(c)=0S'(c) = 0 and S′′(c)>0S''(c) > 0 give a point of local minima. Lesson: first and second derivative tests
  5. It is the least value on the whole range

    "Local" only compares nearby points. To compare with every allowed xx⁠, look at the sign of S′(x)=4x−30=4(x−152)S'(x) = 4x - 30 = 4\left(x - \frac{15}{2}\right)⁠:

    • for 0<x<1520 < x < \frac{15}{2}⁠, S′(x)<0S'(x) < 0⁠, so SS is decreasing there;
    • for 152<x<15\frac{15}{2} < x < 15⁠, S′(x)>0S'(x) > 0⁠, so SS is increasing there.

    So SS goes down all the way to x=152x = \frac{15}{2} and up all the way after it: S(x)>S ⁣(152)S(x) > S\!\left(\frac{15}{2}\right) for every other xx in (0,15)(0, 15)⁠. The same follows from completing the square:

    S(x)=2(x−152)2+2252 ≥ 2252.S(x) = 2\left(x - \tfrac{15}{2}\right)^2 + \tfrac{225}{2} \ \ge\ \tfrac{225}{2}.
    The book stops at the second derivative test, which strictly speaking gives only a local minimum. With one critical point and S′S' negative before it and positive after it, the local minimum is also the least value overall. The ends 0 and 15 are excluded, and near them SS is close to 225, far above 2252\frac{225}{2}⁠, so nothing better hides there.
    Theorem 1, Section 6.3: f′<0f' < 0 on an interval gives decreasing, f′>0f' > 0 gives increasing. Lesson: increasing and decreasing functions
  6. Answer the question asked

    The first number is x=152x = \frac{15}{2} and the second is 15−152=15215 - \frac{15}{2} = \frac{15}{2}⁠. The least sum of squares is

    S ⁣(152)=2254+2254=2252=112.5.S\!\left(\tfrac{15}{2}\right) = \tfrac{225}{4} + \tfrac{225}{4} = \tfrac{225}{2} = 112.5.
    5 7.5 10 15 100 112.5 200 225 x S least value 112.5 x = 0 excluded x = 15 excluded S(x) = x² + (15 − x)²
    S(x)=x2+(15−x)2S(x) = x^2 + (15-x)^2 on 0<x<150 < x < 15⁠. Open dots: the excluded ends. The lowest point is at x=7.5x = 7.5⁠, where S=112.5S = 112.5⁠.
    The question asks for the two numbers, so we name both. The least value itself is a useful extra.
  7. The general rule (the book's Remark)

    Replace 15 by any positive number kk⁠. Then S(x)=x2+(k−x)2S(x) = x^2 + (k-x)^2⁠, S′(x)=4x−2kS'(x) = 4x - 2k⁠, S′′(x)=4>0S''(x) = 4 > 0⁠, and S′(x)=0S'(x) = 0 gives x=k2x = \frac{k}{2}⁠. So the two positive numbers with sum kk and least sum of squares are k2\frac{k}{2} and k2\frac{k}{2}⁠.

    The book's Remark says "Proceeding as in Example 34". Example 34 in this reprint is a different problem (it shows that tan⁡−1(sin⁡x+cos⁡x)\tan^{-1}(\sin x + \cos x) is increasing), so the reference is left over from an older numbering; the example meant is this one (Example 22). The working above is exactly that "proceeding".
Result

The two numbers are 152\frac{15}{2} and 152\frac{15}{2} (that is, 7.5 and 7.5). Their sum of squares, 2252=112.5\frac{225}{2} = 112.5⁠, is the least possible for two positive numbers with sum 15. In general, for sum kk the numbers are k2\frac{k}{2} and k2\frac{k}{2}⁠.

Check it with numbers
PairSum of squares
1 and 141+196=1971 + 196 = 197
5 and 1025+100=12525 + 100 = 125
7 and 849+64=11349 + 64 = 113
7.5 and 7.556.25+56.25=112.556.25 + 56.25 = 112.5

The closer the two numbers are to each other, the smaller the sum of squares, and the equal split gives the least.

Common mistakes
  1. Keeping two variables. Use the condition "sum 15" to write the second number as 15−x15 - x before differentiating.
  2. Stopping at "local minimum". Show that it is the least value on the whole range (sign of S′S'⁠, or completing the square).
  3. Forgetting the range. "Positive" means 0<x<150 < x < 15⁠; check that the critical point lies inside it.
  4. Answering with xx only. The question asks for two numbers; give both.
What to take away
  1. Optimisation recipe: one variable, its range, the function, critical points, a test, then a global argument, then answer in words.
  2. With a single critical point where f′f' changes from −- to ++⁠, the local minimum is the least value on the whole interval.
  3. For a fixed sum, the sum of squares is least when the parts are equal.

Every fact used, and where it comes from

FactUsed inSource
Second number 15−x15 - x⁠; range 0<x<150 < x < 15Step 1The question (Basics: building the function)
(a−b)2=a2−2ab+b2(a-b)^2 = a^2 - 2ab + b^2Step 2Algebra
Extrema only at critical pointsStep 3Theorem 2, Section 6.4
Second Derivative TestStep 4Theorem 4, Section 6.4 (Lesson: tests)
Sign of f′f' gives increasing/decreasingStep 5Theorem 1, Section 6.3
Sum kk gives k2\frac{k}{2} and k2\frac{k}{2}Step 7Remark after Example 22 (its "Example 34" is a stale reference)
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 →