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

$$
\frac{(3 a b-6 b+a(1-a))^{2}+\left(9 b^{2}+2 a+3 b(1-a)\right)^{2}}{a^{2}+9 b^{2}}
$$
# Answer: 4.

Solution 1. The minimized expression is the sum of the squares of the distances from point $A(3 b,-2)$ to the lines $\ell_{1}$ and $\ell_{2}$, given by the equations

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

These lines are perpendicular and intersect at point $B(a-1,0)$. Then, by the Pythagorean theorem, we need to find the minimum of $A B^{2}=(a-1-3 b)^{2}+4$, which is 4 and is achieved, for example, when $a=4$ and $b=1$.

Solution 2. Transform the numerator of the fraction:

$$
\begin{aligned}
& (3 a b-6 b+a(1-a))^{2}+\left(9 b^{2}+2 a+3 b(1-a)\right)^{2}= \\
& =36 b^{2}+9 a^{2} b^{2}+a^{2}(1-a)^{2}-36 a b^{2}-12 a b(1-a)+6 a^{2} b(1-a)+ \\
& +4 a^{2}+81 b^{4}+9 b^{2}(1-a)^{2}+36 a b^{2}+12 a b(1-a)+54 b^{3}(1-a)= \\
& \quad=\left(a^{2}+9 b^{2}\right)\left(4+9 b^{2}+(1-a)^{2}+6 b(1-a)\right)=\left(a^{2}+9 b^{2}\right)\left(4+(1-a+3 b)^{2}\right)
\end{aligned}
$$

Thus, we need to find the minimum of the function $(1-a+3 b)^{2}+1$ for positive $a$ and $b$. It is 4 and is achieved, for example, when $a=4$ and $b=1$.