# $x^2+xy+y^2$ and $x^2-xy+y^2$ are not both perfect squares

Prove that $x^2+xy+y^2$ and $x^2-xy+y^2$ cannot be both perfect squares.

Surely $x$ and $y$ are natural numbers. If $x^2+xy+y^2 =a^2$ and $x^2-xy+y^2=b^2$ simultaneously then we have to show that there are no such integers $a$ and $b$.

I have tried that:

Suppose $x^2+xy+y^2=a^2$ and $x^2-xy+y^2=b^2$. Then $2xy=a^2-b^2=(a+b)(a-b)$, so one of $x$ and $y$ is even, but then I am stuck.

• That hyphen before your first polynomial looks a lot like a negative sign. You should definitely get rid of it. Also proove is not a word. Oct 28, 2013 at 16:15

Adding these equations gives $2(x^2+y^2) = a^2 + b^2$; unique factoriation of Gaussian integers shows that we essentially must have $a = x+y$ and $b = x-y$. Now combine this with what you already have.

• What do you mean by "essentially"? It's certainly not true that $A^2+B^2 = a^2+b^2$ implies that $\{\pm A,\pm B\} = \{\pm a, \pm b\}$. For example, $8^2+1^2=7^2+4^2$ (and thus $2(8^2+1^2)=11^2+3^2$). Oct 28, 2013 at 21:45
• Note too that your answer suggests that for any nonzero $c$ the only $x,y$ for which $x^2+cxy+y^2$ and $x^2-cxy+y^2$ are both squares are those for which $x=0$ or $y=0$. But that's certainly not true; the first natural number $c$ for which this elliptic curve has positive rank is $c=7$, and then we can take $(x:y) = (8:1)$, $(1365:176)$, and infinitely many other ratios. Oct 29, 2013 at 1:11

The question amounts to showing that the elliptic curve $Y^2 = X^2+X+1$, $Z^2 = X^2-X+1$ has no rational points other than those with $X=0$ and $X=\infty$. That can be done by elementary means but requires a Fermat-style descent. According to Dickson's History of the Theory of Numbers (Volume II, Chapter XVI, bottom of page 481, reference to footnote 119 on p.480), the result was proved in 1876 by Genocchi. [In modern language, a Weierstrass form for this curve is $$y^2 = x^3+x^2-24x+36 = (x-2)(x-3)(x+6),$$ with conductor $48$ and thus in the "Antwerp Tables" (see curve 48C), where we find that it has Mordell-Weil group $({\bf Z}/2{\bf Z}) \oplus ({\bf Z}/4{\bf Z})$.]

• Can you please provide the descent? Oct 28, 2013 at 19:36

This is not yet a full answer, but I need to get ready for work now and I'm not sure how to proceed anyway.

This statement clearly doesn't hold if $x$ or $y$ can be $0$, and negative numbers are easily flipped about, so assume that $x$ and $y$ are positive integers.

If $x$ and $y$ are both even, then dividing each by $2$ will yield another solution. Thus if there is any solution, there must be one for which $x$ or $y$ is odd, so we will assume, without loss of generality, that $y$ is odd.

Since $2xy=(a+b)(a-b)$, either $a+b$ or $a-b$ must be even. But $a+b = (a-b)+2b$, so in fact $a+b$ and $a-b$ are both even.

Thus $4\mid (a+b)(a-b)=2xy$, so $x$ or $y$ is even. Since $y$ is assumed to be odd, $x$ must be even.

Thus $a$ and $b$ are both odd.