POV-Ray : Newsgroups : povray.off-topic : DFT and FFT : ax^2 + bx + c = 0 Server Time
6 Sep 2024 15:20:28 EDT (-0400)
  ax^2 + bx + c = 0  
From: Orchid XP v8
Date: 18 Jan 2009 07:00:48
Message: <497319f0$1@news.povray.org>
Orchid XP v8 wrote:

> I still vividly remember the day I figured out why that famous formula 
> actually solves quadratic equations. Maybe I'll share it with you?

OK, so "everybody knows" (?!) that ax^2 + bx + c = 0 can be transformed 
into the magical expression

   x = (-b +/- Sqrt(b^2 - 4ac)) / 2a

But why is that, exactly? Well, looking in my sister's A-level maths 
book [unlike me, my sister was *taught* mathematics] I discover a long 
sequence of algebraic manipulations that slowly transforms the one into 
the other.

Well, that proves it *works*, but *why* does it work??

One day, I figured it out. Watch this:

The (linear) polynomial (x - A) has one solution: A. And the quadratic 
polynomial (x - A)(x - B) has two solutions: A and B. So here we just 
*constructed* a quadratic with *known* solutions!

(This may seem completely unremarkable, but remember I have no 
mathematical training. It seemed pretty impressive to me!)

Now, if we expand that out, we get

   x^2 - Ax - Bx + AB = 0

and with some rearranging,

   x^2 + (-A-B)x + (AB) = 0

If we match that up against

   x^2 + bx + c = 0

then we have

   b = -A-B
   c = AB

Or, put another way, -b = A+B. In other words, if we take

   ax^2 + bx + c = 0

and divide through a, we now know the sum and product of the solutions!

But how do we figure out the solutions themselves given only their sum 
and product?

Well, given that -b = A+B, there are an infinite number of possible 
solutions. Similarly, c = AB on its own has infinitely many solutions. 
Hopefully there is only two solutions to *both* equations. But what are 
they? Hmm.

The next revelation: Since -b = A+B, then -b/2 = (A+B)/2. In other 
words, the arithmetic mean of A and B. So -b/2 is a point exactly half 
way between the two solutions. If I can just figure out how far apart 
they are, I can compute them!

Clearly you can't determine the seperation from the sum. It's not 
obvious that you can determine it from the product either though. But 
that product must come into the equation somehow. Hmm.

Of course, I already know what the final solution is, just not why. That 
gave me a clue.

So what we have is A+B, but what we *want* is A-B. Well now, what 
happens if we square these?

   (A+B)^2 = A^2 + 2AB + B^2
   (A-B)^2 = A^2 - 2AB - B^2   (A mathematician would know this off by 
heart, but it took me a while to work out.)

Ooo, that's *interesting*... The difference between the two is only in 
the product in the middle! And we *have* that product!

 From here, it's just a matter of tying up loose ends. b^2 = (A+B)^2. 
The difference between sum^2 and difference^2 is exactly 4AB, so we have

   (A-B)^2 = (A+B)^2 - 4AB = b^2 - 4c

Since we want to add/subtract half the difference to half the sum, we have

   x = -b/2 +/- Sqrt(b^2 - 4c)/2
     = (-b +/- Sqrt(b^2 - 4c))/2

Ah, but we already eliminated "a", didn't we? Can we put that right back 
into the main formula? Well, comparing with the "standard" formula and 
shifting a little algebra, it becomes clear that we can.

   x = (-b +/- Sqrt(b^2 - 4ac))/2a

QED.

Bouyed up by this, I immediately set about performing the same trick for 
the cubic. Obviously, this did not end well.

However figured out that you can compute the difference from the sum and 
the product... GENIUS!! o_O I would never have known in a million years...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.