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

1 Answer

12

Explanation:

y = -x^2 + 8x -4 y=x2+8x4

:. y' = -2x + 8

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

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

:. 2x = 8
:. x = 4

When x=4 => y=-4^2+8(4)-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 + 8x -4
y = -(x^2 - 8x +4)
y = -((x-4)^2 -4^2+4)
y = -((x-4)^2 -16+4)
y = -((x-4)^2 -12)
y = -(x-4)^2 +12

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