Using the complex definition of $\sin$ to solve an integral Is it possible to use the complex definition of trigonometric identities to simplify integrals? For instance, the integral: $$\int e^{-at}\cos(bt) \, dt$$
Would it be appropriate to use the definition of complex sine and then convert it back after the integration, versus using integration by parts?

This does not add anything to @Michael Hardy's answer but shows the ooold way I learnt !
Consider $$I= \int e^{-at} \cos(bt) \,dt \qquad \text{and} \qquad J=\int e^{-at} \sin(bt) \,dt$$ So
$$I+iJ=\int e^{-(a+ib)t}  \,dt\qquad \text{and} \qquad I-iJ=\int e^{-(a-ib)t}  \,dt$$ that is to say
$$I+iJ=-\frac {e^{-(a+ib)t}}{a+ib}\qquad \text{and} \qquad I-iJ=-\frac {e^{-(a-ib)t} }{a-ib}$$ Adding
$$2I=-\frac {e^{-(a+ib)t}}{a+ib}-\frac {e^{-(a-ib)t} }{a-ib}$$ Expanding the complex numbers and using again Euler's identity, then
$$I=\frac{e^{-a} ( b \sin (b t)- a \cos (b t))}{a^2+b^2}\qquad \text{and} \qquad J=\frac{e^{-a} (a \sin (b t)+b \cos (b t))}{a^2+b^2}$$
