# How do you find the roots, real and imaginary, of y=-x^2+5x-(x-3)^2  using the quadratic formula?

Apr 25, 2018

$x = 1 \mathmr{and} 4.5$

#### Explanation:

First, we expand $- {\left(x - 3\right)}^{2}$ to get $- \left({x}^{2} - 6 x + 9\right) = - {x}^{2} + 6 x - 9$

$y = - {x}^{2} + 5 x - {x}^{2} + 6 x - 9 = - 2 {x}^{2} + 11 x - 9$

$x = \frac{- 11 \pm \sqrt{{11}^{2} - 4 \left(- 2 \cdot - 9\right)}}{2 \cdot - 2}$

$x = - \frac{- 11 \pm \sqrt{121 - 4 \left(18\right)}}{4}$

$x = - \frac{- 11 \pm \sqrt{49}}{4}$

$x = - \frac{- 11 + 7}{4} \mathmr{and} - \frac{- 11 - 7}{4}$

$x = \frac{4}{4} \mathmr{and} \frac{18}{4}$

$x = 1 \mathmr{and} 4.5$

Graph:
graph{-x^2+5x-(x-3)^2 [-2.045, 7.955, -0.68, 4.32]}