3. [6 points] On the plane $O x y$, there is a point $A$, the coordinates $(x ; y)$ of which satisfy the equation $5 a^{2}-6 a x-4 a y+2 x^{2}+2 x y+y^{2}=0$, and a circle with center at point $B$, given by the equation $a^{2} x^{2}+$ $a^{2} y^{2}-6 a^{2} x-2 a^{3} y+4 a y+a^{4}+4=0$. Find all values of the parameter $a$ for which points $A$ and $B$ lie on opposite sides of the line $y=1$ (points $A$ and $B$ do not lie on this line).
Answer: $(-1 ; 0) \cup(1 ; 2)$.

Solution. The first equation can be transformed as follows:

$$
\begin{aligned}
& \left(y^{2}+2(x-2 a) y\right)+2 x^{2}-6 a x+5 a^{2}=0 \Leftrightarrow \\
& \Leftrightarrow\left(y^{2}+2 \cdot y \cdot(x-2 a)+(x-2 a)^{2}\right)-(x-2 a)^{2}+2 x^{2}-6 a x+5 a^{2}=0 \Leftrightarrow \\
& \quad \Leftrightarrow(y+x-2 a)^{2}+x^{2}-2 a x+a^{2}=0 \Leftrightarrow(y+x-2 a)^{2}+(x-a)^{2}=0
\end{aligned}
$$

From this, we obtain that the coordinates of point $A\left(x_{A} ; y_{A}\right)$ satisfy the equations $y+x-2 a=0$ and $x-a=0$, i.e., $x_{A}=a, y_{A}=a$.

Since the second equation defines a circle, $a \neq 0$. Under this condition, the equation can be rewritten as $x^{2}+y^{2}-6 x-2 a y+\frac{4 y}{a}+a^{2}+\frac{4}{a^{2}}=0$, from which we further get $\left(x^{2}-6 x+9\right)+\left(y^{2}+2 y\left(\frac{2}{a}-a\right)+\left(\frac{2}{a}-a\right)^{2}\right)+a^{2}+$ $\frac{4}{a^{2}}=9+\left(\frac{2}{a}-a\right)^{2}$, and finally $(x-3)^{2}+\left(y+\frac{2}{a}-a\right)^{2}=5$. Therefore, the coordinates of point $B$ are: $x_{B}=3, y_{B}=a-\frac{2}{a}$.

For points $A$ and $B$ to lie on opposite sides of the line $y=1$, it is necessary and sufficient that their ordinates satisfy the inequality $\left(y_{A}-1\right)\left(y_{B}-1\right)<0$, i.e., $(a-1)\left(a-\frac{2}{a}-1\right)<$ 0. This simplifies to $(a-1)\left(\frac{a^{2}-2-a}{a}\right)<0 \Leftrightarrow \frac{(a-1)(a-2)(a+1)}{a}<0$. Solving this inequality using the method of intervals, we get the answer: $a \in(-1 ; 0) \cup(1 ; 2)$.

Remark. To solve the problem, it is sufficient to find the ordinates of points $A$ and $B$.