Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What two nonnegative real numbers $a$ and $b$ whose sum is 23 maximize $a^2+b^2$? Minimize $a^2+b^2$?

share|cite|improve this question

If $a+b = 23$ then $b=a-23$ so just maximize and minimize it $2a^2-46a+23^2$ using calculus.

share|cite|improve this answer
Should be $-46$ – Thomas Andrews Oct 31 '12 at 20:52


$$2(a^2 + b^2) = (a + b)^2 + (a - b)^2 = 23^2 + (a - b)^2.$$

So to maximize (minimize) $a^2 + b^2$, you should maximize (minimize) $(a - b)^2$.

share|cite|improve this answer

You could make use of the following inequality. $$(a+b)^2\leq 2(a^2+b^2)$$ The inequality comes from the fact that $(a-b)^2\geq 0$ or can be thought as Cauchy-Schwarz applied to the vectors $\vec{x}=(1,1)$ and $\vec{y}=(a,b)$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.