Integration of $e^{ax}\cos bx$ and $e^{ax}\sin bx$ I am curious about the proof of these two integrations. It would be great if you could point me in the right direction :
$
\int{e^{ax}\cos({bx})dx}= \dfrac{e^{ax}}{a^{2}+b^{2}}[a\cos(bx)+b\sin(bx)] + C
$
&
$
\int{e^{ax}\sin({bx})dx}= \dfrac{e^{ax}}{a^{2}+b^{2}}[a\sin(bx)-b\cos(bx)] + C
$
 A: Integrate by parts.
$$I=\int e^{ax}\cos (bx)\, dx=\left(e^{ax}\right)\left(\frac{\sin(bx)}{b}\right)-\int \left(ae^{ax}\right)\left(\frac{\sin(bx)}{b}\right)\, dx$$
$$=\left(e^{ax}\right)\left(\frac{\sin(bx)}{b}\right)-\frac{a}{b}\int \left(e^{ax}\right)(\sin (bx)\, dx)$$
$$=\left(e^{ax}\right)\left(\frac{\sin(bx)}{b}\right)-\frac{a}{b}\left(\left(e^{ax}\right)\left(\frac{\cos(bx)}{-b}\right)-\int \left(ae^{ax}\right)\left(\frac{\cos(bx)}{-b}\right)\, dx\right)$$
$$=\left(e^{ax}\right)\left(\frac{\sin(bx)}{b}\right)-\frac{a}{b}\left(e^{ax}\right)\left(\frac{\cos(bx)}{-b}\right)-\frac{a^2}{b^2}I$$
Solve for I:
$$I=\frac{b^2}{a^2+b^2}\left(\frac{e^{ax}\sin(bx)}{b}+\frac{ae^{ax}\cos(bx)}{b^2}\right)+C$$
$$=\frac{e^{ax}}{a^2+b^2}\left(b\sin(bx)+a\cos(bx)\right)+C$$
Now find $\int e^{ax}\sin(bx)\, dx$ in an analogous way.
A: By far the easiest way to prove this is to write (omitting the arbitrary constant of integration)
$$\int e^{ax}\cos bx\;dx + i\int e^{ax}\sin bx\;dx = \int e^{ax}(\cos bx + i\sin bx)\;dx = \int e^{(a+bi)x}\;dx$$
$$=\frac1{a+bi}e^{(a+bi)x} =\frac{a-bi}{a-bi}\cdot\frac1{a+bi}e^{(a+bi)x}=\frac{a-bi}{a^2+b^2}e^{(a+bi)x}$$
$$=\frac{e^{ax}}{a^2+b^2}(a-bi)(\cos bx + i\sin bx)$$
$$=\frac{e^{ax}}{a^2+b^2}\big[(a\cos bx+b\sin bx) + i(a\sin bx - b\cos bx)]$$
$$=\frac{e^{ax}}{a^2+b^2}(a\cos bx+b\sin bx) + i\frac{e^{ax}}{a^2+b^2}(a\sin bx - b\cos bx)$$
Equating real parts, and equating imaginary parts, we obtain
$$\boxed{\int e^{ax}\cos bx\;dx = \frac{e^{ax}}{a^2+b^2}(a\cos bx+b\sin bx)}$$
$$\boxed{\int e^{ax}\sin bx\;dx = \frac{e^{ax}}{a^2+b^2}(a\sin bx - b\cos bx)}$$
as desired.
The essential part of this, and the part to remember, is simply that
$\int e^{(a+bi)x}\;dx = \frac1{a+bi}e^{(a+bi)x}$.
A: An hint: $cos(bx)=\frac{e^{ibx}+e^{-ibx}}{2}$
