Minimizing the product $xy$ subject to a polynomial constraint on $x, y$ 
Given that $$16y(x^2+1)=25x(y^2+1),$$ where $x,y$ are positive integers, find the smallest possible value of $xy$.

I wrote my expression as a quadratic in $x$ and calculated it in form of $y$. Then $xy$ became in $y$ but it had square roots, so differentiating it and then solving and then substituting didn't seem a feasible method. 
 A: Let's first note that $x > y > 1.$ Since $(y, y^2+1) = 1,$ we have $y\mid 25x,$ and similarly, $x\mid 16y.$ Suppose that $5\not\mid y,$ so that $y\mid x.$ Writing $x = ky$ yields $ky\mid 16y \Rightarrow k\mid 16,$ and clearly $k\not = 1.$ Hence we now have $16y(k^2y^2+1) = 25ky(y^2+1),$ which after rearranging becomes 
$$y^2(16k-25) = 25 - \frac{16}{k}.$$
Since $k \ge 2,$ the LHS is at least $7y^2$ while the right-hand side is less than $25,$ so $y = 1,$ which is impossible. Hence $5\mid y.$
Suppose that $25\not\mid y.$ Now $y = 5y' \Rightarrow y' \mid 5x \Rightarrow y' \mid x.$ Then $x = ky'$ and $ky' \mid 80y' \Rightarrow k\mid 80.$ Since $x > y, k > 5.$ Using $y = 5y'$ and $x = ky'$ in the original equality yields
$$80y'(k^2y'^2 +1) = 25ky'(25y'^2+1)$$
which, after rearrangement, becomes
$$y'^2(16k-125) = 5 - \frac{16}{k}.$$
As $k>5,$ the RHS is positive, which implies that $k\ge 8.$ But then $k = 8$ (otherwise the LHS is bigger than $5$), whence $y' = 1$ gives $y = 5, x = 8.$
Now if $25\mid y,$ then $x \ge 2$ so $xy \ge 50$ is bigger than the product $5\cdot 8 = 40,$ so we're done.
