# General solution for a nonhomogeneous differential equation

I have to find the general solution of this eq :

$$y''-4y'+5y=e^{2s}$$

I have found the general solution of the homogeneous part of this eq.

$$Y_h= e^{2s} ( C_1 \cos s - C_2 \sin s )$$

I hope it's correct. Well, my problem comes at the particular solution. I don't understand how to find it.

Can anyone help me? Thank you !

Hint:

To find the particular solution $Y_p$, let $y_p = Ce^{2s}$ and substitute in the differential equation to find the value of $C$.

• Thank you ! I tried it and I found the constant being equal to 1. That means that my final general solution will be Yh + e^(2s) or I'm wrong? – Maria Bluee Jun 4 '17 at 18:44
• You're right $y_p = e^{2s}$ and so $y = y_h + e^{2s}$. – Ahmed Jun 4 '17 at 18:47
• Oh, thank you so much. I can't believe I did it ! One more question, please. It's there a rule on chosing the form of the particular solution? Thanks ! – Maria Bluee Jun 4 '17 at 18:52
• Yes. Sure there are rules to choose the particular solution. Check this website efunda.com/math/ode/linearode_undeterminedcoeff.cfm – Ahmed Jun 4 '17 at 18:54
• @MariaBluee After you ask a question here, if you get an acceptable answer, you should "accept" the answer by clicking the check mark ✓ next to it. This scores points for you and for the person who answered your question. You can find out more about accepting answers here: How do I accept an answer?, Why should we accept answers?. – projectilemotion Jun 5 '17 at 10:00

This is more a comment than an answer.

I think that life would have been easier from the beginning defining $y=e^{2s} z$ making the equation to become $$z''+z=1$$ Now, defining $z=w+1$ makes $$w''+w=0$$ giving, as usual $$w=c_1 \cos (s)+c_2 \sin (s)$$ from which $$z=1+c_1 \cos (s)+c_2 \sin (s)$$ $$y=e^{2s}\left(1+c_1 \cos (s)+c_2 \sin (s) \right)$$