# How do you find the two positive real numbers whose sum is 40 and whose product is a maximum?

Dec 10, 2016

You have to find first a function to represent the problem stated, and then find a maximum of that function

#### Explanation:

The problem states that we are looking for two numbers $x$ and $y$ such as $x + y = 40$, that is

$y = 40 - x$

We would like to find where the product $x \cdot y$ is maximum, but from the above equation we can write:

$x \cdot y = x \cdot \left(40 - x\right) = - {x}^{2} + 40 x$.

So we now have a one-variable function $f \left(x\right) = - {x}^{2} + 40 x$, and must find a positive value of $x$ where the function $f$ reaches a maximum.

To do that we calculate the derivative $f ' \left(x\right) = - 2 x + 40$, and we look for values of $x$ where $f ' \left(x\right) = - 2 x + 40 = 0$. There is only one such value (critical point) with $x = 20$.

Now the second derivative $f ' ' \left(x\right) = - 2$ is negative everywhere, and therefore is negative at the critical point $x = 20$. Hence, $x = 20$ is a maximum for $f$.

But we also know that $y = 40 - x$, so the value of $y$ is also $20$.

The solution is then $x = 20 , y = 20$