User:J D Bowen/Lecture

From ProofWiki
Jump to navigation Jump to search

A derivation of the quadratic formula, or, how to solve $ax^2+bx+c=0 \ $ for $x \ $.

Why the average of the zeroes is $-b/2a \ $

We worked out before why the average of the zeroes of a quadratic is $-b/2a \ $, but let's do it again as a refresher:

Suppose you have some quadratic $ax^2+bx+c \ $, which factors as $(px+q)(rx+s) \ $.

If we distribute this out, note that we get $ax^2+bx+c= prx^2+(ps+qr)x+qs \ $, which implies $a=pr, \ b= ps+qr \ $.

Now note that the two zeroes of $(px+q)(rx+s)=0 \ $ will be the solutions of $px+q=0, \ rx+s=0 \ $. It should not be hard to check that these two solutions are $x_1=-q/p, \ x_2=-s/r \ $. Then the line of symmetry of the graph, which is the average of the two zeroes, is

$\frac{x_1+x_2}{2} = \frac{\frac{-q}{p}+\frac{-s}{r}}{2} = \frac{1}{2}\left({ \frac{-q}{p}+\frac{-s}{r} }\right) = \frac{1}{2}\left({ \frac{-qr}{pr}+\frac{-sp}{rp} }\right) = \frac{-(qr+sp)}{2pr} \ $.

But remember from our distribution that $pr=a, \ ps+qr=b \ $. So $\frac{-(qr+sp)}{2pr} = \frac{-b}{2a} \ $.

The Quadratic Formula

Parabola intercepts.jpg

Since the average of the two zeroes $x_1, \ x_2 \ $ is $-b/2a \ $, it makes sense that they are the same distance from that average; that is, there is some number $d \ $ such that $x_1=-b/2a -d, \ x_2 = -b/2a+d \ $.

Given that both of these should be solutions, we write $x=\tfrac{-b}{2a}\pm d \ $ and plug this into our equation:

$ax^2+bx+c = 0 \ $


$a\left({ \tfrac{-b}{2a}\pm d}\right)^2+b\left({\tfrac{-b}{2a}\pm d}\right)+c = 0 \ $


$a\underbrace{\left({ \tfrac{-b}{2a}\pm d}\right)\left({ \tfrac{-b}{2a}\pm d}\right)}_{\text{expanding the square}}+b\left({\tfrac{-b}{2a}\pm d}\right)+c = 0 \ $


Now we distribute that expanded square; this is tricky, because of the $\pm \ $, but we can do it. Suppose we're examining the $+ \ $ case. Then that expanded square becomes

$\left({ \tfrac{-b}{2a}+ d}\right)\left({ \tfrac{-b}{2a}+ d}\right)= \frac{(-b)(-b)}{(2a)(2a)} + d\frac{-b}{2a}+d\frac{-b}{2a}+d^2 = \frac{b^2}{4a^2} + 2d \frac{-b}{2a} +d^2 \ $.

If we were examining the negative case, we'd have

$\left({ \tfrac{-b}{2a}- d}\right)\left({ \tfrac{-b}{2a}- d}\right)= \frac{(-b)(-b)}{(2a)(2a)} - d\frac{-b}{2a}-d\frac{-b}{2a}+d^2 = \frac{b^2}{4a^2} - 2d \frac{-b}{2a} +d^2 \ $.

And so for the general case, we can write

$\left({ \tfrac{-b}{2a}\pm d}\right)^2 = \frac{b^2}{4a^2}\pm 2d\frac{-b}{2a} +d^2 \ $

Therefore, our original equation becomes

$a\underbrace{\left({\frac{b^2}{4a^2}\pm 2d\frac{-b}{2a} +d^2}\right)}_{\text{we distributed}}+b\left({\tfrac{-b}{2a}\pm d}\right)+c = 0 \ $

We can bring that a into that set of parentheses:

$\underbrace{\left({\frac{ab^2}{4a^2}\pm 2d\frac{-ab}{2a} +ad^2}\right)}_{\text{brought the a in}}+b\left({\tfrac{-b}{2a}\pm d}\right)+c = 0 \ $

and start cancelling

$\underbrace{\left({\frac{b^2}{4a}\pm (-bd) +ad^2}\right)}_{\text{cancelled} \ a}+b\left({\tfrac{-b}{2a}\pm d}\right)+c = 0 \ $.

Similarly, we can bring the b inside the parentheses:


$\left({\frac{b^2}{4a}\pm (-bd) +ad^2}\right)+\underbrace{\left({\tfrac{-b^2}{2a}\pm bd}\right)}_{\text{brought b in}}+c = 0 \ $

and now we can remove our parentheses:

$\frac{b^2}{4a}\pm (-bd) + ad^2 +\frac{-b^2}{2a}\pm bd+c = 0 \ $.

Let's rearrange a few terms, and combine all our $\pm \ $ terms, and see if we can't simplify that a bit:

$\underbrace{\frac{b^2}{4a}+\frac{-b^2}{2a}}_{\text{fractions together}}+ad^2+c \underbrace{\pm \left({ (-bd)+bd }\right)}_{\text{plus/minus terms together}} = 0 \ $

Notice that now we have a pair of fractions on the far left we should probably add, and a zero sum in parentheses. So let's make their denominators the same on the left there:

$\frac{b^2}{4a}+\underbrace{\frac{-2b^2}{4a}}_{\text{multiply top/bottom by 2}}+ad^2+c \pm \underbrace{0}_{\text{-bd+bd=0}} = 0 \ $

Performing the additions, we get

$\underbrace{\frac{-b^2}{4a}}_{b^2-2b^2=-b^2}+ad^2+c = 0 \ $

Now we can start solving for $d^2 \ $ to get

$ad^2+c=\frac{b^2}{4a} \ $

$ad^2 = \frac{b^2}{4a}-c \ $

To perform the subtraction on the right, we must make the denominators the same:

$ad^2 = \frac{b^2}{4a}-\underbrace{\frac{4ac}{4a}}_{\text{multiply top/bottom by 4a}} \ $

$ad^2 = \frac{b^2-4ac}{4a} \ $

and divide by a to get

$\frac{1}{a}ad^2 = \frac{b^2-4ac}{4a}\frac{1}{a} \ $

or

$d^2= \frac{b^2-4ac}{4a^2} \ $.

Taking the square root of both sides, we have

$d=\sqrt{\frac{b^2-4ac}{4a^2}}= \frac{\sqrt{b^2-4a}}{2a} \ $.

Since we suspect the solutions to the equation $ax^2+bx+c = 0 \ $ is $x=-b/2a\pm d \ $, we should have

$x=\frac{-b}{2a} \pm d = \frac{-b}{2a} \pm \frac{\sqrt{b^2-4a}}{2a} = \frac{-b\pm \sqrt{b^2-4ac}}{2a} \ $.

We will call this result the quadratic formula.