# Thread: Second order non homogeneous DE, annihilator method

1. ## Second order non homogeneous DE, annihilator method

I've followed Chris' tutorial, but I didn't get lucky at the end.
I must solve $\displaystyle y''+2y'=xe^{-2x}$. Also, $\displaystyle y(0)=a$ and $\displaystyle y'(0)=b$.
So I consider the homogeneous equation $\displaystyle y''+2y'=0$. I wrote the characteristic polynomial and found its roots to be $\displaystyle \pm i \sqrt 2$. Thus a solution to the homogeneous DE is $\displaystyle c_1 \cos (x\sqrt 2)+c_2 \sin (x \sqrt 2)$. I'm not sure if I can solve for $\displaystyle c_1$ and $\displaystyle c_2$ yet, with the initial conditions. It would be the solution the homogeneous DE, but are these constants the same in the case of the non homogeneous case? I guess yes...
Anyway, I continued writing $\displaystyle (D^2+2D)(y)=xe^{-2x}$. The annihilator is $\displaystyle (D+2)$.
Hence $\displaystyle (D+2)(D^2+2D)(y)=0$. So $\displaystyle (r+2)(r^2+2r)=0 \Rightarrow $$\displaystyle r=0 or \displaystyle r=-2 (this one is a double root). Thus a general solution to the original DE is \displaystyle y=c_1 \cos (x\sqrt 2)+c_2 \sin (x \sqrt 2)+c_3e^{-2x}+c_4. I tried to solve for \displaystyle c_3 and \displaystyle c_4 this way: \displaystyle y_p=c_3e^{-2x}. \displaystyle y_p'=-2c_3e^{-2x}. \displaystyle y_p''=4c_3e^{-2x}. Plugging these values into the original DE, I reach that \displaystyle xe^{-2x}=0, c_3 cancels out... Obviously I made something wrong. I don't see what. 2. Originally Posted by arbolis I've followed Chris' tutorial, but I didn't get lucky at the end. I must solve \displaystyle y''+2y'=xe^{-2x}. Also, \displaystyle y(0)=a and \displaystyle y'(0)=b. So I consider the homogeneous equation \displaystyle y''+2y'=0. I wrote the characteristic polynomial and found its roots to be \displaystyle \pm i \sqrt 2. Thus a solution to the homogeneous DE is \displaystyle c_1 \cos (x\sqrt 2)+c_2 \sin (x \sqrt 2). I'm not sure if I can solve for \displaystyle c_1 and \displaystyle c_2 yet, with the initial conditions. It would be the solution the homogeneous DE, but are these constants the same in the case of the non homogeneous case? I guess yes... Anyway, I continued writing \displaystyle (D^2+2D)(y)=xe^{-2x}. The annihilator is \displaystyle (D+2). Hence \displaystyle (D+2)(D^2+2D)(y)=0. So \displaystyle (r+2)(r^2+2r)=0 \Rightarrow$$\displaystyle r=0$ or $\displaystyle r=-2$ (this one is a double root).
Thus a general solution to the original DE is $\displaystyle y=c_1 \cos (x\sqrt 2)+c_2 \sin (x \sqrt 2)+c_3e^{-2x}+c_4$.
I tried to solve for $\displaystyle c_3$ and $\displaystyle c_4$ this way:
$\displaystyle y_p=c_3e^{-2x}$.
$\displaystyle y_p'=-2c_3e^{-2x}$.
$\displaystyle y_p''=4c_3e^{-2x}$.
Plugging these values into the original DE, I reach that $\displaystyle xe^{-2x}=0, c_3$ cancels out... Obviously I made something wrong. I don't see what.
If you consider the homogeneous equation $\displaystyle y^{\prime\prime}+2y^{\prime}=0$, the associated characteristic equation is $\displaystyle r^2+2r=0\implies r_1=0$ and $\displaystyle r_2=-2$.

So the homogeneous solution is $\displaystyle y=c_1+ c_2e^{-2x}$

Now, we consider the non-homogeneous equation in differential operator form:

$\displaystyle (D^2+2D)y=xe^{-2x}$.

Since $\displaystyle \left(D-\alpha\right)^n$ is the annihilator of $\displaystyle e^{\alpha x},xe^{\alpha x},\ldots, x^{n-1}e^{\alpha x}$, it follows that $\displaystyle (D+2)^2$ annihilates $\displaystyle xe^{-2x}$.

Therefore, when you apply the annihilator to both sides, we get

$\displaystyle (D+2)^2(D^2+2D)(y)=0$.

The characteristic equation is $\displaystyle (r+2)^2({\color{red}r^2+2r})=0$

The part in red generates the complimentary solution. What we're interested in is the $\displaystyle (r+2)^2$ term. This generates solutions $\displaystyle r=-2$ with multiplicity 2 (but don't forget $\displaystyle r+2$ was a term in the complementary case!).

This implies that the particular solution will be of the form $\displaystyle y_p=Axe^{-2x}+Bx^2e^{-2x}$.

Now, substitute this into your original differential equation to solve for the constants A and B.

Once you get the particular solution, the general solution will be of the form $\displaystyle y=c_1 + c_2e^{-2x}+y_p(x)$.

It is at this point that you apply the initial conditions that you were given at the start of the problem.

Can you take it from here?

3. Thank you very much Chris!
I don't know why I considered the equation $\displaystyle y''+2y=0$ (hence the roots I found!) instead of $\displaystyle y''+2y'=0$. I'll try to do the rest alone, but in any case I'm going to refer to your help in this post.

4. I've reached a result, but I will re do the arithmetics tomorrow (it's 1:30 am and I'm so tired...).
I just don't know why
This implies that the particular solution will be of the form $\displaystyle y_p=Axe^{-2x}+Bx^2e^{-2x}$
. Why the "$\displaystyle x$" and "$\displaystyle x^2$" terms? I will read the theory for sure, but if you could kill this doubt I have, I'd be grateful. Of course you can refer me to your DE tutorial.

5. Originally Posted by arbolis
I've reached a result, but I will re do the arithmetics tomorrow (it's 1:30 am and I'm so tired...).
I just don't know why . Why the "$\displaystyle x$" and "$\displaystyle x^2$" terms? I will read the theory for sure, but if you could kill this doubt I have, I'd be grateful. Of course you can refer me to your DE tutorial.
The reason for that is because you already have an $\displaystyle e^{-2x}$ in the homogeneous solution. So by repeated roots, the functions in your particular solution are $\displaystyle xe^{-2x}$ and $\displaystyle x^2e^{-2x}$.

Does this clarify things?

6. Originally Posted by Chris L T521
The reason for that is because you already have an $\displaystyle e^{-2x}$ in the homogeneous solution. So by repeated roots, the functions in your particular solution are $\displaystyle xe^{-2x}$ and $\displaystyle x^2e^{-2x}$.

Does this clarify things?
Oh... yes it does. I've just read the example 18 of your tutorial and now things are perfectly clear. Once again, thanks a bunch.