Problem 134
Easy Nonhomogeneous Equations

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

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

Explanation of Method

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

Step 1: Homogeneous solution

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

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

Step 2: Set up the trial

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

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

Step 3: Exponential-shift reduction

Writing $y=Qe^{2x}$ and using the shift $D\to D+2$ on the operator $D^2+D-2$ (since $y'=(D+2)Q\,e^{2x}$, etc.) turns the ODE for $y$ into an ODE for $Q$ alone: $(D+2)^2+(D+2)-2 = D^2+5D+4, \qquad\text{so}\qquad Q''+5Q'+4Q = x^2-1.$

Step 4: Match coefficients

With $Q=Ax^2+Bx+C$, $Q'=2Ax+B$, $Q''=2A$: \[2A+5(2Ax+B)+4(Ax^2+Bx+C) = x^2-1 \implies 4Ax^2+(10A+4B)x+(2A+5B+4C)=x^2-1.\]

\[ x^2:\ 4A=1 \implies A=\frac14. \qquad x^1:\ 10A+4B=0 \implies B=-\frac{5}{8}. \qquad x^0:\ 2A+5B+4C=-1 \implies C=\frac{13}{32}. \]

Step 5: Particular solution

\[ y^* = \left(\frac{x^2}{4}-\frac{5x}{8}+\frac{13}{32}\right)e^{2x} = \frac{e^{2x}}{32}\bigl(8x^2-20x+13\bigr). \]

Step 6: Verify

With $Q=\frac{x^2}{4}-\frac{5x}{8}+\frac{13}{32}$: $Q'=\frac{x}{2}-\frac58$, $Q''=\frac12$. Check $Q''+5Q'+4Q$: \[\frac12 + 5\!\left(\frac{x}{2}-\frac58\right) + 4\!\left(\frac{x^2}{4}-\frac{5x}{8}+\frac{13}{32}\right) = x^2 + \left(\frac{5}{2}-\frac{5}{2}\right)x + \left(\frac12-\frac{25}{8}+\frac{13}{8}\right) = x^2-1.\ \checkmark\]

Step 7: General solution

The solution is recorded in the result below.


Result

Final answer:

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