Solving difference of squares with integer numbers

For e.g., solve for a,b given that they are integers.
a^2 - b^2 = 15
(a + b) (a-b) = 15

Here we will compute all the possible factors of 15 and equate one by one.
15 =  x.y
a + b = x
a - b = y

=> a = (x + y)/2, b = (x-y)/2

x,y = 1,15 => a,b = 8,-7
x,y = 3,5 => a,b = 4,-1
x,y = 5,3 => a,b = 4,1
x,y = 15,1 => a,b = 8,7

Now negative factors:
x,y = -1,-15 => a,b = -8,7
x,y = -3,-5 => a,b = -4,1
x,y = -5,-3 => a,b = -4,-1
x,y = -15,-1 => a,b = -8,-7

In summary:
(-+8,-+7) and (-+4,-+-1)

Let's see how could we have achieved the same thing easily.
a^2 - b^2 = 15 can be written as:

|a|^2 - |b|^2 = 15

since a^2 = |a|^2

Rewrite it like this:
(|a| + |b|)(|a| - |b|) = 15

This forces |a| > |b| else the signs won't match in LHS and RHS.
So both factors are positive now.
Let x = |a| + |b| and y = |a| - |b|
This forces x > y.
Again:
|a| = (x + y)/2 and |b| = (x-y)/2
So we just repeat the earlier exercise with positive factors and x > y only:

x,y = 5,3 => |a|,|b| = 4,1
x,y = 15,1 => |a|,|b| = 8,7

This gives us the same solution as earlier:
(-+8,-+7) and (-+4,-+-1)

Comments

Popular posts from this blog

IOQM 2024 Paper solutions (Done 1-21, 29)

Combinatorics DPP - RACE 6 - Q16 pending discussion

Algebra DPP 1.3 Quadratics