Problem 135
Easy Nonhomogeneous Equations

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

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

Explanation of Method

With α=3 not a characteristic root, the exponential-shift D→D+3 reduces the trial to a quadratic Q solving Q″+3Q′+2Q=x²+x.

Step 1: Homogeneous solution

\[ r^2-3r+2=0 \implies (r-1)(r-2)=0 \implies r_1=1,\ r_2=2. \]

\[ Y_h = C_1e^{x} + C_2e^{2x}. \]

Step 2: Set up the trial

The right-hand side has the form $P_2(x)e^{\alpha x}$ with $\alpha=3$ and $\deg P_2=2$. Since $\alpha=3$ is not a characteristic root ($s=0$), the trial keeps the full quadratic form:

\[ y^*=(Ax^2+Bx+C)e^{3x} = Q(x)e^{3x}, \qquad Q=Ax^2+Bx+C. \]

Step 3: Exponential-shift reduction

Shifting the operator $D^2-3D+2$ by $D\to D+3$ turns the ODE for $y=Qe^{3x}$ into an ODE for $Q$ alone: $(D+3)^2-3(D+3)+2 = D^2+3D+2, \qquad\text{so}\qquad Q''+3Q'+2Q = x^2+x.$

Step 4: Match coefficients

With $Q=Ax^2+Bx+C$, $Q'=2Ax+B$, $Q''=2A$: \[2A+3(2Ax+B)+2(Ax^2+Bx+C) = x^2+x \implies 2Ax^2+(6A+2B)x+(2A+3B+2C)=x^2+x.\]

\[ x^2:\ 2A=1 \implies A=\frac12. \qquad x^1:\ 6A+2B=1 \implies B=-1. \qquad x^0:\ 2A+3B+2C=0 \implies C=1. \]

Step 5: Particular solution

\[ y^* = \left(\frac{x^2}{2}-x+1\right)e^{3x} = \frac{e^{3x}}{2}\bigl(x^2-2x+2\bigr). \]

Step 6: Verify

With $Q=\frac{x^2}{2}-x+1$: $Q'=x-1$, $Q''=1$. Check $Q''+3Q'+2Q$: $1 + 3(x-1) + 2\!\left(\frac{x^2}{2}-x+1\right) = x^2 + (3-2)x + (1-3+2) = x^2+x.$ $\checkmark$

Step 7: General solution

The solution is recorded in the result below.


Result

Final answer:

\[\boxed{\,y = C_1e^{x} + C_2e^{2x} + \frac{e^{3x}}{2}\bigl(x^2-2x+2\bigr)\,}\]