# How do you find the critical points and local max and min for y=4x-x^2?

Nov 23, 2016

Maximum at $\left(2 , 4\right)$

#### Explanation:

Although we can use calculus sometimes an intuitive common sense approach is quicker and easier.

$y = 4 x - {x}^{2} = x \left(4 - x\right)$
If $y = 0 \implies x \left(4 - x\right) = 0$
$\therefore x = 0 , x = 4$

The function has a -ve coefficient of ${x}^{2}$ so it will be $\cap$ shaped. Therefore it will have a maximum and this will occur at the midpoint of the two roots, ie at $x = 2$

$x = 2 \implies y = 8 - 4 = 4$, so $\left(2 , 4\right)$ is a maximum

graph{4x-x^2 [-10, 10, -5, 5]}

Using Calculus

$y = 4 x - {x}^{2}$
$\frac{\mathrm{dy}}{\mathrm{dx}} = 4 - 2 x$

At critical point, $\frac{\mathrm{dy}}{\mathrm{dx}} = 0 \implies 4 - 2 x = 0$
$\therefore 2 x = 4$
$\therefore x = 2$ (as above)

To establish min or max we look at the 2nd derivative:
$\frac{\mathrm{dy}}{\mathrm{dx}} = 4 - 2 x$
$\therefore \frac{{d}^{2} y}{\mathrm{dx}} ^ 2 = - 2$
When $x = 2 \implies \frac{{d}^{2} y}{\mathrm{dx}} ^ 2 < 0 \implies$ maximum (as above)