12.1. Let the function $f:\left[\pi ; \frac{3 \pi}{2}\right] \rightarrow \mathbb{R}, f(x)=\frac{3 \cos (2 x)-4 \sin (2 x)+\cos x-3 \sin x}{(\sin x+3 \cos x)^{2022}}$. Determine the primitive $F:\left[\pi ; \frac{3 \pi}{2}\right] \rightarrow \mathbb{R}$ of the function $f$, for which $F\left(\frac{3 \pi}{2}\right)=\frac{1}{2021}$.
## Solution.

$$
\begin{aligned}
& \int \frac{3 \cos (2 x)-4 \sin (2 x)+\cos x-3 \sin x}{(\sin x+3 \cos x)^{2022}} d x= \\
& =\int \frac{3 \cos ^{2} x-3 \sin ^{2} x-8 \sin x \cos x+\cos x-3 \sin x}{(\sin x+3 \cos x)^{2022}} d x= \\
& =\int \frac{(\sin x+3 \cos x)(\cos x-3 \sin x)+\cos x-3 \sin x}{(\sin x+3 \cos x)^{2022}} d x= \\
& =\left|\begin{array}{c}
t=\sin x+3 \cos x \\
d t=(\cos x-3 \sin x) d x
\end{array}\right|=\int \frac{t+1}{t^{2022}} d t=-\frac{t^{-2020}}{2020}-\frac{t^{-2021}}{2021}+C= \\
& =-\frac{1}{2020(\sin x+3 \cos x)^{2020}}-\frac{1}{2021(\sin x+3 \cos x)^{2021}}+C \\
& F\left(\frac{3 \pi}{2}\right)=\frac{1}{2021} \Rightarrow-\frac{1}{2020}+\frac{1}{2021}+C=\frac{1}{2021} \Rightarrow C=\frac{1}{2020}
\end{aligned}
$$

Thus, we have obtained $F(x)=-\frac{1}{2020(\sin x+3 \cos x)^{2020}}-\frac{1}{2021(\sin x+3 \cos x)^{2021}}+\frac{1}{2020}$.