# How do you solve quadratic equations?

Written by Jesse Dorrestijn - 14 March 2020: watch me explain this on youtube!

The general form of a quadratic equation is:
$ax^2 + bx + c = 0$ with $$a\neq0$$. There are several methods to solve such an equation. The easiest method to choose depends on the values of $$a, b$$ and $$c$$ and on your own skills/preferences. For
$x^2 + 5x + 3 = 0$ the values are: $$a=1, b=5$$ and $$c=3$$.

Below we solve this equation, but first we start with simple examples.

Other questions?

-How do you solve linear equations?;

-How do you solve square root equations?;

-How do you solve exponential equations?;

-How do you solve rational function equations?;

Example 1:

Solve: $$x^2 - 9 = 0$$

$$x^2 - 9 = 0$$

$$x^2 = 9$$

$$x = \sqrt{9} = 3$$  or  $$x = -\sqrt{9}=-3$$

Two solutions: $$x = 3$$  and  $$x = -3$$

Example 2:

Solve: $$3x^2 - 7x = 0$$

$$3x^2 - 7x = 0$$

$$x(3x-7) =0$$

$$x = 0$$  or  $$3x -7 =0$$

$$x = 0$$  or  $$3x = 7$$

$$x = 0$$  or  $$x = \frac{7}{3} =2\frac{1}{3}$$

Two solutions: $$x = 0$$  and  $$x =2\frac{1}{3}$$

Example 3:

Solve: $$x^2 = 0$$

$$x^2 = 0$$

$$x = \sqrt{0}=0$$  or  $$x = -\sqrt{0}=0$$

One solution: $$x = 0$$

Example 4:

Solve: $$9x^2 = 3x$$

$$9x^2 = 3x$$

$$3x^2 = x$$

$$3x^2-x = 0$$

$$x(3x-1) = 0$$

$$x = 0$$  or  $$3x -1 =0$$

$$x = 0$$  or  $$3x = 1$$

$$x = 0$$  or  $$x = \frac{1}{3}$$

Two solutions: $$x = 0$$  and  $$x =\frac{1}{3}$$

Example 5:

Solve: $$3- x^2 = 0$$

$$3 - x^2 = 0$$

$$x^2 = 3$$
$$x = \sqrt{3}$$  or  $$x = -\sqrt{3}$$

Two solutions: $$x = \sqrt{3}$$  and  $$x = -\sqrt{3}$$

Example 6:

Solve: $$x- x^2 = 0$$

$$x - x^2 = 0$$

$$x(1-x) = 0$$

$$x = 0$$  or  $$1-x = 0$$

$$x = 0$$  or  $$x = 1$$

Two solutions: $$x =0$$  and  $$x = 1$$

Example 7:

Solve: $$x- x^2 = 2x - 3x^2$$

$$x - x^2 = 2x - 3x^2$$

$$-x +2x^2 = 0$$

$$2x^2-x = 0$$

$$x(2x-1) = 0$$

$$x = 0$$  or  $$2x-1 = 0$$

$$x = 0$$  or  $$2x = 1$$

$$x = 0$$  or  $$x = \frac{1}{2}$$

Two solutions: $$x =0$$  and  $$x = \frac{1}{2}$$

Example 8:

Solve: $$x^2+1 = 0$$

$$x^2+1 = 0$$

$$x^2 = -1$$

$$x = \sqrt{-1}$$  or  $$x = -\sqrt{-1}$$

No real solutions.

In all examples above either $$b=0$$ or $$c=0$$. This results in a two-term equation. For such an equation no formula is not needed. In case there are three terms, we can always use the abc formula:

For $$a \ne 0$$, the possible solutions of $$ax^2 + bx + c = 0$$ are $x = \frac{-b + \sqrt{b^2-4ac}}{2a}$ and $x = \frac{-b - \sqrt{b^2-4ac}}{2a}$ We call $$D = b^2-4ac$$ the discriminant.This formula gives either two real solution in case D is positive, no real solutions when D is negative and one real solution when D is zero.

Example 9:

Solve: $$x^2 + 5x + 3 = 0$$

We see that $$a=1,b=5$$ and $$c=3$$ and use the abc formula. First we calculate the discriminant: $D=b^2-4ac = 5^2-4\cdot1\cdot3 = 13$ Now we calculate the solutions: $x = \frac{-b + \sqrt{b^2-4ac}}{2a} = \frac{-5 + \sqrt{13}}{2}$ or $x = \frac{-b - \sqrt{b^2-4ac}}{2a} = \frac{-5 - \sqrt{13}}{2}$ Two solutions:

$$x =-2\frac{1}{2}+\frac{1}{2}\sqrt{13}$$  and  $$x = -2\frac{1}{2}-\frac{1}{2}\sqrt{13}$$

Example 10a:

Solve: $$\frac{1}{2}x^2 - 2x - 6 = 0$$

We see that $$a=\frac{1}{2},b=-2$$ and $$c=-6$$ and use the abc formula. First we calculate the discriminant: $D=b^2-4ac = (-2)^2-4\cdot\frac{1}{2}\cdot(-6) = 16$ Now we calculate the solutions: $x = \frac{-b + \sqrt{b^2-4ac}}{2a} = \frac{2 + \sqrt{16}}{2\cdot\frac{1}{2}}$ or $x = \frac{-b - \sqrt{b^2-4ac}}{2a} = \frac{2 - \sqrt{16}}{2\cdot\frac{1}{2}}$ Two solutions:

$$x = 6$$  and  $$x = -2$$

Example 10b:

Solve: $$\frac{1}{2}x^2 - 2x - 6 = 0$$

We can solve the following equation:
$$x^2 - 4x - 12 = 0$$

We see that $$a=1,b=-4$$ and $$c=-12$$ and use the abc formula. First we calculate the discriminant: $D=b^2-4ac = (-4)^2-4\cdot1\cdot(-12) = 64$ Now we calculate the solutions: $x = \frac{-b + \sqrt{b^2-4ac}}{2a} = \frac{4 + \sqrt{64}}{2}$ or $x = \frac{-b - \sqrt{b^2-4ac}}{2a} = \frac{4 - \sqrt{64}}{2}$ Two solutions:

$$x = 6$$  and  $$x = -2$$

In some cases, equations can be solved faster by using the product sum approach.

If $$a = 1$$ we can try to find two numbers with product $$c$$ and sum $$b$$.

Example 11:

Solve: $$x^2 + 4x + 3 = 0$$

Two numbers with product 3 and sum 4:
$$3 \times 1 = 3$$
$$3 + 1 = 4$$
So, we can write:

$$x^2 + 4x + 3 = 0$$

$$(x+3)(x+1)= 0$$

$$x+3 = 0$$  or   $$x+1= 0$$
$$x = -3$$  or   $$x = -1$$

Two solutions: $$x = -3$$  or   $$x = -1$$

Example 12:

Solve: $$x^2 + 7x + 12 = 0$$

Two numbers with product $$12$$ and sum $$7$$:
First write: $$12 = 6\times2$$ or $$4\times 3$$
Calculate the sum: $$6+2=8$$ or $$4 + 3=7$$
Choose the correct combination!
$$4 \times 3 = 12$$
$$4 + 3 = 7$$
So, we can write:

$$x^2 + 7x + 12 = 0$$

$$(x+4)(x+3)= 0$$

$$x+4 = 0$$  or   $$x+3= 0$$
$$x = -4$$  or   $$x = -3$$

Two solutions: $$x = -4$$  or   $$x = -3$$

Example 13:

Solve: $$x^2 + 8x + 12 = 0$$

Two numbers with product 12 and sum 8:
First write: $$12 = 6\times2$$ or $$4\times 3$$
Calculate the sum: $$6+2=8$$ or $$4 + 3=7$$
Choose the correct combination!
$$6 \times 2 = 12$$
$$6 + 2 = 8$$
So, we can write:

$$x^2 + 8x + 12 = 0$$

$$(x+6)(x+2)= 0$$

$$x+6 = 0$$  or   $$x+2= 0$$
$$x = -6$$  or   $$x = -2$$

Two solutions: $$x = -6$$  or   $$x = -2$$

Example 14:

Solve: $$x^2 + 13x + 12 = 0$$

Two numbers with product 12 and sum 13:
If $$b$$ is one more than $$c$$ always use $$b$$ and 1.
$$12 \times 1 = 12$$
$$12 + 1 = 13$$
So, we can write:

$$x^2 + 13x + 12 = 0$$

$$(x+12)(x+1)= 0$$

$$x+12 = 0$$  or   $$x+1= 0$$

Two solutions: $$x = -12$$  and  $$x = -1$$

Example 15:

Solve: $$x^2 -5x + 6 = 0$$

Two numbers with product 6 and sum -5:

$$3 \times 2 = 6$$
$$3 + 2 = 5$$

To make it negative: add two negative signs, then the product is still positive.
$$-3 \times -2 = 6$$
$$-3 + -2 = -5$$

So, we can write:

$$x^2 - 5x + 6 = 0$$

$$(x-3)(x-2)= 0$$

Two solutions: $$x = 3$$  and  $$x = 2$$

Example 16:

Solve: $$x^2 -x - 6 = 0$$

Two numbers with product -6 and sum -1:

$$3 \times 2 = 6$$
$$3 + 2 = 5$$

Add one minus sign to one of the numbers.
$$-3 \times 2 = -6$$  or  $$3 \times -2 = -6$$
$$-3 + 2 = -1$$  or  $$3 - 2 = 1$$

Choose the correct combination.
$$-3 \times 2 = -6$$
$$-3 + 2 = -1$$
So, we can write:

$$x^2 - x - 6 = 0$$

$$(x-3)(x+2)= 0$$

Two solutions: $$x = 3$$  and  $$x = -2$$

In some cases you can use the following special rule:
$(x+p)^2 = x^2 + 2px + p^2$ For example if $$p = 3$$: $(x+3)^2 = x^2 + 6x + 9$ Use this in case you recognize that $$c$$ is a square, here $$9=3^2$$, and at the same time $$b=2\sqrt{c}$$, here $$6 = 2 \times \sqrt{9}$$.

Example 17:

Solve: $$x^2 + 6x + 9 = 0$$

$$x^2 + 6x + 9 = 0$$
$$(x+3)^2 = 0$$

$$x+3 = 0$$

$$x = -3$$

One solutions: $$x = -3$$.

Of course, you can also just use the abc formula:

$$a = 1, b=6$$ and $$c=9$$ gives
$$D = b^2 - 4ac = 36-36 = 0$$
$x = \frac{-6+\sqrt{0}}{2} = -3$ $x = \frac{-6-\sqrt{0}}{2} = -3$ Two times the same solution (because $$D=0$$).

One solutions: $$x = -3$$.

In some cases you can use the following special rule:
$(x-p)^2 = x^2 - 2px + p^2$ For example if $$p = 3$$: $(x-3)^2 = x^2 - 6x + 9$ Use this in case you recognize that $$c$$ is a square, here $$9=3^2$$, and at the same time $$b=-2\sqrt{c}$$, here $$-6 = -2 \times \sqrt{9}$$.

Example 18:

Solve: $$x^2 - 6x + 9 = 0$$

$$x^2 - 6x + 9 = 0$$

$$(x-3)^2 = 0$$

$$x-3 = 0$$

$$x = 3$$

One solutions: $$x = 3$$.

The special rule:
$(x+p)^2 = x^2 + 2px + p^2$ can also be used in case that $$b \neq 2\sqrt{c}$$.

Solve: $$x^2 + bx + c = 0$$

$$(x + \frac{b}{2})^2 -(\frac{b}{2})^2 + c = 0$$

$$(x + \frac{b}{2})^2 = (\frac{b}{2})^2 - c$$

$$(x + \frac{b}{2})= \sqrt{(\frac{b}{2})^2-c}$$  or  $$(x + \frac{b}{2})= -\sqrt{(\frac{b}{2})^2-c}$$

$$x = - \frac{b}{2} + \sqrt{(\frac{b}{2})^2-c}$$  or  $$x = -\frac{b}{2} -\sqrt{(\frac{b}{2})^2-c}$$

Example 19:

Solve: $$x^2 + 6x + 7 = 0$$

$$x^2 + 6x + 7 = 0$$

$$(x+3)^2 -9 + 7 = 0$$

$$(x+3)^2 = 2$$

$$x+3 = \sqrt{2}$$  or  $$x+3 = -\sqrt{2}$$

$$x = \sqrt{2}-3$$  or   $$x = -3-\sqrt{2}$$

Two solutions: $$x = \sqrt{2}-3$$  and  $$x=-3-\sqrt{2}$$

Of course, you can also just use the abc formula.

Another special rule can be used:
$(x-p)(x+p) = x^2 - p^2$ For example if $$p = 5$$: $(x-5)(x+5) = x^2 - 25$ In the next example we will use this rule to solve a quadratic equation.

Example 20:

Solve: $$x^2 - 9 = 0$$

$$x^2 - 9 = 0$$

$$(x+3)(x-3) = 0$$

$$x+3 = 0$$  or  $$x-3 = 0$$

$$x = -3$$  or   $$x = 3$$

Two solutions: $$x = -3$$  and  $$x=3$$

An easier method is given in example 1.

A third option is using the abc formula with $$a = 1, b=0$$ and $$c=-9$$:

$$D = b^2 -4ac = 0 - (-36) = 36$$ $x = \frac{-0 + \sqrt{36}}{2} = \frac{6}{2} = 3$ and $x = \frac{-0 - \sqrt{36}}{2} = \frac{-6}{2} = -3$ We have found the same two solutions: $$x = -3$$  and  $$x=3$$

Example 21:

Solve: $$5x^2 - 9x+7 = 0$$

Easiest method is to use the abc formula, but we can also use completing the square.

$$5x^2 - 9x+7 = 0$$

$$x^2 - \frac{9}{5}x+\frac{7}{5} = 0$$

$$(x - \frac{9}{10})^2 -(\frac{9}{10})^2 +\frac{7}{5} = 0$$

$$(x - \frac{9}{10})^2 = (\frac{9}{10})^2 -\frac{7}{5}$$

$$(x - \frac{9}{10})^2 = \frac{81}{100}-\frac{140}{100}$$

$$(x - \frac{9}{10})^2 = -\frac{59}{100}$$

$$x - \frac{9}{10} = \sqrt{-\frac{59}{100}}$$  or  $$x - \frac{9}{10} =-\sqrt{-\frac{59}{100}}$$

No solutions.

Additional check: $$D = b^2 - 4ac = 81 - 4\cdot 5 \cdot 7 = -59$$

Negative discriminant means no solutions.

Example 22:

Solve: $$(x-3)^2 = 4x$$

$$(x-3)^2 = 4x$$

$$(x-3)(x-3) = 4x$$

$$x^2-6x+9 = 4x$$

$$x^2-10x+9 = 0$$

$$(x-5)^2 - 25 + 9 = 0$$

$$(x-5)^2 = 16$$

$$x-5 = 4$$ or $$x-5 = -4$$

$$x = 9$$ or $$x = 1$$

Two solutions: $$x = 9$$  and  $$x = 1$$

$$(x-3)^2 = 4x$$

$$x^2-6x+9 = 4x$$

$$x^2-10x+9 = 0$$

product 9 sum -10:
$$3 \times 3$$ sum 6
$$-3 \times -3$$ sum -6
$$9 \times 1$$ sum 10
$$-9 \times -1$$ sum -10    Correct!

$$(x-9)(x-1)= 0$$

$$x - 9 = 0$$  or  $$x - 1 = 0$$

Two solutions: $$x = 9$$  and  $$x = 1$$

$$(x-3)^2 = 4x$$

$$x^2-6x+9 = 4x$$

$$x^2-10x+9 = 0$$

$$a=1, b=-10$$  and  $$c=9$$

$$D = b^2-4ac = 100 - 36 = 64$$
$x = \frac{10+\sqrt{64}}{2} = \frac{18}{2}=9$ $x = \frac{10-\sqrt{64}}{2} = \frac{2}{2}=1$ Two solutions: $$x = 9$$  and  $$x = 1$$

Example 23:

Solve: $$x^2 + 12 = (x+2)^2$$

$$x^2 + 12 = (x+2)^2$$

$$x^2 + 12 = (x+2)(x+2)$$

$$x^2 + 12 = x^2+4x+4$$

$$12 = 4x+4$$

This is not a quadratic equation: it is a linear equation!

$$4x+4 = 12$$

$$4x = 8$$

$$x = 2$$

One solution: $$x = 2$$

Summary:
A quadratic equation has the form: $ax^2 + bx + c = 0$ If it not in this form: adapt the equation until it has this form.

If $$b = 0$$, i.e. $ax^2 +c = 0$ move the constant to the other side of the equality sign, devide by $$a$$ and take the square root. The solutions are plus and minus this square root. See example 1.

If $$c = 0$$, i.e. $ax^2 +bx = 0$ write the equation in the form $$x(ax+b) = 0$$. See example 2.

If all parameters $$a, b$$ and $$c$$ are non-zero, you can always use the abc formula. See example 9.

If $$a$$ is 1 and you can find two numbers such that the product is equal to $$c$$ and the sum is $$b$$, it is better to use the product sum method. See example 12.

If $$a$$ not 1, first multiply or divide all coefficients such that $$a=1$$. After that use the abc formula or product sum rule. See example 10b.

Completing the square is an additional method that can always be used, but usually the product sum method and abc formula are faster. See example 22 in which three methods are used to solve an equation.