Sorry for the simple question, I think when I find the answer I'll be like "ow how I didn't notice this..." Unfortunately I'm bad at math and i need help on this. So I don't understand the result of this: $$\int e^x\cos(2x)\,dx$$
Okay I integrated by parts twice and got this: $$e^x\cos(2x)-\left( -2e^x\sin(2x)+4\int e^x\cos(2x)\,dx \right)$$
So we found our inital integral here and so we can isolate it. But the result is: $$\int e^x\cos(2x)\,dx = \frac{2e^x\sin(2x)+e^x\cos(2)}5 +C$$
I'm having problem isolating our integral. I have no idea what happened to the 4 multiplying the integral and I have no idea where this $5$ came from.
See that the original integral popped out in the right side. So call your integral:
$$I=\int e^x \cos{2x} \space dx$$
So now you have that: $$I=e^x \cos{2x}+2e^x \sin{2x} -4I$$
And now you can just solve for I (you have an equation), and you have your integral (plus the constant, of course):
$$I=\frac{e^x \cos{2x}+2e^x \sin{2x} }{5}+C$$