# Diophantine equation $2x^4 + 2x^2 y^2 + y^4 = z^2$

I've come upon the following question, and I'm a bit stumped. Any help would be greatly appreciated.

Find all integer solutions $$(x,y,z)$$ to the equation

$$2x^4 + 2x^2 y^2 + y^4 = z^2$$

Here is the progress I have. I note that $$(0,k,k^2)$$ is a solution for any $$k$$ (including $$k=0$$ which gives the trivial solution). I conjecture that these are all the solutions, but I could be wrong about that.

Let's look at the equation mod 8. If $$x$$ and $$y$$ are both odd then $$x^2, y^2$$ are 1 (mod 8), so the left side is 5, and this is a contradiction. If both are even, then we can divide $$x$$ and $$y$$ by 2, and divide $$z$$ by 4, to obtain a new solution, and keep doing this until at least one of them is odd. Thus, we can assume that exactly one is odd. If $$x$$ is odd and $$y$$ is even, then the left side is 2 (mod 8), but $$z^2$$ must be either 0 or 4 (mod 8), contradiction. Thus we are reduced to the case that $$x$$ is even, $$y$$ is odd, and then $$z$$ is odd. But I can't see how to show that $$x$$ must be $$0$$ (if that is true).

Can anyone help with this?

Greg

• Perhaps use that $x^2, x^2 + y^2, z$ is a pythagorean triple? Apr 3 at 8:51
• Nice observation! Since $x$ is even and the trio is primitive, there must exist integer $m,n$ such that $x^2=2mn, x^2+y^2 = m^2 -n^2, z= m^2+n^2$. Looking at that second equation mod 4 shows that $m$ must be odd (since if it is even then $n$ is odd, but then LHS = 1 and RHS = -1), and since $gcd(m,n)=1$ we see from $x^2 = 2mn$ that $m$ is an odd square, say $r^2$, and $n=2s^2$. All we need or this to exist is that $y^2 = r^4 - 4s^4 - 4r^2 s^2$ must be a perfect square. So we've exchanged our first D. equation for another. But, I have to admit, I don't see how to solve this one, either :) Apr 3 at 10:55
• You could rewrite it as $y^2 + (2 s^2 + r^2)^2 = 2 r^4$ and try to use math.stackexchange.com/questions/1250912/… Apr 3 at 11:11
• OK, cool, what this argument seems to me that this gives is that $$(s^2+(r^2+y)/2)^2 + (s^2+(r^2-y)/2)^2 = r^4$$, and we have another Pythagorean triple. I'm not sure where to go from here, though. It tells us a few things, like (by looking at it mod 16) that the odd term on the LHS is $\pm 1 (mod 8)$ and the even term is $0 (mod 4)$ (but I don't know which is odd and which is even), also that $r^2 = a^2 + b^2$ for some other integers $a,b$, so also $r = c^2 + d^2$ for some other integers. But still not seeing the final step. Apr 3 at 14:00
• Elementary methods for $ax^4 + b x^2 y^2 + c y^4 = d z^2$ are shown in chapter 4 of Mordell, Diophantine Equations. Pages 16-29 Apr 3 at 20:07

The only integer solutions of $$2x^4 + 2x^2 y^2 + y^4 = z^2\tag1$$ are $$(x,y,z)=(0,s,\pm s^2)$$ where $$s$$ is any integer.

Proof :

Let us first consider the case $$xyz=0$$.

• If $$x=0$$, then $$z=\pm y^2$$.

• If $$y=0$$, then $$2x^4=z^2$$ implies $$x=z=0$$.

• If $$z=0$$, then $$x=y=0$$.

So, $$(x,y,z)=(0,s,\pm s^2)$$ are solutions where $$s$$ is any integer.

In the following, let us prove that there is no solution $$(x,y,z)$$ satisfying $$xyz\not=0$$.

Suppose that there is a solution $$(x,y,z)$$ satisfying $$xyz\not=0$$.

We can see that if $$(x,y,z)=(a,b,c)$$ is a solution, then $$(x,y,z)=(\pm a,\pm b,\pm c)$$ are also solutions.

So, there has to be a solution $$(x,y,z)$$ such that $$x,y,z$$ are positive integers.

Let $$(x,y,z)=(X,Y,Z)$$ (where $$X,Y,Z$$ are positive integers) be a solution such that $$Z$$ is the smallest.

Here, we use your good observations.

• Suppose that $$X,Y$$ are odd. Then, we have $$5\equiv Z^2\pmod 8$$ which is impossible.

• Suppose that $$X$$ is odd and $$Y$$ is even. Then, we have $$2\equiv Z^2\pmod 8$$ which is impossible.

• Suppose that $$\gcd(X,Y)\gt 1$$. Then, there is a prime number $$p$$ such that $$p\mid X$$ and $$p\mid Y$$. Then, we have to have $$p^2\mid Z$$, and we see that $$(\frac Xp,\frac Yp,\frac Z{p^2})$$ is also a solution (even when $$p=2$$). This contradicts that $$Z$$ is the smallest.

So, we can say that $$X$$ is even, $$Y$$ is odd, $$Z$$ is odd and $$\gcd(X,Y)=1$$.

As commented by Gribouillis, we can write $$(X^2)^2+(X^2+Y^2)^2=Z^2$$ So, we can write $$X^2=2mn,X^2+Y^2=m^2-n^2,Z=m^2+n^2$$ where $$m,n$$ are positive integers satisfying $$m\gt n,\gcd(m,n)=1$$ and $$m\not\equiv n\pmod 2$$.

We have $$Y^2+2n^2=(m-n)^2$$.

It follows from this answer that we can write $$Y=k|b^2-2a^2|,n=2abk,m-n=k(b^2+2a^2)$$ where $$a,b,k$$ are positive integers.

• $$k=1$$ since $$\gcd(m,n)=1$$.

• $$b$$ is odd since $$Y$$ is odd.

• $$\gcd(a,b)=1$$ since $$\gcd(m,n)=1$$

We have $$X^2=2mn=4ab(2a^2+2ab+b^2)$$

So, there has to be a positive integer $$c$$ such that $$ab(2a^2+2ab+b^2)=c^2$$ We have the followings :

• $$\gcd(a,b)=1$$

• $$\gcd(a,2a^2+2ab+b^2)=\gcd(a,b)=1$$

• $$\gcd(b,2a^2+2ab+b^2)=\gcd(b,a)=1$$

So, there have to be positive integers $$u,v,w$$ such that $$a=u^2,b=v^2, 2a^2+2ab+b^2=w^2$$ So, $$2u^4+2u^2v^2+v^4=w^2$$ which means that $$(x,y,z)=(u,v,w)$$ is also a solution.

Here, we have $$w^2=2a^2+2ab+b^2=m$$ So, \begin{align}Z^2-w^2&=(m^2+n^2)^2-m \\\\&=m^4-m+2m^2n^2+n^4 \\\\&=\underbrace{m(m-1)(m^2+m+1)}_{\text{non-negative}}+\underbrace{2m^2n^2+n^4}_{\text{positive}} \\\\&\gt 0\end{align} This contradicts that $$Z$$ is the smallest.

So, we can say that there is no solution $$(x,y,z)$$ satisfying $$xyz\not=0$$.

Therefore, the only integer solutions are $$(x,y,z)=(0,s,\pm s^2)$$ where $$s$$ is any integer.$$\ \blacksquare$$

• Thanks so much for your answer, I'm sorry that I only seem to be able to award the bounty to one answer, and I could understand the last one the easiest, otherwise I would have given to you as well. Apr 16 at 13:48

The question is

Find all integer solutions $$(x,y,z)$$ to the equation $$2x^4 + 2x^2 y^2 + y^4 = z^2$$

Divide both sides by $$y^4$$ to get $$2r^4 + 2r^2 + 1 = s^2$$

where $$\,r=x/y\,$$ and $$\,s=z/y^2.\,$$ The problem now is to find rational solutions of this new equation. It is equivalent to an elliptic curve according to PARI/GP:

? E = ellfromeqn(2*r^4 + 2*r^2 + 1 - s^2)
[0, 2, 0, -8, -16]
? ellidentify(ellinit(E))
[["128c2", [0, -1, 0, -9, -7], []], [1, -1, 0, 0]]


The LMFDB entry for this curve is at URL https://www.lmfdb.org/EllipticCurve/Q/128c2/

It states that the Mordell-Weil group structure is $$\,\mathbb{Z}/2\mathbb{Z}\,$$ and thus there is only one rational point which is a 2-torsion element. It corresponds to the $$(0,k,k^2)$$ solution you already knew about. This is not a proof, but It seems to me that you did not ask for one, but only for help in finding all integer solutions.

• As with the other answer, I'm sorry that I only seem to be able to award the bounty to one answer, and I could understand the last one the easiest, so I gave it there. But thank you for solving it :) Apr 16 at 13:49

$$2x^4+2x^2y^2+y^4=z^2 \text{ for integers } x, y, z$$

Quite long solution, and lots to edit…

Case 1. $$x=0$$:
$$y^4=z^2, (x, y, z) = (0, t, \pm t^2)$$ is a solution.

Case 2. $$x\ne0, y=0:$$
$$2x^4=z^2$$, No solution.

Case 3. $$x\ne0, y\ne0:$$
$$z\ne0.$$

\begin{align} &\text{let } (x, y, z) = d. \\ \Rightarrow \; & x=dx_1, y=dy_1, z=dz_1. \\ \Rightarrow \; & 2d^4{x_1}^4+2d^4{x_1}^2{y_1}^2+d^4{y_1}^4=d^2{z_1}^2. \\ \Rightarrow \; & d^4|d^2{z_1}^2, d^2|{z_1}^2, d|z_1. \\ \therefore \; & 2\left(\frac x d\right)^4 + 2\left(\frac x d\right)^2\left(\frac y d \right)^2+\left(\frac y d\right)^4=\left(\frac z {d^2}\right)^2. \\ \therefore \; & \left(\frac x d, \frac y d, \frac z {d^2}\right) \text{ is also a solution.} \\ \ \\ \Rightarrow \; & \text{let } (x, y, z) \text{ has a smallest value of } x.\\ \Rightarrow \; & (x, y, z) = 1. \\ & (x^2)^2+(x^2+y^2)^2=z^2 \\ & (x^2, x^2+y^2, z): \text{ Pythagorean Triple.} \\ \Rightarrow \; & \begin{cases} i. & x^2=m^2-n^2, x^2+y^2=2mn, z=m^2+n^2.\\ ii. & x^2=2mn, x^2+y^2=m^2-n^2, z=m^2+n^2.\\ \end{cases} \\ & \left((m, n) = 1, \text{not } 2\not|m \text{ and } 2\not|n\text{, by Pythagorean Triple.}\right)\\ \ \\ i. \; & x^2=m^2-n^2, x^2+y^2=2mn. \\ \Rightarrow \; & x^2\equiv 1 (\mod 4), 2\not|m, 2|n. \\ \therefore \; & x^2+y^2 = 2mn \equiv 0 (\mod 4), 2|x, 2|y, \text{Contradiction.} \\ \ \\ ii. \; & x^2=2mn, x^2+y^2=m^2-n^2. \\ \Rightarrow \; & 2|x, 2\not|y. \\ \therefore \; & m^2-n^2=x^2+y^2\equiv 1 (\mod 4). \\ \Rightarrow \; & 2\not|m, 2|n. \\ & (m, n) = 1 \Rightarrow m = s^2, n = 2t^2. \\ \therefore \; & 4s^2t^2+y^2=s^4-4t^4. \\ & s^4-4s^2t^2-4t^4=y^2. \\ \Rightarrow \; & (s^2-2t^2)^2-y^2=8t^4, 8t^4=(s^2-2t^2-y)(s^2-2t^2+y). \\ &s^2-2t^2\pm y \equiv 1-0\pm1 \equiv 0 (\mod 2). \\ \ \\ &\text{let } (s^2-2t^2+y, s^2-2t^2-y)=d. \\ \Rightarrow \; & 2|d, d|(2s^2-4t^2). \\ & d^2|(s^2-2t^2+y)(s^2-2t^2-y)=8t^4 \Rightarrow d|4t^2 \\ \therefore \; & d|4t^2 \text{ and } d|2s^2, (t, s)=1. \\ \therefore \; & d=2.(\because 2\not|s.) \\ \ \\ \text{let} \; & t=2^{\alpha}l, 2\not|l \in \Bbb{Z}. \\ \Rightarrow \; & (s^2-2t^2+y)(s^2-2t^2-y)=2^{4\alpha+3}l^4 \\ \text{let}\; & s^2-2t^2+y=2p, s^2-2t^2-y=2q. \\ \Rightarrow\; & pq=2^{4\alpha+1}l^4. \\ & (p, q)=1, \begin{cases} p=2^{4\alpha+1}u^4, q=v^4 \\ \text{or} \\ p=v^4, q=2^{4\alpha+1}u^4 \end{cases} (\gcd(u, v)=1, uv=l) \\ &p+q=s^2-2(2^{\alpha}u)^2v^2=2(2^{\alpha}u)^4+v^4. \\ & 2(2^{\alpha}u)^4+2(2^{\alpha}u)^2v^2+v^4=s^2 \\ \Rightarrow \; & 2^{\alpha}u \leqslant 2^{\alpha}uv = 2^{\alpha}l=t<2st=x \\ &\text{Contradiction of minimum of x.} \\ \ \\ & \therefore \text{ Contradiction, No Solution for Case 3.} \end{align}

$$\therefore (0, t, \pm t^2)$$ is the only solution.

• Thank you! That makes perfect sense. But, after seeing the solution, I don't feel bad that I missed it, it's pretty involved. Apr 16 at 13:49