x^2+2y^2+z^2=xyz Diophantine Equation

  • Thread starter Thread starter littlemathquark
  • Start date Start date
  • Tags Tags
    Number theory
littlemathquark
Messages
204
Reaction score
26
Homework Statement
How many solutions are there to the equation $$x^2+2y^2+z^2=xyz$$ where $$1\le x,y,z\le 200$$ are positive even numbers? What are the solutions?
Relevant Equations
None
I think $$x,y,z$$ must be multiple of 4 but I couldn't go on.
 
Physics news on Phys.org
Since all three variables are independent you can try making them the same and find a possible solution.

$$4x^2 = x^3$$

And so you can see that 4 is a solution.

Try other variations of the formula where x and z are the same or where x and y are the same.
 
If solutions must be even it's reasonable to rephrase the problem as
<br /> (2k)^2 + 2(2\ell)^2 + (2m)^2 = 8k\ell m \Leftrightarrow k^2 + 2\ell ^2 + m^2 = 2k\ell m,<br />
where ##1\leqslant k,\ell,m\leqslant 100##. The RHS is even, hence the left side must also be even. In particular, ##k^2+m^2## must be even. So ##k,m## must have the same parity.
 
Last edited:
jedishrfu said:
Since all three variables are independent you can try making them the same and find a possible solution.

$$4x^2 = x^3$$

And so you can see that 4 is a solution.

Try other variations of the formula where x and z are the same or where x and y are the same.
Ok, but how can I find other solutions when none of them equal each other?
 
There is no set method for solving such problems. If no solutions exist (which is not the case here), it can sometimes be shown by infinite descent. Otherwise you poke and prod and see what happens. E.g we see that ##x=y=z=4## is a solution, can other solutions exist? Try modular arithmetic as in the other post.
 
nuuskur said:
There is no set method for solving such problems. If no solutions exist (which is not the case here), it can sometimes be shown by infinite descent. Otherwise you poke and prod and see what happens. E.g we see that ##x=y=z=4## is a solution, can other solutions exist? Try modular arithmetic as in the other post.
Thanks but modular arithmetic doesn't work on this problem, atleast for me.
 
Showing your own work would speed things along nicely.
 
The difficulty with your equation is its asymmetry. You quasi have square meters on the left and cubic meters on the right.
 
Programming works. Ten lines of python and in seconds youll have your answer.
 
  • #10
Here's a lua program:

[CODE lang="clike" title="Finds diophantine equation"]

-- diophantine solver for xyz

for x=2,200,2 do
for y=2,200,2 do
--print(".")
for z=2,200,2 do

sum=x^2+2*y^2+z^2
prod=x*y*z

if sum==prod then
print("( "..x.." , "..y.." , "..z.." )")
end

end
end
end

print("end")
[/CODE]

code was adjusted to process only even x,y,z

Note: Code was written and run via the Codea IDE iPad app.
 
Last edited:
  • #11
One thing to consider is that diophantine rquations are devilishly hard to solve. Sometimes you just plugin numbers and see what happens or you look for some symmetries that reveal a solution. Thats how i found the 4 4 4 solution.

Programmers initially using brute force methods ie try all combinations of numbers. Later looking for symmetries to shorten the loops to get the same solutions quicker.

In this case, the xz symmetry means you could tie the x and z loops ie x ranges from 1 to 200 while z loop ranges from the current x value to 200 which dramatically cuts time nearly in half:

C-like:
    for z=x,200,2

and, I would need to add another print statement following line 10:

C-like:
      if x~=z then
          print("( "..z.." , "..y.." , "..x.." )")
      end

What other symmetries do you see?
 
Last edited:
  • #12
For $$(x,y,x)$$ solutions are $$(5,10,5),(4,4,4)$$; for $$(x,x,z)$$ solutions are $$(4,4,12),(4,4,4)$$; for $$(k,km,kn)$$ solutions are for m=5, n=3 $$(4,20,12)$$ but with using program all solutions are $$(4,4,4),(4,4,12),(4,20,12),(4,20,68),(4,116,68),(12,4,44),(44,4,164)$$ if you omit symmetries.
 
  • #13
I got at least 13 solutions from my code:

Code:
x,y,z

( 4 , 4 , 4 )

( 4 , 4 , 12 )

( 12 , 4 , 4 )

( 4 , 20 , 12 )

( 12 , 20 , 4 )

( 4 , 20 , 68 )

( 68 , 20 , 4 )

( 4 , 116 , 68 )

( 68 , 116 , 4 )

( 12 , 4 , 44 )

( 44 , 4 , 12 )

( 44 , 4 , 164 )

( 164 , 4 , 44 )

I had to add a conditional to drop the second line when x=z. Hence only one line of 4,4,4 will appear.
 
Last edited:
  • #14
We need only even solutions.
 
Back
Top