What Formula Determines the Squares Producing a Specific Difference?

  • Context: High School 
  • Thread starter Thread starter jimjones
  • Start date Start date
  • Tags Tags
    Difference Squares
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
jimjones
Messages
8
Reaction score
0
Hello,

Sorry if this is in the wrong forum, I wasn't sure so I just picked General. Is there a formula to determine the squares that will produce a given difference. For example x^2 - y^2 = 21. From a little experimentation it seems that for odd numbers the problem can be solved with this formula: x = (o+1)/2, y= x - 1. So 11^2 - 10^2 = 21. But I know also that 5^2 - 2^2 = 21. Is there a formula that will produce that result?

Thanks
 
Mathematics news on Phys.org
Hello, Jim,
as you possibly know, x^2 - y^2 = (x+y)(x-y). So you're looking for two factors of your number (21) which not only multiply to 21, but which can also be constructed as the sum and difference of two other numbers. In your examples, 11+10=21 multiplied by 11-10=1 equals 21, and also 5+2=7 times 5-2=3 is 21.

If you call a and b those two factors, such that ab=21, (where, for our discussion, a will be the largest and b the smallest), you look for solutions of the system of equations
x + y = a
x - y = b
whose solutions are x=(a+b)/2, y=(a-b)/2. As long as these fractions turn out to be integers, you have a winning pair.