Example 22: Sum 15, least sum of squares: both numbers
Find two positive numbers whose sum is 15 and the sum of whose squares is minimum.
Let the numbers be and , where . Let
, which lies in .
. So has a local minimum at , its only critical point in ; hence is least there.
Hence the numbers are and .
Want the reason behind every step, the basics and the checks?
Two unknowns tied together by one condition is really one unknown: once the first number is , the second must be . The sum of squares then becomes a function of 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
- 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 and find its allowed range. Write the sum of squares . 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
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
If and , then is a point of local minima. Lesson: first and second derivative tests
If on an interval, is decreasing there; if , increasing. We use this to show the local minimum is the least value on the whole range. Lesson: increasing and decreasing functions
, written , contains neither 0 nor 15. Basics: interval notation
Solution
One variable and its allowed range
Let the first number be . The sum is 15, so the second number is . Both must be positive:
The condition "sum is 15" removes one unknown. The word "positive" fixes the range of ; we need the range later to be sure that our answer is the least value over all allowed choices, not just near one point.Write the sum of squares as a function of
This is the quantity the question wants as small as possible. Expanding makes it easy to differentiate.Differentiate and find the critical point
lies inside , so it is an allowed value. 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 (or is not differentiable, which never happens here). Checking that is inside the range matters: a critical point outside the range would be useless.Power rule: , , .Second derivative test: a local minimum
By the second derivative test, is a point of local minima of .
A positive second derivative means the slope is increasing: negative before , zero at it, positive after. That is the shape of a valley.It is the least value on the whole range
"Local" only compares nearby points. To compare with every allowed , look at the sign of :
- for , , so is decreasing there;
- for , , so is increasing there.
So goes down all the way to and up all the way after it: for every other in . The same follows from completing the square:
The book stops at the second derivative test, which strictly speaking gives only a local minimum. With one critical point and 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 is close to 225, far above , so nothing better hides there.Theorem 1, Section 6.3: on an interval gives decreasing, gives increasing. Lesson: increasing and decreasing functionsAnswer the question asked
The first number is and the second is . The least sum of squares is
on . Open dots: the excluded ends. The lowest point is at , where . The question asks for the two numbers, so we name both. The least value itself is a useful extra.The general rule (the book's Remark)
Replace 15 by any positive number . Then , , , and gives . So the two positive numbers with sum and least sum of squares are and .
The book's Remark says "Proceeding as in Example 34". Example 34 in this reprint is a different problem (it shows that 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".
The two numbers are and (that is, 7.5 and 7.5). Their sum of squares, , is the least possible for two positive numbers with sum 15. In general, for sum the numbers are and .
| Pair | Sum of squares |
|---|---|
| 1 and 14 | |
| 5 and 10 | |
| 7 and 8 | |
| 7.5 and 7.5 |
The closer the two numbers are to each other, the smaller the sum of squares, and the equal split gives the least.
- Keeping two variables. Use the condition "sum 15" to write the second number as before differentiating.
- Stopping at "local minimum". Show that it is the least value on the whole range (sign of , or completing the square).
- Forgetting the range. "Positive" means ; check that the critical point lies inside it.
- Answering with only. The question asks for two numbers; give both.
- Optimisation recipe: one variable, its range, the function, critical points, a test, then a global argument, then answer in words.
- With a single critical point where changes from to , the local minimum is the least value on the whole interval.
- For a fixed sum, the sum of squares is least when the parts are equal.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Second number ; range | Step 1 | The question (Basics: building the function) |
| Step 2 | Algebra | |
| Extrema only at critical points | Step 3 | Theorem 2, Section 6.4 |
| Second Derivative Test | Step 4 | Theorem 4, Section 6.4 (Lesson: tests) |
| Sign of gives increasing/decreasing | Step 5 | Theorem 1, Section 6.3 |
| Sum gives and | Step 7 | Remark after Example 22 (its "Example 34" is a stale reference) |
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 →