2A. Calculate the value of the expression

$$
\frac{\sin 3 x}{\sin x}+\frac{\sin 6 x}{\sin 2 x}+\ldots+\frac{\sin 3 n x}{\sin n x}-\frac{\cos 3 x}{\cos x}-\frac{\cos 6 x}{\cos 2 x}-\ldots \frac{\cos 3 n x}{\cos n x}
$$
Solution. Using the addition theorem

$$
\sin (\alpha-\beta)=\sin \alpha \cdot \cos \beta-\sin \beta \cdot \cos \alpha
$$

and the trigonometric formula for the double angle

$$
\sin 2 \alpha=2 \sin \alpha \cos \alpha
$$

we obtain

$$
\begin{aligned}
A & =\frac{\sin 3 x}{\sin x}+\frac{\sin 6 x}{\sin 2 x}+\ldots+\frac{\sin 3 n x}{\sin n x}-\frac{\cos 3 x}{\cos x}-\frac{\cos 6 x}{\cos 2 x}-\ldots-\frac{\cos 3 n x}{\cos n x} \\
& =\left(\frac{\sin 3 x}{\sin x}-\frac{\cos 3 x}{\cos x}\right)+\left(\frac{\sin 6 x}{\sin 2 x}-\frac{\cos 6 x}{\cos 2 x}\right)+\ldots+\left(\frac{\sin 3 n x}{\sin n x}-\frac{\cos 3 n x}{\cos n x}\right) \\
& =\frac{\sin 3 x \cos x-\cos 3 x \sin x}{\sin x \cos x}+\frac{\sin 6 x \cos 2 x-\cos 6 x \sin 2 x}{\sin 2 x \cos 2 x}+\ldots+\frac{\sin 3 n x \cos n x-\cos 3 n x \sin n x}{\sin n x \cos n x} \\
& =\frac{\sin (3 x-x)}{\sin x \cos x}+\frac{\sin (6 x-2 x)}{\sin 2 x \cos 2 x}+\ldots+\frac{\sin (3 n x-n x)}{\sin n x \cos n x} \\
& =\frac{\sin 2 x}{\frac{1}{2} 2 \sin x \cos x}+\frac{\sin 4 x}{\frac{1}{2} 2 \sin 2 x \cos 2 x}+\ldots+\frac{\sin 2 x}{\frac{1}{2} 2 \sin n x \cos n x} \\
& =\frac{\sin 2 x}{\frac{1}{2} \sin 2 x}+\frac{\sin 4 x}{\frac{1}{2} \sin 4 x}+\ldots+\frac{\sin 2 n x}{\frac{1}{2} \sin 2 n x}=\underbrace{2+2+\ldots+2}_{n}=2 n
\end{aligned}
$$