# Does the equation $a^2 + b^2 + c^2 = d^2$ have solutions in integers if $(a, b, c, d) > 0$?

I tried working out a solution to satisfy this equation and I got that this has no solution, however:

$$1^2 + 2^2 + 2^2 = 3^2$$

so it does have a solution.

I started off with the equation:

$$a^2 + b^2 + c^2 = d^2$$

Therefore $a^2 + b^2 = d^2 - c^2$ and therefore:

$$(a + b)^2 - 2ab = (d + c)^2 - 2ab - 2c^2$$

which simplifies to $(a + b)^2 = (d + c)^2 - 2c^2$. This means that $(a + b)^2 + 2c^2 = (d + c)^2$ and therefore:

$$a^2 + b^2 + 2ab + 2c^2 = d^2 + c^2 + 2dc$$

Therefore: $a^2 + b^2 + 2ab + c^2 = d^2 + 2dc$ which means:

$$a^2 + b^2 + c^2 = d^2 + 2dc - 2ab$$

However, we just established that $a^2 + b^2 + c^2 = d^2$ so this means that $2dc = 2ab$. So now we have three options of what $a$, $b$, $c$, or $d$ could equal.

1. $a = b = c = d = 0$

2. $a = d$ and $b = c$

3. $a = c$ and $b = d$

But when we test it, we see that our only option is $a = b = c = d = 0$ however we had a solution for this equation where $(a, b, c, d) > 0$ to satisfy this equation.

Could somebody please tell me where I am wrong, because I obviously did something wrong here but I can't identify where I made a mistake; there is probably something very obvious that I missed. I would appreciate if you showed me the steps to finding a solution to this equation.

EDIT: Yeah I think I should learn the basics first before I allow my curious mind to wander off onto other things.

• I would have put (squared-numbers) or (perfect-squares) in my tags list but I need at least 1000 reputation to put it there. – George N. Missailidis Jul 24 '17 at 2:46
• Hint: substitute $a=1,b=c=2,d=3$ into each of your equations and see which is the first one that is wrong. – Robert Israel Jul 24 '17 at 2:49
• are we talking about integers only here? pls clarify that in your question – Agile_Eagle Jul 24 '17 at 2:50
• the third (centered) equation is wrong – fonfonx Jul 24 '17 at 2:58
• ... and there are additional mistakes in the subsequent "simplifications". – NickD Jul 24 '17 at 3:21

$$\left( a^2 + b^2 - c^2 - d^2 \right)^2 + (-2ad+2bc)^2 +(2ac+2bd)^2 = \left( a^2 + b^2 + c^2 + d^2 \right)^2$$
gives all possible solutions with gcd one, where we need $\gcd(a,b,c,d) = 1$ and $a+b+c+d$ odd.