## Task B-3.1.

If $\operatorname{ctg} x=\frac{1}{2}$, what is $\frac{(\cos x-1+\sin x)(\cos x+1-\sin x)}{\cos x-\cos x \sin x}$ ?
## First Solution.

If in the numerator of the given expression we notice a difference of squares or multiply the parentheses, and in the denominator we factor out $\cos x$, we get successively:

$$
\begin{aligned}
& \frac{(\cos x-1+\sin x)(\cos x+1-\sin x)}{\cos x-\cos x \sin x}=\frac{[\cos x-(1-\sin x)][\cos x+(1-\sin x)]}{\cos x(1-\sin x)}= \\
& \frac{\cos ^{2} x-(1-\sin x)^{2}}{\cos x(1-\sin x)}=\frac{\cos ^{2} x-1+2 \sin x-\sin ^{2} x}{\cos x(1-\sin x)}
\end{aligned}
$$

After applying the fundamental trigonometric identity $\cos ^{2} x+\sin ^{2} x=1$, we get

$$
\begin{gathered}
\frac{\cos ^{2} x-1+2 \sin x-\sin ^{2} x}{\cos x(1-\sin x)}=\frac{-\sin ^{2} x+2 \sin x-\sin ^{2} x}{\cos x(1-\sin x)}= \\
\frac{2 \sin x-2 \sin ^{2} x}{\cos x(1-\sin x)}
\end{gathered}
$$

Then, we factor out $2 \sin x$ in the numerator, simplify the fraction, and apply the given equality.

$$
\begin{gathered}
\frac{2 \sin x-2 \sin ^{2} x}{\cos x(1-\sin x)}=\frac{2 \sin x(1-\sin x)}{\cos x(1-\sin x)}=\frac{2 \sin x}{\cos x}= \\
2 \operatorname{tg} x=\frac{2}{\operatorname{ctg} x}=4
\end{gathered}
$$