# How do you find the maximum value of  y = -x^2 + 8x - 4?

Oct 20, 2016

12

#### Explanation:

$y = - {x}^{2} + 8 x - 4$

$\therefore y ' = - 2 x + 8$

and $y ' ' = - 2$ (See Note below)

As such we have maximum (as $y ' ' < 0$) at $y ' = 0 \implies - 2 x + 8 = 0$

$\therefore 2 x = 8$
$\therefore x = 4$

When $x = 4 \implies y = - {4}^{2} + 8 \left(4\right) - 4 = - 16 + 32 - 4 = 12$

Note: As this is a quadratic and the coefficient of ${x}^{2} < 0$ it should be obvious that the critical point corresponds to a maximum without the need to examine the second derivative.

Incidentally, this can also be fond without calculus by completing the square:
$y = - {x}^{2} + 8 x - 4$
$y = - \left({x}^{2} - 8 x + 4\right)$
$y = - \left({\left(x - 4\right)}^{2} - {4}^{2} + 4\right)$
$y = - \left({\left(x - 4\right)}^{2} - 16 + 4\right)$
$y = - \left({\left(x - 4\right)}^{2} - 12\right)$
$y = - {\left(x - 4\right)}^{2} + 12$

So maximum of $y = 12$ occurs when $x - 4 = 0 \implies x = 4$
graph{-x^2 + 8x -4 [-16.17, 23.83, -4.8, 15.2]}