As suggested on Mathoverflow (https://mathoverflow.net/questions/168536/solutions-to-the-diophantine-equation-2a2-2b2-c2-d2-0) I am transfering this question to math-stackexchange:

I am looking for integer solutions of the following algebraic equations: $ 2a^{2} + 2b^{2} - c^{2} - d^{2} = 0 $ Preferentially the solutions should obey $a+b+c+d=0$.

By inspection I found the following solutions: $(a,b,c,d)=(1,0,1,1)$ , $(a,b,c,d)=(0,1,1,1)$, $(a,b,c,d)=(1,1,-2,0)$ and $(a,b,c,d)=(1,1,0,-2)$.

Additional solutions can be generated by swapping the sign of $a,b,c,d$ or by scaling the solutions that I have given by an integer.

As a theoretical physicist I am rarely working with these diophantine equations and hence I am wondering what other solutions of the equation exist that I have not taken into account.

I am looking forward to your responses.

  • $\begingroup$ We can choose $a$ and $b$ arbitrarily, and let $c=a+b$ and $d=a-b$. (And there are additional solutions.) $\endgroup$ – André Nicolas May 29 '14 at 18:26
  • $\begingroup$ @Andre Nicolas: Yes, but that doesn't give $a+b+c+d = 0$ unless $a= 0.$ $\endgroup$ – Geoff Robinson May 29 '14 at 18:27
  • $\begingroup$ Formula for the solution of this equation in the general form I have in my blog. I mean in general. When the number of variables 4. artofproblemsolving.com/Forum/blog.php?u=206450 If it is not clear then write the formula itself. $\endgroup$ – individ May 29 '14 at 18:27
  • $\begingroup$ What are your motivations to come up with this question? $\endgroup$ – chubakueno May 29 '14 at 18:31

$$a=2-2p^2-q^2-r^2+2p(q+r)$$ $$b=2(-2p+q+r)$$ $$c=-2-2p^2+4pq-q^2-2qr+r^2$$ $$d=-2-2p^2+q^2+4pr-2qr-r^2$$

Edited to add: If you also require $a+b+c+d=0$, then

$$a=p^2-2pq+q^2+2pr-2qr-2r^2$$ $$b=p^2+q^2+2qr-2r^2-2p(q+r)$$ $$c=4r^2$$ $$d=-2(p-q)^2$$

  • 1
    $\begingroup$ Supposing this is ok (I don't dare squaring those monsters), how did you come up with this solution? Does it gives every solution? Also, this doesn't follow the $a+b+c+d=0$ requirement. $\endgroup$ – chubakueno May 29 '14 at 18:38
  • 1
    $\begingroup$ On Mathoverflow it was pointed out that the equations (together with the a+b+c+d=0 condition) define a "conic in P^2". Can someone explain to me in simple terms what this means? $\endgroup$ – MrLee May 29 '14 at 18:53
  • $\begingroup$ MrLee: If you impose the condition $a+b+c+d=0$ (which I did not), you're down to three variables (say $a$, $b$, $c$). Then your first equation is a homogeneous quadratic in three variables. The corresponding curve is called a conic because it's of degree 2. So at this point you have a conic in affine 3-space. Now if you throw away the origin, and then collapse each line through the origin to a single point, you have projective 2-space, or $P^2$, and the image of your conic is a conic in $P^2$. $\endgroup$ – WillO May 29 '14 at 19:45
  • $\begingroup$ Ok. So how did you derive these equations? Is there some reference? $\endgroup$ – MrLee May 29 '14 at 20:00
  • 1
    $\begingroup$ MrLee: Most lines meet a given conic in exactly two points. So if you take a line through a known point on the conic, it will ordinarily hit in some other point. Start, say, with the known point $(1,0,1,1)$. A typical line through this point is given parametrically by $(1+pt,qt,rt+1,st+1)$, with $p,q,r,s$ constant. Look for where this line hits your conic by plugging in $1+pt$, $qt$ and so forth for $a$, $b$, and so forth in the equation for the conic and then solving the resulting quadratic for $t$. One solution is $t=0$, giving you back your known point. Take the other solution! $\endgroup$ – WillO May 29 '14 at 20:46

This should have been a comment under WillO's answer, but didn't fit.

About "conics" and such. Let's start with the most familiar "conic": a circle in $\mathbb R^2$ given by $x^2+y^2=1$, or equivalently a circle in $P^2$ given by $x^2+y^2=z^2$. Let's answer a similar question: what are all the integer triples that solve the Pythagorian equation $x^2+y^2=z^2$ (or, eqivalently, rational pair that solve $x^2+y^2=1$)?

The solution boils down to constructing a "stereographic projection" between the circle and the line. This projection gives an "almost 1:1" correspondence between rational points on the circle and rational points on a line. Here's a video that explains how Pythagorian triples are found using stereographic projection. The Geometry of Euclid's formula part of Wikipedia article explains the same thing.

The technique is extendible from the circle given by the equation $x^2+y^2=z^2$ to any "conic section" given by any quadratic equation, or in your case a system of a quadratic and linear equation. What you need to do is the following:

1) Pick a single point on the curve given by your equations which would act like a pivot for mapping your curve onto a line;

2) Pick a line in the hyperplane given by your linear equation $a+b+c+d=0$;

3) Draw a generic line through the pivot point that would intersect your curve as well as the chosen line and figure out the formula that maps between the points on the curve and the points on the line;

4) Since rational points on the line are in "almost" 1:1 correspondence with the rational points on the curve the mapping from the line to the curve would give you the formula for the integer points on the curve when you substitute the line parameter (say, "$t$") with the corresponding fraction (say, $t=m/n$).

BTW, this technique (could also be found under other names such "birational isomorphsim") is useful in field other than number theory. For example, when you are solving an indefinite integral of an expression with trigonometric functions $\sin(x)$ and $\cos(x)$ you usually make well-known substitutions such as $\tan(x/2)=t$. These substitutions were also found by birationally mapping the circle parametrized by $(\cos(x),\sin(x))$ onto the line $t\in\mathbb R$.

  • $\begingroup$ This is a very nice and detailed answer! As I pointed out in my last comment in response to WillO it puzzles me that the t that I obtain is rational. (Since I am looking for integer solutions) $\endgroup$ – MrLee May 29 '14 at 21:34
  • $\begingroup$ Also it seems to me that this technique should apply fo more generic equations of the form $x^{T}Ax$ = 0 with A being some symmetric matrix and x an integer vector. Is this correct? $\endgroup$ – MrLee May 29 '14 at 21:40
  • $\begingroup$ @MrLee: as long as you have quadratic curves this works. When you get into cubics or higher degrees things become more tricky (in fact, the reason one cannot express so-called "elliptic integrals" in terms of elementary functions is because cubics don't map onto lines). If you try to solve a system of 2 quadratic equations the corresponding curve will have degree $2*2=4$ (according to Bezout's Theorem), and therefore not rationally mappable onto a line. You got away with a system of 2 equations because one of them was linear, so the curve had degree $2*1=2$. $\endgroup$ – Michael May 29 '14 at 21:50

I think that it is necessary to adjust the formula solutions.

For the equation: $2X^2+2Y^2=Z^2+R^2$

Solutions can be written.





For the system of equations:


Solutions have the form:





$p,s,t,k$ - integers of any sign.


Here is a low tech solution (it is the same answer with slightly different notation)

The solutions to $2(a^2+b^2)=c^2+d^2$ and $a+b=c+d$ are essentially $$c,d=4P^2,-2Q^2,a,b=2P^2\pm 2PQ-Q^2 $$ in that all solutions arise from these by possibly multiplying through by a constant $m \in \mathbb{Z}$. To have $\gcd(a,b,c,d)=1$ we should have $$\gcd(2P,Q)=1.$$ For a connection to Gaussian integers see the end.

The request was for $a+b=-(c+d)$ but that requires just changing the signs.

Here is (a sketch of) one way to arrive at that solution. Since we have $(a,b,c,d)=(1,1,2,0)$ lets look for other rational solutions with $a+b=c+d=2.$ We can then scale up to get (all) the integer solutions. So we seek $$2(a^2+b^2)=c^2+d^2 \text{ with }a,b=1\pm u\text{ and }c,d=1\pm v.$$ This simplifies to $$2(1+u^2)=1+v^2 \text{ i.e. }v^2=1+2u^2.$$

We can restrict this curve $v=\sqrt{1+2u^2}$ to $u,v \ge 0$ starting at the point $X=(0,1).$ If we take the line $v=1+ku$ of (rational) slope $k$ through $X$ it will intersect the curve at two points, $u=0$ and, after some algebra, $$u=\frac{2k}{2-k^2 }\text{ and }v=\frac{2+k^2}{2-k^2 }.$$ First substitue these values into $$a,b=1\pm u\text{ and }c,d=1\pm v.$$ Then set $k=\frac{P}{Q}$ to get expressions for $a,b,c,d$ all with denominator $P^2-2Q^2$. Clear the denominators to get the solution given above.

For example with $k=\frac{2}{3}$ we get $u,v=6/7, 11/7$ leading to the rational solution $(a,b,c,d)=(1/7,13/7,-4/7,18/7)$ and thus the integer solution $(1,13,-4,18).$

ASIDE: Since $(a+bi)(a-bi)=a^2+b^2,$ the form of this problem suggests to me that there might be an approach via Gaussian integers (where there is a unique factorization up to units.) I did not fully work one out but the following is suggestive: $$a+bi=(1+i)(Q+P+Pi)(Q-P+Pi)$$ $$c+di =(1+i)^2(Q+P-Pi)(Q-P+Pi)$$ It might be enlightening to examine the variation $m(a^2+b^2)=c^2+d^2$ for $m=5,10,13$ or other values with all odd prime divisors of the form $4q+1$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.