# How do you find the local extrema for f(x)=5x-x^2?

Mar 8, 2016

I found $x = \frac{5}{2} \mathmr{and} y = \frac{25}{4}$ as coordinates of a point of maximum for our function.

#### Explanation:

We can derive our function (representing a Parabola) and set the derivative equal to zero: this will give us the $x$ coordinate where the function neither increases nor decreases.
So:
$f ' \left(x\right) = 5 - 2 x$
set equal to zero:
$5 - 2 x = 0$
and:
$x = \frac{5}{2}$
which corresponds to a $y$ value of:
$f \left(\frac{5}{2}\right) = 5 \left(\frac{5}{2}\right) - {\left(\frac{5}{2}\right)}^{2} = \frac{25}{2} - \frac{25}{4} = \frac{25}{4}$

Graphically:
graph{5x-x^2 [-20.28, 20.28, -10.14, 10.14]}