## Task B-1.2.

Determine the maximum value of the expression $\left(\frac{12 x^{2}+27 y^{2}+12 x+36 y+29}{4 x^{2}+9 y^{2}+4 x+12 y+9}\right)^{2}$. For which real numbers $x, y$ is this value achieved?
## First Solution.

By rearranging the denominator, we get:

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

By rearranging the numerator, we get:

$$
\begin{aligned}
12 x^{2}+27 y^{2}+12 x+36 y+29 & =12 x^{2}+12 x+3+27 y^{2}+36 y+12+14 \\
& =3\left(4 x^{2}+4 x+1\right)+3\left(9 y^{2}+12 y+4\right)+14 \\
& =3(2 x+1)^{2}+3(3 y+2)^{2}+12+2 \\
& =3\left[(2 x+1)^{2}+(3 y+2)^{2}+4\right]+2
\end{aligned}
$$

It follows that:

$$
\begin{aligned}
\left(\frac{12 x^{2}+27 y^{2}+12 x+36 y+29}{4 x^{2}+9 y^{2}+4 x+12 y+9}\right)^{2} & =\left(\frac{3\left[(2 x+1)^{2}+(3 y+2)^{2}+4\right]+2}{(2 x+1)^{2}+(3 y+2)^{2}+4}\right)^{2} \\
& =\left(3+\frac{2}{(2 x+1)^{2}+(3 y+2)^{2}+4}\right)^{2}
\end{aligned}
$$

Since $(2 x+1)^{2} \geqslant 0$ and $(3 y+2)^{2} \geqslant 0$, for all $x$ and $y$ we have:

$(2 x+1)^{2}+(3 y+2)^{2}+4 \geqslant 4$, or, $\frac{2}{(2 x+1)^{2}+(3 y+2)^{2}+4} \leqslant \frac{1}{2}$.

Then, $3+\frac{2}{(2 x+1)^{2}+(3 y+2)^{2}+4} \leqslant 3+\frac{1}{2}$.

Both sides of the inequality are positive, so we have:

$$
\left(3+\frac{2}{(2 x+1)^{2}+(3 y+2)^{2}+4}\right)^{2} \leqslant\left(3+\frac{1}{2}\right)^{2}=\frac{49}{4}
$$

The maximum value that the given expression can achieve is $\frac{49}{4}$.

Equality is achieved when $(2 x+1)^{2}+(3 y+2)^{2}=0$, which in this case means $x=-\frac{1}{2}$ and $y=-\frac{2}{3}$.