# Solving Quadratic Equations by Quadratic Formula

In many cases, factorising a quadratic equation or completing the square can be long or difficult. We can instead use the quadratic formula.

\begin{align} \displaystyle \require{AMSsymbols} \require{color} ax^2 + bx + c &= 0 \\ ax^2 + bx &= -c \\ x^2 + \dfrac{b}{a}x &= -\dfrac{c}{a} \\ x^2 + \dfrac{b}{a}x \color{red} + \Big(\dfrac{b}{2a}\Big)^2 &= -\dfrac{c}{a} \color{red} + \Big(\dfrac{b}{2a}\Big)^2\\ \Big(x+\dfrac{b}{2a}\Big)^2 &= \dfrac{b^2-4ac}{4a^2} \\ x+\dfrac{b}{2a} &= \pm \sqrt{\dfrac{b^2-4ac}{4a^2}} \\ x &= -\dfrac{b}{2a} \pm \dfrac{\sqrt{b^2-4ac}}{2a} \\ \therefore x &= \dfrac{-b \pm \sqrt{b^2-4ac}}{2a} \end{align}

### Example 1

Solve $x^2-2x-6 =0$ for $x$.

\begin{align} \displaystyle a &= 1, b=-2,c=-6 \\ x &= \dfrac{-(-2) \pm \sqrt{(-2)^2-4 \times 1 \times (-6)}}{2 \times 1} \\ &= \dfrac{2 \pm \sqrt{4+24}}{2} \\ &= \dfrac{2 \pm \sqrt{28}}{2} \\ &= \dfrac{2 \pm 2\sqrt{7}}{2} \\ \therefore &= 1 \pm \sqrt{7} \end{align}

### Example 2

Solve $2x^2 + 3x-6 = 0$ for $x$.

\begin{align} \displaystyle a &= 2, b=3,c=-6 \\ x &= \dfrac{-3 \pm \sqrt{3^2-4 \times 2 \times (-6)}}{2 \times 2} \\ &= \dfrac{-3 \pm \sqrt{9+48}}{4} \\ \therefore &= \dfrac{-3 \pm \sqrt{57}}{4} \end{align}