# Find all integral solutions for the Diophantine Equations $x^4 - x^2y^2 + y^4 = z^2$ and $x^4 + x^2y^2 + y^4 = z^2$.

Find all integral solutions for the Diophantine Equations $$x^4 - x^2y^2 + y^4 = z^2$$ and $$x^4 + x^2y^2 + y^4 = z^2$$

I basically think that to solve these equations we need to use the fact that all Pythagoras Triplets are like $(k \cdot 2mn, k \cdot (m^2 - n^2), k \cdot (m^2 + n^2))$. The above equations can be modified a little bit to make all the terms perfect squares. Then the first equation would be $$(x^2 - y^2)^2 + (xy)^2 = z^2$$ and the second one would be $$z^2 + (xy)^2 = (x^2 + y^2)^2$$

Thanks.

• If you subtract them, you get $x^2y^2=0$. Apr 26, 2016 at 10:08
• @MichaelBurr They are different questions. It's not like that they both have the same solutions. Apr 26, 2016 at 10:14
• So, you're asking two questions, not a simultaneous system. Apr 26, 2016 at 10:24
• @MichaelBurr Yes. Apr 26, 2016 at 10:31

[Edited to add the citations of Euler and others from Dickson]

Each of $E_\pm: x^4 \pm x^2 y^2 + y^4 = z^2$ is an elliptic curve. It turns out that in each case a Fermat-style "descent" suffices to find all solutions; in practice these days such questions are solved by reducing the curve to standard form and then either using software such as J.Cremona's mwrank, or consulting tables of elliptic curve if the curve is simple enough to be in the tables $-$ as is the case here where Tingley's "Antwerp" tables already contain both curves. The solutions are $(x,y,z) = (t,0,\pm t^2)$ and, for $E_-$, also $(x,y,z) = (t,\pm t, \pm t^2)$.

One easy way to map $x^4 \pm x^2 y^2 + y^4 = z^2$ to an elliptic curve in "Weierstrass form" is to let $t = x/y$ (assuming $y \neq 0$, but if $y=0$ then it's easy), so that $t^4 \pm t^2 + 1$ is a square, and then let $X = t^2$ so $X^3 \pm X^2 + X = Y^2$. The curve is then in the extended Weierstrass form $$Y^2 + a_1 X Y + a_3 Y = X^3 + a_2 X^2 + a_4 X + a_6$$ with $(a_1, a_2, a_3, a_4, a_6) = (0,\pm1,0,1,0)$. [These curves $Y^2 = X^3 \pm X^2 + X$ are not isomorphic with $E_\pm$, but they are "2-isogenous", which is good enough for our purposes, and in any case the "descent" approach requires solving $Y^2 = X^3 \pm X^2 + X$ as well.] We can now look up these coefficients in the tables, or enter them into mwrank and gp, to find that for both choices of $\pm$ sign there are finitely many rational solutions, with $X=0$ and (for $E_-$) also $X=1$. Thus the only solutions with $xy=0$ are those with $x=\pm y$ for $E_-$, etc.

[Added later: since this is a natural question that is tractable but nontrivial, it is not surprising that it's been asked and answered before. Indeed Dickson's History of the Theory of Numbers, Vol. II devotes several pages to such equations (Chapter XXII, starting on page 634), starting with Euler's work on $x^4+kx^2y^2+y^4=\Box$. The present question concerns the cases $k=\pm 1$, called $E_\pm$ above. The result on $E_-$ was already stated in Euler's Algebra (1770), but without proof, which was first supplied in the early 1800's. As for $E_+$, "R. Adrain$^{112}$ proved by descent that $x^4+x^2y^2+y^4 \neq \Box$", presumably excluding the trivial $xy=0$; footnote 112 refers to The Math. Diary, New York, 1, 1825, 147-150, with citations of later work by Genocchi (1855; he'd later use elliptic-curve descent to prove Fermat for exponent 7) and Pocklington (1914, but still more than a century ago).]

• Heavy weaponry, only to few people. Best regards. Apr 30, 2016 at 2:46
• In this case the modern "heavy weaponry" really comes down to a systematization of what Fermat already showed how to do. I wouldn't be surprised if these specific results are already cited in Dickson's History of the Theory of Numbers, Vol. II, perhaps due to Euler himself. Apr 30, 2016 at 2:56
• I hope you don't see this as too chatty, but I did not know that a person as famous as Professor Noam D. Elkies used this site. Apr 30, 2016 at 14:49
• Famous or not, I contribute more to Mathoverflow than Stackexchange, but yes, I sometimes find on this site (especially among the "featured questions") a question that touches on my expertise or strikes my fancy for some other reason. Apr 30, 2016 at 15:28
• It is certainly very good thing that Professor Elkies is contributing StackExchange. I would say however that "modern" notion of descent (extremely important to elliptic curves!) is essentially the same as Fermat but with a very sophisticated elaboration (evolution indeed!). May 1, 2016 at 11:13

COMMENT.- I feel but I have no proof that there are only the trivial solutions $(x,y,z)= (t,0,t^2),(0,t,t^2)$. I give here an outline of what could perhaps lead to a proof. $$x^4-x^2y^2+y^4=z^2\iff (x^2-y^2)^2+x^2y^2=z^2\qquad (1)$$ Hence, as it is well known, $$\begin{cases}x^2-y^2=t^2-s^2\\xy=2ts\\z=t^2+s^2\end{cases}\qquad (2)$$ It follows in particular $$x^2+s^2=t^2+y^2\qquad (3)$$ The general solution of $(3)$, which likely as for Pithagorean triples comes from an identity easily verified, is given by $$\begin{cases}2x=aX+bY\\2s=aY-bX\\2t=aX-bY\\2y=aY+bX\end{cases}\qquad (4)$$ where $a,b$ are arbitrary integers and $X,Y$ two parameters.

In any case, because of $(3)$, $x$ and $y$ must have the form, given by $(4)$, for certain integer values $a,b,X,Y$. However, in order to use parameters $t$ and $s$ we need besides to fit our values with the constraint $xy=2ts$ so we get the condition $$(aX+bY)(aY+bX)=2(aX-bY)(aY-bX)\iff 3ab(X^2+Y^2)=(a^2+b^2)XY$$ It follows $$\left(\frac XY\right)^2-\left(\frac{a^2+b^2}{3ab}\right)\left(\frac XY\right)+1=0$$ Hence $$\frac{6abX}{Y}= a^2+b^2\pm \sqrt{ (a^2+b^2)^2-(6ab)^2}$$ so the equation $$(a^2+b^2)^2-(6ab)^2=c^2\iff (a^2+b^2+6ab)(a^2+b^2-6ab)=c^2$$

It could be useful perhaps for someone. I stop here the comment.

• And $(t,t,t^2)$?
– san
Apr 29, 2016 at 23:10
• Equally trivial. Believe it or not I always write $xyz=0$ when I want to refer only to the two above solutions. It was a distraction so I did not put the solution that you say. Apr 30, 2016 at 2:41

Updated

We can try to find solutions ourself.

Equation 1. $\quad x^4+x^2y^2+y^4 = z^2.$

Let $$\gcd(x,y) = m,\quad x=mX,\quad y=mY,\quad z=m^2Z,$$ then $$X^4+X^2Y^2+Y^2=Z^2,\quad\gcd(X,Y)=1.$$

$$(X^2+XY+Y^2)(X^2-XY+Y^2)=Z^2,\quad\gcd(X,Y)=1.$$ Multipliers in the left part are the same parity. If they are even, then both $X$ and $Y$ are even and coprime, but this conditions are incompatible. So the multipliers are odd, and if they can have only odd common divider, which are the divider of expressions $$3(X^2+XY+Y^2)-(X^2-XY+Y^2) = 2(X+Y)^2$$ and $$3(X^2-XY+Y^2)-(X^2+XY+Y^2) = 2(X-Y)^2,$$ so numbers $X+Y$ and $X-Y$ share a common odd divider. And this odd divider must divide both their sum $2X$ and difference $2Y$, when $X$ and $Y$ are coprime. This contradiction proves that $$\gcd(X^2-XY+Y^2,X^2+XY+Y^2)=1.$$

Product of coprime positive factors is the square of an integer. Consequently, each of them is the square of coprime integers: $$\begin{cases} X^2+XY+Y^2=U^2,\\ X^2-XY+Y^2=V^2,\\ \gcd(X,Y)=1,\\ \gcd(U,V)=1. \end{cases}$$ So $$\begin{cases} X^2+Y^2=\dfrac{U^2+V^2}2,\\ 2XY= U^2-V^2. \end{cases}$$ Right part of the second equality is even, so $U$ and $V$ has the same parity and are odd. Then, $XY$ is even, when $X$ and $Y$ are coprime. The task is symmetric in the variables $X$ and $Y$, let $X$ is odd and $Y$ is even: $$X\cdot\frac Y2 = \dfrac{U+V}2\frac{U-V}2.$$ Note than $\dfrac{U+V}2$ and $\dfrac{U-V}2$ are coprime, because any their common divider also divides their sum $U$ and difference $V$.

The last equation has а solution $$X=ac,\quad\dfrac Y2=bd,\quad \dfrac{U+V}2=ad,\quad\dfrac{U-V}2=bc,$$ so $$X=ac,\quad Y=2bd,\quad U=ad+bc,\quad V=ad-bc,\quad Z=\pm(a^2d^2-b^2c^2),$$ where $$\gcd(ac,2bd)=\gcd(ad,bc)=1.$$ Thus, $a$ and $c$ are odd and $a$, $b$, $c$, $d$ are pairwise coprime numbers. That numbers must satisfy to equation $$(ac)^2+4(bd)^2=(ad)^2+(bc)^2,$$ or $$a^2(c^2-d^2)=b^2(c^2-4d^2).$$ $$\dots$$

Equation 2.

If $$3(xy)^2+z^2=(x^2+y^2)^2,$$ then $$\begin{cases} xy=2m-1,\\ z=\dfrac{3x^2y^2-1}2,\\ x^2+y^2=\dfrac{3x^2y^2+1}2. \end{cases}$$ So $$(xy+1)(3xy+1)=2(x+y)^2.$$ Then you can use the fact that equation $$mn=p^2$$ has solutions $$m=a^2c,\quad n=b^2c,\quad p=abc,$$ for $$m\in\left\{\dfrac{xy+1}2,xy+1\right\}$$