# How do you write f(x) = -x^2+5x+2 into vertex form?

Jun 3, 2018

$f \left(x\right) = - {\left(x - \frac{5}{2}\right)}^{2} + \frac{33}{4}$

#### Explanation:

Given: $f \left(x\right) = - {x}^{2} + 5 x + 2$

Vertex form: $f \left(x\right) = a {\left(x - h\right)}^{2} + k$, where $\text{vertex} = \left(h , k\right)$ and $a$ is a constant.

There are two ways to find vertex form.

1. Use the vertex formula $\text{vertex} = \left(- \frac{B}{2 A} , f \left(- \frac{B}{2 A}\right)\right)$ where the equation is in the form $A {x}^{2} + B x + C = 0$.

$\text{ }$But a second point is required to find the constant $a$.

$\text{ } - \frac{B}{2 A} = - \frac{5}{- 2} = \frac{5}{2}$

$\text{ } f \left(\frac{5}{2}\right) = - {\left(\frac{5}{2}\right)}^{2} + \frac{5}{1} \cdot \left(\frac{5}{2}\right) + 2 = - \frac{25}{4} + \frac{25}{2} + 2$

$\text{ } f \left(\frac{5}{2}\right) = - \frac{25}{4} + \frac{50}{4} + \frac{8}{4} = \frac{33}{4}$

$\text{ } f \left(x\right) = a {\left(x - \frac{5}{2}\right)}^{2} + \frac{33}{4}$

A second point can be selected by letting $x = 0$ in the original equation $\implies f \left(0\right) = 2$

$\text{ } 2 = a {\left(0 - \frac{5}{2}\right)}^{2} + \frac{33}{4}$

$\text{ } \frac{8}{4} - \frac{33}{4} = \frac{25}{4} a$

$\text{ } - \frac{25}{4} = \frac{25}{4} a$

$\text{ } a = - 1$

$f \left(x\right) = - {\left(x - \frac{5}{2}\right)}^{2} + \frac{33}{4}$

The second method is by using completing of the square .

Group the $x$ terms together and factor out a negative:

$f \left(x\right) = - {x}^{2} + 5 x + 2 = - \left({x}^{2} - 5 x\right) + 2$

Take half of the $x$-term and add the square of this halved value because it was subtracted when the square was completed and seen below:

$- {\left(x - \frac{5}{2}\right)}^{2} = - \left(x - \frac{5}{2}\right) \left(x - \frac{5}{2}\right) = - \left({x}^{2} - 5 x + \frac{25}{4}\right) = - {x}^{2} + 5 x - \frac{25}{4}$

As you can see $\frac{25}{4}$ was subtracted. This must be added to keep the equation the same:

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

$f \left(x\right) = - {\left(x - \frac{5}{2}\right)}^{2} + \frac{8}{4} + \frac{25}{4}$

$f \left(x\right) = - {\left(x - \frac{5}{2}\right)}^{2} + \frac{33}{4}$