Solving quadratic equations
A quadratic equation is under the form:
$$ \forall a \in \hspace{0.05em} \mathbb{R}^*, \enspace \forall (b, c) \in \hspace{0.05em} \mathbb{R}^2, \enspace \forall X \in \mathbb{R}, $$
$$ P_2(X) = aX^2 + bX + c = 0 \qquad (1) $$
Solving by finding roots and factorizing
Solutions for \( X \) which \( P_2(X) = 0 \) are called the roots of the polynomial.
They make it possible to obtain a factorized form.
Three cases should be considered after calculating the discriminant \( \Delta \):
$$ \Delta = b^2 - 4ac \qquad (\Delta) $$
-
\( \alpha) \) if \( \textcolor{#456E3D}{\Delta >0}\):two distinct roots \( X_1, \ X_2 \)
And \( P_2(X) \) can be factorized like this:
$$ P_2(X) = a(X - X_1)(X - X_2) $$
-
\( \beta) \) if \( \Delta =0\): one double root \( X_0 \)
$$ X_0 = \frac{- b}{2a} $$
And \( P_2(X) \) can be factorized like this:
$$ P_2(X) = a(X - X_0)^2 $$
-
\( \gamma) \) if \( \Delta < 0\): two conjugate complex roots \( C_1, \ C_2 \)
And \( P_2(X) \) can be factorized like this:
$$ P_2(X) = a(X - C_1)(X - C_2) $$
Link between coefficients and roots
Furhtermore, in the general case we will also have these two relationships between the coefficients and the roots:
Demonstration
We start from the equation \( (1) \):
$$ aX^2 + bX + c = 0 \qquad (1) $$
First of all, we factorize it by \( a \):
$$ a \left[ X^2 + \frac{b}{a}X + \frac{c}{a} \right] = 0 \qquad (2) $$
However, we notice that the expression in brackets has the same start as \(\left(X + \frac{b}{2a}\right)^2 \), because :
$$ \left(X + \frac{b}{2a}\right)^2 = X^2 + \frac{b}{a}X + \frac{b^2}{4a^2} $$
So that,
$$ \left(X + \frac{b}{2a} \right)^2 - \frac{b^2}{4a^2} = X^2 + \frac{b}{a}X $$
By rewriting the equation the other way around:
$$ X^2 + \frac{b}{a}X = \left(X + \frac{b}{2a} \right)^2 - \frac{b^2}{4a^2} \qquad (3) $$
We can then transform \( (2) \) by injecting \( (3) \):
$$ a \left[ \left(X + \frac{b}{2a} \right)^2 - \frac{b^2}{4a^2} + \frac{c}{a} \right] = 0 $$
$$ a \left[ \left(X + \frac{b}{2a} \right)^2 - \frac{b^2 - 4ac}{4a^2} \right] = 0 $$
We then recognize the third quadratic remarkable identity which is:
$$ A^2 - B^2 = (A + B)(A - B) $$
With:
$$
\begin{Bmatrix}
A = X + \frac{b}{2a} \\
B = \sqrt{\frac{b^2 - 4ac}{4a^2}}
\end{Bmatrix}
$$
Which leads us to:
$$ a \left(X + \frac{b}{2a} + \sqrt{\frac{b^2 - 4ac}{4a^2}} \right) \left(X + \frac{b}{2a} - \sqrt{\frac{b^2 - 4ac}{4a^2}} \right) = 0 $$
For the sake of simplicity, let us set down:
$$ \Delta = b^2 - 4ac $$
We now have:
$$ a \left(X + \frac{b}{2a} + \frac{\sqrt{\Delta}}{2a} \right) \left(X + \frac{b}{2a} - \frac{\sqrt{\Delta}}{2a} \right) = 0 $$
So:
$$ a \left[ X - \left( -\frac{b}{2a} - \frac{\sqrt{\Delta}}{2a} \right) \right] \left[ X - \left( -\frac{b}{2a} + \frac{\sqrt{\Delta}}{2a} \right) \right] = 0 $$
$$ a \left[ X - \left( \frac{- b - \sqrt{\Delta}}{2a} \right) \right] \left(X - \left(\frac{- b + \sqrt{\Delta}}{2a} \right) \right] = 0 $$
Starting from this result, there will be three cases to take into account.
-
\( \alpha) \) if \( \textcolor{#456E3D}{\Delta >0}\):two distinct roots \( X_1, \ X_2 \)
Then \( \sqrt{\Delta} \) exists and the solutions are directly given by:
Thereby, the polynomial \(P_2(X)\) admits the following factorization:
$$ P_2(X) = a(X - X_1)(X - X_2) $$
-
\( \beta) \) if \( \Delta =0 \): one double root \( X_0 \)
Then \( \sqrt{\Delta} = 0 \) and the root is double:
$$ X_0 = \frac{- b}{2a} $$
Then the factorization of \(P_2(X)\) becomes:
$$ P_2(X) = a(X - X_0)^2 $$
-
\( \gamma) \) if \( \Delta < 0\): two conjugate complex roots \( C_1, \ C_2 \)
Then \( \sqrt{\Delta} \) is not defined on \( \mathbb{R} \). On the other hand, it can exists in the complex set \( (\mathbb{C}) \).
To solve a such equation in \( \mathbb{C} \) of type:
$$ Y= \sqrt{-\alpha } \Longrightarrow Y^2 = -\alpha $$
We do have the following solutions:
$$ \mathcal{S} = \left \{Y_{1} = i \sqrt{ |\alpha |} , \ Y_{2} = -i \sqrt{ |\alpha |} \right \} $$
In our case, the solution \( \mathcal{S} \) will become:
$$ \left \{ \Delta = i \sqrt{ |\Delta |} , \ \Delta = -i \sqrt{ |\Delta |} \right \} $$
We will then have two complex roots:
And the factorization will remain of the same form as for the case where \( \Delta > 0 \):
$$ P_2(X) = a(X - C_1)(X - C_2)$$
From the two general formulas for the roots seen above,
We can calculate their sum and product.
-
Sum of roots\(: X_1 + X_2 \)
$$ X_1 + X_2 = \frac{- b - \sqrt{\Delta}}{2a} + \frac{- b + \sqrt{\Delta}}{2a}$$
$$ X_1 + X_2 = \frac{- 2b}{2a} $$
$$ X_1 + X_2 = -\frac{b}{a} $$
-
Roots product\(: X_1 X_2 \)
$$ X_1 X_2 = \biggl( \frac{- b - \sqrt{\Delta}}{2a} \biggr) \biggl( \frac{- b + \sqrt{\Delta}}{2a} \biggr)$$
$$ X_1 X_2 = \frac{b^2 - b\sqrt{\Delta} + b\sqrt{\Delta}- \Delta }{4a^2} $$
$$ X_1 X_2 = \frac{b^2 - \Delta }{4a^2} $$
But, \(\Delta = b^2 - 4ac \), so:
$$ X_1 X_2 = \frac{b^2 - (b^2 - 4ac)}{4a^2} $$
$$ X_1 X_2 = \frac{ 4ac}{4a^2} $$
$$ X_1 X_2 = \frac{c}{a} $$
Examples
-
Solving a second degree polynomial
$$ P_2(X) = 2X^2 - 3X + 1 $$
We calculate the discriminant \( \Delta \):
$$ \Delta = (-3) ^2 - 4 \times 2 \times 1 = 1$$
So, \(P_2(X) \) has two real roots \(X_1, X_2\):
$$ \mathcal{S} = \biggl \{X_{1} = \frac{1}{2} , \ X_{2} = 1 \biggr \} $$
\(P_2(X) \) can be factorized:
$$ P_2(X) = 2 \left(X- \frac{1}{2} \right)\Bigl(X -1 \Bigr) $$
\(P_2(X) \) is the polynomial which is worth \(0\) at \( X = \frac{1}{2}\) et \( X = 1\).
-
Solving a fourth degree polynomial by a variable change
Let us solve this new equation:
$$ P_4(X) = 6X^4 - X^2 - 1 $$
When we have this type of situation, we do a variable change:
Let us set a new variable down:
$$ \varphi = X^2$$
Then the polynomial \(P_4(X)\) becomes a second degree polynomial:
$$ P_4(X) \Longrightarrow P_2( \varphi) = 6\varphi^2 - \varphi - 1 $$
We can now calculate the discriminant \( \Delta \):
$$ \Delta = (-1) ^2 - 4 \times (-1) \times 6 = 25$$
Then \(P_2(\varphi ) \) has two real roots \(\varphi _1, \varphi _2\):
$$ \mathcal{S} = \biggl \{\varphi_{1} =-\frac{1}{3} , \ \varphi_{2} = \frac{1}{2 } \biggr \} $$
And \(P_2(\varphi) \) can be factorized:
$$ P_2(\varphi) = 6 \left(\varphi + \frac{1}{3} \right)\left(\varphi - \frac{1}{2 } \right) $$
We finally replace \(\varphi\) by its initial value, \( \varphi = X^2\) :
$$ P_4(X) = 6 \left(X^2 + \frac{1}{3} \right)\left(X^2 - \frac{1}{2 } \right) $$
We can further break it down:
So,
$$ P_4(X) = 6 \left(X^2 + \frac{1}{3} \right)\left(X + \frac{1}{\sqrt2 } \right)\left(X - \frac{1}{\sqrt2} \right) $$
$$ P_4(X) = 6 \left(X^2 + \frac{1}{3} \right)\left(X + \frac{\sqrt2}{2 } \right)\left(X - \frac{\sqrt2}{2} \right) $$