<s>[INST] If x, y and z are rational and strictly positive and if $\frac{1}{x} + \frac{1}{y} = \frac{1}{z}$, show that $\sqrt{x^2+y^2+z^2}$ is rational This is a question from "Pathfinder to Mathematical Olympiads", I know that we need to prove that $x^2+y^2+z^2$ is a perfect square of a rational number. I did prove it but I'm wondering if there's a better solution than mine. And there is no solution given in the textbook.
I'm not able to add a pic of my solution so I'll briefly explain it.
$\ z = \frac{xy}{x+y}$, so I found the value of $\ x^2+y^2+z^2$ as a fraction in terms of x and y.
The denominator turned out to be $\ (x+y)^2$ which is a perfect square. So I factored the numerator and showed that it was a perfect square. Hence the whole fraction is a perfect square.
I hope you understood my solution.
P.S. I'm only 13 years old, so please don't put too advanced solutions.
 [/INST] Replace $z$ by $-z$, we get $\frac{1}{x} + \frac{1}{y} + \frac{1}{z} = 0$ and do not change $x^2 + y^2 + z^2$, then we can calculate that $xy + yz + zx = 0$, so $x^2 + y^2 + z^2 = x^2 + y^2 + z^2 + 2(xy + yz + zx) = (x + y + z)^2$, and $\sqrt{x^2 + y^2 + z^2} = x + y + z$ is rational.
</s>