# Find two positive numbers whose product is 10 and whose sum is as large as possible.

I got this question from MIT single variable calculus course. All over the internet, this type of optimization is not asked in this form (usually the sum is given and their product needs to be maximized or it's just like this question but the minimum sum is required)

The answer should be 5 and 2 (I think!) but I couldn't find it algebraically, here's what I tried.

$xy = 10$

$S = x + y$ This needs to be maximized!

$S = x + \frac{10}{x}$

$\frac{dS}{dx} = 1 - 10/x^2$

$x = \sqrt{10}$

if $x = \sqrt{10}$ then $y$ should be the same and $x + y = 2\sqrt{10}$ which is not larger than 7. Anyway, from the second derivative test or by plotting $S$, $\sqrt{10}$ is clearly a minimum point.

How do I solve such a question algebraically?

• If the numbers are to be limited to the range $x,y\in[0,10]$, then consider $x=9,y=\frac {10}9, x+y=\frac {91}9\gt 10$... Otherwise, consider $x=1000, y=\frac 1{100}, x+y=1000+\frac 1{100}$... – abiessu Jan 31 '14 at 1:15
• maybe there's no global maximum? And it's a trick question? – mjb4 Jan 31 '14 at 1:22
• Oh I see, stupid of me to think of 5 and 2 only (I guess they are the biggest integers which satisfy the condition). If it's integers though, how does one find an answer? – pythonista Jan 31 '14 at 1:25
• If it's only integers, then your only solutions are $(x,y) = (1,10), (2,5), (5,2), (10,1)$, and your options are $7$ and $11$. – 2012ssohn Jan 31 '14 at 1:56

Your function is $y(x)=\dfrac{10}x$ , whose derivative is $y'(x)=-\dfrac{10}{x^2}$ , which is never $0$ unless $x\to\infty$. Indeed, $\displaystyle\lim_{x\to\infty}\bigg(x\cdot\frac{10}x\bigg)=10$ , but $\displaystyle\lim_{x\to\infty}\bigg(x+\frac{10}x\bigg)\to\infty$.