Find all integers $x$, $y$, and $z$ such that $\frac{1}{x} + \frac{1}{y} = \frac{1}{z}$

Solution 1:

The solutions are parameterized by $$x = p^2+pq, y= q^2+pq, z = pq$$ where $p,q$ are arbitrary integer numbers, chosen so that $x,y,z$ are all unequal zero.

The reason for this is that $1/x + 1/y = 1/z$ describes a projective curve in 2-dimensional projective space ${\mathbf P}^2$, given by the homogeneous equation $$(1) \quad y z + x z - x y = 0$$

The equation is of degree $2$ and so every line $l$ intersects it in two points $P_l$ and $Q_l$. Keeping $P=P_l$ fixed and with rational coordinates, the points $Q_l$ are also with rational coordinates when $l$ is a line with rational slope. Furthermore every rational point $Q$ defines a rational line $l$ with $Q = Q_l$. So the lines $l$ through $P$ with rational slope trace out the rational points of $C$, called $C({\mathbb Q})$. As the curve $C$ is projective we have $C({\mathbb Z}) = C({\mathbb Q})$. So the rational and the integer solutions to (1) are identical after multiplying away denominators.

Now take as point $P=(0,0,1)$ and do the calculation explicity on the affine patch $z=1$ where (1) becomes $y+x-xy = 0$. Making the ansatz $x=w,y=p/q \,w$ and solving for $w$ we find the solutions $0, (p+q)/p$. So $x=(p+q)/p$ and $y=(p+q)/q$ are the rational solutions of the affine equation. Bringing this to a common denominator $pq$ we receive the homogeneous solution from the beginning.

Solution 2:

${1\over x}+{1\over y}={1\over z}$ if and only if it has the form

$${1\over a(a+b)d}+{1\over b(a+b)d}={1\over abd}\quad\text{with}\quad \gcd(a,b)=1$$

(all variables being understood as positive integers).

The "if" part is trivial to verify. The "only if" part comes by setting $x=ga$ and $y=gb$ with $g=\gcd(x,y)$, which gives

$${1\over x}+{1\over y}={a+b\over gab}$$

and noting that $a+b$ is relatively prime to both $a$ and $b$.