4

If $$\frac{x}{y} + \frac{y}{z} + \frac{z}{x} = 17,$$ then solve for $x$, $y$ and $z$, where $x$, $y$, and $z$ are positive integers.

I got a common denominator of $xyz$, but then after that I was stuck:

$$x^2z + xy^2 + yz^2 = 17xyz$$

I also tried the quadratic formula, solving for $x$, but that was also a dead end:

$$x = \frac{-y^2+17zy \pm \sqrt{(y^2-17zy)^2-4z^3y}}{2z}.$$

I even wrote a rudimentary program to test a few numbers:

// index.js
function solve() {
    const limit = 10000;
    for (x = 1; x < limit; x++) {
        for (y = 1; y < limit; y++) {
            for (z = 1; z < limit; z++) {
                if (x*x*z + x*y*y + y*z*z === 17*x*y*z)
                    return { x, y, z };
            }
        }
    }
}

console.log(solve());

Getting undefined. Any help would be appreciated.

azizj
  • 205

0 Answers0