# Find two numbers whose sum is 12 such that the sum of the square of one plus 4 times the other is a maximum?

Jun 19, 2018

0 and 12

#### Explanation:

Let the first number be $x$ ($0 \le x \le 12$). Then the second is $12 - x$.

We need to maximize

$f \left(x\right) = {x}^{2} + 4 {\left(12 - x\right)}^{2}$
$q \quad \quad \quad = {x}^{2} + 4 \left(144 - 24 x + {x}^{2}\right)$
$q \quad q \quad \quad = 5 {x}^{2} - 96 x + 576$

Differentiating, we get

$\frac{\mathrm{df}}{\mathrm{dx}} = 10 x - 96$
$\frac{{d}^{2} f}{\mathrm{dx}} ^ 2 = 10$

The only local extremum is thus at $x = \frac{96}{10} = 9.6$. Since $\frac{{d}^{2} f}{\mathrm{dx}} ^ 2 > 0$ this is a minimum. The maximum must then be at one of the endpoints of the interval $\left[0 , 12\right]$. Since $f \left(0\right) = 576 > 144 = f \left(12\right)$, the maximum occurs when the first number is 0, and the second is 12.