How to solve integration of a product of an exponential and a trigonometric function? Preparing for the exam I bumped into this integral and I just can't get hold on it. It's an integration of a product of an exponential and a trigonometric function. It's going in an endless loop for me.
$$ \int \cos(x)e^{2x} dx $$ 
Thank you in advance.
P.S. Meanwhile I solved it myself, you can find the solution in the answers below. :)
 A: we will evaluate this integral by using  the fact that $e^{-2x}\int e^{2x}\cos x \, dx$ is a particular solution of the differential equation $$y' + 2y = \cos x.\tag 1$$ you can find a particular solution of $(1)$ by looking for $y = A\cos x + B \sin x.$ subbing in $(1),$  we get $$-A\sin x + B \cos x+2(A\cos x + B \sin x)=\cos x \to 2B - A = 0, 2A + B= 1. $$ that gives you $$ B = \frac 15, A = \frac 25, e^{-2x}\int e^{2x}\cos x = \frac 25 \cos x + \frac 15 \sin x$$ that is $$\int e^{2x}\cos x\, dx = e^{2x} \left(\frac 25 \cos x + \frac 15 \sin x \right) + C$$
A: Denote $I=\int e^{2x} \cos{x} dx$ integrate by parts you get:
$$I=\left(\frac{e^{2x}\cos{x}}{2}\right)+\int\frac{e^{2x}\sin{x}}{2} dx$$
Integrate by parts a second time. We get
$$\int\frac{e^{2x}\sin{x}}{2} dx=\frac{e^{2x}\sin{x}}{4}-\int\frac{e^{2x}\cos{x}}{4} dx$$
and this combined with the above yields:
$$I=\left(\frac{e^{2x}\cos{x}}{2}\right)+\frac{e^{2x}\sin{x}}{4}-\frac{I}{4}$$
an equation in $I$ you can solve
A: After repeated integration by parts.. you get the following equation:
$$\int \cos(x)e^{2x}dx=e^{2x}\sin(x)-2(2\int \cos(x)e^{2x}dx-e^{2x}\cos(x))$$
Solve for the integral, to get your answer!
A: The idea is that $e^{2x}$ is multiplied by a constant when integrated or differentiated; the same for $\sin x$ and $\cos x$, with the added “problem” that they're also interchanged with one another. So you can look for
$$
F(x)=ae^{2x}\cos x+be^{2x}\sin x
$$
and differentiate:
$$
F'(x)=2ae^{2x}\cos x-ae^{2x}\sin x+2be^{2x}\sin x+be^{2x}\cos x=
e^{2x}\bigl((2a+b)\cos x+(2b-a)\sin x\bigr)
$$
and we can set
$$
\begin{cases}
2a+b=1\\
a-2b=0
\end{cases}
$$
that gives $a=2/5$ and $b=1/5$.
Alternatively, recall that $\cos x=(e^{ix}+e^{-ix})/2$ so your integral becomes
\begin{align}
\frac{1}{2}\int(e^{(2+i)x}+e^{(2-i)x})\,dx
&=
\frac{1}{2}\left(\frac{1}{2+i}e^{(2+i)x}+\frac{1}{2-i}e^{(2-i)x}\right)+c\\
&=
\frac{e^{2x}}{10}\bigl((2-i)e^{ix}+(2+i)e^{-ix}\bigr)+c
\end{align}
and it's just a matter of computing the function in brackets:
\begin{align}
(2-i)(\cos x+i\sin x)+(2+i)(\cos x-i\sin x)
&=2\cos x+\sin x+2\cos x+\sin x\\
&=4\cos x+2\sin x
\end{align}
A: Ok, thank you guys a lot, I managed to solve it with your help of course. Here how it goes.
$$I = \int e^{2x}cos(x)dx$$
$ \int e^{2x}cos(x)dx = e^{2x}sinx -2\int e^{2x}sin(x)dx $
$ \int e^{2x}cos(x)dx = e^{2x}sinx -2(-e^{2x}cos(x) + 2\int e^{2x}cos(x)dx) $
$ \int e^{2x}cos(x)dx = e^{2x}sinx +2e^{2x}cos(x) -4\int e^{2x}cos(x)dx $
Since 
$$\int e^{2x}cos(x)dx=I$$
$I = e^{2x}sinx +2e^{2x}cos(x) -4I$
$5I= e^{2x}sinx +2e^{2x}cos(x)$
$I = \frac{e^{2x}sinx +2e^{2x}cos(x)}{5} $
therefore
$$ \int e^{2x}cos(x)dx=\frac{e^{2x}sinx +2e^{2x}cos(x)}{5} + C$$
Hope others like me will find it useful. :)
