# Math Help - 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 $y''+2y'=xe^{-2x}$. Also, $y(0)=a$ and $y'(0)=b$.
So I consider the homogeneous equation $y''+2y'=0$. I wrote the characteristic polynomial and found its roots to be $\pm i \sqrt 2$. Thus a solution to the homogeneous DE is $c_1 \cos (x\sqrt 2)+c_2 \sin (x \sqrt 2)$. I'm not sure if I can solve for $c_1$ and $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 $(D^2+2D)(y)=xe^{-2x}$. The annihilator is $(D+2)$.
Hence $(D+2)(D^2+2D)(y)=0$. So $(r+2)(r^2+2r)=0 \Rightarrow$ $r=0$ or $r=-2$ (this one is a double root).
Thus a general solution to the original DE is $y=c_1 \cos (x\sqrt 2)+c_2 \sin (x \sqrt 2)+c_3e^{-2x}+c_4$.
I tried to solve for $c_3$ and $c_4$ this way:
$y_p=c_3e^{-2x}$.
$y_p'=-2c_3e^{-2x}$.
$y_p''=4c_3e^{-2x}$.
Plugging these values into the original DE, I reach that $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 $y''+2y'=xe^{-2x}$. Also, $y(0)=a$ and $y'(0)=b$.
So I consider the homogeneous equation $y''+2y'=0$. I wrote the characteristic polynomial and found its roots to be $\pm i \sqrt 2$. Thus a solution to the homogeneous DE is $c_1 \cos (x\sqrt 2)+c_2 \sin (x \sqrt 2)$. I'm not sure if I can solve for $c_1$ and $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 $(D^2+2D)(y)=xe^{-2x}$. The annihilator is $(D+2)$.
Hence $(D+2)(D^2+2D)(y)=0$. So $(r+2)(r^2+2r)=0 \Rightarrow$ $r=0$ or $r=-2$ (this one is a double root).
Thus a general solution to the original DE is $y=c_1 \cos (x\sqrt 2)+c_2 \sin (x \sqrt 2)+c_3e^{-2x}+c_4$.
I tried to solve for $c_3$ and $c_4$ this way:
$y_p=c_3e^{-2x}$.
$y_p'=-2c_3e^{-2x}$.
$y_p''=4c_3e^{-2x}$.
Plugging these values into the original DE, I reach that $xe^{-2x}=0, c_3$ cancels out... Obviously I made something wrong. I don't see what.
If you consider the homogeneous equation $y^{\prime\prime}+2y^{\prime}=0$, the associated characteristic equation is $r^2+2r=0\implies r_1=0$ and $r_2=-2$.

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

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

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

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

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

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

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

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

This implies that the particular solution will be of the form $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 $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 $y''+2y=0$ (hence the roots I found!) instead of $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 $y_p=Axe^{-2x}+Bx^2e^{-2x}$
. Why the " $x$" and " $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 " $x$" and " $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 $e^{-2x}$ in the homogeneous solution. So by repeated roots, the functions in your particular solution are $xe^{-2x}$ and $x^2e^{-2x}$.

Does this clarify things?

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