The Quadratic Formula

The quadratic formula is a formual for finding the roots of a quadratic equation. It depends on a procedure called completing the square. Here's the idea. Suppose you can do algebra to get your equation to look like this:

$$(\hbox{variable-stuff})^2 = (\hbox{a number}).$$

Then you can solve for the variable-stuff by taking the square root of both sides.


Example. Solve the equation for x.

(a) $x^2 - 49 = 0$ .

$$\eqalign{ x^2 - 49 & = 0 \cr x^2 &= 49 \cr x & = \pm 7 \quad\halmos \cr}$$

(b) $x^2 + 16 = 0$ .

$$\eqalign{ x^2 + 16 & = 0 \cr x^2 & = -16 \cr x &= \pm \sqrt{-16} \cr x &= \pm 4i \quad\halmos \cr}$$

(c) $(x - 5)^2 = 4$ .

$$\eqalign{ (x - 5)^2 & = 4 \cr x - 5 & = \pm 2 \cr}$$

$x - 5 = 2$ gives $x = 7$ and $x - 5 = -2$ gives $x =
   3$ . The solutions are $x = 7$ and $x = 3$ .


Suppose you start out with a quadratic equation where you don't have a perfect square on one side. Suppose, for instance, that the variable-stuff is $x^2 + ax$ .

What would you need to add to $x^2 + ax$ to make it a perfect square? If it comes from $(x + c)^2 = x^2 + 2cx + c^2$ , then the middle (x) terms must be the same. So

$$2cx = a, \quad c = \dfrac{a}{2}.$$

Therefore, I need to add $c^2
   = \left(\dfrac{a}{2}\right)^2 = \dfrac{a^2}{4}$ to get a perfect square. The procedure is: Take half of the coefficient of the middle term ($\dfrac{a}{2}$ ), then square it ($\dfrac{a^2}{4}$ ).


Example. Solve $x^2 + 6x = 16$ by completing the square.

The x term is $6x$ . Half of 6 is 3, and $3^2 = 9$ . Therefore, I should add 9 to both sides:

$$\eqalign{x^2 + 6x &= 16 \cr x^2 + 6x + 9 &= 25 \cr (x + 3)^2 &= 25 \cr x + 3 &= \pm 5 \cr}$$

$x + 3 = 5$ gives $x = 2$ ; $x + 3 = -5$ gives $x =
   -8$ . The solutions are $x = 2$ and $x = -8$ .


Example. Solve $x^2 - 10x = 16$ by completing the square.

The x term is -10. Half of -10 is -5, and $(-5)^2 = 25$ . Therefore, I should add 25 to both sides:

$$\eqalign{x^2 - 10x &= 16 \cr x^2 - 10x + 25 &= 41 \cr (x - 5)^2 &= 41 \cr x - 5 &= \pm\sqrt{41} \cr}$$

$x - 5 = \sqrt{41}$ gives $x = 5 + \sqrt{41}$ ; $x - 5 = -\sqrt{41}$ gives $x = 5 - \sqrt{41}$ . The solutions are $x = 5 \pm
   \sqrt{41}$ .


Now I'll see how to use completing the square to obtain a formula for solving an aribtrary quadratic equation.

Start with a quadratic equation

$$ax^2 + bx + c = 0.$$

Divide by a:

$$x^2 + \dfrac{b}{a}x + \dfrac{c}{a} = 0.$$

(If $a = 0$ , the equation wasn't quadratic to begin with.)

Move the constant term to the other side:

$$x^2 + \dfrac{b}{a}x = -\dfrac{c}{a}.$$

The idea is to add something to both sides to make the left side a perfect square.

Represent the left side as the sum of the areas of a square ($x^2$ ) and a rectangle ($\dfrac{b}{a}x$ ). Divide the rectangle into two equal pieces.

$$\hbox{\epsfysize=2in \epsffile{quadratic-formula1.eps}}$$

Move the bottom piece next to the square. The total area is still the same. What is the area of the square that must be added to "complete the square"?

$$\hbox{\epsfysize=2.5in \epsffile{quadratic-formula2.eps}}$$

Since the missing square has sides of length $\dfrac{b}{2a}$ , its area is $\dfrac{b^2}{4a^2}$ . This is what I need to add to both sides:

$$x^2 + \dfrac{b}{a}x + \dfrac{b^2}{4a^2} = \dfrac{b^2}{4a^2} - \dfrac{c}{a}.$$

So

$$\left(x + \dfrac{b}{2a}\right)^2 = \dfrac{b^2 - 4ac}{4a^2}.$$

Take the square root of both sides and solve for x:

$$x + \dfrac{b}{2a} = \dfrac{\pm\sqrt{b^2 - 4ac}}{2a}, \quad x = -\dfrac{b}{2a} \pm \dfrac{\sqrt{b^2 - 4ac}}{2a}.$$

Theorem. ( The Quadratic Formula) The solutions to $ax^2 + bx + c = 0$ are

$$x = \dfrac{-b \pm\sqrt{b^2 - 4ac}}{2a}.$$


Example. Use the Quadratic Formula to solve $x^2 - 4x + 2 = 0$ .

$$x = \dfrac{4 \pm \sqrt{16 - 8}}{2} = \dfrac{4 \pm \sqrt{8}}{2} = \dfrac{4 \pm 2\sqrt{2}}{2} = 2 \pm \sqrt{2}.$$

The roots are $x = 2 +
   \sqrt{2}$ and $x = 2 - \sqrt{2}$ .


Example. Use the Quadratic Formula to solve $2x^2 - 8x + 5 = 0$ .

$$x = \dfrac{8 \pm \sqrt{64 - 40}}{4} = \dfrac{8 \pm \sqrt{24}}{4} = \dfrac{8 \pm 2\sqrt{6}}{4} = \dfrac{4 \pm \sqrt{6}}{2}.$$

The roots are $x = \dfrac{4 +
   \sqrt{6}}{2}$ and $x = \dfrac{4 - \sqrt{6}}{2}$ .


Example. Use the Quadratic Formula to solve $x^2 + 2x + 5 = 0$ .

$$x = \dfrac{-2 \pm \sqrt{4 - 20}}{2} = \dfrac{-2 \pm \sqrt{-16}}{2} = \dfrac{-2 \pm \sqrt{16}\sqrt{-1}}{2} = \dfrac{-2 \pm 4i}{2} = -1 \pm 2i.\quad\halmos$$


Example. Use the Quadratic Formula to solve $x^3 - 1 = 0$ .

$x^3 - 1 = (x - 1)(x^2 + x +
   1)$ , so $x = 1$ is a root. To find the roots for $x^2 + x + 1 = 0$ , I use the Quadratic Formula:

$$x = \dfrac{-1 \pm \sqrt{1 - 4}}{2} = \dfrac{-1 \pm \sqrt{-3}}{2} = \dfrac{-1 \pm \sqrt{3}\sqrt{-1}}{2} = \dfrac{-1 \pm i\sqrt{3}}{2}.$$

The roots are $x = 1$ and $x = \dfrac{-1 \pm i\sqrt{3}}{2}$ .


The Root Theorem says that if $p(x)$ is a polynomial, then $x - c$ is a factor of $p(x)$ if and only c is a root of $p(x)$ .

To say that $x - c$ is a factor of $p(x)$ is the same as saying that $x - c$ divides $p(x)$ ("evenly"). For example, $x - 3$ divides $x^2 + 4x - 21$ , because

$$x^2 + 4x - 21 = (x - 3)(x + 7).$$


Example. Factor $3x^2 - 16x - 35$ .

By the Root Theorem, factoring is equivalent to finding roots. By the Quadratic Formula, the roots are

$$x = \dfrac{16 \pm \sqrt{256 + 420}}{6} = \dfrac{16 \pm \sqrt{676}}{6} = \dfrac{16 \pm 26}{6}.$$

Now

$$\dfrac{16 + 26}{6} = \dfrac{42}{6} = 7 \quad\hbox{and}\quad \dfrac{16 - 26}{6} = -\dfrac{5}{3}.$$

The root $x = 7$ corresponds to a factor $x - 7$ ; the root $x
   = -\dfrac{5}{3}$ corresponds to a factor $x + \dfrac{5}{3}$ . But $\left(x + \dfrac{5}{3}\right)(x -
   7)$ would have $x^2$ as its square term, whereas the original quadratic has $3x^2$ . Therefore, I have to multiply by 3 to get the correct factorization:

$$3x^2 - 16x - 35 = 3\left(x + \dfrac{5}{3}\right)(x - 7) = (3x + 5)(x - 7).\quad\halmos$$


Example. Factor $x^2 - 6x + 6$ .

Factoring is equivalent to find the roots of $x^2 - 6x + 6 = 0$ .

$$x = \dfrac{6 \pm \sqrt{36 - 24}}{2} = \dfrac{6 \pm \sqrt{12}}{2} = \dfrac{6 \pm 2\sqrt{3}}{2} = 3 \pm \sqrt{3}.$$

The roots are $x = 3 +
   \sqrt{3}$ and $x = 3 - \sqrt{3}$ . This means that

$$x^2 - 6x + 6 = \left[x - (3 + \sqrt{3})\right] \left[x - (3 - \sqrt{3})\right].\quad\halmos$$


You can also use the Root Theorem to construct quadratics with given roots.


Example. Find a quadratic equation whose roots are 4 and -7.

$c = 4$ corresponds to the factor $x - 4$ . $c = -7$ corresponds to the factor $x - (-7) = x + 7$ . The quadratic

$$(x - 4)(x + 7) = x^2 + 3x - 28$$

has roots 4 and -7.


Example. Find a quadratic equation whose roots are $2 - \sqrt{3}$ and $2 + \sqrt{3}$ .

$c = 2 - \sqrt{3}$ corresponds to the factor $x - (2 - \sqrt{3})$ . $c = 2 + \sqrt{3}$ corresponds to the factor $x
   - (2 + \sqrt{3})$ . The quadratic

$$\left[x - (2 - \sqrt{3})\right]\left[x - (2 + \sqrt{3})\right] = x^2 - 4x + 1$$

has roots $2 - \sqrt{3}$ and $2 + \sqrt{3}$ .


The term $b^2 - 4ac$ in the quadratic formula is called the discriminant; it tells you about the roots of the quadratic equation.

(a) If $b^2 - 4ac > 0$ , there are two (different) real roots.

(b) If $b^2 - 4ac = 0$ , there is one real root. (This is called a double root or a repeated root.)

(c) If $b^2 - 4ac < 0$ , there are two complex roots. The complex roots have the form $p \pm qi$ .


Example. For what value or values of k does

$$2x^2 + kx + 5 = 0$$

have exactly one root?

The discriminant is

$$b^2 - 4ac = k^2 - 4(2)(5) = k^2 - 40.$$

There is exactly one root when the discriminant is 0:

$$\eqalign{k^2 - 40 &= 0 \cr k^2 &= 40 \cr k &= \pm 4\sqrt{5} \cr}$$

There is exactly one root when $k = \pm 4\sqrt{5}$ .


Example. Show that if k is any real number, the equation

$$x^2 - 4x + (5 + k^2) = 0$$

has complex roots.

The discriminant is

$$b^2 - 4ac = 16 - 4(5 + k^2) = -4 - 4k^2.$$

Since $-4 - 4k^2$ is negative no matter what k is, the equation always has complex roots.


Contact information

Bruce Ikenaga's Home Page

Copyright 2016 by Bruce Ikenaga