Quadratic equations in complex numbers

Kapitoly: Basic quadratic equation, Solving with a discriminant, Parametric quadratic equation, Solutions in complex numbers

If you get a negative discriminant when solving a quadratic equation, it means that the equation has no solution in the real number domain. However, this equation always has a solution in the domain of complex numbers.

Motivation

Let's try to solve the following quadratic equation: x2 + 2x + 5 = 0. The first thing to do is to calculate the discriminant: D = 4 − 20 = −16. As we already know, this equation has no solution in the domain of real numbers. However, complex numbers have the advantage of allowing us to square the negative number. Since i2 = −1, we can rewrite our discriminant in the form −16 = 16i2. We can already subtract this number and get 4i. We will calculate the solution of the quadratic equation:

$$x_1=\frac{-2+\sqrt{16i^2}}{2}=\frac{-2+4i}{2}=\frac{2(-1+2i)}{2}=2i-1.$$

$$x_2=\frac{-2-\sqrt{16i^2}}{2}=\frac{-2-4i}{2}=\frac{2(-1-2i)}{2}=-2i-1.$$

Formulas and relations

From the previous example, we can derive the formula for calculating the roots of a quadratic equation when the discriminant is negative:

$$x_{1{,}2}=\frac{-b\pm i\sqrt{|D|}}{2a}.$$

This implies that every quadratic equation has a solution. If the discriminant is non-negative, we just need real numbers; if the discriminant is negative, we have to solve the equation in complex numbers. In general, we can say that every quadratic equation has a solution in the domain of complex numbers.

Even for these complex roots, Viet's formulas apply. First the derivation for the sum:

$$\begin{eqnarray} x_1+x_2&=&\frac{-b+i\sqrt{|D|}}{2a}+\frac{-b-i\sqrt{|D|}}{2a}\\ &=&\frac{-b+i\sqrt{|D|}-b-i\sqrt{|D|}}{2a}\\ &=&\frac{-2b}{2a}=-\frac{b}{a} \end{eqnarray}$$

And for the product. We will take advantage of the fact that the discriminant is negative, and since we need to subtract it, we will calculate with minus D to get a positive number. So instead of |D| we will write −D, the result is the same.

$$\begin{eqnarray} x_1\cdot x_2&=&\frac{-b+i\sqrt{-D}}{2a}\cdot\frac{-b-i\sqrt{-D}}{2a}\\ &=&\frac{b^2+b\cdot i\sqrt{-D}-b\cdot i\sqrt{-D}-(-D)i^2}{4a^2}\\ &=&\frac{b^2+Di^2}{4a^2}\\ &=&\frac{b^2-D}{4a^2}\\ &=&\frac{b^2-(b^2-4ac)}{4a^2}\\ &=&\frac{4ac}{4a^2}=\frac{c}{a} \end{eqnarray}$$

Example

Solve the quadratic equation 2x2 + 6x + 9 = 0. Calculate the discriminant: D = 36 − 72 = −36. a negative number, so we use the formula for complex roots and just add:

$$x_1=\frac{-b+i\sqrt{|D|}}{2a}=\frac{-6+i\sqrt{36}}{4}=\frac{-6+6i}{4}=\frac{3(i-1)}{2}=-\frac32+\frac{3i}{2}$$

$$x_2=\frac{-b-i\sqrt{|D|}}{2a}=\ldots=-\frac32-\frac{3i}{2}$$