# Particular solution to linear nonhomogeneous equation

1. Nov 3, 2015

### spacetimedude

1. The problem statement, all variables and given/known data
I started learning about solving non homogeneous linear differential equations in class and I am a bit clueless on how to solve them since I've never had a prior experience with much of differential equation.

I am trying to find the particular solutions to the equation L''+w^2L=cn^2sin(nt)+w^2b where w,c,n are constants.

2. Relevant equations

3. The attempt at a solution
First, I split the equation into two:
Lp1=> L''+w^2L=w^2b
Lp2=>L''+w^2L=cn^2sin(nt)

Not quite sure how to solve for the particular solution for the first one.

Lp2:
We guess that L=Acos(nt)+Bsin(nt).
Then we have
L'=-nAsin(nt)+nBcos(nt)
L''=-n^2Acos(nt)-n^2Bsin(nt)=-n^2(Acos(nt)+Bcos(nt))

Plugging back into the equation =>
(-n^2(Acos(nt)+Bcos(nt)))+w^2(Acos(nt)+Bsin(nt))=cn^2sin(nt)

What do we do from here?
Any help will be appreciated.

EDIT:
For the second particular solution, do we just solve for Acos(nt)+Bsin(nt) because we supposed that is L?
In that case, I get Lp2=(cn^2sin(nt))/(w^2-n^2).

Also, for the first solution, do we guess that Lp1 is a constant, so when we take the second derivative, L'' becomes 0, so it just becomes w^2L=w^2b, hence L=b?

Last edited: Nov 3, 2015
2. Nov 3, 2015

### epenguin

Last edited: Nov 3, 2015
3. Nov 3, 2015

### Ray Vickson

It may be easiest to eliminate the constant on the right, by writing the DE for $M = L + \text{constant}$ and figuring out what the appropriate constant would be in order to have the simpler right-hand-side $cn^2 \sin(nt)$.