The quadratic formula · Mathematics Class 9–10 | StemPy Lab
Course 4.2·Lesson 2 of 3
The quadratic formula
Completing the square on ax2+bx+c=0
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
One method for every equation
Completing the square works, but the steps are the same each time. So let us do them once, with letters, for the general equation
ax2+bx+c=0,a=0.
Deriving the formula
Divide by a.x2+abx+ac=0.
Move the number term.x2+abx=−ac.
Add the square of half the coefficient of x. Half of ab is 2ab. Add 4a2b2 to both sides.
Write the square.
(x+2ab)2=4a2b2−ac
=4a2b2−4ac
Take the square root. If b2−4ac≥0, then x+2ab=±2ab2−4ac.
Solve for x. This is the quadratic formula:
x=2a−b±b2−4ac
The plus sign gives one root and the minus sign gives the other.
Using the formula
Solve 3x2+2x−8=0.
Read off the numbers.a=3, b=2, c=−8. Keep the signs.
Work out b2−4ac.4−4×3×(−8)=4+96=100.
Put them in.x=6−2±10.
The two roots.x=68=34, or x=6−12=−2.
Check.3×4−4−8=0 for x=−2. It works.
Now one that does not factorise: x2−4x+1=0. Here b2−4ac=16−4=12, so
x=24±12=2±3,
the same answer that completing the square gave in the last lesson.
A problem that needs the formula
A ball is thrown upwards. After t seconds its height is h=20t−5t2 metres. When is it 12m above the ground?
Write the equation.20t−5t2=12, so 5t2−20t+12=0.
The discriminant.400−4×5×12=400−240=160.
The formula.t=1020±160=2±10160.
The numbers.160≈12.65, so t≈3.26s or t≈0.74s.
Both answers make sense. The ball passes 12m on the way up, after about 0.74s. It passes it again on the way down, after about 3.26s.
Practise with new numbers
Try it in Python
The function solve uses the formula. Then the program puts each root back into the equation. The left side should come out as 0, or as a tiny number such as 10−16 from rounding.
Common mistakes
Losing a sign. With b=−4, −b=4. And b2=16, never −16.
Dividing only the root by 2a. The whole top, −b±b2−4ac, is divided by 2a.
Forgetting that c can be negative. In 3x2+2x−8=0, c=−8, so −4ac is +96.
Writing a when it is 1 and hidden. In x2−4x+1=0, a=1.
Remember these
For ax2+bx+c=0: x=2a−b±b2−4ac.
Read a, b and c with their signs, work out b2−4ac first, then the two roots.
Check each root by putting it back, and check that it makes sense in the problem.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
In 2x2−7x+3=0, what are a, b and c?
Solve x2+2x−4=0.
Why does the formula have a ± sign?
Solve 5x2−2x−3=0.
Ishaan writes x=−b±2ab2−4ac. What is wrong?
Enroll free in The Quadratic Formula and the Nature of Roots
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.