2. Find the maximum value of the expression for $a, b>0$

$$
\frac{|4 a-10 b|+|2(a-b \sqrt{3})-5(a \sqrt{3}+b)|}{\sqrt{a^{2}+b^{2}}}
$$
# Answer: $2 \sqrt{87}$.

Solution 1. The expression to be maximized is $2\left(d_{1}+d_{2}\right)$, where $d_{1}, d_{2}$ are the distances from point $A(2,5)$ to the lines $\ell_{1}, \ell_{2}$, given by the equations

$$
\ell_{1}: a x-b y=0 \quad \text { and } \quad \ell_{2}:(a-b \sqrt{3}) x-(a \sqrt{3}+b) y=0
$$

These lines intersect at the origin $O$. Let's find the angle $\varphi$ between them:

$$
\cos \varphi=\frac{a(a-b \sqrt{3})+b(a \sqrt{3}+b)}{\sqrt{a^{2}+b^{2}} \cdot \sqrt{(a-b \sqrt{3})^{2}+(a \sqrt{3}+b)^{2}}}=\frac{a^{2}+b^{2}}{\sqrt{a^{2}+b^{2}} \cdot \sqrt{4 a^{2}+4 b^{2}}}=\frac{1}{2}
$$

that is, $\varphi=\frac{\pi}{3}$. Let $d=O A, \alpha$ be the angle between $\ell_{1}$ and $A B, \beta$ be the angle between $A B$ and the $O X$ axis. Consider two cases.

1) Point $A$ lies inside the acute angle formed by the lines $\ell_{1}$ and $\ell_{2}$. Then

$$
2\left(d_{1}+d_{2}\right)=2 d\left(\sin \alpha+\sin \left(\frac{\pi}{3}-\alpha\right)\right)=4 d \sin \frac{\pi}{6} \cos \left(\frac{\pi}{6}-\alpha\right)=2 d \cos \left(\frac{\pi}{6}-\alpha\right) \leqslant 2 d
$$

2) Point $A$ lies outside the acute angle formed by the lines $\ell_{1}$ and $\ell_{2}$. Then

$$
2\left(d_{1}+d_{2}\right)=2 d\left(\sin \alpha+\sin \left(\frac{\pi}{3}+\alpha\right)\right)=4 d \cos \frac{\pi}{6} \cos \left(\frac{\pi}{6}+\alpha\right) \leqslant 2 d \sqrt{3}
$$

Equality on the right side is achieved when $\alpha=\frac{\pi}{3}$. This value of $\alpha$ is permissible, since

$$
\operatorname{tg} \beta=\frac{5}{2}>\sqrt{3}, \quad \text { that is } \quad \beta>\frac{\pi}{3} .
$$

Therefore, the maximum of $2\left(d_{1}+d_{2}\right)$ is achieved in the second case, and it is equal to $2 d \sqrt{3}=2 \sqrt{87}$.

Solution 2. Let the expression to be maximized be $A$. Let $a=r \cos t, b=r \sin t$, where $r>0$, $t \in\left(0, \frac{\pi}{2}\right)$. Then

$$
\begin{aligned}
A & =|4 \cos t-10 \sin t|+|2(\cos t-\sqrt{3} \sin t)-5(\sqrt{3} \cos t+\sin t)|= \\
& =|4 \cos t-10 \sin t|+\left|4 \cos \left(t+\frac{\pi}{3}\right)-10 \sin \left(t+\frac{\pi}{3}\right)\right|=2 \sqrt{29}\left(|\sin (t-\alpha)|+\left|\sin \left(t+\frac{\pi}{3}-\alpha\right)\right|\right)
\end{aligned}
$$

where $\alpha=\operatorname{arctg} \frac{2}{5}$. Note that $\alpha<\frac{\pi}{3}+\alpha<\frac{\pi}{2}$. Then

$$
A=2 \sqrt{29}\left(\sin (t-\alpha)+\sin \left(t+\frac{\pi}{3}-\alpha\right)\right)=4 \sqrt{29} \cos \frac{\pi}{6} \sin \left(t+\frac{\pi}{6}-\alpha\right)=2 \sqrt{87} \sin \left(t+\frac{\pi}{6}-\alpha\right)
$$

Since $\alpha<\frac{\pi}{3}+\alpha<\frac{\pi}{2}$, the maximum of $A$ in case 1) is achieved when $t=\frac{\pi}{3}+\alpha$ and is equal to $2 \sqrt{87}$.

2) Let $t \leqslant \alpha$. Then

$$
A=2 \sqrt{29}\left(\sin (\alpha-t)+\sin \left(t+\frac{\pi}{6}-\alpha\right)\right)=4 \sqrt{29} \sin \frac{\pi}{6} \cos \left(t+\frac{\pi}{6}-\alpha\right) \leqslant 2 \sqrt{29}<2 \sqrt{87}
$$

Therefore, the maximum of $A$ is achieved in case 1).