Problem 133
Easy Nonhomogeneous Equations

Find the general solution of y'' + y = e^(-x) + 2

Find the general solution of $y'' + y = e^{-x} + 2$.

Explanation of Method

With complex roots ±i, superposition splits the right-hand side e⁻ₓ+2 into two non-resonant trials, giving y*=e⁻ₓ/2+2.

Step 1: Homogeneous solution

$r^2+1=0 \implies r=\pm i$, $Y_h = C_1\cos x + C_2\sin x$.

Step 2: Split by superposition

The right-hand side is a sum of two elementary terms, so the particular solution is built from each term separately and added: $y^*=y_1^*+y_2^*$, where $y_1^*$ solves the equation with right-hand side $e^{-x}$ and $y_2^*$ with right-hand side $2$.

Step 3: Part 1: right-hand side $e^{-x}$

Here $\alpha=-1$, which is not a characteristic root ($s=0$), so try $y_1^*=Ae^{-x}$: $y_1^{*\prime}=-Ae^{-x}, \qquad y_1^{*\prime\prime}=Ae^{-x}.$

\[ Ae^{-x}+Ae^{-x}=e^{-x} \implies 2A=1 \implies A=\frac{1}{2}, \qquad y_1^*=\frac{e^{-x}}{2}. \]

Step 4: Part 2: right-hand side $2$

A constant is a degree-0 polynomial with $\alpha=0$, not a characteristic root ($s=0$), so try $y_2^*=B$: \[y_2^{*\prime}=0, \qquad y_2^{*\prime\prime}=0 \implies 0+B=2 \implies B=2, \qquad y_2^*=2.\]

Step 5: Combine and verify

\[ y^* = y_1^*+y_2^* = \frac{e^{-x}}{2}+2. \]

\[ y^{*\prime}=-\frac{e^{-x}}{2}, \qquad y^{*\prime\prime}=\frac{e^{-x}}{2}, \qquad y^{*\prime\prime}+y^* = \frac{e^{-x}}{2}+\frac{e^{-x}}{2}+2 = e^{-x}+2.\ \checkmark \]

Step 6: General solution

The solution is recorded in the result below.


Result

Final answer:

\[\boxed{\,y = C_1\cos x + C_2\sin x + \frac{e^{-x}}{2} + 2\,}\]