Find all positive integer solutions for the following equation: Find all positive integer solutions for the following equation:
$(x^2+1)(y^2+1)+2(x-y)(1-xy)=4(1+xy)$
I've tried simplifying the equation and then refactoring but I can't find any solutions.
 A: We write the given equation equivalently:
$$
\begin{aligned}
0 &= x^2y^2 - 2x^2y + 2xy^2 + x^2 - 4xy + y^2 + 2x - 2y - 3\ ,\\
0 &= x^2(y-1)^2 + 2x(y-1)^2 + (y-1)^2-4\ ,\\
4 &= (x+1)^2(y-1)^2\ .
\end{aligned}
$$
Now consider all possible ways to write $4$ as a product of two perfect squares.
A: Expansion:
$$x^2y^2+x^2+y^2+1+2x-2y+2xy^2-2x^2y-4xy=4$$
Re-factoring:
$$(x^2+2x+1)(y^2-2y+1)=4$$
Simplify
$$(x+1)^2(y-1)^2=4$$
I will leave you to check the cases.
A: Using wolfram alpha, all the solutions are given by the expression : $$\begin{cases}y=\frac{x-1}{x+1}, x\neq -1 \\y = \frac {x+3}{x+1}, x\neq -1 \end{cases}$$
For example, the solutions for $x=1$ are $y=0$ and $y=2$.
You could try to find these solutions by hand solving the quadratic equation in respect to $y$. If you expand the original equation you get:
$$x^2 y^2 - 2 x^2 y + x^2 + 2 x y^2 + 2 x + y^2 - 2 y + 1 = 4 x y + 4$$ $$\Leftrightarrow (x^2 +2x+1) y^2 + (-2x^2-4x-2)y + (x^2+2x+1-4)=0 $$
Which you can solve using the quadratic formula.
A: The problem is that you are trying to solve this by simplifying instead of substituting for x and y. Hint to this problem is to first look at the graph of it on desmos perhaps. From this you can see the only integer solutions will ever be found on the axis'. Hence where x=0 or where y=0. This is the easiest method to do this of course. Doing this we can get:
When x=0 -> (y^2 +1)-2y =4  -> y^2-2y-3=0 use quadratic formula to solve and get:
y=-3 and y=1  two sols when x=0: (-3,0) and (1,0)
Now for the solutions when y=0
same process
y=0 -> (x^2+1)+2x =4 follow the same steps as earlier to get solutions where y=0: (0,3) and (0,-1)
Basically you had the right idea you simply needed to solve to place one variable as a zero first. Repeating the process with each variable. Hopefully this clears things up. If you want to know the reason why we can say there aren't any other integer solutions besides the intercept solutions would be a little more difficult/
Just remember that it asked for positive solutions. Therefor (0,3) and (1,0) are the only cases that work here.
