✖

Discriminant

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

A discriminant is a polynomial that we can use to calculate the solution to a general quadratic equation, or to determine whether an equation has a solution and how many such solutions it has.

Formulae and basic relationships

First, let's review the basic form of a quadratic equation:

$$ax^2+bx+c=0,\quad a\ne0$$

where a, b, c are real numbers. The discriminant, let's denote it by D, is calculated as follows:

$$D=b^2-4\cdot a\cdot c$$

Example: consider the quadratic equation 3x2 + 5x − 7 = 0. For this equation: a = 3, b = 5, c = −7. We calculate the discriminant as follows:

$$D=5^2-4\cdot3\cdot(-7)=25+4\cdot3\cdot7=25+84=109$$

The result is 109. What does this number tell us? If the discriminant comes out...

  • positive, then the equation has two different real roots,
  • zero, then the equation has two equal real roots,
  • negative, then the equation has no solution in the real number field. However, it does have a solution in the domain of complex numbers.

How to calculate the roots of a quadratic equation

Using the discriminant, we can directly calculate the roots of a quadratic equation. The formula for calculating the roots is as follows:

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

where D is the discriminant. The full formula with the discriminant broken down looks like this:

$$x_{1{,}2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}.$$

Let's try using this formula to calculate the roots of the quadratic equation x2 + 7x + 12 = 0. First we calculate the discriminant:

$$D=7^2-4\cdot1\cdot12=49-48=1.$$

The discriminant came out positive, so the equation has two different real roots. Let's calculate the first root. First we will add the square root of the discriminant, in the second step we will subtract the square root:

$$x_1=\frac{-7+\sqrt{1}}{2}=\frac{-7+1}{2}=-\frac62=-3.$$

The first root is −3. We calculate the second root by subtracting the square root:

$$x_2=\frac{-7-\sqrt{1}}{2}=\frac{-7-1}{2}=-\frac82=-4.$$

Now we have both roots of the equation, x1 = −3 and x2 = −4.

In order to master this procedure, it is imperative that you can correctly determine the values of a, b, and c. How to determine them correctly was described in the first article on quadratic equations.

And what does this solution mean graphically, how does it show up on the graph? If we draw the graph of the function that is on the left-hand side of the equation, we find that the graph of this quadratic function intersects the x axis at two points - at x1 = −3 and x2 = −4.

Graph the function y=x^2+7x+12

The zero discriminant

If the discriminant comes out to be zero, then this means that the equation has a solution, but only one; or two, but the same. Example: solve the equation x2 − 10x + 25 = 0. Calculate the discriminant:

$$D=(-10)^2-4\cdot1\cdot25=100-100=0.$$

Calculate the root as in the last chapter, using the formula. But because the discriminant is zero, the plus/minus root of D disappears from the formula because we would be adding/subtracting zero.

$$x_{1{,}2}=\frac{-(-10)}{2}=\frac{10}{2}=5.$$

We came up with one double root, x = 5. What does this mean graphically? That the graph of the given function touches the x axis at exactly one point, its vertex.

Graph the function y=x^2-10x+25

The negative discriminant

If the discriminant is negative, then the quadratic equation has no solution in the real number domain. We can solve the equation in the domain of complex numbers, but that's for another article. For an example, let's try to solve this quadratic equation: x2 + x + 1 = 0. Discriminant:

$$D=1^2-4\cdot1\cdot1=1-4=-3.$$

Thus, the quadratic equation has no solution in the real number domain. You can try - the polynomial x2 + x + 1 will be positive for all real numbers. For example, if you put a one after x, you get: 1 + 1 + 1 = 3. If x = −1, then we have 1 − 1 + 1 = 1. If x = 0, then we have 0 + 0 + 1 = 1. And similarly for other numbers. You can also see the graph of the function y = x2 + x + 1, it never crosses the axis x.

Graph the function y=x^2+x+1

Viet's formulas

We already know how to calculate the solution of a quadratic equation. But what is the relationship between them? Let's try adding the two solutions x1 and x2:

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

If we add the roots of the quadratic equation ax2 + bx + c = 0, we get the quotient −b/a. What happens if we multiply the roots?

$$\begin{eqnarray} x_1\cdot x_2&=&\frac{-b+\sqrt{D}}{2a}\cdot\frac{-b-\sqrt{D}}{2a}\\ &=&\frac{b^2+b\cdot\sqrt{D}-b\cdot\sqrt{D}-D}{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}$$

So if we multiply the roots, we get the number c/a. And these are Viet's formulas. Together again:

$$\begin{eqnarray} x_1+x_2&=&-\frac{b}{a}\\ x_1\cdot x_2&=&\frac{c}{a} \end{eqnarray}$$

Notice that the denominator of a fraction always contains the expression a. Then the special case is the quadratic equation, for which a = 1. Then we can write Viet's formulas like this:

$$\begin{eqnarray} \mbox{ If } a=1:\\ x_1+x_2&=&-b\\ x_1\cdot x_2&=&c \end{eqnarray}$$

We can use this to find solutions to quadratic equations. Rather than calculating the discriminant in a complicated way, we can see if we are able to find the numbers x1 and x2 such that the above relations hold. Example: find the solution to the equation x2 + 8x + 15 = 0. It holds that a = 1, so we can use the simpler Viet formulas. We look for the numbers x1 and x2 such that the following holds:

$$\begin{eqnarray} x_1+x_2&=&-8\\ x_1\cdot x_2&=&15 \end{eqnarray}$$

If we restrict ourselves to integers, we have a total of four ways to get 15 when we add:

$$\begin{eqnarray} 1\cdot15&=&15\\ 3\cdot5&=&15\\ -3\cdot(-5)&=&15\\ -1\cdot(-15)&=&15 \end{eqnarray}$$

Now we need the sum of the numbers on the right hand side to give us −8. Only one pair will give such a sum, namely −3 and −5. These numbers are thus solutions of a quadratic equation. We can try plugging them into the equation, it must come out to zero:

$$\begin{eqnarray} (x=-3):\quad &&(-3)^2-8\cdot3+15=9-24+15=0\\ (x=-5):\quad &&(-5)^2-8\cdot5+15=25-40+15=0 \end{eqnarray}$$

It fits. If you know the roots, you can also write the equation in a more readable form. If x1 and x2 are the roots of the equation ax2 + bx + c = 0, then if a = 1, you can rewrite the equation in the form

$$(x-x_1)(x-x_2)=0.$$

So we can rewrite the previous equation in the form:

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

References