Welcome to our community

Be a part of something great, join today!

Non homogeneous linear differential equation

Fernando Revilla

Well-known member
MHB Math Helper
Jan 29, 2012
I quote an unsolved question posted in MHF (November 7th, 2012) by user NumberMunhcer.

hi, this should be pretty straight forward problem to solve but im stuck anyway: y''' + 9y' = 18sin(3x) + 9
i need to solve this using determined coeficients.
note: y' = dy/dx and y''' = d^3y/dx^3

Fernando Revilla

Well-known member
MHB Math Helper
Jan 29, 2012
The characteristic equation is [tex]\lambda^3+9\lambda=0[/tex] whose roots are [tex]0,\pm 3i[/tex]. A basis for the vector space of the solutions of the homogeneous equation is [tex]B=\{1,\cos 3t,\sin 3t\}[/tex], as a consequence the general solution of [tex]y'''+9y'=0[/tex] is [tex]y_h=c_1+c_2\cos 3x+c_3\sin 3x[/tex].

According to a well-known theorem (form of a particular solution knowing the form of the right side), a particular solution of the complete equation has the form [tex]y_p=x(A+B\cos 3x+C\sin 3x)[/tex]. Then,
$$y'''_p+9y'_p=9+18\sin 3x\Leftrightarrow \ldots \Leftrightarrow A=1,B=-\frac{1}{3},C=-1$$So, the general solution of the given equation is
$$y=x\left(1-\frac{1}{3}\cos 3x-\sin 3x \right)+c_1+c_2\cos 3x+c_3\sin 3x$$
Last edited:


Staff member
Feb 24, 2012
A similar approach would be the annihilator method.

We are given the ODE:

(1) $\displaystyle y'''+9y'=18\sin(3x)+9$

$\displaystyle \frac{1}{9}D^2+1$ annihilates $\displaystyle 18\sin(3x)$

$\displaystyle D$ annihilates $\displaystyle 9$

and so:

$\displaystyle A\equiv D\left(\frac{1}{9}D^2+1 \right)$ annihilates $\displaystyle 18\sin(3x)+9$

Thus, applying $A$ to both sides of (1) gives us:

$\displaystyle D\left(\frac{1}{9}D^2+1 \right)(D^3+9D)[y]=0$

(2) $\displaystyle (D(D^2+9))^2[y]=0$

The characteristic roots are then:

$\displaystyle r=0,\,\pm3i$ where all 3 roots are of multiplicity 2.

Hence, the general solution to (2) is:

(3) $\displaystyle y(x)=c_1+c_2x+(c_3+c_4x)\cos(3x)+(c_5+c_6x)\sin(3x)$

Now, recall that a general solution to (1) is of the form $\displaystyle y(x)=y_h(x)+y_p(x)$. Since every solution to (1) is also a solution to (2), then $\displaystyle y(x)$ must have the form displayed on the right-hand side of (3). But, we recognize that:

$\displaystyle y_h(x)=c_1+c_3\cos(3x)+c_5\sin(3x)$

and so there must exist a particular solution of the form:

$\displaystyle y_p(x)=x\left(c_2+c_4\cos(3x)+c_6\sin(3x) \right)$

Now it is just a matter of using the method of undetermined coefficients as Fernando did to obtain the particular solution that satisfies (1). First, we compute:

$\displaystyle y_p'(x)=c_2+(c_2+3c_6x)\cos(3x)+(c_6-3c_4x)\sin(3x)$

$\displaystyle y_p'''(x)=-27((c_4+c_6x)\cos(3x)+(c_6-c_4x)\sin(3x))$

Now, substitute into (1):

$\displaystyle -27((c_4+c_6x)\cos(3x)+(c_6-c_4x)\sin(3x))+9(c_2+(c_2+3c_6x)\cos(3x)+(c_6-3c_4x)\sin(3x))=0\cos(3x)+18\sin(3x)+9$

$\displaystyle 9c_2+(9c_2-27c_4)\cos(3x)+(-18c_6)\sin(3x)=(0)\cos(3x)+(18)\sin(3x)+9$

Equating coefficients, we obtain the system:

$\displaystyle 9c_2=9\,\therefore\,c_2=1$

$\displaystyle 9c_2-27c_4=0\,\therefore\,c_4=\frac{1}{3}$

$\displaystyle -18c_6=18\,\therefore\,c_6=-1$

And so we have:

$\displaystyle y_p(x)=x\left(1+\frac{1}{3}\cos(3x)-\sin(3x) \right)$

Hence, the general solution to (1) is:

$\displaystyle y(x)=y_h(x)+y_p(x)=c_1+c_2\cos(3x)+c_3\sin(3x)+x \left(1+\frac{1}{3}\cos(3x)-\sin(3x) \right)$