When you understand linear equations, quadratic equations are the next step because they let you model even more complex problems.
Quadratic equations can be applied in different fields, from financial issues involving interest rates to free fall problems in physics.
In machine learning, the linear regression model is based on linear equations, which seems like a very rigid structure. In contrast, quadratic regression is based on quadratic equations, which allows it to capture more complicated relationships and therefore, can have a better performance in real-life problems.
In this topic, you will:
-
Understand what quadratic equations are,
-
Learn a simple method to determine their solutions (roots) and
-
Discover a formula to find them all.
You will also use a simple method for the resolution of these equations.
What is a quadratic equation?
A typical quadratic equation looks like this:
where , , and are real numbers. Some examples of quadratic equations are:
You can notice that the values and are perfectly valid. But, what would happen if ? In this case, the equation would be reduced to and you would go back to linear equations. You already know how to handle them and do not need to add anything new!
So, to be sure that you are dealing with quadratic equations, you must always check that . This is the reason equations like or are not quadratic equations.
The roots of a quadratic equation are the solutions of the equation: .
Finding the roots can be useful for solving practical problems involving quadratic equations.
Here is an example: if you throw a ball vertically upward with an initial speed ft/s, it will reach a height of ft after seconds. In mechanics, there is a formula that describes in terms of by the quadratic equation: .
In this situation, you might be interested in knowing when the ball would fall to the ground after being thrown. This question translates into the equation:
In this example, a solution can be a negative number. However, in the context of the problem, it would be absurd to consider such a solution. That is why you must always remember that in applications, you must be clear about the context of the problem you are solving: the context is pivotal!
Quadratic formula and number of roots
When dealing with linear equations it is easy to get the unique solution . However, when you work with quadratic equations , there may be up to two solutions or even no solutions at all!
Fortunately, you can detect how many roots a quadratic equation has by its discriminant, which is defined as:
We use the discriminant as follows:
-
If , then, there is no root,
-
If , then, there is only one root,
-
If , then, there are two different roots.
You can give a geometric interpretation of the discriminant if you note that finding the roots of the equation is the same as finding the points where the function intersects the horizontal axis.
The function is a parabola and if the coefficients are all positive, then the parabola opens up. If the discriminant is positive then the parabola is below the horizontal axis, while when it is equal to zero the parabola cuts the axis at a single point. Finally, when the discriminant is negative, the parabola is completely above the axis. The same reasoning applies when the coefficients are negative, but in this case the parabola opens downward.
Let's use the discriminant in the following equation: . We identify that , and , so the discriminant is . Since the discriminant is negative, we are completely confident that the equation has no solutions.
Once you have calculated the discriminant and know that there is at least one root, you can find them all using the quadratic formula:
When the discriminant is zero, the only root is: .
But when there are two solutions, they are given by: , .
Let's see the quadratic formula in action with the following equation . The first step is to compute the discriminant . Its value is positive, so we are certain that the equation has two different roots and its exact values are:
Roots multiplication and sum
You can determine the two possible roots of the quadratic equation with the help of the quadratic formula. Fun fact: if you know the roots of the equation, you can get information about the relation between coefficients , , and of the original equation.
To get this, let's call the solutions of the quadratic equation and . Using the quadratic formula, we get that the sum of the roots is:
Similarly, the product of the roots is:
You can use these relationships to find the roots of an equation. For the equation you have that:
Then look for two numbers such that their product is and their sum is . Since the product is equal to , two candidates are and . The sum of both numbers is equal to , so you have found the roots of the equation!
This method also helps verify that the solutions obtained by another method are the correct ones. If the sum of the calculated roots is not or their product is not , then you did something wrong!
Method of completing the square
Here is the identity that you might remember from math classes:
The left side of the equality is more compact and has the advantage that appears only once: if you were trying to isolate , it would be easier and more direct to opt for the left side of the equation. If, for example, you had the equation , you would simply write and then from which you can conclude that .
However, in most cases, you will find expressions that contain both and , but do not have a quadratic term that allows the entire equation to be factored. An example is the equation . In these cases, you want to be able to complete the expression by adding the term that would play the role of in the equation .
In general, you have an expression of the form: .
Then, add a number so that has an easy simplification like equation . Although you cannot add any number to the equation because it would unbalance it, you can add and take away the same number so that the original equation is not altered:
So, all you have to do is to find the exact value for that makes look like equation . The good thing is that this is easy because the only thing that the equation needs to become is that , so you see that:
Substituting , you obtain that in the quadratic equation:
Great job so far! It's time to summarize our work. To complete the square, you only have to add and subtract the term and simplify, or directly use the formula:
Here is an example of completing the square:
Here comes the great power of completing the square. Solving the equation is the same as solving the equation , but the latter is much simpler because you only have to isolate . We get , and finally .
This technique is great because it can be applied to any equation, and so it helps find the roots of any quadratic equation.
Conclusion
-
Quadratic equations are present in different disciplines and finding their roots is very helpful. They have the form
-
When working with them, the first thing you should do is to determine how many roots it has using the discriminant , given by . When it is negative, there are no roots, while if it is zero, there is only one root, finally, when it is positive, there are two different roots.
-
The quadratic formula gives you all the roots, and you can verify that our results are correct by adding and multiplying the roots.
-
Finally, completing the square is a simple technique that greatly simplifies solving quadratic equations.