4. If for the real numbers $x$ and $y$ the equality $(x+5)^{2}+(y-12)^{2}=14^{2}$ holds, find the smallest value of the expression $x^{2}+y^{2}$ and determine for which values of $x$ and $y$ this value is achieved.
Solution. The given equation is equivalent to the equation

$$
\left(\frac{x+5}{14}\right)^{2}+\left(\frac{y-12}{14}\right)^{2}=1
$$

therefore there exists $\theta \in[0,2 \pi)$ such that $\frac{x+5}{14}=\cos \theta, \frac{y-12}{14}=\sin \theta$. Therefore,

$$
\begin{aligned}
x^{2}+y^{2} & =(14 \cos \theta-5)^{2}+(14 \sin \theta+12)^{2}=365+24(12 \sin \theta-5 \cos \theta) \\
& =365+364\left(\frac{12}{13} \sin \theta-\frac{5}{13} \cos \theta\right) \\
& =365+364(\cos \varphi \sin \theta-\sin \varphi \cos \theta) \\
& =365+364 \sin (\theta-\varphi) \\
& \geq 365-364=1
\end{aligned}
$$

where $\varphi$ is the smaller acute angle of the right triangle with sides 5, 12, and 13. Therefore, the minimum value of the expression $x^{2}+y^{2}$ is equal to 1 and it is achieved for $\theta-\varphi=\frac{3 \pi}{2}$, i.e., for $\theta=\frac{3 \pi}{2}+\varphi$. In this case, since $\sin \varphi=\frac{5}{13}$ and $\cos \varphi=\frac{12}{13}$, we get

$$
x=14 \cos \theta-5=14 \sin \varphi-5=\frac{5}{13}, y=14 \sin \theta+12=14(-\cos \varphi)+12=-\frac{12}{13}
$$

## 4th year