Example 4.9. Find the general solution of the equation

$$
y^{\prime}-y \tan x=\sin x
$$
Solution. Let $y=u v$, then $y^{\prime}=u^{\prime} v+u v^{\prime}$ and the given equation takes the form

$$
u^{\prime} v+u v^{\prime}-u v \operatorname{tg} x=\sin x \text {, }
$$

or

$$
u^{\prime} v+u\left(v^{\prime}-v \operatorname{tg} x\right)=\sin x \text {. }
$$

Solving the equation $U^{\prime}-U \operatorname{tg} x=0$, we get the simplest particular solution:

$$
\frac{d v}{d x}=v \operatorname{tg} x ; \quad \frac{d v}{v}=\operatorname{tg} x d x ; \ln |\nu|=-\ln |\cos x|,
$$

from which

$$
u=\frac{1}{\cos x}
$$

Substituting $U$ into equation (*), we get the equation

$$
u^{\prime} \cdot \frac{1}{\cos x}=\sin x
$$

from which we find 4 :

$$
\frac{d u}{d x} \cdot \frac{1}{\cos x}=\sin x ; d u=\sin x \cos x d x
$$

from which

$$
u=\frac{\sin ^{2} x}{2}+C
$$

Thus, the general solution is

$$
y=u v=\frac{\sin ^{2} x}{2}+C \frac{1}{\cos x}
$$