Maths WorkshopMaths problems with full solutions
Exercise 2076Calculus › Differential equations › Linear equations of order twoL2Added 2 Nov 2026

Superposition of right-hand sides

#superposition#double root#polynomial right-hand side

Statement

Solve
y′′−2y′+y=(x2+1)ex+e3x.y'' - 2y' + y = (x^2+1)e^x + e^{3x}.

Hint

Use superposition. Solve first with right-hand side (x2+1)ex(x^2+1)e^x, then with e3xe^{3x}.

Show solutionHide solution

Solution

Homogeneous. As before, yh=(Ax+B)exy_h = (Ax+B)e^x.

First particular solution. For (x2+1)ex(x^2+1)e^x, since 11 is a double root, try yp1=P(x)exy_{p1} = P(x)e^x with deg⁡P≤4\deg P \le 4. Substituting:
yp1′′−2yp1′+yp1=P′′(x)ex.y_{p1}'' - 2y_{p1}' + y_{p1} = P''(x)e^x.
We need P′′=x2+1P'' = x^2+1. Integrating twice:
P(x)=x412+x22+Cx+D.P(x) = \frac{x^4}{12} + \frac{x^2}{2} + Cx + D.
Taking C=D=0C=D=0 for a particular solution:
yp1(x)=(x412+x22)ex.y_{p1}(x) = \left(\frac{x^4}{12} + \frac{x^2}{2}\right)e^x.

Second particular solution. For e3xe^{3x}, try αe3x\alpha e^{3x}. We found α=14\alpha = \frac14.

General solution.
y(x)=(x412+x22+Ax+B)ex+14e3x.y(x) = \left(\frac{x^4}{12} + \frac{x^2}{2} + Ax + B\right)e^x + \frac14 e^{3x}.