3. [6 points] On the plane $O x y$, the equation $2 a^{2}-2 a x-6 a y+x^{2}+2 x y+5 y^{2}=0$ defines the coordinates of point $A$, and the equation $a x^{2}+4 a^{2} x-a y+4 a^{3}+2=0$ defines a parabola with vertex at point $B$. Find all values of the parameter $a$ for which points $A$ and $B$ lie on the same side of the line $x+y=3$ (points $A$ and $B$ do not lie on this line).
Answer: $(-2 ; 0) \cup\left(\frac{1}{2} ; 3\right)$.

Solution. The first equation can be transformed as follows:

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

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

Since the second equation defines a parabola, $a \neq 0$. Under this condition, the equation can be rewritten as $y=x^{2}+4 a x+\left(4 a^{2}+\frac{2}{a}\right)$. The coordinates of point $B$ are: $x_{B}=-2 a, y_{B}=y(a)=\frac{2}{a}$.

Let $f(x ; y)=x+y-3$. Points $A$ and $B$ lie on the same side of the line $x+y-3=0$ if and only if $f\left(x_{A} ; y_{A}\right)$ and $f\left(x_{B} ; y_{B}\right)$ are of the same sign. This is equivalent to the inequality $f\left(x_{A} ; y_{A}\right) \cdot f\left(x_{B} ; y_{B}\right)>0$. We have

$$
\begin{aligned}
\left(\frac{a}{2}+\frac{a}{2}-3\right)\left(-2 a+\frac{2}{a}-3\right)>0 \Leftrightarrow-(a-3) & \frac{2 a^{2}+3 a-2}{a}<0 \Leftrightarrow \\
& \Leftrightarrow \frac{(a-3)(a+2)(2 a-1)}{a}<0 \Leftrightarrow a \in(-2 ; 0) \cup\left(\frac{1}{2} ; 3\right)
\end{aligned}
$$