Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

Equations and the quadratic

An expression such as 2x2-7x-15 is not true or false; it is just a recipe waiting for a number. Set it equal to something and it becomes a claim about x, and the claim is true for some values and false for others. Finding exactly which ones is what solving means.

This lesson takes that from the easiest case to the first genuinely hard one. It assumes the laws of the previous lesson, since every step in a solution is one of them applied to both sides, and it ends with a formula for every quadratic that is derived here rather than quoted.

From expression to statement

An equation asserts that two expressions name the same number. Its solutions are the values of the unknown that make the assertion true, and to solve it is to replace it with a chain of equations having the same solutions until the last one reads x=something.

The chain works because of the equality fact from the previous lesson: doing the same thing to two names for one number leaves two names for one number. Adding, subtracting, and multiplying by anything non-zero all preserve the solution set exactly, so nothing is gained or lost.

Two operations do not preserve it, and both are traps worth naming now. Multiplying by an expression that might be zero can invent solutions, since x=3 has one solution but x(x-5)=3(x-5) has two. Squaring both sides does the same, because x+6=x becomes x+6=x2, whose solutions are 3 and -2, and -2 fails in the original since the square root sign means the non-negative root. The fix is not to avoid these moves but to check every candidate in the original equation, which costs seconds.

Linear equations by inverse operations

A linear equation has the unknown to the first power only, and it always yields to the same strategy: undo the operations applied to x, in reverse order. Collect all the x terms on one side, all the numbers on the other, and divide by whatever multiplies x.

Example. Solve 5(x-3)+2=3x+7.

Distribute: 5x-15+2=3x+7, so 5x-13=3x+7. Subtract 3x from both sides: 2x-13=7. Add 13: 2x=20. Divide by 2: x=10. Check in the original, which is not optional: the left is 5×7+2=37 and the right is 30+7=37.

Now you. Solve 4(2x+1)-3=2(x-4)+11 and check it.

Answer

8x+1=2x+3, so 6x=2 and x=1/3. Checking, the left is 4(2/3+1)-3=20/3-3=11/3 and the right is 2(1/3-4)+11=-22/3+11=11/3.

Not every linear equation has exactly one solution. Reduce 2(x+3)=2x+6 and the unknown vanishes, leaving 6=6, true for every x: the equation was an identity in disguise. Reduce 2(x+3)=2x+5 and you get 6=5, false for every x, so there is no solution. A vanishing unknown is information, not a mistake, and which of the two you have is decided by whether what remains is true.

Quadratics, and why factoring is not enough

A quadratic equation is ax2+bx+c=0 with a not zero. When the left side factors over the integers the work is already done, because a product is zero exactly when one factor is: from (x-4)(x+3)=0 read off x=4 and x=-3 immediately.

The method is fast and it is unreliable, because most quadratics do not factor over the integers. The equation x2-6x+2.5=0 has perfectly good solutions and no integer pair multiplies to 2.5 while adding to -6. Searching for a factorisation that does not exist can take a long time before you conclude anything, so a method that always works is worth having.

The one that always works comes from noticing which quadratics are easy. Anything of the form (x+p)2=k is solved in one line: take square roots, remembering both signs, so x+p=±k and x=-p±k. So the task is to turn any quadratic into that shape, and the technique for doing so is called completing the square.

Completing the square

The identity to exploit is (x+p)2=x2+2px+p2. Given x2+bx, matching the middle terms gives 2p=b, so p=b/2, and the perfect square that starts with those two terms is (x+b/2)2=x2+bx+b2/4. It has an extra b2/4 on the end, so subtract it back off: x2+bx=(x+b/2)2-b2/4. That single line is the whole technique.

Example. Solve 2x2-12x+5=0 exactly, then to four decimal places.

Divide through by 2 so the leading coefficient is 1: x2-6x+2.5=0. Half of -6 is -3, so x2-6x=(x-3)2-9, and the equation becomes (x-3)2-9+2.5=0, that is (x-3)2=6.5. Take roots: x=3±6.5. Since 6.5=2.5495, the solutions are x=5.5495 and x=0.4505. Check the first: 2(5.5495)2-12(5.5495)+5=61.594-66.594+5=0 to the precision shown.

Now you. Solve 3x2+12x-7=0 by completing the square, exactly and to four decimals.

Answer

Divide by 3: x2+4x-7/3=0. Half of 4 is 2, so (x+2)2-4-7/3=0 and (x+2)2=19/3. Then x=-2±19/3, and 19/3=2.5166, giving x=0.5166 and x=-4.5166.

The formula, derived

Run that procedure once on the general equation and you never have to run it again. Start from ax2+bx+c=0 and divide by a, which is legal because a is not zero:

x2+bax+ca=0

Complete the square on the first two terms, with half the middle coefficient being b/2a:

(x+b2a)2-b24a2+ca=0

Move the constants across and put them over the common denominator 4a2:

(x+b2a)2=b2-4ac4a2

Take square roots of both sides. The right-hand denominator is a perfect square, so its root is 2a, and

x=-b±b2-4ac2a

That is the quadratic formula, and it is not a fact to be memorised on authority: it is the completed square, done once with letters instead of numbers. Anyone who forgets it can rederive it in five lines. Check it against the worked example above, where a=2, b=-12, c=5: the formula gives x=(12±144-40)/4=(12±104)/4, and 104=10.198, so x=5.5495 or 0.4505 as before.

The discriminant tells you before you start

The quantity under the root, b2-4ac, is the discriminant, and it decides the character of the answer before any arithmetic. If it is positive there are two distinct real solutions. If it is zero the ± collapses and there is one, a repeated root at x=-b/2a. If it is negative there are no real solutions at all, because no real number squares to a negative, which is precisely the gap left open in the first lesson at x2=-1.

So x2+4x+7=0 can be dismissed in one step: 16-28=-12, negative, no real solutions. This is not a failure of technique. The equation asks for a number whose square plus four times itself is -7, and on the real line there is none. The complex numbers supply two, and this course leaves them alone.

A repeated root is the boundary case between the two, and it is what a projectile problem gives when the object just grazes the height asked about. Discriminant zero is the algebraic signature of tangency, a fact that becomes visible as a picture in the next lesson but one.

A quadratic that came from somewhere

Formulas earn their keep on real problems. Throw a stone upward at 15 m s⁻¹ from a cliff 40 m above the sea. Ignoring air resistance, its height in metres after t seconds is h=40+15t-4.9t2, where 4.9 is half the gravitational acceleration of 9.8 m s⁻².

Example. When does the stone hit the water?

Set h=0: -4.9t2+15t+40=0, or 4.9t2-15t-40=0 after multiplying by -1. The discriminant is 225+4×4.9×40=225+784=1009, whose root is 31.765. So t=(15±31.765)/9.8, giving t=4.772 s and t=-1.711 s. Both are solutions of the equation; only one is a solution of the problem, since the stone was not in flight before it was thrown. Discarding a mathematically valid root on physical grounds is a normal part of modelling, and it should be done explicitly rather than silently.

Now you. A ball is thrown upward at 20 m s⁻¹ from a 25 m balcony, so h=25+20t-4.9t2. When does it land?

Answer

4.9t2-20t-25=0, discriminant 400+490=890, root 29.833. So t=(20+29.833)/9.8=5.085 s, the negative root being rejected.

The same quadratic answers other questions about the flight. The stone is highest when the two roots of h=H coincide, which is when the discriminant vanishes, and by symmetry that is halfway between the roots of any horizontal cut: t=15/9.8=1.531 s, at which h=51.48 m.

What the formula reveals, and cannot do

Look at the formula rather than through it. The solutions are expressed in terms of a, b and c, so as those coefficients vary the answers vary with them, and this is the first time in the course that a quantity has been described as depending on other quantities in a way no single equation captures. That dependence is the subject of the next lesson.

Two honest limits close this one. The formula is exact but not always the best way to compute: when b2 is enormously larger than 4ac, subtracting two nearly equal numbers in the numerator loses precision, and numerical libraries compute one root by the formula and the other from the fact that the roots multiply to c/a. And it does not generalise as far as one would hope. There is a formula for the cubic, published by Cardano in 1545, and one for the quartic, but Abel proved in 1824 that no formula in radicals exists for the general fifth-degree equation. Solving by formula stops at degree four, permanently.