Full disclosure: I critized the article in a comment below...
Respectfully, that's not the reason people are critiquing the article.
I fully agree mathematics is what works and many methods use identical underpinning logic, just expressed in different ways. I'm fine with that.
But that doesn't mean all methods are equally good. This method is no quicker or easier or less error prown than the quadratic formula it "replaces". Even in the authors chosen example, it's no better. In many other cases it's harder (if B or C are not divisible by A, dividing by A to force A=1 just spreads and increases the complexity).
That makes it a bad method because now, a user has to not only know both methods but also pick the right one. And for this extra time and risk, the gain nothing the standard Quadratic Formula didn't give them.
We could equally "simplify" the quadratic formula by forcing B=1 or C=1. Are those methods new and useful? No. They're trivial and have limited use cases. They're never better than just using the full formula.
My issues with the article are a bit wider: this is not new. I was taught this as a limited version of quadratics in 2000 in a run of the mill school in London. I also think it's derivative. Anyone smart enough to be solving quadratics should also be smart enough to apply basic algebra to simplify quadratics. But the article presents this, assuming the audience knows no better, like it's a breakthrough. That feels dishonest to me...
If you understand the importance of the expression under the square root (i.e. the sign of the discriminant) you can rename one subexpression:
def quadratic_formula(a, b, c):
discriminant = b ** 2 - 4 * a * c
return [
(-b - math.sqrt(discriminant)) / (2 * a),
(-b + math.sqrt(discriminant)) / (2 * a)
]
Of course you can refactor it further with pointless stuff like denom = 2a, but that doesn't add much semantic value. So the above is more or less the vocabulary we have about quadratic equations today.
Loh's contribution is a specific way of refactoring the code by first dividing by a:
def quadratic_formula(a, b, c):
b = b / a
c = c / a
discriminant = b ** 2 - 4 * c
return [
-b / 2 - math.sqrt(discriminant) / 2,
-b / 2 + math.sqrt(discriminant) / 2
]
Which then unlocks the ability to talk about the subexpressions in relation to the roots (a la Vieta's formula):
def quadratic_formula(a, b, c):
b = b / a
c = c / a
sumOfRoots = -b
productOfRoots = c
averageRoot = sumOfRoots / 2
# Want roots [averageRoot - delta, averageRoot + delta]
# such that:
# productOfRoots == (averageRoot - delta) * (averageRoot + delta)
# == averageRoot ** 2 - delta ** 2
delta = math.sqrt(averageRoot ** 2 - productOfRoots)
return [
averageRoot - delta,
averageRoot + delta
]
Your code is no longer using single-letter variable names!
While the mathematician claims to not find historical evidence of this, it is suuuuper similar to something we went over in high school in Calculus. It was related to finding the vertex of a parabola and noting the roots will be equally distant to both sides of the mid point. At the time, it was used as a "see? Neat. It all works out" type lesson.
Comments
Full disclosure: I critized the article in a comment below...
Respectfully, that's not the reason people are critiquing the article.
I fully agree mathematics is what works and many methods use identical underpinning logic, just expressed in different ways. I'm fine with that.
But that doesn't mean all methods are equally good. This method is no quicker or easier or less error prown than the quadratic formula it "replaces". Even in the authors chosen example, it's no better. In many other cases it's harder (if B or C are not divisible by A, dividing by A to force A=1 just spreads and increases the complexity).
That makes it a bad method because now, a user has to not only know both methods but also pick the right one. And for this extra time and risk, the gain nothing the standard Quadratic Formula didn't give them.
We could equally "simplify" the quadratic formula by forcing B=1 or C=1. Are those methods new and useful? No. They're trivial and have limited use cases. They're never better than just using the full formula.
My issues with the article are a bit wider: this is not new. I was taught this as a limited version of quadratics in 2000 in a run of the mill school in London. I also think it's derivative. Anyone smart enough to be solving quadratics should also be smart enough to apply basic algebra to simplify quadratics. But the article presents this, assuming the audience knows no better, like it's a breakthrough. That feels dishonest to me...
I think it's useful to think of this as refactoring code to make it more readable (and therefore more teachable).
If you're a memorizer, your code might as well be obfuscated code:
If you understand the importance of the expression under the square root (i.e. the sign of the discriminant) you can rename one subexpression: Of course you can refactor it further with pointless stuff like denom = 2a, but that doesn't add much semantic value. So the above is more or less the vocabulary we have about quadratic equations today.Loh's contribution is a specific way of refactoring the code by first dividing by a:
Which then unlocks the ability to talk about the subexpressions in relation to the roots (a la Vieta's formula): Your code is no longer using single-letter variable names!While the mathematician claims to not find historical evidence of this, it is suuuuper similar to something we went over in high school in Calculus. It was related to finding the vertex of a parabola and noting the roots will be equally distant to both sides of the mid point. At the time, it was used as a "see? Neat. It all works out" type lesson.
This was around 2001.
*error prone