Subject 2. Determine the integer values of $x$ and $y$ such that

$$
x-3 y+4=0 \quad \text { and } \quad \sqrt{x^{2}+7 y^{2}+8 x+8 y+4} \in \mathbb{Q}
$$
## Solution:

From $x-3 y+4=0 \Rightarrow x+4=3 y$

From $x^{2}+7 y^{2}+8 x+8 y+4=x^{2}+7 y^{2}+8 x+8 y+4+12-12=x^{2}+8 x+16+7 y^{2}+8 y-12=$

$$
\begin{aligned}
& =(x+4)^{2}+7 y^{2}+8 y-12=(3 y)^{2}+7 y^{2}+8 y-12=9 y^{2}+7 y^{2}+8 y-12= \\
& =16 y^{2}+8 y+1-13=(4 y+1)^{2}-13
\end{aligned}
$$

From $\sqrt{x^{2}+7 y^{2}+8 x+8 y+4} \in \mathbb{Q}$ we have that $(4 y+1)^{2}-13=k^{2}$, for $k \in \mathbb{Q}$.

| Details of solution | Associated grading |
| :---: | :---: |
| Makes the substitution $x+4=3 y \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots . \ldots \ldots . \ldots . \ldots . \ldots$ | $1 \mathrm{p}$ |
| ![](https://cdn.mathpix.com/cropped/2024_06_07_5dba17adea0b2d4d33dcg-1.jpg?height=69&width=1576&top_left_y=2581&top_left_x=185) | $2 \mathrm{p}$ |

Since $(4 y+1)^{2}-k^{2}=13 \Leftrightarrow(4 y+1-k)(4 y+1+k)=13$ with $x$ and $y$ from $\mathbb{Z}$. By analyzing the possible cases, we obtain the solution $x=-10$ and $y=-2$.

| ![](https://cdn.mathpix.com/cropped/2024_06_07_5dba17adea0b2d4d33dcg-2.jpg?height=129&width=1585&top_left_y=226&top_left_x=189) |  |
| :---: | :---: |
| Analyzes the cases |  |