Solve the following equation in integers $x,y:$ $x^2+6xy+8y^2+3x+6y=2.$

Another solution is to let $k=2y$ and get $$x^2+3xk+2k^2+3x+3k=2$$ $$\iff (x^2+2xk+k^2)+(k^2+3xk)+3(x+k)=2\iff (x+k)^2+(x+k)(k+3)=2$$ So now we can let $m=x+k$ and get $$m(m+k+3)=2 \implies (m,k) \in \{(1,-2),(-1,-4),(2,-4),(-2,-2)\}$$ Noting that $k=\frac{2}{m}-m-3$ in our calculations. This gives (after dividing the solutions of $k$ by $2$ and putting $x=m-k$) $$(x,y) \in \{(3,-1),(3,-2),(6,-2),(0,-1)\}$$ This is much simpler.



Or else, I guess we can stop at the point where $$(x+4y+3)(x+2y)=2$$ and let $a$ be an integer such that $a=x+2y$, this simplifies a lot: $$a(a+2y+3)=2$$ And we note that $a \in \{1,-1,2,-2\}$ and $y=\frac{1}{a}-\frac{a}{2}-\frac{3}{2}$ $$\implies (a,y) \in \{(1,-1),(-1,-2),(2,-2),(-2,-1)\}$$ $$x=a-2y\implies (x,y) \in \{(3,-1),(3,-2),(6,-2),(0,-1)\}$$ That makes stuff a lot easier.


Below is a different solution. It's not as easy as other methods to which this equation might be amenable, but it generalizes nicely to degree two polynomial Diophantine equations in two variables and has a nice geometric interpretation. The general idea is to parameterize all rational solutions and then restrict them to integers. Here we go.

First we notice that $(0,-1)$ works. This will be helpful because we can use it to generate all other rational solutions. Note that for $x=0,$ the only solutions are $y=-1,\frac{1}{4}.$ Note that if $(p,q)$ is a rational solution other than $(0,-1)$ and $\left(0,\frac{1}{4}\right),$ then the line through $(p,q)$ and $(0,-1)$ is non-vertical and has slope $\frac{q+1}{p},$ which is rational. The main idea is the converse: If there is a non-vertical line through $(0,-1)$ with a rational slope $m,$ then it intersects the curve of real solutions at a rational point. We can prove it as follows: The equation of the line is $y=mx-1.$ By substituting it into the curve's equation and simplifying, we get $$(1+6m+8m^2)x^2 -(3+10m)x=0.$$ Since $x\ne 0,$ we get $$(1+6m+8m^2)x =3+10m.$$ The only ways that $1+6m+8m^2=0$ are $m=-\frac{1}{4},-\frac{1}{2}.$ Each of these cause the left side to disappear while making the right side non-zero, so we don't have to worry about division by zero when we produce $$x=\frac{3+10m}{1+6m+8m^2},$$ which is rational. So the rational solutions for $x\ne 0$ are parameterized by $$(x,y)=\left(\frac{3+10m}{1+6m+8m^2},mx-1\right)$$ over all rational $m.$ We want to find out which of there are not merely rational, but integers.

Isolating $m$ in $$x=\frac{3+10m}{1+6m+8m^2}$$ using the quadratic formula yields $$m=\frac{5-3x\pm\sqrt{(x-3)^2+2^4}}{8x}.$$ So we want to find all cases where $(x-3)^2+2^4=z^2$ for some integer $z.$ By difference of squares, we want to solve the Diophantine equation $$(z-x+3)(z+x-3)=2^4.$$ Via casework, we get the solutions $$(x,z)=(6,5),(3,4),(0,5),(0,-5),(3,-4),(6,-5).$$ Omitting the cases where $x=0,$ we can find all the corresponding values of $$m=\frac{5-3x\pm z}{8x}$$ and subsequently all the values of $y.$ There turn out to be some overlaps in these cases, but anyway, the solutions are $$(6,-2),(3,-1),(3,-2),(0,-1),$$ where the last one is the one that we initially guessed.