Trying to solve a non-homogeneous differential equation

86 Views Asked by At

I am trying to solve $$y''-y'-2y = \sin(t) + \cos(2t) $$ and based on what I have learned, the solution to an equation is $$y(t) = y_c(t)+y_p(t) $$ I know that the $y_c(t)$ would be $c_1e^{2t} + c_2e^{-t}$, but I can't find the proper $y_p(t)$. I tried $y_p(t) = A\cos(t) + B\sin(t)$, but I think that won't work. Is there something wrong with my trial, or the way I choose the $y_p(t)$? And if possible, what would be the correct $y_p(t)$ for this question? Thanks a lot for your help, guys!

2

There are 2 best solutions below

0
On BEST ANSWER

The general solution will be the sum of the $\color{blue}{\text{complementary solution}}$ and $\color{blue}{\text{particular solution}}$.

Complementary solution: Let $$y''-y'-2y=0 \quad \overbrace{\implies}^{y=e^{rt}} \quad r^{2}-r-2=0 \implies r=-1 \vee r=2 $$So, fundamental set of solutions will be $C.F.S=\{e^{-t},e^{2t}\}$ and therefore the complementary solution for ODE is $$\boxed{y_{c}(t)=Ae^{-t}+Be^{2t}, \quad A,B \in \mathbb{F}.}$$

Particular solution (undetermined coefficients): The particular solution to ODE will be the sum of the particular solutions $$y''-y'-2y=\cos(2t)$$and $$y''-y'-2y=\sin(t)$$The particular solution to $y''-y'-2y=\cos(2t)$ is of the form $$y_{p_{1}}=a_{1}\cos(2t)+a_{2}\sin(2t)$$also the particular solution to $$y''-y'-2y=\sin(t)$$ if of the form $$y_{p_{2}}=a_{3}\cos(t)+a_{4}\sin(t)$$Sum $y_{p_{1}}$ and $y_{p_{2}}$ we obtain $y_{p}$: $$\boxed{y_{p}=y_{p_{1}}+y_{p_{2}}} \implies y_{p}=a_{1}\cos(t)+a_{2}\cos(2t)+a_{3}\sin(t)+a_{4}\sin(2t)$$

Now, can can solve for the unknown constant $a_{1},a_{2},a_{3}$ and $a_{4}$ and we have that $$\boxed{y''_{p}-y'-2y=\sin(t)+\cos(2t) \overbrace{\implies}^{y_{p}=a_{1}\cos(t)+a_{2}\cos(2t)+a_{3}\sin(t)+a_{4}\sin(2t)} a_{1}=\frac{1}{10}\wedge a_{2}=-\frac{3}{20}\wedge a_{3}=-\frac{3}{10}\wedge a_{4}=-\frac{1}{20}}.$$ Therefore, we have $$\boxed{y_{p}(t)=\frac{1}{10}\cos(t)-\frac{3}{20}\cos(2t)-\frac{3}{10}\sin(t)-\frac{1}{20}\sin(2t)}$$

General solution: Is the form $$\boxed{y=y_{c}+y_{p}}$$Therefore $$\boxed{y(t)= Ae^{-t}+Be^{2t}+ \frac{1}{10}\cos(t)-\frac{3}{20}\cos(2t)-\frac{3}{10}\sin(t)-\frac{1}{20}\sin(2t)}.$$where $\mathbb{F}$ is scalar field.

0
On

Hint:

To find $y_p(t), $ try the form $A\cos(t)+B\sin(t)+C\cos(2t)+D\sin(2t)$,

so that $y_p$ and its derivatives can have terms with $\cos(2t)$.