The simpler quadratic formula | Ep. 1 Lockdown live math
Video Statistics and Information
Channel: 3Blue1Brown
Views: 1,201,515
Rating: undefined out of 5
Keywords:
Id: MHXO86wKeDY
Channel Id: undefined
Length: 52min 11sec (3131 seconds)
Published: Fri Apr 17 2020
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
There's an alternative quadratic formula I like that I learned from the book Numerical Recipes. You start with the usual formula:
ax2 + bx + c = 0
yields
x = [-b +- sqrt(b2 - 4ac)] / (2a)
Suppose you're evaluating this numerically, e.g. as part of some program that is simulating something. What if b >0 and we're taking the + root:
x = [sqrt(b2 - 4ac) - b] / (2a) (Eq. 1)
Now suppose that b2 is very very large compared to 4ac. Then you have a precision problem because you're taking the difference of two large numbers that differ only by a little bit. In finite precision, your result will be garbage.
The trick is to rationalize the numerator in Eq. 1 by multiplying the top and bottom by sqrt(b2 - 4ac) + b. Then you are left with
x = -2c / [sqrt(b2 - 4ac) + b]
and your precision problem has disappeared!
The video will be live 9 hours from this comment.
I actually self-discovered this trick to make calculations easier; whenever b is even, you just keep dividing out by 2 until you get ac = (some integer) / 4 or until what's left as the coefficient of x is an odd number. This helps because all those factors of 2 would have cancelled out or come out common anyway, but doing it beforehand with the equation is less prone to silly mistakes as compared to a complicated expression with square roots and fractions.
Gosh Grant is handsome
This seems to be very near the pq-Formula. In germany we (the Math teachers) can usually decide if we teach pq or abc formula, but I guess most decide on the easier pq formula for weaker classes. To solve: ax2 +bx+c=0 divide by a, b/a = p, c/a = q, you get x2 +px+q=0 Then you get x_1 and x_2= -p/2+-sqrt((p/2)2 - q) Edit: To clarify. In my experience pq is taught as the standard unless a class is very advanced in their math skills or the teacher/school has another preference/curriculum. Sorry, didnโt want to diss Sweden or anyone for that matter...
This form was taught by one of my undergrad professors in an offhand way. and I appreciated it!
Alternative method using complex number and no completing the square.
Say you want to solve az2 + bz + c = 0
divide by a and make the substitution p = b/a and q = c/a to get the equation z2 + pz + q = 0.
If p = 0 then z = ยฑSqrt(-q) = ยฑSqrt(-c/a) and you are done.
In the case p != 0 assume the answer is the complex number x + iy and plug it in for z.
(x+ iy)2 + p(x+iy) + q = 0
Expand everything
x2 + 2xyi - y2 + px + pyi + q = 0
group by real and imaginary numbers
(x2 - y2 + px + q) + i(2xy + py) = 0
Note we have two things equal to zero
x2 - y2 + px + q = 0 and 2xy + py = 0
Use the second equation to solve for x
x = -p/2
and substituting this into the first equation gives
(-p/2)2 - y2 + p(-p/2) + q = 0
and solving for y gives
y = ยฑ (1/2 sqrt(4 q - p2))
And since z = x + iy
z = -p/2 ยฑ i sqrt( 4 q - p2 ) /2
and pulling i inside the square root
z = -p/2 ยฑ sqrt(p2 - 4q) /2
and switching back to the original constants gives the quadratic formula
z = -b/2a ยฑ sqrt(b2 - 4c) /2a
The best method, if you can't remember the formula, is Bhaskara's algorithm - multiply the whole equation by 4a and add b2 to complete the square and the equation becomes
(2ax+b)2 = b2 - 4ac
Easy peesy!
Something to look forward to when it goes live later today (4 hours from now). I wonder if he'll be exploring Po-Shen Loh's alternative method for solving quadratic equations.