Integrate $\int e^{3x}\cos{5x} \ dx$. Can anyone please help me with this integral?
I perform a couple of substitutions and a couple of integration by parts and I get onto the right track I feel but then I get to a point where I have:
$\frac{e^{3x}\sin(5x)\ dx}5 - 3(\frac{3\int \cos(5x)e^{3x} \ dx}5 )-$... a whole bunch of other stuff all over 5 and then over 5 again (I won't annoy any further you with my inability to format correctly).
But...I have my original integral in the equation? And I put it into a solver and they have the same thing? So how can this ever be solved? I don't get it!
 A: Hint: 
$$\int e^{3x}\cos{(5x)}\mathrm{dx}=Re[\int e^{3x}e^{i5x}\mathrm{dx}]=Re[\int e^{3x+i5x}\mathrm{dx}]=Re[\frac{e^{3x+i5x}}{3+5i}]$$ Where $Re$ returns the real part of the complex expression inside the brackets.
A: Let $$\displaystyle I = \int e^{ax}\cdot \cos (bx)dx$$
Then Using Integration by parts, we get
$$\displaystyle I = e^{ax}\int \cos (bx)dx-\left[\frac{d}{dx}\left(e^{ax}\right)\cdot \int \cos (bx)dx\right]dx$$
$$\displaystyle I = e^{ax}\cdot \frac{\sin (bx)}{b}-\frac{a}{b}\int e^{ax}\cdot \sin (bx)dx$$
Now Again Using Integration by parts, we get
$$\displaystyle I = e^{ax}\cdot \frac{\sin (bx)}{b}-\frac{a}{b}\left[-e^{ax}\cdot \frac{\cos (bx)}{b}+\frac{a}{b}\int e^{ax}\cdot \cos (bx)dx \right]$$
So we get $$\displaystyle I = e^{ax}\cdot \frac{\sin (bx)}{b}+\frac{a}{b^2}\cdot e^{ax}\cdot \frac{\cos (bx)}{b}-\frac{a^2}{b^2}\int e^{ax}\cdot \cos (bx)dx+\mathcal{C}$$
So we get $$\displaystyle I = \frac{e^{ax}\cdot \left(a\cos (bx)+b\sin (bx)\right)}{b^2}-\frac{a^2}{b^2}I+\mathcal{C}$$
So we get $$\displaystyle I = \int e^{ax}\cdot \cos (bx)dx = \frac{e^{ax}\cdot \left(a\cos (bx)+b\sin (bx)\right)}{a^2+b^2}+\mathcal{C}$$
