Finding all integers satisfying an equation? My task is to find all $x,y\in\mathbb{Z}$ which satisfy
$$
2x^2+2xy+y^2=25\quad\quad\text{(1)}
$$
Is there a general approach of solving a task like this? If not, have you got tips for me, that might help me solving this? Below are my attempts of solving this task:
First I tried to solve it as a differential equation:
$$
2x^2+2xy+y^2=25 \\
\Leftrightarrow\quad\frac{d}{dx}(2x^2+2xy+y^2)=\frac{d}{dx}(25) \\
\Leftrightarrow\quad4x+2y+2x\cdot\frac{dy}{dx}+2y\cdot\frac{dy}{dx}=0 \\
\Leftrightarrow\quad\frac{dy}{dx}(2x+2y)=-4x-2y \\
\Leftrightarrow\quad\frac{dy}{dx}=\frac{-4x-2x}{2x+2y} \\
\Leftrightarrow\quad\frac{dy}{dx}=-\frac{2x+x}{x+y}
$$
Here I got stuck, so I tried to solve equation (1) like a quadratic equation (for $x$ as well as for $y$) and came up with this pair of equations (which didn't help either):
$$
x=-\frac{1}{2}y\pm\sqrt{-\frac{1}{4}y^2+\frac{25}{2}} \\
y=-x\pm\sqrt{(5+x)(5-x)}
$$
 A: These equations are called Diophantine equations and we don't know yet how to solve them effectively, we know only how to solve some particular cases, Your equation is equivalent to $(x+y)^2+x^2=5^2$ and we know that the only representations of $5^2$ as sum of squares are :$5^2=5^2+0^2=3^2+4^2$ (search for Pythagorean triples).
so you have either:


*

*$x+y=0$ $x=\mp 5$

*$x+y=\mp 5$ $x=0$

*$x+y=\mp 4,x=\mp 3$

*$x+y=\mp 3,x=\mp 4$

A: You are looking for integer solutions. So differentiating the equation doesn't make any sense. Note that multiplying by $2$, we can rewrite
$$2x^2+2xy+y^2 = 25$$
as
$$4x^2 + 4xy + 2y^2 = 50 \implies (2x+y)^2 + y^2 = 50$$
Since we are looking for integer solutions, this means $y$ has to be odd and $y^2 \leq 50 \implies y \in \{\pm1, \pm3, \pm5, \pm7\}$.


*

*$y=\pm1 \implies (2x+y)^2 = 49 \implies 2x+y = \pm7$

*$y=\pm3 \implies (2x+y)^2 = 41 \implies $no solution

*$y=\pm5 \implies (2x+y)^2 = 25 \implies 2x+y = \pm5$

*$y=\pm7 \implies (2x+y)^2 = 1 \implies 2x+y = \pm1$


Solve each of the above cases to obtain $x,y \in \mathbb{Z}$.
