The sum of two numbers is $28.$ Find the numbers if the sum of their squares is a minimum.

I have no clue where to start.

The sum of two numbers is $$28$$. Find the numbers assuming that the sum of their squares is a minimum

I am an eleventh-grader. I only learned how to find the minimum for functions like $$y=ax^2+bx+c$$ or $$y=a(x-h)^2+K.$$ I don't believe I know how to do calculus and don't know what a derivative is.

Thanks!

• We have $x+y =28$. We are requested to find $x,y$ s.t. $x^2+y^2$ attains minimum. Now $y = 28-x$, so…… could you see how to proceed now? – xbh Sep 25 '18 at 16:37
• Do you have calculus as an available tool? Specifically, do you know how to find the derivative of a function, or not? – Namaste Sep 25 '18 at 16:39
• Based on your previous hint, we want to minimize $f(x) = x^2 +(28-x)^2 = ...$ – Namaste Sep 25 '18 at 16:40
• No, can you continue? I only learned how to find min in y=ax^2+bx+c or y=a(x-h)^2+K. I don't believe I know how to do calculus and don't know what a dervative is – Zebert Sep 25 '18 at 16:42
• Would factoring it help? – Zebert Sep 25 '18 at 16:43

Let $$x, y$$ be such that $$x+y = 28 \iff y= 28-x$$.

Then, the function we want to minimize looks something like this: $$x^2 + y^2 = x^2 +(28-x)^2 = x^2+ 784-56 x + x^2\tag{1}$$

Simplify $$(1)$$ to get $$f(x) = 2x^2 -56x + 784\tag{2}$$ And given you know how to find the minimum of a function of the form $$f(x) = ax^2 +bx+c$$ use your knowledge to minimize the function $$(2)$$

Begin by writing down what the problem is asking you to do.

The sum of two numbers is 28

So we take two numbers, $$x$$ and $$y$$. From this, we know that $$x + y = 28$$.

the sum of their squares is a minimum

Here, we want to minimize $$S = x^2 + y^2$$. From the above, we can see that $$y = 28 - x$$, which by substituting this into $$S$$, we get \begin{align}S &= x^2 + (28 - x)^2 \\ &= 2x^2-56x + 784.\end{align} This is a quadratic equation, which the minimum or maximum of the parabola (for any $$y = ax^2 + bx + c$$) occurs at $$x = -{b\over 2a}$$. Here, $$a = 2$$ and $$b = -56$$. Hence, \begin{align}x &= -{-56\over 2(2)} \\ &= 14.\end{align}

Here we have found $$x$$. I will leave it to you to find $$y$$.

By the RMS-AM inequality (root-mean square vs. arithmetic mean):

$$\sqrt{\frac{a^2+b^2}{2}} \ge \frac{|a|+|b|}{2} \ge \frac{a+b}{2} = \frac{28}{2}=14$$

Equalities hold iff $$\,a=b \ge 0\,$$, therefore the minimum of $$\,a^2+b^2\,$$ is attained for $$\,a=b=14\,$$.

Let's name the numbers $$a$$ and $$b$$.

$$a + b = 28$$

Furthermore, let's define the sum of the squares (so we can minimize that):

$$f(a,b) = a^2 + b^2$$

Let's use the first formula to reduce the amount of variables:

$$f(a)=a^2 + (28 - a)^2 = 2 a^2 - 2 \cdot28\cdot a +28^2$$

now let's find the minimum of $$f(x)$$:

$$\dfrac{df(a)}{da} = 4a-2\cdot28$$

Finally, we will set this to zero and solve for a:

$$4a-2\cdot28=0$$ $$4a=2\cdot28$$ $$a = 14$$

• btw, this is also why a square has compared to all the other rectangles the best area to circumference ratio. – Finn Eggers Sep 25 '18 at 16:46

$$\min_{x+y=28}x^2+y^2$$

is the same as

$$\min_xx^2+(28-x)^2$$ which you find by differentiation.

$$x-(28-x)=0\implies x=14.$$

Note that $$(a-b)^2 \ge 0 \implies a^2+b^2 \ge 2ab \implies 2(a^2+b^2) \ge a^2+b^2 +2ab.$$ That is, $$a^2+b^2 \ge\frac{(a+b)^2}{2},$$ where the equality holds when $$a-b=0$$, or equivalently $$a = b$$. In your case, $$a+b=28$$. Therefore, $$a^2+b^2$$ will be minimum when $$a = b = 28/2 = 14$$.

"I have no clue where to start" "I don't believe I know how to do calculus and don't know what a derivative is. "

Then experiment.

$$a + b =28$$. So you could have $$14 + 14 = 28$$ and $$14^2 + 14^2 = 196 + 196 = 392$$. Or you could have $$1 + 27 = 28$$ and $$1^2 + 27^2 = 1 + 729 = 730 > 392$$. Or you can have $$13 + 15 = 28$$ and $$13^2 + 15^2 = 169 +225 = 394 > 392$$.

Can you make a hypothesis? Can you argue why.

Hint: Have you ever hear of the A.M/G.M inequality? (If $$a> 0; b> 0$$ then $$\sqrt ab \le \frac {a+b}2$$ Can you see how that would be relevent.)

I only learned how to find the minimum for functions like y=ax2+bx+c or y=a(x−h)2+K

Well, that's more than I knew in the 11th grade!

Consider $$a + b = 28$$ so $$b = 28 -a$$ and you want to find the minimum of $$a^2 + b^2 = a^2 + (28 -a)^2= 28^3 - 2*28a + 2a^2$$. Can you use what you know to find the minimum?

but... experiment and muck around and see what you find. No one is expectiong you to get it right away.

====

If it were up to me and I only had the knowledge I had in the $$11$$th grade I would notice that if $$a$$ and $$b$$ are close together it seems that the sums of the squares are smaller than than if the are far apart. I would then figure if $$a = b = 14$$ would be the smallest $$a^2 + b^2$$.

Then I'd try to see if I can justify it. I'd figure $$a + b = 28$$ so $$b = 28-a$$ so I am trying to minimalize $$a^2 + b^2 = a^2 + (28 - a)^2 = 2a^2 - 56a + 28^2$$. That is smallest when $$2a^2 - 56a$$ or when $$a^2 - 28a = a(a-28)$$ is smallest.

If $$a$$ goes up by, say $$1$$ then $$a'^2 - 28a' = (a + 1)^2 - 28(a+1) = a^2 - 28 + (2a + 1)-28$$. That's an increase if $$(2a + 1) -28$$ is positive and a decrease if $$(2a+1) - 28$$ is negative.

In other words if $$2a + 1 -28 > 0$$ or $$2a > 27$$ or $$a > 13.5$$ then be increasing by $$a$$ by one will increase $$a^2 + b^2$$ but it if $$a < 13.5$$ then increasing $$a$$ by one will be decreasing the value of $$a^2 + b^2$$. So if $$a = 13.5$$ is when adding $$1$$ to $$a$$ will stop decreasing $$a^2 + b^2$$ and start increasing it. So it's reasonable that somewhere near $$a = 13.5$$ and $$b = 14.5$$ that $$a^2 + b^2$$ reaches a minimum and has nowhere to go but up.

I suppose I'd then think that $$1$$ was a jerky to big of a jump and I'd consider a jump of $$d$$ where $$d$$ can be something small like $$\frac 1{1000}$$. Then jumping from $$a$$ to $$a + d$$ would change $$a^2 -28a$$ to $$(a + d)^2 - 28(a+d) = a^2 - 28a + 2ad + d^2 - 28d$$ or a differencd of $$2ad + d^2 - 28d$$. So to find the point where that "stops" being a negative decrease and starts being a poisitive increase I want to find when $$2ad + d^2 - 28d > 0$$ and when $$2ad + d^2 - 28d =0$$ and when $$2ad + d^2 - 38d < 0$$.

If we divide by $$d$$ (which is a tiny positive amount) in other words when $$2a + d > 28$$ and $$2a + d = 28$$ and if $$2a + d < 28$$. Or with $$a > 14 - \frac d 2$$ or $$a = 14 - \frac d2$$ or $$a , 14 - \frac d2$$. As $$d$$ can be very small this shift when we go from this being a decrease to this being an increase is at $$a = 14$$

Now maybe it would have occured to me (I honestly don't know if it would have or not) that if we can replace $$b$$ with $$28 -a$$ we could "center" by averaging $$\frac {a+b}2 = \frac {28}2 = 14$$ and replacing $$a = 14 -e$$ and $$b = 14 + e$$ so $$a + b = (14 -e) + (14 + e) = 28$$.

So now we want to minimize $$(14 - e)^2 + (14 + e)^2 = 14^2 - 28 e + e^2 + 14^2 + 2e + e^2 = 2*14^2 + 2e^2$$.

How do we minimize that? Well $$e^2 \ge 0$$ so to minimize it we simply take $$e = 0$$. So it is minimum at $$e =0$$ or $$a = 14 - 0 = 14 = b = 14 + 0$$.

Suppose you take a line segment of length 28, and divide it into two pieces, $$left$$ and $$right$$, with the $$left$$ part smaller than the $$right$$ part. Now draw the squares with sides $$left$$ and $$right$$. Now suppose you move the dividing point over by $$h$$ to the right. The $$left$$ square will increase by height $$h$$, while the $$right$$ square will lose $$h$$ in height. While the amount of height that $$left$$ gains is equal to the height that $$right$$ loses, $$right$$ loses that height over a greater distance, so the area that $$right$$ loses is more than the area $$left$$ gains.

The above hold until $$left$$ is equal to $$right$$. So if you want to decrease the total area, you should increase the smaller length until the lengths are equal. Hence, you want $$left=right$$, which happens when they're both equal to $$14$$.

Another way of looking at it is that if you have a right triangle, the length squared of the hypotenuse is the sum of the squares of the legs. So this is equivalent to "You have a right triangle whose legs add up to 28. What leg lengths minimize the hypotenuse?"