7

Determine all positive integer solutions of the equation $x^2+y^2=2z^2$.

First I assume $x \geq y$, and I have $x^2-z^2=z^2-y^2$. Then I have $(x-z)(x+z)=(z-y)(z+y)$, but from here, I don't know how it can help me to describe solutions (I know that there are infinitely many).

Runj
  • 571
  • 3
  • 11
  • 1
    Some other posts about the same diophantine equation: http://math.stackexchange.com/questions/1250912/diophantine-equations-solving-a2-b2-2c2 http://math.stackexchange.com/questions/1282600/parametric-characterization-for-x2-y2-2z2 – Martin Sleziak May 02 '16 at 05:24

4 Answers4

9

Just a start:

Note that $$\left(\frac{x-y}{2}\right)^2 + \left(\frac{x+y}{2}\right)^2=\frac{x^2+y^2}{2}=z^2.$$

And $\frac{x-y}{2}$ and $\frac{x+y}{2}$ are integers (why?)

So you need to find solutions to $u^2+v^2=z^2$.

Thomas Andrews
  • 177,126
  • 1
    Thanks, I get it. Is there a general way to solve this type of problem, like $x^2+y^2=kz^2$ – Runj May 01 '16 at 18:55
  • 3
    The general way is to solve $k=u^2+v^2$. If you can't solve it, then there is no solution. If you can, then you can convert the question to a question about $x_1^2+y_1^2=z_1^2$. This is related to Gaussian integers, and the fact that you have unique factorization in the Gaussian integers. In the case of $k=2$, $1^2+1^2=2$. – Thomas Andrews May 01 '16 at 19:02
7

In General formula generic for Pythagorean triples looks a little different.

$$x^2+y^2=az^2$$

If the number can be represented as a sum of squares. $a=t^2+k^2$

The solution has the form:

$$x=-tp^2+2kps+ts^2$$

$$y=kp^2+2tps-ks^2$$

$$z=p^2+s^2$$

individ
  • 4,301
3

From Brahmagupta-Fibonacci Identity: $${\left( {p}_{2}\,{s}_{2}+{p}_{1}\,{s}_{1}\right) }^{2}+{\left( {p}_{1}\,{s}_{2}-{s}_{1}\,{p}_{2}\right) }^{2}=\left( {p}_{2}^{2}+{p}_{1}^{2}\right) \,\left( {s}_{2}^{2}+{s}_{1}^{2}\right)$$ get: $${\left( {p}_{2}\,{s}_{2}\,{t}_{2}+{p}_{1}\,{s}_{1}\,{t}_{2}+{p}_{1}\,{t}_{1}\,{s}_{2}-{s}_{1}\,{t}_{1}\,{p}_{2}\right) }^{2}+{\left( {p}_{1}\,{s}_{2}\,{t}_{2}-{s}_{1}\,{p}_{2}\,{t}_{2}-{t}_{1}\,{p}_{2}\,{s}_{2}-{p}_{1}\,{s}_{1}\,{t}_{1}\right) }^{2}=\left( {p}_{2}^{2}+{p}_{1}^{2}\right) \,\left( {s}_{2}^{2}+{s}_{1}^{2}\right) \,\left( {t}_{2}^{2}+{t}_{1}^{2}\right)$$ and get solution: $${\left( {p}_{2}\,{t}_{2}^{2}+2\,{p}_{1}\,{t}_{1}\,{t}_{2}-{t}_{1}^{2}\,{p}_{2}\right) }^{2}+{\left( {p}_{1}\,{t}_{2}^{2}-2\,{t}_{1}\,{p}_{2}\,{t}_{2}-{p}_{1}\,{t}_{1}^{2}\right) }^{2}=\left( {p}_{2}^{2}+{p}_{1}^{2}\right) \,{\left( {t}_{2}^{2}+{t}_{1}^{2}\right) }^{2}$$

AlexSam
  • 311
3

Though others have posted simple solutions to the problem but if you want to proceed the way you did then here it is:

First let $\dfrac xz = a$ and $\dfrac yz = b$. This reduces problem to two variables (which are rational numbers).
Now we have $(b+1)(b-1)=(1+a)(1-a)$
which means $${b+1\over1+a} ={ 1-a\over b-1}$$ Let this fraction be $\dfrac mn$ in reduced form. From this we get 2 linear equations in 2 variables (in terms of a and b). Solving those will give
$$a = \frac{(n² + 2mn - m²)}{(m² + n²)}$$
$$b = {(m² + 2mn - n²)\over(m² + n²)}$$
Substituting values of a and b back gives the solution to original problem: $$x = n² + 2mn - m²$$ $$y = m² + 2mn - n²$$ $$z = m² + n²$$

Ronak
  • 31