113. For what values of $x$ and $y$ does the expression $z=x^{2}+2 x y+2 y^{2}+$ $+2 x+4 y+3$ have the smallest value? Find this smallest value.
Solution. Let's transform the given polynomial:

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

$$
\begin{gathered}
=\left(x^{2}+2(y+1) x+(y+1)^{2}\right)+2 y^{2}+4 y+3-(y+1)^{2}= \\
=(x+(y+1))^{2}+\left(2 y^{2}+4 y+3-y^{2}-2 y-1\right)= \\
=(x+y+1)^{2}+\left(y^{2}+2 y+1+1\right)= \\
=(x+y+1)^{2}+(y+1)^{2}+1
\end{gathered}
$$

From this, it follows that $z$ takes its minimum value, which is 1, when $x+y+1=y+1=0$, i.e., when $x=0, y=-1$.

Answer: the minimum value of $z$ is achieved when $x=0, y=-1$.

Another method for solving this problem is provided in § 4, p. 27.