Answer
$e^{4x} *\frac{(\sin(2x) + 2\cos(2x))}{10} + C$
Work Step by Step
We want to solve for the following integral: $\int e^{4x} \cos(2x)$ $dx$
In order to solve this problem we integrate by parts twice in a row.
The first time:
Following $\int f g' = f g - \int f' g$, we have:
$ f = \cos(2x), g' = e^{4x} \implies f' = -2\sin(2x)$ and $g = \frac{e^{4x}}{4} $
$\implies \int e^{4x}*\cos(2x)$ $dx = \frac{e^{4x}}{4}* \cos(2x) + \int \frac{e^{4x}*\sin(2x)}{2}dx $
The second time:
$f = -2 \sin(2x), g' = \frac{e^{4x}}{4} \implies f' = -4\cos(2x), g = \frac{e^{4x}}{16} \implies$
$\frac{e^{4x}}{4}* \cos(2x) + \int \frac{e^{4x}*\sin(2x)}{2}dx = \frac{e^{4x}}{4}* \cos(2x) + \frac{e^{4x}\sin(2x)}{8} - \frac{1}{4} *\int e^{4x} \cos(2x) dx$
We now note that the desired integral, $\int e^{4x} \cos(2x)$ $dx$, appears on the right hand side of the equality:
$\int e^{4x} \cos(2x)$ $dx= \frac{e^{4x}}{4}* \cos(2x) + \frac{e^{4x}\sin(2x)}{8} - \frac{1}{4} *\int e^{4x} \cos(2x) dx$
We may now add the integral to the other side $\implies$
$\frac{5}{4}*\int e^{4x} \cos(2x)$ $dx= \frac{e^{4x}}{4}* \cos(2x) + \frac{e^{4x}\sin(2x)}{8} $. Now dividing both sides by $\frac{5}{4}$, we have:
$\int e^{4x} \cos(2x)$ $dx$ = $e^{4x} *\frac{(\sin(2x) + 2\cos(2x))}{10} + C$