# Can there be different values of $y_p$ for one equation?

For example, consider following example:

Solution given by book is this:

I solved it using different approach(as shown in the pic below) & got different answer.

Is my solution wrong or both solutions are correct?

• I haven't look at the solution, but the answer to your title question is yes, a linear equation has, in general, many solutions, and any of them can be picked as $y_p$. The easiest way to test your $y_p$ is to substitute it to the equation and see if it gives you $0=0$. – A.Γ. Aug 24 '15 at 17:44

In one of the first steps you write $$\frac{1}{(D+1)(D^2-2D+5)}e^x\sin 2x=\frac{1}{(D+1)(-4-2D+5)}e^x\sin 2x.$$ This is not correct. I guess that you think that differentiating $\sin 2x$ two times gives $-4\sin 2x$. But you have also an exponential function to the right of the operator!
A final note: You can get different particular solutions to linear differential equations, but the difference of them must solve the corresponding homogeneous differential equation. You better start to commute with the exponential function as they do in the book, replacing all $D$ with $(D+1)$. Then you can proceed more or less as you do. But be careful!