The Quadratic Formula No One Taught You

preview_player
Показать описание
We derive an alternative version of the quadratic formula, then explore advantages and disadvantages of each version. This includes values for which they are defined, and the effect of rounding on the accuracy of solutions.

00:00 Intro
00:19 Derivation 1
02:29 Derivation 2
04:55 Problems with the original formula
07:40 Problems with the new formula
11:31 Comparison of accuracy
14:17 Why you should use both
Рекомендации по теме
Комментарии
Автор

Crazy how I never thought of this during my 35 years of solving 2nd degree equations.

KarlFredrik
Автор

IMHO, I would keep the "minus over plus" in the alternate formula.

frobozz
Автор

I was aware of this version. In days of old when computers ran on steam and precision was to 3 or 4 decimal places, the standard formula failed if b was much bigger than c say b=10000 and c is 0.1 then the c is lost in the computing rounding. The alternate formula takes the c into account and contributes to the computation. It would be interesting to see what happens with modern day computations with the two formulas when b is very much bigger than c.

abve
Автор

slowly turning into blackpenredpen, I see :)

NoNameAtAll
Автор

For people in the comments saying what about a, b, c = 0

You should look at what this formulas means. It gives the roots of the 2nd degree polynomial
ax^2 + bx + c = 0

Here, if a, b, c = 0 then what are you even solving for?

gametimewitharyan
Автор

I remember coming across this equation myself about two years ago while I was trying to find the proof behind the quadratic formula. Really good to know there are other people out there interested in this stuff.

shafiandpritha
Автор

I was in my thirties when I first encountered this version of the quadratic formula, in a wonderful book called Numerical Recipes. For computational accuracy, you want to choose the radical term with the largest absolute value. So define S = -b + sqrt(b*b-4ac) when b<0, and S = -b - sqrt(b*b-4ac) when b>0. Then the two solutions are S/2a and 2c/S.

bucc
Автор

This is genuinely so freaking cool. Thank you for sharing, great work as always Dr Barker!

SaidVSMath
Автор

Rationalising the numerator was really cool for me. I had earlier tried using the quadratic formula to get the roots of a linear polynomial but was not successful because division by zero, but I wasn't able to think of rationalizing the numerator which would allow the quadratic formula to also work for linear polynomial

gametimewitharyan
Автор

Having taken a Numerics class, I appreciate how well this video presents the challenges of trying to get accurate numbers out of a computer.

RCHobbyist
Автор

I myself discovered this 4 years ago (while I was in my 10th standard) and showed it to my teachers. But no one gave proper attention. 😞😞😞

poetry_pulse
Автор

At first, I thought couldn't you multiply the two formulas together, and cancel out the square root entirely, and just end up with x² = something simple?

But then I realised that the root that has the + in one form is the one that has the - in the other form, so they won't actually cancel out if you multiply the same root to itself. But if you multiply the two roots together, you do get a bunch of cancellation... and it ends up collapsing down to x1*x2 = c/a, which is one of Vieta's formulas.

mrphlip
Автор

Great stuff. Enjoying your channel. Always fun to go after problems from every direction ... can optimize for the needs of particular engineering problems. Thanks. Cheers ...

algorithminc.
Автор

It's more an informatics than a mathematics topic. If you program it, you'll find indeed that the better results are coming from the mixed formula. Great topic for better understanding of the rounding errors with floating point numbers!

philippetrov
Автор

I love this! It's been over 40 years since last seeing such a careful examination of avoiding subtraction in a numerical calculation. This was one of our numerical methods assignments, but I don't recall anyone at the time noting that rationalization of the numerator could avoid the subtraction.

However, haven't you swapped the two cases in the last few minutes? That to be avoided is when the sign being used for sqrt(discriminant) is equal to that of (b); and hence opposite of that for (-b). If programming this, I think I'd simply always select the roots as:
x_1 = [ -b + sign(-b) * | sqrt(discriminant) | ] / 2a
x_2 = 2c / [ -b + sign(-b) * | sqrt(discriminant) | ]

pietergeerkens
Автор

An entirely different approach is to verify that the roots of cx^2+bx+a=0 are the reciprocals of the roots of ax^2+bx+c=0. Using either the traditional quadratic formula or the new formula in this video, it's straightforward to demonstrate that the product of each root of the first equation and the opposite-signed root of the second equation is 1.

davidellis
Автор

and for good reason. We rationalize the denominator so that the calculation is straight forward. take the simple case of 1/sqrt(2) VS sqrt(2)/2: to work that out using long division the first one is not doable. whereas the second is irrational but if we are willing to cutoff the calculation at some point we can do that calculation.

kennethgee
Автор

Actually, there's a slightly better (IMO) derivation for this formula, which I absolutely adore, for it relies on an interesting "trick".

The derivation starts by completing the square, but instead of completing the square for ax²+bx you do so for c+bx. So multiply by 4c throughout and after adding a particular zero you get (2c+bx)²=(b²-4ac)x². Taking the square root one gets 2c+bx=±x√(b²-4ac), solving for x yields the formula.

I like it, because it represents a sort of "solving with respect to 1" approach and on a more general note that sometimes it makes sense to swap the role of your parameters (or constants for that matter) and variables.

vladislavanikin
Автор

For both formlas you can get all the solutions, even those where the denominator is zero. You do this by taking the limit a-->0 (for the original formula) or c-->0 (for the new one) and use the taylor expanaion of the square root (or, equivalently, use the L'hospital rule, as in both cases both the denominator and numerator tend to zero).

eilonpoem
Автор

Hello, why is it still a quadratic if a = 0? Wouldn’t the highest degree then be just x^1 making the expression a binomial? What am I missing?

Aurochs