Total Pageviews

Search This Blog

Tuesday, September 2, 2025

a math trick from Po-Shen Loh

Say we have:

x + y = 6
x*y = 12

It's easy to solve for one variable, substitute into the other equation, and use the quadratic formula. In this case, we get a negative radical and two complex numbers as solutions.

We could also graph and see that the line y = 6 - x does not intersect the hyperbola y = 12/x. That only tells us there is no real solution. It does show us that in such a system, if the sum of two numbers is less than their product, the numbers must be complex. 

Loh's method says we should assume the solution is centered around the sum. 

So x = 3 + d and y = 3 - d.

When we substitute into the other equation, we get a simpler quadratic, 9 - d^2 = 12, which simplifies to

d = +/- sqrt(-3) = +/- i*sqrt(3)

So are answers are x =  3 +/- i*sqrt(3) and y = 3 -/+ i*sqrt(3)

Yes, it is possible to have a reverse plus/minus sign. Here it shows how the answers properly pair. 

It's good to get the right answer and better to get it quickly. See Karatsuba's multiplication algorithm for a more complex example.


No comments: