Solving a Non-Homogeneous Differential Equation Using the Annihilator Method (2nd Order example)

Find the general solution to the following 2nd order non-homogeneous equation using the Annihilator method:

$$y''-3y'-4y=2sin(x) $$

We begin by first solving the homogeneous case for the given differential equation:

$$y''-3y'-4y=0 $$

Revisit the steps from the Homogeneous 2nd order pages to solve the above equation. The roots of our "characteristic equation" are:

$$r_1 = -1 \;,\; r_2 = 4 $$

...and the solution to the homogeneous case is:

$$y_h = C_1e^{4x} + C_2e^{-x} \qquad(1) $$

Before proceeding, we will rewrite the right hand side of our original equation [2sin(x)] using Euhler's Identity

Euhler's Identity:

$$e^{i\theta} = cos(\theta) + isin(\theta) $$

...where

$$cos(\theta)=real \; part $$

$$isin(\theta)=imaginary \; part $$

...therefore:

$$2sin(x) = 2e^{ix} $$

Note that since our use of Euhler's Identity involves converting a sine term, we will only be considering the imaginary portion of our particular solution (when we finally obtain it). We can now rewrite the original non-homogeneous equation as:

$$y''-3y'-4y = 2e^{ix} $$

...and recalling that a non-homogeneous eqaution of the form:

$$ay''+by'+cy=g(x) $$

...can be written as:

$$a(D-m_2)(D-m_1)y=g(x)$$

...where m1 and m2 are the roots of our "characteristic equation" for the homogeneous case. So in our problem we arrive at the expression:

$$(D-4)(D+1)y_p = 2e^{ix} $$

...where the particular solution (yp) is:

$$y_p = (D+1)^{-1}(D-4)^{-1}(2e^{ix}) \qquad(2)$$

We now use the following theorem in a reiterative fashion to eliminate the D's and solve for yp:

$$(D-m)^{-1} g(x) = e^{mx} \int{}{}e^{-mx}g(x)dx \qquad(3)$$

We being with:

$$(D-4)^{-1} 2e^{ix} = e^{4x} \int{}{}e^{-4x}(2e^{ix})dx $$

$$ = 2e^{4x} \int{}{}e^{-4x+ix}dx$$

$$ = 2e^{4x} \int{}{}e^{(i-4)x}dx$$

$$ = 2e^{4x} \frac{1}{i-4}e^{(i-4)x}$$

$$ = \frac{2}{i-4}e^{4x+ix-4x}$$

$$ = \frac{2}{i-4}e^{ix}$$

Equation #2 now becomes:

$$y_p = (D+1)^{-1}(\frac{2e^{ix}}{i-4}) \qquad(4)$$

...and we again use our theorem (#3) in a second iteration on eqn #4:

$$y_p = (D+1)^{-1}(\frac{2e^{ix}}{i-4}) = e^{-x} \int{}{}e^x(\frac{2e^{ix}}{i-4})dx $$

$$ = \frac{2e^{-x}}{i-4} \int{}{}e^{x+ix}dx $$

$$ = \frac{2e^{-x}}{i-4} \int{}{}e^{(1+i)x}dx $$

$$(\frac{2e^{-x}}{i-4})( \frac{1}{1+i})e^{(1+i)x} $$

$$= (\frac{2e^{-x}}{i+i^2-4-4i}) e^{(1+i)x}$$

$$= (\frac{2e^{-x}}{-5-3i}) e^{(1+i)x}$$

$$y_p = \frac{2e^{ix}}{-5-3i} \qquad(5)$$

We will again use Euhler's Identity to convert eqn #5 into an equation that has a recognizable real and imaginary part. However, before we do so, we must remove the imaginary terms from the denominator. We do so by multiplying by the complex conjugate:

$$y_p = (\frac{2e^{ix}}{-5-3i})(\frac{-5+3i}{-5+3i}) = \frac{(-5+3i)2e^{ix}}{34}$$

$$y_p = ( \frac{-10}{34} + \frac{6i}{34})e^{ix} \qquad(6)$$

At this point we now have an equation with a form that allows us to use Euhler's Identity. We use the identity to rewrite eqn #6 as:

$$y_p = ( \frac{-5}{17} + \frac{3}{17}i)(cos(x) + isin(x))$$

$$y_p = (\frac{-5}{17}cos(x) - \frac{3}{17}sin(x)) $$

$$ \qquad + \; i(\frac{3}{17}cos(x) - \frac{5}{17}sin(x)) \qquad(7)$$

Now recall that in the beginning of this problem we used Euhler's Identity to rewrite the 2sin(x) term of our original equation. Because the term involved sine, we only use the imaginary part of eqn #7 (with the exception of the "i") and the real part is discarded. Had we used Euhler's Identity to rewrite a term that involved cosine, we would only use the real part of eqn #7 while discarding the imaginary part. With this in mind, our particular solution (yp) is:

$$y_p = \frac{3}{17}cos(x) - \frac{5}{17}sin(x)$$

...and the general solution to our original non-homogeneous differential equation is the sum of the solutions to both the homogeneous case (yh) obtained in eqn #1 and the particular solution y(p) obtained above

$$y_g = y_h + y_p $$

$$y_g = C_1e^{4x} + C_2e^{-x} + \frac{3}{17}cos(x) - \frac{5}{17}sin(x)$$