Example 4.20. Find the particular solution of the equation $y^{\prime \prime}-3 y^{\prime}+2 y=0$, satisfying the given initial conditions $y(0)=1$, $y^{\prime}(0)=-1$.
Solution. Let's write down the characteristic equation

$$
r^{2}-3 r+2=0
$$

its roots are $r_{1}=1, r_{2}=2$. Therefore, the general solution has the form:

$$
y=C_{1} e^{x}+C_{2} e^{2 x}
$$

Next, using the initial conditions, we determine the values of the constants $C_{1}$ and $C_{2}$. For this, we substitute the given values $x=0, y=1$ into the general solution; as a result, we obtain one of the equations connecting $C_{1}$ and $C_{2}$:

$$
1=C_{1}+C_{2}
$$

The second equation for $C_{1}$ and $C_{2}$ is obtained as follows. We differentiate the general solution:

$$
y^{\prime}=C_{1} e^{x}+2 C_{2} e^{2 x}
$$

and substitute the given values $x=0$, $y^{\prime}=-1$ into the obtained expression:

$$
-1=C_{1}+2 C_{2}
$$

From the system

$$
\begin{aligned}
& C_{1}+C_{2}=1, \\
& C_{1}+2 C_{2}=-1
\end{aligned}
$$

we find $C_{1}=3, C_{2}=-2$. Therefore, the required particular solution has the form

$$
y=3 e^{x}-2 e^{2 x}
$$

## 4.8. Linear Non-Homogeneous Differential Equations of the Second Order with Constant Coefficients

A linear non-homogeneous differential equation of the second order with constant coefficients has the form:

$$
y^{\prime \prime}+p y^{\prime}+q y=f(x) .
$$

It differs from the corresponding linear homogeneous equation

$$
y^{\prime \prime}+p y^{\prime}+q y=0 .
$$

by the presence of some function $f(x)$ on the right-hand side.

To find the general solution of equation (1), we first need to find the general solution $\bar{y}$ of equation (2), and then find some particular solution $y^{*}$ of equation (1). Their sum is the general solution of the given non-homogeneous equation (1):

$$
y=\bar{y}+y^{*}
$$

We will provide the rule for finding a particular solution $y^{*}$ of equation (1) in the following two cases:

the right-hand side $f(x)$ has the form

$$
f(x)=e^{k x} P_{n}(x)
$$

where $P_{n}(x)$ is a polynomial of degree $n$;

the right-hand side $f(x)$ has the form

$$
f(x)=a \cos \lambda x+b \sin \lambda x
$$

Let's consider each of these cases separately.

I. Suppose the right-hand side of equation (1) has the form

$$
f(x)=e^{k x} P_{n}(x)
$$

and the number $k$ is not a root of the characteristic equation

$$
r^{2}+p r+q=0
$$

corresponding to the homogeneous equation (2). Then a particular solution of equation (1) should be sought in the form

$$
y^{*}=e^{k x} Q_{n}(x),
$$

where $Q_{n}(x)$ is some polynomial of the same degree $n$ with undetermined coefficients.

If, however, the number $k$ is a root of the characteristic equation (5), then a particular solution of equation (1) should be sought in the form

$$
y^{*}=x^{m} e^{k x} Q_{n}(x)
$$

where $m$ is the multiplicity of the root $k$ (i.e., $m=1$ if $k$ is a simple root, and $m=2$ if $k$ is a double root).

II. Suppose now the right-hand side of equation (1) has the form:

$$
f(x)=a \cos \lambda x+b \sin \lambda x
$$

and the numbers $\pm \lambda i$ are not roots of the characteristic equation (5). Then a particular solution of equation (1) should be sought in the form

$$
y^{*}=A \cos \lambda x+B \sin \lambda x,
$$

where $A$ and $B$ are undetermined coefficients.

If, however, the complex numbers $\pm \lambda i$ are roots of the characteristic equation (5), then a particular solution of equation (1) should be sought in the form

$$
y^{*}=x(A \cos \lambda x+B \sin \lambda x) .
$$