Skip to main content

Math Trailhead

Section Solving with the quadratic formula

The quadratic formula gives a systematic way to find the solutions (roots) of any quadratic equation.

The quadratic formula.

For real coefficients \(a,b,c\) with \(a\ne0\text{,}\) the solutions of \(ax^2+bx+c=0\) are
\begin{equation*} \boxed{x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}.} \end{equation*}
The symbol \(\pm\) asks you to calculate two expressions: one with a plus and one with a minus. If the square root is zero, the two expressions give the same solution. If \(b^2-4ac<0\text{,}\) there are no real solutions; complex solutions are discussed further below.

A reliable procedure.

  1. Move all terms to one side, combine like terms, and write \(ax^2+bx+c=0\text{.}\)
  2. Identify \(a,b,c\text{,}\) including their signs. Use zero for any missing linear or constant term.
  3. Compute the discriminant \(D=b^2-4ac\text{.}\)
  4. Substitute into the formula with parentheses around negative coefficients. Simplify the square root, then calculate both the \(+\) and \(-\) solutions. The denominator \(2a\) divides the entire numerator.
  5. Check by substituting your answers into the original equation. Keep exact roots unless a decimal approximation is requested.
Discriminant Real solutions Graph of \(y=ax^2+bx+c\)
\(D>0\) Two distinct real roots Crosses the x-axis twice
\(D=0\) One distinct real root, \(-b/(2a)\) Touches the x-axis at its vertex
\(D<0\) No real roots Does not meet the x-axis

Example 103.

Solve \(2x^2+x=3\text{.}\)
Solution.
  1. Subtract \(3\) from both sides to obtain \(2x^2+x-3=0\text{.}\)
  2. Thus \(a=2\text{,}\) \(b=1\text{,}\) and \(c=-3\text{.}\) Note that \(c\) is not \(3\text{!}\)
  3. The discriminant is \(D=1^2-4(2)(-3)=25\text{,}\) so the equation will have two real solutions.
  4. \begin{equation*} x=\frac{-1\pm\sqrt{25}}{2(2)} =\frac{-1\pm5}{4}. \end{equation*}
    The plus branch gives \(x=1\text{;}\) the minus branch gives \(x=-3/2\text{.}\)
  5. Check in the original equation: \(2(1)^2+1=3\) and \(2(-3/2)^2+(-3/2)=9/2-3/2=3\text{.}\)

Checkpoint 104.

Use the quadratic formula to solve
\begin{equation*} {3x^{2}+3x-3}=0. \end{equation*}
Identify \(a\text{,}\) \(b\text{,}\) and \(c\) on paper, then enter the discriminant and both solutions. Enter exact expressions; for example, type sqrt(5) for \(\sqrt{5}\text{.}\)
Discriminant: \(D=b^2-4ac=\) .
Solution using the plus sign: \(x_+=\) .
Solution using the minus sign: \(x_-=\) .
Use β€œCheck Responses” to check each answer and β€œRandomize” to try a new equation.
Hint.
Keep the signs of \(a\text{,}\) \(b\text{,}\) and \(c\text{.}\) Square all of \(b\text{,}\) including its sign. Divide the entire numerator by \(2a\text{,}\) and calculate both branches of \(x=(-b\pm\sqrt{D})/(2a)\text{.}\)
Answer 1.
Answer 2.
\(\frac{-3+\sqrt{45}}{2\cdot 3}\)
Answer 3.
\(\frac{-3-\sqrt{45}}{2\cdot 3}\)
Solution.
Here \(a=3\text{,}\) \(b=3\text{,}\) and \(c=-3\text{.}\) Therefore
\begin{equation*} D=(3)^2 -4(3)(-3)=45. \end{equation*}
Substitute into the two branches:
\begin{equation*} x_+=\frac{-(3)+\sqrt{45}}{2(3)}, \qquad x_-=\frac{-(3)-\sqrt{45}}{2(3)}. \end{equation*}
Equivalent exact expressions are accepted. The positive discriminant gives two distinct real solutions.

Factoring.

Factoring means rewriting an expression as a product of simpler expressions, called factors. For example, \(x^2+5x+6=(x+2)(x+3)\text{:}\) the factors are \(x+2\) and \(x+3\text{.}\) Factoring reverses expanding, which uses the distributive property to multiply out the factors.
For a quadratic beginning with \(x^2\text{,}\) one useful method is to look for two numbers whose sum is the coefficient of \(x\) and whose product is the constant term. Here \(2+3=5\) and \(2\cdot3=6\text{,}\) so we try \((x+2)(x+3)\text{.}\) Expanding checks the factorization:
\begin{equation*} (x+2)(x+3)=x^2+3x+2x+6=x^2+5x+6. \end{equation*}
Note that the equation from the previous example factors as \((2x+3)(x-1)=0\text{.}\) We can check this by expanding and simplifying:
\begin{equation*} (2x+3)(x-1)=2x^2-2x+3x-3=2x^2+x-3. \end{equation*}
When considering the solutions to the equation \((2x+3)(x-1)=0\text{,}\) we know that at least one factor must be zero, since the only way two numbers multiply to be zero is if at least one of them is zero. Thus \(2x+3=0\) or \(x-1=0\text{,}\) again giving the same solutions we found with the quadratic formula: \(-3/2\) and \(1\text{.}\)
Both methods find the same zeros. More generally, if a quadratic has real roots \(r_1,r_2\) (including a possible repeated root), then
\begin{equation*} ax^2+bx+c=a(x-r_1)(x-r_2). \end{equation*}
The leading coefficient \(a\) must be included. For example, \(2(x+3/2)(x-1)=(2x+3)(x-1)\text{.}\) A root \(r\) corresponds to a factor \(x-r\text{:}\) a root of \(-3/2\) gives \(x+3/2\text{,}\) not \(x-3/2\text{.}\)
Factoring can be a quick way to avoid having to go through the full process of using the quadratic formula. However, if you do not see factors quickly, the formula will always work.

Checkpoint 105.

This instant-feedback problem is reused from Factoring in Part I. Factor the expression in the answer box. After checking your factorization, set each factor equal to zero on paper to find the roots; confirm them with the formula.
Factor the following polynomial expression.
\(\displaystyle{ {12x^{2}-5x-3} }\)
Factored Form:
Answer.
\(\left(3x+1\right)\mathopen{}\left(4x-3\right)\)

Example 106.

Solve \(x^2-4x+1=0\) exactly.
Solution.
Here \(a=1\text{,}\) \(b=-4\text{,}\) \(c=1\text{,}\) so \(D=(-4)^2-4(1)(1)=12\text{.}\) Notice that \((-4)^2=16\text{.}\) Therefore
\begin{equation*} x=\frac{-(-4)\pm\sqrt{12}}{2} =\frac{4\pm2\sqrt{3}}{2}=2\pm\sqrt{3}. \end{equation*}
These are two exact real roots, approximately \(0.268\) and \(3.732\text{.}\) The real factorization is \((x-(2+\sqrt{3}))(x-(2-\sqrt{3}))\text{.}\) To check both at once, rewrite the original expression as \((x-2)^2-3\text{.}\) Substituting either root gives \((\pm\sqrt{3})^2-3=0\text{.}\)
The following two additional examples compare the cases \(D=0\) and \(D<0\text{.}\)

Example 107.

Solve \(x^2-6x+9=0\) and describe what happens on the graph.
Solution.
Here \((a,b,c)=(1,-6,9)\text{,}\) so \(D=(-6)^2-4(1)(9)=0\text{.}\) The formula gives
\begin{equation*} x=\frac{6\pm\sqrt{0}}{2}=3. \end{equation*}
Both branches coincide. Factoring gives \((x-3)^2=0\text{,}\) so \(3\) is a repeated root. The graph touches the x-axis at its vertex \((3,0)\text{.}\)

Example 108.

Solve \(x^2+2x+5=0\) over the real numbers. If complex numbers are available, find those solutions too.
Solution.
Here \((a,b,c)=(1,2,5)\) and \(D=2^2-4(1)(5)=-16\text{.}\) There are no real solutions, since no real square root of \(-16\) exists. The graph has no x-intercept.
Over the complex numbers, use \(i^2=-1\) and \(\sqrt{-16}=4i\text{:}\)
\begin{equation*} x=\frac{-2\pm4i}{2}=-1\pm2i. \end{equation*}
This quadratic cannot be factored into real linear factors.

Watch the signs and the fraction.

If \(b=-4\text{,}\) then \(-b=4\) and \(b^2=16\text{.}\) Write \((-4)^2\) on a calculator. Also, \((4\pm2\sqrt{3})/2=2\pm\sqrt{3}\) because both terms are divided by \(2\text{.}\) You cannot cancel a factor from just one term in a sum. Finally, the zero-product property applies only when the product equals zero.

Practice: try first, then reveal the solution.

Work on paper. For each equation, record standard form, the coefficients, and the discriminant before finding the roots. Each exercise has an expandable solution for checking your reasoning.

Checkpoint 109.

Solve \(3x^2+5=8x\) using the formula. Then check by factoring.
Hint.
Subtract \(8x\) first. What is the sign of \(b\text{?}\)
Solution.
Standard form is \(3x^2-8x+5=0\text{,}\) so \((a,b,c)=(3,-8,5)\) and \(D=64-60=4\text{.}\) The formula gives \(x=(8\pm2)/6\text{,}\) hence \(x=5/3\) or \(x=1\text{.}\) Factoring gives \((3x-5)(x-1)=0\) with the same solutions.

Checkpoint 110.

Solve \(2x^2+4x-1=0\) exactly. Can this polynomial be factored into linear factors with rational coefficients?
Hint.
Simplify \(\sqrt{24}\) before reducing the fraction.
Solution.
\((a,b,c)=(2,4,-1)\) and \(D=16+8=24\text{.}\) Thus \(x=(-4\pm\sqrt{24})/4=-1\pm\sqrt{6}/2\text{.}\) Both roots are irrational, so no factorization into rational linear factors exists.

Checkpoint 111.

Solve \(4x^2-12x+9=0\text{.}\) How many distinct real zeros does the corresponding function have? Describe its graph at the x-axis.
Solution.
\((a,b,c)=(4,-12,9)\) and \(D=144-144=0\text{.}\) Thus \(x=12/8=3/2\text{.}\) There is one distinct real zero, repeated twice in \((2x-3)^2\text{.}\) The upward-opening parabola touches the x-axis at its vertex \((3/2,0)\text{.}\)

Checkpoint 112.

Determine the real solutions of \(x^2+2x+5=0\) using its discriminant. If you know complex numbers, also find its complex solutions.
Solution.
\((a,b,c)=(1,2,5)\) gives \(D=4-20=-16\text{.}\) There are no real solutions. Over the complex numbers, \(x=(-2\pm4i)/2=-1\pm2i\text{.}\)

Checkpoint 113.

Solve \(3x^2=12\) using the formula and then directly using square roots. Explain why \(b=0\) does not prevent use of the formula.
Solution.
Write \(3x^2+0x-12=0\text{.}\) Then \((a,b,c)=(3,0,-12)\text{,}\) \(D=144\text{,}\) and \(x=(0\pm12)/6=\pm2\text{.}\) Directly, \(x^2=4\) gives \(x=\pm2\text{.}\) Only \(a\) must be nonzero; a zero value for \(b\) is allowed.

Checkpoint 114.

For \(2x^2-3x-2=0\text{,}\) a student writes \(x=(3\pm5)/2\text{,}\) giving \(4\) and \(-1\text{.}\) What went wrong? Find and check the correct solutions.
Solution.
The denominator should be \(2a=4\text{,}\) not \(2\text{.}\) With \((a,b,c)=(2,-3,-2)\) and \(D=25\text{,}\) the roots are \((3\pm5)/4\text{,}\) namely \(2\) and \(-1/2\text{.}\) Substitution gives \(8-6-2=0\) and \(1/2+3/2-2=0\text{.}\)

Checkpoint 115.

A rectangle is \(3\) meters longer than it is wide and has area \(18\) square meters. Let \(w\) be its width. Write a quadratic equation, use the formula to solve it, and explain which solution gives the rectangle’s dimensions.
Solution.
The area equation is \(w(w+3)=18\text{,}\) or \(w^2+3w-18=0\text{.}\) Here \((a,b,c)=(1,3,-18)\) and \(D=9+72=81\text{.}\) Thus \(w=(-3\pm9)/2\) is \(3\) or \(-6\text{.}\) Width must be positive, so the rectangle is \(3\) meters by \(6\) meters. The negative root solves the algebraic equation but does not describe a physical width.