how to solve $\int e^{7x}\cos(2x)dx$ I'm having problems to solve this integral, It looks like it will never end because every time I do integration by parts I need to do it again and again...
$$\int e^{7x}\cos(2x)dx$$
$$u=\cos(2x) \ \ \  dv = e^{7x}$$
$$du = -2\sin(2x)dx \ \ \   v = \frac{1}{7}e^{7x}$$
$$\frac {\cos(2x)e^{7x}}{7}-\int \frac{1}{7}e^{7x}(-2\sin(2x))dx$$
$$\frac {\cos(2x)e^{7x}}{7}+\frac{2}{7}\int e^{7x}(-2\sin(2x))dx$$
doing integration by parts again
$\int e^{7x}(-2\sin(2x))dx$
$u = \sin(2x)$ $dv = e^{7x}$
$du = \cos(2x)$ $v =\frac{1}{7}e^{7x}$
$\frac {\sin(2x)e^{7x}}{7} - \frac{2}{7}\int e^{7x}\cos(2x)dx$

You're almost there:
\begin{align}
I &= \int e^{7x}\cos(2x)\,dx \\
&= \frac {\cos(2x)e^{7x}}{7}+\frac{2}{7}\int e^{7x}(-2\sin(2x))\,dx \\
&= \frac {\cos(2x)e^{7x}}{7}+\frac{2}{7}\left(\frac {\sin(2x)e^{7x}}{7} - \frac{2}{7}\int e^{7x}\cos(2x)\,dx\right)\\
&= \frac {\cos(2x)e^{7x}}{7}+\frac {2\sin(2x)e^{7x}}{49} - \frac{4}{49}\int e^{7x}\cos(2x)\,dx\\
&= \frac {7\cos(2x)+2\sin(2x)}{49}e^{7x} - \frac{4}{49}I\\
\end{align}
Thus, by solving for $I$ we get:
$$I = \frac {7\cos(2x)+2\sin(2x)}{53}e^{7x}$$
