Example 10. Solve the equation

$$
y^{\prime \prime \prime}-2 y^{\prime \prime}+2 y^{\prime}=4 \cos x \cos 3 x+6 \sin ^{2} x
$$
Solution. Using known trigonometric identities, we transform the right-hand side of equation (17) to a "standard" form:

$$
4 \cos x \cos 3 x+6 \sin ^{2} x=2 \cos 4 x-\cos 2 x+3
$$

The original equation (17) can now be written as:

$$
y^{\prime \prime \prime}-2 y^{\prime \prime}+2 y^{\prime}=2 \cos 4 x-\cos 2 x+3
$$

The general solution of the homogeneous equation $y^{\prime \prime \prime}-2 y^{\prime \prime}+2 y^{\prime}=0$ is

$$
y_{0,0}=C_{1}+\left(C_{2} \cos x+C_{3} \sin x\right) e^{x}
$$

To find a particular solution of equation (18), we use the principle of superposition. For this, we find particular solutions of three equations:

$$
\begin{aligned}
& y^{\prime \prime \prime}-2 y^{\prime \prime}+2 y^{\prime}=2 \cos 4 x \\
& y^{\prime \prime \prime}-2 y^{\prime \prime}+2 y^{\prime}=-\cos 2 x \\
& y^{\prime \prime \prime}-2 y^{\prime \prime}+2 y^{\prime}=3
\end{aligned}
$$

Using the method of undetermined coefficients, we find particular solutions $y_{1}, y_{2}$, and $y_{3}$ of equations (19), (20), and (21) respectively:

$$
y_{1}=\frac{1}{65}\left(\cos 4 x-\frac{7}{4} \sin 4 x\right), \quad y_{2}=\frac{1}{10}\left(\frac{1}{2} \sin 2 x-\cos 2 x\right), \quad y_{3}=\frac{3}{2} x
$$

By the principle of superposition, a particular solution of the non-homogeneous equation (8) is

$$
y_{4, \text {.. }}=\frac{1}{65}\left(\cos 4 x-\frac{7}{4} \sin 4 x\right)+\frac{1}{10}\left(\frac{\sin 2 x}{2}-\cos 2 x\right)+\frac{3}{2} x .
$$

The general solution of the original equation is

$$
y=C_{1}+\left(C_{2} \cos x+C_{3} \sin x\right) e^{x}+
$$

$$
+\frac{1}{65}\left(\cos 4 x-\frac{7}{4} \sin 4 x\right)+\frac{1}{10}\left(\frac{\sin 2 x}{2}-\cos 2 x\right)+\frac{3}{2} x
$$

## Problems for Independent Solution

Determine the form of a particular solution of a linear non-homogeneous differential equation if the roots of its characteristic equation and the right-hand side $f(x)$ are known.

550. 

$$
\left.\begin{array}{l}\text { a) } \lambda_{1}=-1, \quad \lambda_{2}=1, \quad \lambda_{3}=2, \\ \text { b) } \lambda_{1}=0, \quad \lambda_{2}=2, \quad \lambda_{3}=3, \\ \text { c) } \lambda_{1}=\lambda_{2}=-1, \quad \lambda_{3}=1, \\ \text { d) } \lambda_{1}=\lambda_{2}=\lambda_{3}=-1,\end{array}\right\} f(x)=a e^{-x}+b e^{x}.
$$

Using the principle of superposition, determine the form of a particular solution of the following linear non-homogeneous differential equations:

551. $y^{\prime \prime}-y^{\prime}-2 y=e^{x}+e^{-2 x}$.
552. $y^{\prime \prime}+4 y^{\prime}=x+e^{-4 x}$.
553. $y^{\prime \prime}-y=x+\sin x$.
554. $y^{\prime \prime}-2 y^{\prime}+2 y=(1+\sin x) e^{x}$.
555. $y^{\prime \prime \prime}-y^{\prime \prime}=1+e^{x}$.
556. $y^{\prime \prime \prime}+4 y^{\prime}=e^{2 x}+\sin 2 x$.
557. $y^{\prime \prime}+4 y=\sin x \sin 2 x$.
558. $y^{\prime \prime}-4 y^{\prime}=2 \cos ^{2} 4 x$.

Solve the following linear non-homogeneous equations using the principle of superposition to find their particular solutions:

559. $y^{\prime \prime}-y^{\prime}-2 y=4 x-2 e^{x}$.
560. $y^{\prime \prime}-3 y^{\prime}=18 x-10 \cos x$.
561. $y^{\prime \prime}-2 y^{\prime}+y=2+e^{x} \sin x$.
562. $y^{\prime \prime}+2 y^{\prime}+2 y=(5 x+4) e^{x}+e^{-x}$.
563. $y^{\prime \prime}+2 y^{\prime}+5 y=4 e^{-x}+17 \sin 2 x$.
564. $2 y^{\prime \prime}-3 y^{\prime}-2 y=5 e^{x} \operatorname{ch} x$.
565. $y^{\prime \prime}+4 y=x \sin ^{2} x$.
566. $y^{\text {IV }}+2 y^{\prime \prime \prime}+2 y^{\prime \prime}+2 y^{\prime}+y=x e^{x}+\frac{1}{2} \cos x$.
567. $y^{\prime \prime}+y^{\prime}=\cos ^{2} x+e^{x}+x^{2}$.
568. $y^{\mathrm{v}}+4 y^{\prime \prime \prime}=e^{x}+3 \sin 2 x+1$.
569. $y^{\prime \prime}-2 y^{\prime}+5 y=10 \sin x+17 \sin 2 x$.
570. $y^{\prime \prime}+y^{\prime}=x^{2}-e^{-x}+e^{x}$.
571. $y^{\prime \prime}-2 y^{\prime}-3 y=2 x+e^{-x}-2 e^{3 x}$.
572. $y^{\prime \prime}+4 y=e^{x}+4 \sin 2 x+2 \cos ^{2} x-1$.
573. $y^{\prime \prime}+3 y^{\prime}+2 y=6 x e^{-x}\left(1-e^{-x}\right)$.
574. $y^{\prime \prime}+y=\cos ^{2} 2 x+\sin ^{2} \frac{x}{2}$.
575. $y^{\prime \prime}-4 y^{\prime}+5 y=1+8 \cos x+e^{2 x}$.
576. $y^{\prime \prime}-2 y^{\prime}+2 y=e^{x} \sin ^{2} \frac{x}{2}$.
577. $y^{\prime \prime}-3 y^{\prime}=1+e^{x}+\cos x-\sin x$.
578. $y^{\prime \prime}-2 y^{\prime}+5 y=e^{x}\left(1-2 \sin ^{2} x\right)+10 x+1$.
579. $y^{\prime \prime}-4 y^{\prime}+4 y=4 x+\sin x+\sin 2 x$.
580. $y^{\prime \prime}+2 y^{\prime}+y=1+2 \cos x+\cos 2 x-\sin 2 x$.
581. $y^{\prime \prime}+y^{\prime}+y+1=\sin x+x+x^{2}$.
582. $y^{\prime \prime}+6 y^{\prime}+9 y=18 e^{-3 x}+8 \sin x+6 \cos x$.
583. $y^{\prime \prime}+2 y^{\prime}+1=3 \sin 2 x+\cos x$.
584. $y^{\prime \prime \prime}-2 y^{\prime \prime}+y^{\prime}=2 x+e^{x}$.
585. $y^{\prime \prime}+y=2 \sin x \sin 2 x$.
586. $y^{\prime \prime \prime}-y^{\prime \prime}-2 y^{\prime}=4 x+3 \sin x+\cos x$.
587. $y^{\prime \prime \prime}-4 y^{\prime}=x e^{2 x}+\sin x+x^{2}$.
588. $y^{\mathrm{v}}-y^{\mathrm{N}}=x e^{x}-1$.
589. $y^{\vee}+y^{\prime \prime \prime}=x+2 e^{-x}$.

B. Cauchy Problem. As is known, the Cauchy problem for a linear non-homogeneous equation

$$
y^{(n)}+p_{1} y(n-1)+\ldots+p_{n} y=f(x)
$$

consists of the following: find a solution of this equation that satisfies the initial conditions (Cauchy data)

$$
y\left(x_{0}\right)=y_{0}, \quad y^{\prime}\left(x_{0}\right)=y_{0}^{\prime}, \quad \ldots, \quad y^{(n-1)}\left(x_{0}\right)=y_{0}^{(n-1)}
$$