Find a solution: $3(x^2+y^2+z^2)=10(xy+yz+zx)$

As far as I understand - this is the site for solving the problem. Programming and calculation using the computer is not mathematics. If you want to calculate - there is a special section. https://mathematica.stackexchange.com/questions

Here it is necessary to solve the equations.

For the equation:

$$3(x^2+y^2+z^2)=10(xy+xz+yz)$$

The solution is simple.

$$x=4ps$$

$$y=3p^2-10ps+7s^2$$

$$z=p^2-10ps+21s^2$$

$p,s - $ any integer which we ask.

Why make a program? What's the point? For what?


This was a bunch of nonsense characters typed by hand so that the software would not test me with a ``captcha''

   0           1           3
   0           3           1
   1           0           3
   1           3           0
   3           0           1
   3           1           0
   3           9          40
   3          40           9
   5          32         119
   5         119          32
   8          11          65
   8          65          11
   9           3          40
   9          40           3
  11           8          65
  11          65           8
  13          15          96
  13          96          15
  15          13          96
  15          96          13
  32           5         119
  32         119           5
  40           3           9
  40           9           3
  65           8          11
  65          11           8
  96          13          15
  96          15          13
 119           5          32
 119          32           5

When he wrote the equation he meant probably that entry.

$$q(x^2+y^2+z^2)=(3q+1)(xy+xz+yz)$$

It turns out, this equation has a connection with the Pell equation:

$$p^2-5s^2=\pm1$$

For $+1$ it is necessary to use the first solution $(9 ; 4)$. For $-1$ it is necessary to use the first solution $(2 ; 1)$. Knowing what the decision can be found on the following formula.

$$p_2=9p_1+20s_1$$

$$s_2=4p_1+9s_1$$

Using the solutions of the Pell equation can be found when there are solutions. $q=\mp(p^2-s^2)$

Will make a replacement. $t=\mp4ps$ Then the solution can be written:

$$x=2(q+1)tkn$$

$$y=(q+t+1)k^2-2(3q+1)tkn+(t-q-1)(10q^2+7q+1)n^2$$

$$z=(t-q-1)k^2-2(3q+1)tkn+(t+q+1)(10q^2+7q+1)n^2$$

$k,n $ - integers asked us. May be necessary, after all the calculations is to obtain a relatively simple solution, divided by the common divisor.