# Second order differential equations where the r.h.s. ${}= 6e^2\cos(3x)$

Solve the differrential equation $$y'' - 4y' + 13y' = 6e^{2x}\cos(3x)$$ where $$y(0)=3$$ and $$y'(0)=-8$$.

I think we start like…

For the homogenous case $$\lambda^2 -4\lambda + 13 = 0$$ \begin{align} \lambda &= \frac{-b \pm \sqrt{b^2-4ac}}{2a} \\ &= \frac{4 \pm \sqrt{16-52}}{2} \\ &= \frac{4 \pm \sqrt{-36}}{2} \\ &= \frac{4 \pm 6i}{2} \\ &= 2 \pm 3i \end{align} $$\lambda_1 = 2+3i \quad \text{and} \quad \lambda_2 = 2-3i$$

The homogenous equation has a general solution

$$y_{\text{h}} = Ae^{(2+3i)x}\cos(3x) +Be^{(2-3i)x}\sin(3x)$$

Since the R.H.S. is an non-homogenous equation “$$6e^{2x}\cos(3x)$$” we choose the trial function $$y_{\text{p}} = (\alpha e^{(2+3i)x} \cos(3x)+\beta e^{(2-3i)x}\sin(3x))$$

I’m not sure how to procede from here or whether I am going in the right direction.

Hint: Your homogeneous solution can either be $$y_h = Ae^{2x+3ix}+Be^{2x-3ix}$$ or $$y_h = Ce^{2x}\cos(3x)+De^{2x}\sin(3x)$$

They are equivalent.

Also, why would you try the function $$\cos \ \& \ \sin 4x$$? Trial function should be $$y_p=x\,e^{2x}\, \cos (3x)+x\,e^{2x}\, \sin (3x)$$

For this method to work, if you take derivatives of the inhomogeneous part, you must get a finite number of different functions. When some of the derivatives of the inhomogeneous part happen to be identical to the homogeneous solution, you need to multiply your trial function by $$x$$. I suggest you to read more about this method.

• Wait i'm confused about the homogenous solution, why do you have to solutions for the homogenous solution? I get $y_h = Ce^{2x} cos(3x) + D e^{2x} sin (3x)$ but i don't get why $y_h = Ae^{(2+3o)x} + Be^{(2-3i)x}$ is also there. Do i need to consider both of them?
– Ivan
Commented May 28, 2015 at 18:17
• @Ivan Those two solutions are identical upload.wikimedia.org/math/1/0/2/… Linear combination (the constants $ABCD$) of {sinx, cosx} are equivalent to $e^{+ix},e^{-ix}$ Commented May 28, 2015 at 18:20
• What i don't get is how come for the second one the complex roots do not affect the homogenous equation. So i didn't have to solve for the roots at all?
– Ivan
Commented May 28, 2015 at 18:23
• Do you accept the first one to be a correct answer? Commented May 28, 2015 at 18:23
• If so, lets take $A=1$ and $B=1$. We have $$2e^{2x}\frac{e^{3ix}+e^{-3ix}}{2}=2e^{2x}\cos (3x)$$ as per this formula:upload.wikimedia.org/math/1/0/2/… So (A=1,B=1) is equivalent to (C=2,D=0). I can do this for ANY A and B. Commented May 28, 2015 at 18:26

I think it must be $$y''-4y'+13y=6e^{2x}\cos(3x).$$ The solution of the homogenous part is given by $$y(x)= c_1e^{2 x}\sin (3 x)+c_2 e^{2 x} \cos (3 x).$$ For the inhomogenous solution, set $$y_{\text{P}}=e^{2x}(Ax\sin(3x)+B\cos(3x)).$$

• Do you mean $y_h = y(x) = c_1 e^{2x} sin(3x) + c_2e^{2x} cos{3x}$
– Ivan
Commented May 28, 2015 at 18:50
• yes sorry some $c_1$ is missing Commented May 28, 2015 at 18:52