# Find all integer solutions to an equation

• Sep 6th 2010, 12:25 PM
Mukilab
Find all integer solutions to an equation
Whenever I'm confronted with a question bearing the label of 'find all solutions' I almost never know how to solve it algebraically (apologies if I spelt that incorrectly), I always have to resort to manual methods, which usually are a bore and I know that is not the true mathematical way to solve them.

Now I've been shown this equation:
x^2+y^2+x+y=1001

and I have to find all integer solutions.

I have no idea of how to solve this because I think the left half of the equation cannot be simplified (or I simply do not know of the method). Until necessary, I'll refrain from using the calculator so please could anyone help me?

~Cyfer
• Sep 6th 2010, 12:31 PM
e^(i*pi)
You can only solve for x in terms of y or vice versa (and you can use the quadratic formula in this case)

To solve for x and y you need another equation
• Sep 6th 2010, 12:55 PM
Opalg
Quote:

Originally Posted by Mukilab
Whenever I'm confronted with a question bearing the label of 'find all solutions' I almost never know how to solve it algebraically (apologies if I spelt that incorrectly), I always have to resort to manual methods, which usually are a bore and I know that is not the true mathematical way to solve them.

Now I've been shown this equation:
x^2+y^2+x+y=1001
and I have no idea of how to solve this because I think the left half of the equation cannot be simplified (or I simply do not know of the method). Until necessary, I'll refrain from using the calculator so please could anyone help me?

If $x^2+y^2+x+y=1001$ then $4x^2+4y^2+4x+4y=4004$, and so $(2x+1)^2 + (2y+1)^2 = 4006 = 2\times2003$. Now 2003 is a prime that is congruent to 3 mod 4 (or in everyday language, it leaves a remainder 3 when divided by 4). It is known (see for example here) that an integer can only be expressed as a sum of two squares if each of its prime factors that is congruent to 3 mod 4 occurs to an even power. That is not the case with 4006, which therefore cannot be expressed as a sum of two squares. So there are no integer solutions (x,y) to your equation.
• Sep 6th 2010, 01:00 PM
Mukilab
EDIT: Sorry didn't see the previous post before I wrote this. Will create a reply for the previous post when ready. Apologies.

Surely it would go to 4002 and not 4004 because the two left over 1s from the factorising are positive, so they become negative when brought over.
• Sep 6th 2010, 02:47 PM
HallsofIvy
Notice that Opalg is assuming you are asked to find all integer solutions, which was not said in the original post.
• Sep 6th 2010, 02:55 PM
Opalg
Quote:

Originally Posted by HallsofIvy
Notice that Opalg is assuming you are asked to find all integer solutions, which was not said in the original post.

But it was in the title of the post!
• Sep 8th 2010, 12:31 PM
Mukilab
Opalg please refer to my last post, I think you missed it
• Sep 8th 2010, 12:47 PM
Opalg
Quote:

Originally Posted by Mukilab
Surely it would go to 4002 and not 4004 because the two left over 1s from the factorising are positive, so they become negative when brought over.

No, you have to add 2 to both sides: $(2x+1)^2 + (2y+1)^2 = 4x^2+4x+1+4y^2+4y+1 = 4(x^2+x+y^2+y) + 2 = 4(1001) + 2 = 4006.$
• Sep 8th 2010, 01:16 PM
Mukilab
why do you add 2 to both sides? I understand from creating (2x+1)^2 + (2y+1)^2 you have 2 left over from the previous expression but how do you get 2 from the right side?
• Sep 8th 2010, 01:41 PM
Opalg
Quote:

Originally Posted by Mukilab
why do you add 2 to both sides? I understand from creating (2x+1)^2 + (2y+1)^2 you have 2 left over from the previous expression but how do you get 2 from the right side?

If an equation is to balance then you always have to do the same thing to both sides of it. Starting with the given equation $x^2+y^2+x+y=1001$, you can multiply both sides by 4 to get $4x^2+4y^2+4x+4y=4004$. You can then add 2 to both sides to get $4x^2+4y^2+4x+4y +2 =4004 + 2 = 4006$. Finally, factorise the left side to get $(2x+1)^2 + (2y+1)^2 = 4006$.
• Sep 8th 2010, 02:05 PM
awkward
Quote:

Originally Posted by Mukilab
Whenever I'm confronted with a question bearing the label of 'find all solutions' I almost never know how to solve it algebraically (apologies if I spelt that incorrectly), I always have to resort to manual methods, which usually are a bore and I know that is not the true mathematical way to solve them.

Now I've been shown this equation:
x^2+y^2+x+y=1001

and I have to find all integer solutions.

I have no idea of how to solve this because I think the left half of the equation cannot be simplified (or I simply do not know of the method). Until necessary, I'll refrain from using the calculator so please could anyone help me?

~Cyfer

Here is another approach.

$x^2 + x = x (x+1)$ is the product of two consecutive integers, hence is even.

The same can be said of $y^2 + y$.

So their sum must be...