<s>[INST] Given $a + b = c + d$ and $a^2 + b^2 = c^2 + d^2$ prove $a=c, b=d$ or $a=d, b=c$ 
Given $$a + b = c + d\space \text{and}\space a^2 + b^2 = c^2 + d^2\quad\forall\space a,b,c,d \in \mathbb{R}$$ Prove: $$a=c, b=d\space \text{or} \space a=d, b=c $$


*

*I managed to get $ab=cd$. Don't know how to proceed further.

 [/INST] Suppose that $ab = cd \neq 0$. Then we get $\frac{a}{c} = \frac{d}{b} = k$.
From the above, we get $a = kc$ and $d = bk$. Substituting in $a+b = c+d$, we get $kc + b = c + bk$. Thus $(k-1)c - (k-1)b = (k-1)(c-b) = 0$. Thus, we must have that $b = c$ or $k = 1$. In the first case, we would then get $a=d, b=c$. In the second case, we get $a = c, b = d$.
If $ab = 0$. The $a = 0$ or $b = 0$. WLOG $a = 0$. Similarly since $cd = 0$, $c = 0$ (in which case $a=c, b=d$) or $d=0$ (in which case $a=d, b=c$).
</s>