Example 3. Solve the differential equation $y^{\prime \prime \prime}+y^{\prime}=\frac{\cos x}{\sin ^{2} x}$.
Solution. The roots of the characteristic equation $k^{3}+k=0$ are the numbers $k_{1}=0, k_{2}=i, k_{3}=-i$. Therefore, the general solution of the homogeneous equation has the form $y_{00}=C_{1}+C_{2} \cos x+C_{3} \sin x$. A particular solution of the non-homogeneous equation can only be determined using the method of variation of arbitrary constants, i.e., $y_{4}=C_{1}(x)+C_{2}(x) \cos x+ C_{3}(x) \sin x$, where $C_{\mathrm{I}}(x), C_{2}(x), C_{3}(x)$ are solutions of the system of differential equations

$$
\left\{\begin{array}{l}
C_{1}^{\prime} y_{1}+C_{2}^{\prime} y_{2}+C_{3}^{\prime} y_{3}=0 \\
C_{1}^{\prime} y_{1}^{\prime}+C_{2}^{\prime} y_{2}^{\prime}+C_{3}^{\prime} y_{3}^{\prime}=0 \\
C_{1}^{\prime} y_{1}^{\prime \prime}+C_{2}^{\prime} y_{2}^{\prime \prime}+C_{3}^{\prime} y_{3}^{\prime \prime}=\frac{\cos x}{\sin ^{2} x}
\end{array}\right.
$$

From the general solution $y_{\text {oo }}$, it follows that we can take $y_{\mathrm{I}}=1, y_{2}=\cos x, y_{3}=\sin x$. Then the corresponding system has the form:

$$
\left\{\begin{array}{c|c|c}
C_{1}^{\prime}+C_{2}^{\prime} \cos x+C_{3}^{\prime} \sin x=0 \\
C_{1}^{\prime} \cdot 0-C_{2}^{\prime} \sin x+C_{3}^{\prime} \cos x=0 \\
C_{1}^{\prime} \cdot 0-C_{2}^{\prime} \cos x-C_{3}^{\prime} \sin x=\frac{\cos x}{\sin ^{2} x} \cdot & \cos x & -\sin x
\end{array}+\right.
$$

Using the first action indicated to the right of the system, we get: $-C_{2}^{\prime}=\frac{\cos ^{2} x}{\sin ^{2} x}$. Hence, $C_{2}=-\int \frac{\cos ^{2} x}{\sin ^{2} x} d x=-\int \frac{1-\sin ^{2} x}{\sin ^{2} x} d x=\operatorname{ctg} x+x$. Using the second action, we get: $C_{3}^{\prime}=\frac{\cos x}{\sin x}$, i.e., $C_{3}=\ln |\sin x|$.

From the first equation of the system, written in the form $C_{\mathrm{1}}^{\prime}=-C_{2}^{\prime} \cos x- C_{3}^{\prime} \sin x$, we find $C_{1}^{\prime}=-\frac{\cos ^{3} x}{\sin ^{2} x}-\cos x$. Hence, $C_{1}^{\prime}=-\frac{\left(1-\sin ^{2} x\right) \cos x}{\sin ^{2} x}-\cos x=-\frac{\cos x}{\sin ^{2} x}$, i.e., $C_{1}=\frac{1}{\sin x}$. Thus, $y_{4}=C_{1} y_{1}+C_{2} y_{2}+C_{3} y_{3}=\frac{1}{\sin x}+(\operatorname{ctg} x+x) \cos x+\sin x \ln |\sin x|$.

Answer. $y_{\text {on }}=C_{1}+C_{2} \cos x+C_{3} \sin x+\frac{1}{\sin x}+(\operatorname{ctg} x+x) \cos x+\sin x \ln |\sin x|$.

## Exercises

Find the general solutions of the differential equations, and where initial conditions are given, find the corresponding particular solutions.

1. $y^{\prime \prime \prime}-3 y^{\prime \prime}+3 y^{\prime}-y=0 ; x_{0}=0, y_{0}=1, y_{0}^{\prime}=2, y_{0}^{\prime \prime}=7$.
2. $y^{I V}+8 y^{\prime \prime}+16 y=0$.
3. $y^{I V}-6 y^{\prime \prime}+9 y=0$.
4. $y^{\prime \prime \prime}+y^{\prime \prime}+y^{\prime}+y=x e^{x}$.
5. $y^{\prime \prime \prime}+y^{\prime}=\frac{\sin x}{\cos ^{2} x}$.
6. $y^{I V}-2 y^{\prime \prime \prime}+y^{\prime \prime}=e^{x}+x^{3}$.
7. $y^{\prime \prime \prime}-4 y^{\prime \prime}+5 y^{\prime}-2 y=2 x+3 ; x_{0}=0, y_{0}=0, y_{0}^{\prime}=7, y