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

  • #1
littlemathquark
17
5
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
  • #2
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.
 
  • #3
If solutions must be even it's reasonable to rephrase the problem as
[tex]
(2k)^2 + 2(2\ell)^2 + (2m)^2 = 8k\ell m \Leftrightarrow k^2 + 2\ell ^2 + m^2 = 2k\ell m,
[/tex]
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:
  • Like
Likes jedishrfu
  • #4
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?
 
  • #5
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.
 
  • Like
Likes jedishrfu
  • #6
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.
 
  • #7
Showing your own work would speed things along nicely.
 
  • Like
Likes SammyS
  • #8
The difficulty with your equation is its asymmetry. You quasi have square meters on the left and cubic meters on the right.
 
  • #9
Programming works. Ten lines of python and in seconds youll have your answer.
 
  • Like
Likes nuuskur
  • #10
Here's a lua program:

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 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.
 
  • Like
Likes nuuskur
  • #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.
 
  • #15
I adjusted my post to show only even solutions.
 
Back
Top