2.7 - Quadratic formula and completing the square

2.7 - Quadratic formula and completing the square

Learn two reliable ways to solve quadratics when factorisation is inconvenient. You will keep both roots, recognise when real roots exist and give exact or rounded answers as requested.

Using the quadratic formula (Higher)

Can 2x2+3x−4=02x^2+3x-4=0 have exact answers even when you cannot find tidy factors? Yes: a square root can be part of an exact number. We will find both answers without guessing decimal values.

You already know

A quadratic can be written as ax2+bx+c=0ax^2+bx+c=0, with a≠0a\ne0. Its coefficients include their signs. A square root such as 41\sqrt{41} is exact; a rounded decimal is an approximation.

Bring every term to the same side before reading the coefficients. For 2x2+3x−4=02x^2+3x-4=0, they are a=2a=2, b=3b=3, c=−4c=-4. If a term is absent, its coefficient is zero.

Quadratic formula

The solutions of ax2+bx+c=0ax^2+bx+c=0, where a≠0a\ne0, are

x=−b±b2−4ac2ax=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

The ±\pm means do one calculation with addition and one with subtraction. The denominator divides the whole numerator. Real answers require b2−4ac≥0b^2-4ac\ge0.
In the Higher formulae sheet.

Why does this formula work? First rearrange to ax2+bx=−cax^2+bx=-c. Multiply both sides by 4a4a, then add b2b^2 to both sides. The left side becomes (2ax+b)2(2ax+b)^2, giving (2ax+b)2=b2−4ac(2ax+b)^2=b^2-4ac. Taking both square roots and solving the resulting linear equations gives the formula. We will use this same square idea more directly in the next part.

Worked example 1: exact surd roots

Question. Solve 2x2+3x−4=02x^2+3x-4=0 exactly.

Plan. Substitute the signed coefficients into the formula and keep the root exact.

a=2,b=3,c=−4read signed coefficientsx=−3±32−4(2)(−4)2(2)substitute=−3±9+324negative times negative is positive=−3±414simplify inside the root\begin{aligned} a&=2,\quad b=3,\quad c=-4 &&\text{read signed coefficients}\\ x&=\frac{-3\pm\sqrt{3^2-4(2)(-4)}}{2(2)} &&\text{substitute}\\ &=\frac{-3\pm\sqrt{9+32}}4 &&\text{negative times negative is positive}\\ &=\frac{-3\pm\sqrt{41}}4 &&\text{simplify inside the root} \end{aligned}

Why keep 41\sqrt{41}? It is not an integer, and replacing it by a decimal would lose the requested exactness.

Answer. x=−3+414x=\frac{-3+\sqrt{41}}4 or x=−3−414x=\frac{-3-\sqrt{41}}4.

Check. For either root, 4x+3=±414x+3=\pm\sqrt{41}, so (4x+3)2=41(4x+3)^2=41. Expanding gives 16x2+24x−32=016x^2+24x-32=0, which divides by 88 to give the original equation.

Change only the sign of the linear coefficient. Its square stays the same, but −b-b changes sign.

Worked example 2: a negative linear coefficient

Question. Solve 2x2−3x−4=02x^2-3x-4=0 exactly.

Plan. Include b=−3b=-3 in both places where the formula uses bb.

a=2,b=−3,c=−4keep the signsx=−(−3)±(−3)2−4(2)(−4)2(2)substitute with brackets=3±414simplify both signs\begin{aligned} a&=2,\quad b=-3,\quad c=-4 &&\text{keep the signs}\\ x&=\frac{-(-3)\pm\sqrt{(-3)^2-4(2)(-4)}}{2(2)} &&\text{substitute with brackets}\\ &=\frac{3\pm\sqrt{41}}4 &&\text{simplify both signs} \end{aligned}

Why the brackets? (−3)2=9(-3)^2=9, while −32-3^2 without brackets means −9-9.

Answer. x=3+414x=\frac{3+\sqrt{41}}4 or x=3−414x=\frac{3-\sqrt{41}}4.

Check. Now (4x−3)2=41(4x-3)^2=41, which expands to 8(2x2−3x−4)=08(2x^2-3x-4)=0.

Here is a useful surprise: the two irrational roots in Example 1 add to the rational number −3/2-3/2, because their square-root terms cancel. This checks the paired signs without rounding either root.

Watch out

x=−3±414x=-3\pm\frac{\sqrt{41}}4 is not the answer to Example 1: only the root term is divided by 44. Keep the whole numerator in brackets: x=(−3±41)/4x=(-3\pm\sqrt{41})/4.

Enter each whole numerator in calculator brackets. Show the formula substitution when algebraic working is requested.

Solving by completing the square (Higher)

Completing the square rewrites the quadratic as a squared bracket plus a constant. Solving then means isolating the square and taking both square roots.

Since (x−3)2=x2−6x+9(x-3)^2=x^2-6x+9, the expression x2−6x+2x^2-6x+2 equals (x−3)2−7(x-3)^2-7: the +9+9 from the square must be reduced by 77 to leave +2+2.

Completing the square

x2+bx+c=(x+b2)2+c−(b2)2x^2+bx+c=\left(x+\frac b2\right)^2+c-\left(\frac b2\right)^2

Half the linear coefficient goes inside the bracket. Subtract its square to preserve the original expression. A general quadratic's completed-square form is a(x+b)2+ca(x+b)^2+c, where the letters take the values needed for that expression.
Not in the Higher formulae sheet: learn the method.

If the x2x^2 coefficient is not 11, divide the whole equation by it first. Alternatively, factor it from the quadratic and linear terms. Do not divide only the squared term.

Worked example 3: taking both square roots

Question. Solve x2−6x+2=0x^2-6x+2=0 by completing the square.

Plan. Use half of −6-6 inside the bracket, isolate the square and keep both signs.

(x−3)2−9+2=0add and subtract 32(x−3)2=7collect constantsx−3=±7both values square to 7x=3±7add 3\begin{aligned} (x-3)^2-9+2&=0 &&\text{add and subtract }3^2\\ (x-3)^2&=7 &&\text{collect constants}\\ x-3&=\pm\sqrt7 &&\text{both values square to }7\\ x&=3\pm\sqrt7 &&\text{add }3 \end{aligned}

Why both signs? The equation asks which numbers have square 77, and both 7\sqrt7 and −7-\sqrt7 do.

Answer. x=3+7x=3+\sqrt7 or x=3−7x=3-\sqrt7.

Check. In either case x−3=±7x-3=\pm\sqrt7, so (x−3)2−7=0(x-3)^2-7=0; expansion returns the original quadratic.

Change only the sign of the linear term. Half its coefficient becomes positive, so the bracket is x+3x+3 and the final shift is negative.

Worked example 4: a positive number inside the bracket

Question. Solve x2+6x+2=0x^2+6x+2=0 by completing the square.

Plan. Complete (x+3)2(x+3)^2, then undo the square and the addition.

(x+3)2−9+2=0preserve the constant term(x+3)2=7isolate the squarex+3=±7take both square rootsx=−3±7subtract 3\begin{aligned} (x+3)^2-9+2&=0 &&\text{preserve the constant term}\\ (x+3)^2&=7 &&\text{isolate the square}\\ x+3&=\pm\sqrt7 &&\text{take both square roots}\\ x&=-3\pm\sqrt7 &&\text{subtract }3 \end{aligned}

Why subtract 33? It reverses the +3+3 inside the bracket. The bracket number is not itself the value of xx.

Answer. x=−3+7x=-3+\sqrt7 or x=−3−7x=-3-\sqrt7.

Check. Each root makes (x+3)2=7(x+3)^2=7, hence x2+6x+2=0x^2+6x+2=0.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account