Finding the complementary function of a second order linear differential equation I have a question stating 


  Find the complementary function of  $\frac{d^2y}{dx^2} + 4\frac{dy}{dx} + 40y = x$


So I solved the auxillary equation, $ \lambda^2 + 4\lambda +40 = 0$, which gives $\lambda = -2 \pm 6i$. I believe I am correct in thinking this means the complementary solution is of the form $Ae^{(-2+6i)x} + Be^{(-2-6i)x}$, where $x \in \mathbb{R}$. I would have thought this is the final answer but the answer given is $e^{-2x}(A\cos{6x} +B\sin{6x})$. To try to get this I did 
$$ \begin{align}   
Ae^{(-2+6i)x} + Be^{(-2-6i)x} &amp;= Ae^{-2x}(\cos{6x} +i\sin{6x}) +Be^{-2x}(\cos{6x}+i\sin{6x}) \\ &amp;= e^{-2x}((A+B)\cos{6x} + (A-B)i\sin{6x})
\end{align}$$
How do you get to the given answer?

EDIT

To clarify. What I want to know is how to get from my answer, $Ae^{(-2+6i)x} + Be^{(-2-6i)x}$, to the textbook's(and wolfram alpha's) answer, $e^{-2x}(A\cos{6x} +B\sin{6x})$ ?
It is simply $(A+B)=C$ and $(A-B)= D$ to give $e^{-2x}(C\cos{6x}+D\sin{6x})$
It is easy..

Use $e^{ix}=\cos x+i \sin x$.

And in final step you can collect $\cos$ and $\sin$ values as constant (you can say $A+B=$ new constant let say $C$ and $(A-B)i=$ another constant let say $D$)