How do I find the number of integer solutions ($x,y$) that satisfy the equation $y = 3x^2 + 7xy + 4y^2$? I'm looking for the number of integer solutions for this equation. This problem is from a $7$th grade math contest where you had a few minutes to answer it, but the only way to solve it I found was to find all the solutions by solving second degree equations which takes significantly more than that. Is there any way to solve this problem that, perhaps, would be easier/would get closer to that time limit? Thanks.
 A: Noting that the coefficient of the middle term is the sum of the other coefficients, so there is a factor $x+y$, we find the factorisation $y=(x+y)(3x+4y)$
Set $x+y=X$ and we have $y=X(3X+y)$ and $y=\cfrac {3X^2}{1-X}$ 
($X=1$ is easily eliminated, so we are not dividing by zero)
Now $X$ and $1-X$ can have no [non-trivial] factor in common, so $1-X$ must be a factor of $3$ hence $(1-X)\in \{-3, -1, 1, 3\}$
Clearly each of these possibilities does provide a solution, since the steps are reversible.
A: Say $(x,y)$ is a pair of integers satisfying $y = 3x^2 + 7xy + 4y^2$. We can rewrite this as $$4y^2 + (7x-1)y + 3x^2 = 0$$ and solving for $y$ with the quadratic formula yields $$y = \frac{1-7x \pm \sqrt{(7x-1)^2 - 48x^2}}{8} = \frac{1-7x \pm \sqrt{x^2 - 14x + 1}}{8}$$ For this to be an integer, we require $x^2 - 14x + 1$ to be a perfect square, call it $m^2$. Then $$(x-7-m)(x-7+m) = (x-7)^2 - m^2 = 48$$ Since both factors on the left hand side are integers, this has a finite number of integer solutions coming from factorizations of $48$. This readily yields all possible values of $x$ when combined with the condition that $y$ must itself be an integer.
