The general form of quadratic equations (or a second-degree equation) is \[ax^{2}+bx+c=0,\quad(a\neq0)\tag{i}\] For example, \[3x^{2}-5x+2=0\] is a quadratic equation. In this example, \(a=3,b=-5\) , and \(c=2\) .
Solving Quadratic Equations by Factoring
Factoring is a powerful technique for solving quadratic equations. A quadratic equation in the form \(ax^2 + bx + c = 0\) can sometimes be solved by factoring the quadratic expression into two linear factors. If we can write the equation as \[(px + q)(rx + s) = 0,\] where \(p\) , \(q\) , \(r\) , and \(s\) are constants, then we can apply the zero-product property . The zero-product property states that if the product of two expressions is zero, then at least one of those expressions must be zero. That is to say: \[AB=0 \text{ if and only if } A=0 \text{ or } B=0.\] Thus, the equation is satisfied when either \(px + q = 0\) or \(rx + s = 0\) . This leads to two solutions for \(x\) : \[x = -\frac{q}{p} \quad \text{or} \quad x = -\frac{s}{r}.\]
Example 1. Factoring a Simple Quadratic
Solve the quadratic equation \(x^2 - 5x + 6 = 0\) by factoring.
Solution
To solve the equation \(x^2 - 5x + 6 = 0\) by factoring, we look for two numbers that multiply to \(6\) and add up to \(-5\) . Those numbers are \(-2\) and \(-3\) . Thus, the quadratic expression can be factored as follows: \[(x - 2)(x - 3) = 0.\] Applying the zero product property we have that the equation is satisfied if either \(x - 2 = 0\) or \(x - 3 = 0\) . Therefore, the solutions are \[x = 2 \quad \text{or} \quad x = 3.\]
Example 2. Factoring a Quadratic with a Leading Coefficient
Solve the quadratic equation \(2x^2 + 7x + 3 = 0\) by factoring.
Solution
To solve this equation by factoring, we write: \[2x^2 + 7x + 3 = \frac{1}{2} \bigl[(2x)^2 + 7(2x) + 6\bigr] = \frac{1}{2}(2x + a)(2x + b).\] We look for \(a\) and \(b\) such that \(a + b = 7\) and \(ab = 6\) . It is clear that \(a = 6\) and \(b = 1\) . Therefore, \[2x^2 + 7x + 3 = \frac{1}{2}(2x + 6)(2x + 1) = (x + 3)(2x + 1).\] Hence, the two factors are \[(2x + 1)(x + 3) = 0.\] By the zero product property, the equation is satisfied if either \(2x + 1 = 0\) or \(x + 3 = 0\) . Therefore, the solutions are \[2x = -1 \implies x = -\frac{1}{2} \quad \text{or} \quad x = -3.\]
Completing the Square
If we can rewrite the quadratic equation \(ax^{2}+bx+c=0\) as \[(x+A)^{2}=C,\] then we can easily solve it by taking the square root of each side (see Section: Power Equations ). The left hand side is a perfect square—the square of \(x+A\) —and if we expand it, we get \[(x+A)^{2}=x^{2}+2Ax+A^{2}.\] So in a perfect square, the constant term is the square of half of the coefficient of \(x\) .
A binomial \(x^{2}+bx\) becomes a perfect square if we add \(\left(\frac{b}{2}\right)^{2}\) to it: \[x^{2}+bx+\left(\frac{b}{2}\right)^{2}=\left(x+\frac{b}{2}\right)^{2}\] This method which is called completing the square has many applications in different parts of mathematics. One of these applications is in solving the quadratic equations and deriving the quadratic formula we have seen in this section.
To solve \[x^{2}+bx+c=0\] we add \((b/2)^{2}\) to both sides of the equation, so \[x^{2}+bx+\left(\frac{b}{2}\right)^{2}+c=\left(\frac{b}{2}\right)^{2}\] Therefore, the sum of the first three terms makes a perfect square \[\begin{align} \left(x+\frac{b}{2}\right)^{2}+c & =\left(\frac{b}{2}\right)^{2}\\ \left(x+\frac{b}{2}\right)^{2} & =\left(\frac{b}{2}\right)^{2}-c\\ x+\frac{b}{2} & =\pm\sqrt{\left(\frac{b}{2}\right)^{2}-c}\tag{taking the square roots}\\ x & =-\frac{b}{2}\pm\sqrt{\left(\frac{b}{2}\right)^{2}-c} \end{align}\]
For example, let us solve \[x^{2}-6x-5=0.\] First, transpose 5; that is, add 5 to both sides \[x^{2}-6x=5.\] If now we add \((-6/2)^{2}=9\) to both sides, the left hand side will be a perfect square \[x^{2}-6x+9=14\] \[\begin{align} (x-3)^{2} & =14\tag{express as a square}\\ x-3 & =\pm\sqrt{14}\tag{taking the square root of each sides}\\ x & =3\pm\sqrt{14} \end{align}\] The solutions therefore are \(3-\sqrt{14}\) and \(3+\sqrt{14}\) .
- If there is a constant \(a\) multiplying the \(x^{2}\) term, then we first factor out that constant and then complete the square, as illustrated in the following example.
Example 3. Solve \(3x^{2}-8x+2=0\) by completing the square.
Solution
\[\begin{align} 3x^{2}-8x+2 & =0\\ 3x^{2}-8x & =-2\\ 3\left(x^{2}-\frac{8}{3}x\right) & =-2\\ x^{2}-\frac{8}{3}x & =-\frac{2}{3}\tag{divide both sides by $3$}\\ x^{2}-\frac{8}{3}x+\left(\frac{8}{2\cdot3}\right)^{2} & =-\frac{2}{3}+\left(\frac{8}{2\cdot3}\right)^{2}\tag{complete the square by adding $\left(\frac{8}{6}\right)^{2}$ to both sides}\\ \left(x-\frac{8}{6}\right)^{2} & =-\frac{2}{3}+\frac{16}{9}=\frac{10}{9}\\ x-\frac{4}{3} & =\pm\sqrt{\frac{10}{9}}\tag{$\frac{8}{6}=\frac{4}{3}$; take the square roots}\\ x & =\frac{4}{3}\pm\frac{\sqrt{10}}{3}=\frac{4\pm\sqrt{10}}{3}. \end{align}\]
Quadratic Formula
The solutions (or roots) of the quadratic equation (i) can always be found using the following general formula, called the quadratic formula: \[\bbox[5px,border:1px solid black;background-color:#f2f2f2]{x=\frac{-b\pm\sqrt{b^{2}-4ac}}{2a}}\]
Proof
The quadratic formula can be derived using completing the square. Here’s a step-by-step proof:
- Start with the General Form : \[ax^2 + bx + c = 0.\]
- Divide by \(a\) (assuming \(a \neq 0\) ) : \[x^2 + \frac{b}{a}x + \frac{c}{a} = 0.\]
- Transpose the Constant Term to the Right Side (i.e. subtract the constant terms from both sides): \[x^2 + \frac{b}{a}x = -\frac{c}{a}.\]
- Complete the Square : To complete the square on the left-hand side, we take half of the coefficient of the \(x\) term (which is \(\frac{b}{a}\) ), square it \(\left( \frac{b}{2a} \right)^2 = \frac{b^2}{4a^2}\) , and add it to both sides of the equation: \[x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} = -\frac{c}{a} + \frac{b^2}{4a^2}.\]
- Rewrite the Left Side as a Perfect Square : The left-hand side can now be written as a perfect square: \[\left(x + \frac{b}{2a}\right)^2 = -\frac{c}{a} + \frac{b^2}{4a^2}.\]
- Find a Common Denominator on the Right Side : To combine the fractions on the right-hand side, we use \(4a^2\) as the common denominator: \[\left(x + \frac{b}{2a}\right)^2 = -\frac{4ac}{4a^2} + \frac{b^2}{4a^2} = \frac{b^2 - 4ac}{4a^2}.\]
- Take the Square Root of Both Sides : Taking the square root of both sides gives us: \[x + \frac{b}{2a} = \pm \sqrt{\frac{b^2 - 4ac}{4a^2}} = \pm \frac{\sqrt{b^2 - 4ac}}{2a}.\]
- Isolate \(x\) : Subtract \(\dfrac{b}{2a}\) from both sides of the above equation: \[x = -\frac{b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{2a}.\]
- Combine Terms : Finally, combining the terms on the right side, we obtain the quadratic formula: \[x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.\]
When we apply the general formula to the equation \(3x^{2}-5x+2=0\) with \(a=3,b=-5\) , and \(c=2\) , we get: \[\begin{align} x & =\frac{5\pm\sqrt{5^{2}-4\cdot3\cdot2}}{2\cdot3}\\ & =\frac{5\pm1}{6}\\ & =1\quad\text{or}\quad\frac{2}{3} \end{align}\]
The part of the quadratic formula that is under the square root, \(D=b^{2}-4ac\) , is called the discriminant of the equation \(ax^{2}+bx+c=0\) . There are three cases \[\begin{cases} D>0 & \text{There are two distinct real solutions}\\ D=0 & \text{There is one real solution (a double root or a double solution)}\\ D<0 & \text{There is no real solutions} \end{cases}\]
- Factorization: When Equation \(ax^2+bx+c=0\) has two real solutions \(x_{1}\) and \(x_{2}\) , it factors as \[\bbox[5px,border:1px solid black;background-color:#f2f2f2]{ax^{2}+bx+c=a(x-x_{1})(x-x_{2}).}\] For example, because the solutions of \(3x^{2}-5x+2=0\) are 1 and \(2/3\) , we have \[\begin{align} 3x^{2}-5x+2 & =3\left(x-1\right)\left(x-\frac{2}{3}\right)\\ & =(x-1)(3x-2) \end{align}\]
Example 4. Factor \(12x^{2}-43x+35\) .
Solution
It may not be easy to factor it by trial and error. So we find the solutions of \(12x^2-43x+35=0\) using the quadratic formula \[\begin{align} x_{1,2} & =\frac{43\pm\sqrt{43^{2}-4\cdot12\cdot35}}{2\cdot12}\\ & =\frac{43\pm\sqrt{169}}{2\cdot12}\\ & =\frac{43\pm13}{2\cdot12} \end{align}\] which gives \(x_{1}=\frac{5}{4}\) and \(x_{2}=\frac{7}{3}\) . Therefore, \[\begin{align} 12x^{2}-43x+35 & =a(x-x_{1})(x-x_{2})\\ & =12\left(x-\frac{5}{4}\right)\left(x-\frac{7}{3}\right)\\ & =(4x-5)(3x-7). \end{align}\]
- Sum and product of roots: If \(x_{1}\) and \(x_{2}\) are the solutions of \(ax^2+bx+c=0\) then \[\bbox[5px,border:1px solid black;background-color:#f2f2f2]{x_{1}+x_{2}=-\frac{b}{a},\qquad x_{1}x_{2}=\frac{c}{a}}\] Because if we expand \(a(x-x_{1})(x-x_{2})\) , we have \[a(x-x_{1})(x-x_{2})=ax^{2}-a(x_{1}+x_{2})x+ax_{1}x_{2}.\] So by comparing with \(ax^{2}+bx+c\) , we realize that \(-a(x_1+x_{2})=b\) and \(ax_{1}x_{2}=c\) .
For example, the solutions of \(3x^{2}-5x+2=0\) are \(1\) and \(2/3\) and \[1+\frac{2}{3}=-\frac{b}{a}=-\left(-\frac{5}{3}\right),\qquad1\cdot\frac{2}{3}=\frac{c}{a}=\frac{2}{3}\] - If \(a+b+c=0\) , then one of the roots is 1, because if we substitute 1 for \(x\) , we get \[a\times1^{2}+b\times1+c=a+b+c=0\]
- If \(a+c=b\) , then one of the roots is \(-1\) , because if we substitute \(-1\) for \(x,\) we get \[a\cdot(-1)^{2}+b\cdot(-1)+c=a-b+c=b-b=0.\]