Completing the Square and the Quadratic Formula
Learning Outcomes
- Complete the square to solve a quadratic equation.
- Use the quadratic formula to solve a quadratic equation.
- Use the discriminant to determine the number and type of solutions to a quadratic equation.
- Given a quadratic equation that cannot be factored and with [latex]a=1[/latex], first add or subtract the constant term to the right sign of the equal sign.
[latex]{x}^{2}+4x=-1[/latex]
- Multiply the b term by [latex]\frac{1}{2}[/latex] and square it.
[latex]\begin{array}{l}\frac{1}{2}\left(4\right)=2\hfill \\ {2}^{2}=4\hfill \end{array}[/latex]
- Add [latex]{\left(\frac{1}{2}b\right)}^{2}[/latex] to both sides of the equal sign and simplify the right side. We have
[latex]\begin{array}{l}{x}^{2}+4x+4=-1+4\hfill \\ {x}^{2}+4x+4=3\hfill \end{array}[/latex]
- The left side of the equation can now be factored as a perfect square.
[latex]\begin{array}{l}{x}^{2}+4x+4=3\hfill \\ {\left(x+2\right)}^{2}=3\hfill \end{array}[/latex]
- Use the square root property and solve.
[latex]\begin{array}{l}\sqrt{{\left(x+2\right)}^{2}}=\pm \sqrt{3}\hfill \\ x+2=\pm \sqrt{3}\hfill \\ x=-2\pm \sqrt{3}\hfill \end{array}[/latex]
- The solutions are [latex]x=-2+\sqrt{3}[/latex], [latex]x=-2-\sqrt{3}[/latex].
Properties of Equality and taking the square root of both sides
Remember that we are permitted, by the properties of equality, to add, subtract, multiply, or divide the same amount to both sides of an equation. Doing so won't change the value of the equation but it will enable us to isolate the variable on one side (that is, to solve the equation for the variable). The square root property gives us another operation we can do to both sides of an equation, taking the square root. We just have to remember when taking the square root (or any even root, as we'll see later), to consider both the positive and negative possibilities of the constant.The square root property
If [latex]\sqrt{x}=k[/latex]
Then [latex]x = \pm{k}[/latex]
Example: Solving a Quadratic by Completing the Square
Solve the quadratic equation by completing the square: [latex]{x}^{2}-3x - 5=0[/latex].Answer: First, move the constant term to the right side of the equal sign by adding 5 to both sides of the equation.
[latex]\begin{array}{c}\sqrt{{\left(x-\frac{3}{2}\right)}^{2}}=\pm \sqrt{\frac{29}{4}}\hfill \\ \left(x-\frac{3}{2}\right)=\pm \frac{\sqrt{29}}{2}\hfill \\ x=\frac{3}{2}\pm \frac{\sqrt{29}}{2}\hfill \end{array}[/latex]
The solutions are [latex]x=\frac{3}{2}+\frac{\sqrt{29}}{2}[/latex], [latex]x=\frac{3}{2}-\frac{\sqrt{29}}{2}[/latex].Try It
Solve by completing the square: [latex]{x}^{2}-6x=13[/latex].Answer: [latex-display]x=3\pm \sqrt{22}[/latex-display]
Note that when solving a quadratic by completing the square, a negative value will sometimes arise under the square root symbol. Later, we'll see that this value can be represented by a complex number (as shown in the video help for the problem below). We may also treat this type of solution as unreal, stating that no real solutions exist for this equation, by writing DNE. We will study complex numbers more thoroughly in a later module. [ohm_question]1384[/ohm_question] [ohm_question]79619[/ohm_question]Using the Quadratic Formula
The fourth method of solving a quadratic equation is by using the quadratic formula, a formula that will solve all quadratic equations. Although the quadratic formula works on any quadratic equation in standard form, it is easy to make errors in substituting the values into the formula. Pay close attention when substituting, and use parentheses when inserting a negative number. We can derive the quadratic formula by completing the square. We will assume that the leading coefficient is positive; if it is negative, we can multiply the equation by [latex]-1[/latex] and obtain a positive a. Given [latex]a{x}^{2}+bx+c=0[/latex], [latex]a\ne 0[/latex], we will complete the square as follows:- First, move the constant term to the right side of the equal sign:
[latex]a{x}^{2}+bx=-c[/latex]
- As we want the leading coefficient to equal 1, divide through by a:
[latex]{x}^{2}+\frac{b}{a}x=-\frac{c}{a}[/latex]
- Then, find [latex]\frac{1}{2}[/latex] of the middle term, and add [latex]{\left(\frac{1}{2}\frac{b}{a}\right)}^{2}=\frac{{b}^{2}}{4{a}^{2}}[/latex] to both sides of the equal sign:
[latex]{x}^{2}+\frac{b}{a}x+\frac{{b}^{2}}{4{a}^{2}}=\frac{{b}^{2}}{4{a}^{2}}-\frac{c}{a}[/latex]
- Next, write the left side as a perfect square. Find the common denominator of the right side and write it as a single fraction:
[latex]{\left(x+\frac{b}{2a}\right)}^{2}=\frac{{b}^{2}-4ac}{4{a}^{2}}[/latex]
- Now, use the square root property, which gives
[latex]\begin{array}{l}x+\frac{b}{2a}=\pm \sqrt{\frac{{b}^{2}-4ac}{4{a}^{2}}}\hfill \\ x+\frac{b}{2a}=\frac{\pm \sqrt{{b}^{2}-4ac}}{2a}\hfill \end{array}[/latex]
- Finally, add [latex]-\frac{b}{2a}[/latex] to both sides of the equation and combine the terms on the right side. Thus,
[latex]x=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}[/latex]
A General Note: The Quadratic Formula
Written in standard form, [latex]a{x}^{2}+bx+c=0[/latex], any quadratic equation can be solved using the quadratic formula:How To: Given a quadratic equation, solve it using the quadratic formula
- Make sure the equation is in standard form: [latex]a{x}^{2}+bx+c=0[/latex].
- Make note of the values of the coefficients and constant term, [latex]a,b[/latex], and [latex]c[/latex].
- Carefully substitute the values noted in step 2 into the equation. To avoid needless errors, use parentheses around each number input into the formula.
- Calculate and solve.
Example : Solve A Quadratic Equation Using the Quadratic Formula
Solve the quadratic equation: [latex]{x}^{2}+5x+1=0[/latex].Answer: Identify the coefficients: [latex]a=1,b=5,c=1[/latex]. Then use the quadratic formula.
Recall adding and subtracting fractions
The form we have used to recall adding and subtracting fractions can help us write the solutions to quadratic equations. [latex-display]\dfrac{a}{b}\pm\dfrac{c}{d} = \dfrac{ad \pm bc}{bd}[/latex-display] Ex. The solutions [latex-display]x=\dfrac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}[/latex-display] can also be written as two separate fractions [latex]x=\dfrac{-b}{2a} \pm \dfrac{\sqrt{{b}^{2}-4ac}}{2a}[/latex].Example: Solving a Quadratic Equation with the Quadratic Formula
Use the quadratic formula to solve [latex]{x}^{2}+x+2=0[/latex].Answer: First, we identify the coefficients: [latex]a=1,b=1[/latex], and [latex]c=2[/latex]. Substitute these values into the quadratic formula.
Try It
Solve the quadratic equation using the quadratic formula: [latex]9{x}^{2}+3x - 2=0[/latex].Answer: [latex]x=-\frac{2}{3}[/latex], [latex]x=\frac{1}{3}[/latex]
[embed] [embed]The Discriminant
The quadratic formula not only generates the solutions to a quadratic equation, it tells us about the nature of the solutions when we consider the discriminant, or the expression under the radical, [latex]{b}^{2}-4ac[/latex]. The discriminant tells us whether the solutions are real numbers or complex numbers as well as how many solutions of each type to expect. The table below relates the value of the discriminant to the solutions of a quadratic equation.Value of Discriminant | Results |
---|---|
[latex]{b}^{2}-4ac=0[/latex] | One rational solution (double solution) |
[latex]{b}^{2}-4ac>0[/latex], perfect square | Two rational solutions |
[latex]{b}^{2}-4ac>0[/latex], not a perfect square | Two irrational solutions |
[latex]{b}^{2}-4ac<0[/latex] | Two complex solutions |
recall rational and irrational numbers are real numbers
- Rational numbers: A rational number is a number that can be expressed as a ratio of integers (a fraction with an integer numerator and a positive, non-zero integer denominator). The square root of a perfect square, such as [latex]\sqrt{25}[/latex] is rational because it can be expressed as [latex]\dfrac{5}{1} = 5[/latex]. Solutions containing only rational numbers are themselves rational solutions.
- Irrational numbers: All the real numbers that are not rational are called irrational numbers. These numbers cannot be expressed as a fraction of integers. As quadratic solutions, irrational numbers arise in the form of a square root of a numbers that is not a perfect square. For example, [latex]\sqrt{6}[/latex] cannot be expressed as a ratio of two integers. [latex]\sqrt{6}[/latex] is an irrational number. Solutions containing an irrational number are themselves irrational solutions.
- Both rational and irrational numbers are real numbers. Quadratic solutions that are either rational or irrational are real solutions.
- Quadratic solutions that are unreal (they have a negative under the square root symbol, the radical symbol) are called complex solutions.
A General Note: The Discriminant
For [latex]a{x}^{2}+bx+c=0[/latex], where [latex]a[/latex], [latex]b[/latex], and [latex]c[/latex] are real numbers, the discriminant is the expression under the radical in the quadratic formula: [latex]{b}^{2}-4ac[/latex]. It tells us whether the solutions are real numbers or complex numbers and how many solutions of each type to expect.Example: Using the Discriminant to Find the Nature of the Solutions to a Quadratic Equation
Use the discriminant to find the nature of the solutions to the following quadratic equations:- [latex]{x}^{2}+4x+4=0[/latex]
- [latex]8{x}^{2}+14x+3=0[/latex]
- [latex]3{x}^{2}-5x - 2=0[/latex]
- [latex]3{x}^{2}-10x+15=0[/latex]
Answer: Calculate the discriminant [latex]{b}^{2}-4ac[/latex] for each equation and state the expected type of solutions.
- [latex]{x}^{2}+4x+4=0[/latex]: [latex]{b}^{2}-4ac={\left(4\right)}^{2}-4\left(1\right)\left(4\right)=0[/latex]. There will be one rational double solution.
- [latex]8{x}^{2}+14x+3=0[/latex]: [latex]{b}^{2}-4ac={\left(14\right)}^{2}-4\left(8\right)\left(3\right)=100[/latex]. As [latex]100[/latex] is a perfect square, there will be two rational solutions.
- [latex]3{x}^{2}-5x - 2=0[/latex]: [latex]{b}^{2}-4ac={\left(-5\right)}^{2}-4\left(3\right)\left(-2\right)=49[/latex]. As [latex]49[/latex] is a perfect square, there will be two rational solutions.
- [latex]3{x}^{2}-10x+15=0[/latex]: [latex]{b}^{2}-4ac={\left(-10\right)}^{2}-4\left(3\right)\left(15\right)=-80[/latex]. There will be two complex solutions.
Try It
[ohm_question]35145[/ohm_question]Licenses & Attributions
CC licensed content, Original
- Revision and Adaptation. Provided by: Lumen Learning License: CC BY: Attribution.
CC licensed content, Shared previously
- College Algebra. Provided by: OpenStax Authored by: Abramson, Jay et al.. License: CC BY: Attribution. License terms: Download for free at http://cnx.org/contents/[email protected].
- Question ID 1384. Authored by: WebWork-Rochester. License: CC BY: Attribution. License terms: IMathAS Community License CC- BY + GPL.
- Question ID 79619. Authored by: Edward Wicks. License: CC BY: Attribution. License terms: IMathAS Community License CC- BY + GPL.
- Question ID 35145. Authored by: Jim Smart. License: CC BY: Attribution. License terms: IMathAS Community License CC- BY + GPL.
- Question ID 41014. Authored by: Tyler Wallace. License: CC BY: Attribution. License terms: IMathAS Community License CC- BY + GPL.
- Question ID 35639. Authored by: Christina Hughes Martin. License: CC BY: Attribution. License terms: IMathAS Community License CC- BY + GPL.
CC licensed content, Specific attribution
- College Algebra. Provided by: OpenStax Authored by: OpenStax College Algebra. Located at: https://cnx.org/contents/[email protected]:1/Preface. License: CC BY: Attribution.