# How to get a particular solution.

1. Apr 13, 2005

### Cafka

I have a "Solve the initial value problem" It is:

y'' + y = 2cosx - 3sinx

I know how to do everything except for get yp. I know it has to be something so when i substitute yp into the left hand side of the equation, i get the right hand side, 2cosx - 3sinx.

By this definition i would think yp = Acosx - Bsinx, where A = 2 and B = 3. But that doesn't seem right.

Can anyone help me out?

Thank you.

2. Apr 13, 2005

### dextercioby

Yeah,use Lagrange's method of variation of constants...Solve the homogenous ODE and then make the 2 constants (associated with the 2 independent solution spanning the solutions space) become functions of "x"...

Daniel.

3. Apr 13, 2005

### saltydog

For the equation:

$$y^{''}+y=2Cos[x]-3Sin[x]$$

Whenever the right-hand side is a particular solution of a linear homogeneous equation, then you can apply that differential operator to both sides of the above equation to collapse it into a homogeneous one:

Since RHS is a particular solution to homogeneous equation (in operator notation):

$$(D^2+1)y=0$$

Applying this opearator to both sides of the original equation leads to:

$$(D^2+1)(D^2+1)R=0$$

Solution of this one is:

$$y(x)=c_1Sin[x]+c_2Cos[x]+AxSin[x]+BxCos[x]$$

but:

Well, read the book to fill in the details, but then just substitute:

$$y_p(x)=AxSin[x]+BxCos[x]$$

into the original equation, equate coefficients. You're done.