Minimizing the Sum of Squares
A classic optimisation problem in this chapter asks: split a fixed quantity into parts so that the sum of their squares is as small as possible. For instance, "Find two positive numbers whose sum is S and the sum of whose squares is a minimum." The derivative handles it neatly.
Setting it up
Suppose two numbers add up to a fixed total S. Call them x and S−x. The quantity we want to minimise is the sum of their squares:
f(x)=x2+(S−x)2.
By writing the second number in terms of the first, we have turned a two-variable question into a single-variable function — exactly what makes it a maxima–minima problem.
Applying the derivative
Differentiate and set to zero:
f′(x)=2x−2(S−x)=4x−2S.
f′(x)=0 ⇒ x=2S.
The second derivative is f′′(x)=4>0, which is positive everywhere, so this critical point is a genuine minimum. Hence the two numbers are equal, each 2S, and the least possible sum of squares is
(2S)2+(2S)2=2S2.
The result matches intuition: squaring punishes large numbers heavily, so making the parts as balanced as possible — all equal — keeps the total of the squares down. Pushing the split to extremes (one number near S, the other near 0) makes the sum of squares largest, not smallest.
The general recipe
Whenever a problem says "minimise the sum of squares subject to a fixed sum":
- Use the constraint to express everything in one variable. …