Example 6. Solve the equation $y^{\prime \prime}+6 y^{\prime}+8 y=\frac{4 e^{-2 x}}{2+e^{2 x}}$.
Solution. We have: $k^{2}+6 k+8=0, k_{1}=-4, k_{2}=-2, y_{o 0}=$ $=C_{1} e^{-4 x}+C_{2} e^{-2 x}$. We take $y_{1}=e^{-4 x}, \quad y_{2}=e^{-2 x}$ as two linearly independent particular solutions of the homogeneous linear differential equation. Then $y_{1}^{\prime}=-4 e^{-4 x}$, $y_{2}^{\prime}=-2 e^{-2 x}$ and we solve the system of differential equations (from Theorem 9):

$$
\left\{\left.\begin{array}{l}
C_{1}^{\prime} e^{-4 x}+C_{2}^{\prime} e^{-2 x}=0 \\
-4 C_{1}^{\prime} e^{-4 x}-2 C_{2}^{\prime} e^{-2 x}=\frac{4 e^{-2 x}}{2+e^{2 x}}
\end{array}\right|_{1} ^{4}+\left.\right|_{1} ^{2}+\right.
$$

Let's emphasize that $C_{1}^{\prime}=C_{1}^{\prime}(x), C_{2}^{\prime}=C_{2}^{\prime}(x)-$ are functions of the variable $x$. By performing the operations indicated to the right of the system, we get:

$$
\begin{gathered}
C_{2}^{\prime}=\frac{2}{2+e^{2 x}} \\
\text { i.e. } C_{2}=\int \frac{2 d x}{2+e^{2 x}}=\int \frac{2 e^{-2 x}}{2 e^{-2 x}+1} d x=-\frac{1}{2} \ln \left(1+2 e^{-2 x}\right)=\frac{1}{2}\left(2 x-\ln \left(2+e^{2 x}\right)\right) ; \\
C_{1}^{\prime}=\frac{-2 e^{2 x}}{2+e^{2 x}}, \quad \text { i.e. } \quad C_{1}=-\int \frac{2 e^{2 x}}{2+e^{2 x}} d x=-\ln \left(2+e^{2 x}\right) \\
\text { Answer. } y_{\text {on }}=C_{\mathrm{I}} e^{-4 x}+C_{2} e^{-2 x}-e^{-4 x} \ln \left(2+e^{2 x}\right)+ \\
+\frac{1}{2}\left(2 x-\ln \left(2+e^{2 x}\right)\right) e^{-2 x}
\end{gathered}
$$

## Exercises

Find the general solutions of the differential equations, and for those with initial conditions, also specify the particular solutions.

1. $y^{\prime \prime}+y^{\prime}=10 x+12 ; \quad x=0, y=1, y^{\prime}=2$.
2. $y^{\prime \prime}+y^{\prime}=(7-4 x) e^{-x}$.
3. $y^{\prime \prime}+y=2 e^{-3 x} \sin x ; \quad x=0, y=0, y^{\prime}=0$.
4. $y^{\prime \prime}+y=(1-x) \sin x+\cos x$.
5. $y^{\prime \prime}-2 y^{\prime}+10 y=10 x^{2}+18 x+6 ; \quad x=0, y=1, y^{\prime}=3,2$.
6. $y^{\prime \prime}-2 y^{\prime}=\left(x^{2}+x-3\right) e^{x} ; \quad x=0, y=2, y^{\prime}=2$.
7. $y^{\prime \prime}+y=-\sin 2 x ; \quad x=\pi, y=1, y^{\prime}=1$.
8. $2 y^{\prime \prime}+5 y^{\prime}=e^{x} \cdot 9 \cdot y^{\prime \prime}+\frac{y}{4}=\frac{1}{4} \operatorname{ctg} \frac{x}{2}$.
9. $y^{\prime \prime}-y^{\prime}=\frac{e^{2 x}}{1+e^{x}}$. 11. $y^{\prime \prime}+y^{\prime}=\cos x+\sin 2 x ; y(0)=y^{\prime}(0)=0$.
10. $y^{\prime \prime}+y=x^{3}+6 x ; y(0)=y^{\prime}(0)=0$. 13. $y^{\prime \prime}+4 y=\frac{1}{\cos ^{2} x}$.
11. $y^{\prime \prime}-2 y^{\prime}+y=\frac{e^{x}}{x}$. 15. $y^{\prime \prime}-9 y^{\prime}+18 y=\frac{9 e^{3 x}}{1+e^{-3 x}}$.
12. $y^{\prime \prime}+y=\frac{2}{\cos ^{3} x}$.

## Answers

1. $y_{\text {on }}=C_{1}+C_{2} e^{-x}+5 x^{2}+2 x, \quad y_{4}=5 x^{2}+2 x+1 . \quad$ 2. $y_{\text {on }}=$ $=C_{1}+C_{2} e^{-x}+\left(2 x^{2}-3 x\right) e^{-x}$. 3. $y_{\text