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.

 A: Once you know $a+b = c + d$ and $ab = cd$, you can think about quadratic equations.
The two roots $r_1, r_2$ of $x^2 - px + q = 0$ have sum $r_1 + r_2 = p$ and product $r_1r_2 = q$. In other words:

*

*$a$ and $b$ are the two roots of $x^2 - (a+b)x + ab = 0$;

*$c$ and $d$ are the two roots of $x^2 - (c+d)x + cd = 0$.

But we've just shown that $a+b=c+d$ and $ab=cd$, i.e. these are the same quadratic equation! It has solution "$x=a$ or $x=b$" and it also has solution "$x=c$ or $x=d$"; these must be the same solution. The roots $a,b$ must be equal to the roots $c,d$ in one of the two possible orders.
A: 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$).
A: Having gotten $ab=cd$, take a linear combination with $a^2+b^2=c^2+d^2$:
$\color{blue}{ab=cd}$
$\color{brown}{a^2+b^2=c^2+d^2}$
$\color{brown}{a^2}\color{blue}{-2ab}\color{brown}{+b^2}=\color{brown}{c^2}\color{blue}{-2cd}\color{brown}{+d^2}$
Those polynomials are squares:
$(a-b)^2=(c-d)^2$
$a-b=\pm(c-d)$
Then if $a-b=+(c-d)$ and $a+b=c+d$, we are forced to have $a=c,b=d$. Can you fill in the result for the case $a-b=-(c-d)$?
A: Here's another method.
Note that by re-arranging, we may write $a+b=c+d$ either as $a-c=d-b$ or as $b-c = d-a.$  Just keep that in mind as we manipulate the second equation:
$$\begin{align*}0 &= (c^2 + d^2) - (a^2 + b^2) \\ &= (d^2 - b^2) - (a^2 - c^2) \\ &= (d-b)(d+b) - (a-c)(a+c) \\ &= (a-c)(d+b) - (a-c)(a+c) \\ &= (a-c)((d+b)-(a+c)) \\ &= (a-c)((d-a)+(b-c)) \\ &= (a-c)((d-a)+(d-a)) \\ &= 2(a-c)(d-a)\end{align*}$$
[Do you see the steps I've used each of $a-c=d-b$ and $b-c=d-a$ to simplify the expression?]

At this point, we're effectively done, as the factorization gives us only two solutions:

*

*$a-c=0$: Then $d-b=a-c = 0$ as well, which gives $a=c$ and $b=d$.

*$d-a=0$: Then $b-c=d-a = 0$ as well, which gives $a=d$ and $b=c$.

A: Introduce $x$, $y$, $\alpha$ and $\delta$, so
$$x=\frac {a+b} 2$$
$$y=\frac {c+d} 2$$
$$\alpha=\frac {a-b} 2$$
$$\delta=\frac {c-d} 2$$
Now
$$a=x-\alpha$$
$$b=x+\alpha$$
$$c=y-\delta$$
$$d=y+\delta$$
Rewrite $a+b=c+d$ using $x$, $y$, $\alpha$ and $\delta$:
$$x-\alpha+x+\alpha=y-\delta+y+\delta$$
$$2x=2y$$
$$x=y$$
Similarly rewrite $a^2+b^2=c^2+d^2$:
$$(x-\alpha)^2+(x+\alpha)^2=(y-\delta)^2+(y+\delta)^2$$
$$x^2-2x\alpha+\alpha^2+x^2-2x\alpha+\alpha^2=y^2-2y\delta+\delta^2+y^2+2y\delta+\delta^2$$
$$2x^2+2\alpha^2=2y^2+2\delta^2$$
We already know $x=y$, therefore
$$\alpha^2=\delta^2$$
This means $\alpha=\delta$ or $\alpha=-\delta$. The former case leads to $a=c,b=d$; the latter case leads to $a=d,b=c$.
A: Let $a = c + \delta$.  Then as $a+b = c+\delta + b = c+d$ we have $b= d-\delta$.
So we ahve $c^2 + d^2 = (c+\delta)^2 + (d-\delta)^2$ so
$2\delta(c-d) + 2\delta^2= 0$.
Case 1:  $\delta = 0$.
The we go back to near the beginning.  Then $a =c+\delta =c$ and $b=d-\delta = d$.
Case 2: $\delta \ne 0$ then
$(c-d) + \delta = 0$
$c = d-\delta$.
But $b = d-\delta$ so $c=b$.
Going way back to the very beginning:
$a + b = c + d$ and $c + d = b+d$ we get $a=d$.
So case 1: $a=c;b=d$ or case 2: $a=d$ and $b=c$.  (or both:  $a=b=c=d$ is always an option.)
A: Alternative approach:
From the constraints, 
$(a + b)^2 = (c + d)^2 \implies$ 
[since $a^2 + b^2 = c^2 + d^2$] 
$2ab = 2cd \implies ab = cd \implies$ 
$a(c + d - a) = cd$.
This allows a quadratic equation in $a$ to be formed, that may be solved in terms of $c,d$.
$a^2 - (c+d)a + cd = 0.$
Therefore, 
$\displaystyle a = \frac{1}{2}\left[
(c + d) \pm \sqrt{(c + d)^2 - 4cd}\right].$
This equals 
$$\frac{1}{2}\left[
(c + d) \pm \sqrt{(c - d)^2}\right].\tag 1$$
Due to the symmetry in the expression in (1) above, you have that without loss of generality, $c \geq d$.
Therefore $\displaystyle a = \frac{1}{2}\left[
(c + d) \pm (c - d)\right].$
The two solutions generated will be $a = c$ or $a = d$.
