# How do you find the max or minimum of f(x)=4x-x^2+1?

Jan 14, 2018

$\text{maximum at } \left(2 , 5\right)$

#### Explanation:

$f \left(x\right) = - {x}^{2} + 4 x + 1 \leftarrow \textcolor{b l u e}{\text{in standard form}}$

$\text{with "a=-1,b=4" and } c = 1$

• " if "a>0" then f(x) has a minimum "uuu

• " if "a<0" then f(x) has a maximum "nnn

$\text{here "a=-1<0rArr"f(x) has a maximum}$

$\text{the max/min is at the vertex of the parabola}$

$\text{to find the vertex use "color(blue)"completing the square}$

$\Rightarrow f \left(x\right) = - \left({x}^{2} - 4 x - 1\right)$

$\textcolor{w h i t e}{\times \times \times} = - \left({x}^{2} + \left(- 2\right) x + 4 - 4 - 1\right)$

$\textcolor{w h i t e}{\times \times \times} = - {\left(x - 2\right)}^{2} + 5$

$\Rightarrow \text{vertex at } \left(2 , 5\right)$

$\Rightarrow \text{maximum at } \left(2 , 5\right)$
graph{(y+x^2-4x-1)((x-2)^2+(y-5)^2-0.04)=0 [-10, 10, -5, 5]}

Jan 14, 2018

Maximum is at : color(blue)[(2,5)

#### Explanation:

Given:

$\textcolor{red}{y = f \left(x\right) = 4 x - {x}^{2} + 1}$

$\Rightarrow f \left(x\right) = - {x}^{2} + 4 x + 1$

$L e t \text{ } f \left(x\right) = - {x}^{2} + 4 x + 1 = 0$ ...(1)

The Standard Form of a Quadratic Equation is:

$f \left(x\right) = a {x}^{2} + b x + c = 0$

If $a > 0$ then

the y coordinate value of the vertex represents a Minimum

If $a < 0$ then

the y coordinate value of the vertex represents a Maximum

Hence, we have a Maximum for our problem.

Also, remember that

Vertex:

$\left[\begin{matrix}\frac{- b}{2 a} \\ f \frac{- b}{2 a}\end{matrix}\right]$

From .... (1) we observe that

color(blue)(a = -1; b = 4 and c = 1)

x coordinate of the vertex:

$\frac{- b}{2 a} = \frac{- 4}{2 \left(- 1\right)} = \left(\frac{- 4}{-} 2\right) = 2$

Substitute the value of the x coordinate in (1) to get the y coordinate value

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

$\Rightarrow - {\left(2\right)}^{2} + 4 \left(2\right) + 1$

$\Rightarrow - 4 + 8 + 1$

$\Rightarrow 5$

$\therefore$ Vertex: color(blue)[(2,5)

Hence,

Maximum is at : color(blue)[(2,5)

Analyze the graph below to understand the behavior of the quadratic:

Hope you find this solution useful.