# Show that $x^2 + y^2$ and $x^2 - y^2$ cannot both be perfect squares at the same time where $x, y \in \mathbb{Z}^+$.

Show that $x^2 + y^2$ and $x^2 - y^2$ cannot both be perfect squares at the same time where $x, y \in \mathbb{Z}^+$.

I think that $x^2 + 2xy + y^2$ and $x^2 + y^2$ are not consecutive squares since the difference is even. I think it has some relation with other squares like $(x+y)^2$ and $(x-y)^2$.

How should I proceed? I would love some hints.

• I'm sure there was a question in MSE that $a+b$ and $a+2b$ cannot be squares at the same time. Apr 22, 2016 at 14:41
• what is perfect square? Apr 22, 2016 at 14:42
• @sixulm Squares of integers. Apr 22, 2016 at 14:43
• @N.S.JOHN I see, so it's simply square. Apr 22, 2016 at 14:43
• I believe it means x and y are both non-zero integers. Apr 22, 2016 at 14:51

Suppose $x^2+y^2=a^2$ and $x^2-y^2=b^2$, then by multiplying them you get $x^4-y^4=(ab)^2$. This last equation has no non-trivial solution; see e.g. Solving $x^4-y^4=z^2$.

• This proves a stronger result - that $x^2+y^2$ and $x^2-y^2$ can't have their product equal to a square (except for trivial cases). Apr 22, 2016 at 14:57
• @user236182 Exactly. Apr 22, 2016 at 15:03
• I think that this proof can be modified for Fermat's Last Theorem where $n=4$. This question itself can be a different form of asking for a proof of the FLT where $n=4$. No doubt my problem sheet says this question was asked by Fermat. Apr 23, 2016 at 13:50

Hint:

If$x^2+y^2=c^2$ is a Pythagorean triple than there are two integers $m,n$ such that: $$x=m^2-n^2 \qquad y=2mn \qquad c=m^2+n^2$$

so: $$x^2-y^2=(m^2-n^2)^2-4m^2n^2=m^4+n^4-6 m^2n^2$$

• Provided $x$ and $y$ are coprime, but this is not an essential restriction. You should also justify why $x$ is odd and $y$ is even (after reduction to a primitive Pythagorean triple). Apr 22, 2016 at 15:36
• Why can't $m^4+n^4-6 m^2n^2$ be a perfect square? Apr 22, 2016 at 15:38
• Let m^2=x & n^2=y Then the equation reduces to x^2-6xy+y^2 In which the discriminant is 0 if and only if y=8 or n=2\sqrt 2 So this would not have any integer solution Dec 8, 2016 at 6:27