Example 4.10. Solve the differential equation:

$$
y^{\prime}+y \cdot \tan x=\cos ^{2} x
$$
Solution. Assuming $y=u v$, we transform this equation into the form

$$
v\left[u^{\prime}+u \operatorname{tg} x\right]+u u^{\prime}=\cos ^{2} x
$$

Setting the square bracket to zero:

$$
u^{\prime}+u \operatorname{tg} x=0
$$

we get that

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

Substituting the obtained value of $u$ into the equation, we get the following equation for $($ :

$$
\cos x \cdot v^{\prime}=\cos ^{2} x
$$

From this, we find

$$
v^{\prime}=\cos x, \quad v=\sin x+C .
$$

Thus,

$$
y=u v=\cos x(\sin x+C) .
$$