I have been trying to find the solutions to the joint equations below,
$$x+y+z+w=30$$ $$x^2+y^2=z^2+w^2$$
where $x$, $y$, $z$ and $z$ are distinctive natural numbers.
I have not worked with integer equations that much and do not seem to have equipped myself with a systematic approach as I do real equations. So, with certain reasoning and some reluctant trial-and-errors, I was able to come up with one set of solutions, only after about a good hour spent.
I am not sure how to tell if there are other solutions and aware that my method is inefficient to find them. I would like to see if there is a clean algebraic way to find all the solutions.
We can assume that $w=\max \{x,y,z,w\}$ and $z=\min \{x,y,z,w\}$ (at the end we take all permutation). Write: $$(x-z)(x+z)= (w-y)(w+y)\implies $$
exists $a,b,c,d\in\mathbb{N}$ such that \begin{eqnarray} x+z &=& ab\\ x-z &=& cd\\ w-y &=& ac\\ w+y&=&bd \end{eqnarray} so $b(a+d)= 30 \;\;\wedge \;\; d>a \implies b\leq 10$, so $b\in\{1,2,3,5,6,10\}$