# Number theory: finding integer solution to an equation

1. Apr 27, 2012

### mtayab1994

1. The problem statement, all variables and given/known data

(E): x^2+y^2=6+2xy+3x

3. The attempt at a solution

$$x^{2}+y^{2}=6+2xy+3x\Longleftrightarrow x^{2}-2xy-3x+y^{2}=6\Longleftrightarrow x^{2}+x(-2y-3)+y^{2}=6$$

Any further help to find the answer??

2. Apr 27, 2012

### Joffan

You might try looking at $x^2 - 2xy+y^2=6+3x$

3. Apr 27, 2012

### mtayab1994

That's $$(x-y)^{2}-3x=6$$

4. Apr 27, 2012

### Joffan

Or $(x-y)^2=3(x+2)$ - which should be more interesting.

5. Apr 27, 2012

### mtayab1994

Can we use substitution and say that x+2=n?

6. Apr 27, 2012

### Joffan

Sure, although we will find a better substitution... what can you tell me about $n$?

7. Apr 27, 2012

### mtayab1994

On the question before I proved that x^2 Ξ 0(mod3) and that means that x^2=3n.

8. Apr 27, 2012

### Joffan

Hmm, not really. Let's define $m:=(x-y)$ - what can you tell me about $m$?

9. Apr 27, 2012

### mtayab1994

That means that m is the difference of x and y.

10. Apr 27, 2012

### Joffan

My question is, what does $m^2=3n$ (using the new definitions) tell you about $m$?

11. Apr 27, 2012

### mtayab1994

That means that m^2 is divisible by 3 hence divisible by all multiples of 3.

12. Apr 27, 2012

### vela

Staff Emeritus
Is that what you meant to say? 81 is divisible by 3, but it's not divisible by 6, which is a multiple of 3.

13. Apr 27, 2012

### Joffan

Yes... what does that mean for $m$???
What??? No. For example, 36 is divisible by 3 but not by 15.

14. Apr 27, 2012

### mtayab1994

If we said that m=x-y then m^2=(x-y)^2=3n .
So then we get that (x-y)^2=3n right?

15. Apr 27, 2012

### vela

Staff Emeritus
Yes, but it doesn't follow that m2 is divisible by all multiples of 3, which is what you claimed.

16. Apr 27, 2012

### mtayab1994

But how are we supposed to find integer solutions out of that? I found that y=n^2-3n-2 and that's wrong I think.

17. Apr 27, 2012

### vela

Staff Emeritus
At this point, you're going to have to think about it a bit on your own. You've got all the pieces. You just need that last little insight, which is what Joffan's been trying to get you to see.

18. Apr 27, 2012

### mtayab1994

Which new definitions m=x-y???

19. Apr 27, 2012

### Joffan

Don't backtrack. We have defined new variables $m$ and $n$; the formula translates into those variables as shown; now you need to understand what $m^2=3n$ tells you about $m$.

20. Apr 27, 2012

### mtayab1994

Well there are 3 cases:

Case 1: if m Ξ 0(mod3) then m^2 Ξ 0(mod3)

Case 2: if m Ξ 1(mod3) then m^2 Ξ 1(mod3)

Case 3: if m Ξ 2(mod3) then m^2 Ξ 4(mod3) with is m^2 Ξ 1(mod3)

So that means that m^2=3n . So that means the when m is divided by 3 you get either a remainder of 0,1, or 2 am i right?