If $x+y+2xy=83$, find the value of $x+y$. 
Let $x$ and $y$ be integers. If $x+y+2xy=83$, find the value of $x+y$.

I tried to multiply both sides by $x+y-2xy$ but I could never manage to simplify it. Is there a better way to solve this question?

Let's assume we have a solution $(x,y)$. First we make a substitution $y = x + a$ for some integer $a$. Substituting gives $2x^2 +2x(a+1) + (a - 83) = 0$ which we can think of as a quadratic in $x$.
If a general quadratic $ax^2 + bx + c = 0$ has integer roots then we have that it's discriminant $b^2 - 4ac$ is a square because it appears under the squareroot in the quadratic formula.
So in our case, we have that $4(a+1)^2 - 4 \cdot 2 \cdot (a - 83)$ is a square. Simplifying gives us that $4(a^2 + 167)$ is a square. Suppose $a^2 + 167 = k^2$ for some integer $k$, then $(k-a)(k+a) = 167$. Since $167$ is prime we have $k = \pm 84 $ and $a = \pm 83$. Note that $2k$ is the discriminant of our quadratic.
So to find $x$ we plug $a$ into the quadratic formula. 
$$
x = \frac{-2(a+1) \pm 2k}{2 \cdot 2} = \frac{-2(\pm 83 + 1) \pm 2 \cdot 84}{4} = 0, 83, -84 \textrm{ or } -1.
$$
So now we check the possible solutions $(x,y)$. A trick we can use here it to note that the equation $x+y+2xy = 83$ is symmetric in $x$ and $y$ so the possible values for $y$ are also $0, 83, -84$ and $-1$. Going through the options gives the solutions $(0,83), (83, 0), (-84,-1)$ and $(-1,84)$.
