Sign in to follow this  
Displayname

Diophantine equation

Recommended Posts

Displayname    0

Hello everyone, 

Im new in this forum and in advance I would like to apologise for possibly posting this thread in a wrong place.

I am learning mathematics and I came across this problem that I can't find a solution for:

x^2 - 4^2 = 1000000 , find all possible integer solutions for x and y.

Being an amateur mathematician I tried to understand this problem using system of equations technique and instead of million i used a prime number (5) as an anwser and turned this equation into difference of squares:

(x+2y)(x-2y) = 5;

5 is prime, has two divisors -> 5, 1;

(x+2y) = 5

(x-2y) = 1

2y - 2y = 0 (y is out)

2x = 6

x = 3;

3+2y = 5

2y = 2

y = 1;

Anwser : x = 3, y = 1;

I tried to do similar thing with a million:

(x+2y)(x-2y) = 1000000

let's say (x+2y) = 1000 and (x-2y) = 1000

 

(x+2y)= 1000

(x-2y) = 1000

2x = 2000

x=1000

y = 0;

But how do you find other solutions to this equation ?

I found these anwsers using brute force algorithm in java:   

[[31258, 15621], [12520, 6240], [6290, 3105], [2600, 1200], [1450, 525], [1000, 0]]

is there a formula for finding all of the Integer possibilities? Where should I look ?

Thank you

Share this post


Link to post
Share on other sites
HallsofIvy    52

  I don't know why you are using "brute force" as you call it when you already had the solution staring at you!

 You have "either x+ 2y= 5 or x- 2y= 1".

 

  If x+ 2y= 5 then, for every y, x= 5- 2y.  Solutions, in (x, y) form, are (5, 0). (3, 1), (1, 2). (-1. 3), ..., (5- 2y, y) for y non-negative and (7. -1), (9. -2). (11, -3),... for y negative.

 If x- 2y= 1 then, for every y, x= 2y+ 1.  Solutions are (1, 0), (3, 1). (5, 2), (7, 3), ... for y non-negative and (-1, -1), (-3, -2), (-5, -3), ... for y negative.

 

  Those at are the solutions: $\{(5- 2y, y)\}\cup\{(2y+1, y)\}$  for y any  integer.

Edited by HallsofIvy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this