Math contest proof problem fractions
Could someone help me with this?
Let $x, y, z$ be positive integers with greatest common divisor $1$. If $\frac 1 x +\frac 1 y=\frac 1 z$, then show that $\sqrt{x + y}$ is an integer.
$x+y = \frac{xy}{z} $ is an integer, so $ z \mid xy$.
Let $z = z_x \times z_y $ where $z_x \mid x$ and $z_y \mid y$. (Because $ \gcd(x,y) = 1 $, hence these are uniquely determined.)
Let $x = z_x \times x_x$ and $y = z_y \times y_y$, where every variable is an integer.
Then we have that $z_xx_x + z_y y_y = x_xy_y$
Apply the condition that $\gcd(x,y,z)=1$ to conclude that $x_x | y_y $ and $y_y | x_x$. (Fill in this argument. If you want a further hint ...
$ \gcd(x,y,z) = 1 \Rightarrow \gcd(x_x, z_y ) = 1$. Since $x_x(z_x-x_y) = -z_y y_y$ hence $ x_x \mid y_y$
Hence $\sqrt{x+y} = x_x$ is an integer.
Note: we can replace the condition $$\frac{1}{x}+\frac{1}{y}=\frac{1}{z}$$ with the following weaker one:
For every prime $p$, $$\nu_p(x+y)=\nu_p(x)+\nu_p(y)-\nu_p(z)=S_p\geq 0$$
First, suppose that $\nu_p(z)=0$. Then $\nu_p(x+y)=\nu_p(x)+\nu_p(y)$, so $\nu_p(x)=\nu_p(y)$ and $S_p$ is even.
Otherwise, suppose wlog that $\nu_p(x)=0$. If $\nu_p(y)=0$, then $S_p=0$, so suppose $\nu_p(y)\geq 1$. Then $\nu_p(x+y)=0\implies S_p=0$ again.
Thus in all cases, $S_p$ is even. It follows that $x+y$ is a perfect square.