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

A second-order equation with a polynomial right-hand side

#particular solution#identification#polynomial right-hand side

Statement

Solve
y′′+9y=x+1.y'' + 9y = x + 1.

Hint

The homogeneous solution uses cos⁡(3x)\cos(3x) and sin⁡(3x)\sin(3x). Look for a particular solution of the form ax+bax+b.

Show solutionHide solution

Solution

Homogeneous equation. r2+9=0r^2 + 9 = 0 gives r=±3ir = \pm 3i, so
yh(x)=Acos⁡(3x)+Bsin⁡(3x).y_h(x) = A\cos(3x) + B\sin(3x).

Particular solution. Try yp=ax+by_p = ax+b. Then yp′′=0y_p'' = 0, and
yp′′+9yp=9(ax+b)=9ax+9b.y_p'' + 9y_p = 9(ax+b) = 9ax + 9b.
Identifying with x+1x+1:
9a=1  ⟹  a=19,9b=1  ⟹  b=19.9a = 1 \implies a = \frac19, \qquad 9b = 1 \implies b = \frac19.
So
yp(x)=x+19.y_p(x) = \frac{x+1}{9}.

General solution.
y(x)=Acos⁡(3x)+Bsin⁡(3x)+x+19.y(x) = A\cos(3x) + B\sin(3x) + \frac{x+1}{9}.