How to integrate $$\int\frac{\cos(\omega t)\gamma e^{-\gamma t}}{\omega}dt,$$ where $\gamma, \omega \neq 0$.
I tried using substitution $u=\omega t$, $du=\omega dt$ and got $\frac{1}{\omega^2} \int \cos(u) \gamma e^{-\frac{\gamma u}{\omega}} du$ and then integrating by parts, but so far it seems like an endless cycle of substitutions and ind integration by parts, and I can't get to something meaningful. Is there any easy way to compute this?
Edit: Using one of the hints, I arrived at $\frac\gamma\omega\mathrm{Re}\left[\frac{\mathrm{e}^{(i\omega-\gamma)t}}{i\omega-\gamma}+C\right]$, but not sure how do go from here. Have I made any errors here (I am not sure about the denominator)?
In general for $a,b$
$$ \begin{align} I=\int\cos(ax)e^{bx}&={\sin(ax)\over a}e^{bx}-{b\over a}\int\sin(ax)e^{bx}\\ &={\sin(ax)\over a}e^{bx}+{b\cos(ax)\over a^2}-{b^2\over a^2}\int \cos(ax)e^{bx}\\&={e^{bx}(a\sin(ax)+b\cos(ax))\over a^2}-{b^2\over a^2}I \end{align} $$
The on rearrangement gives
$$ \int\cos(ax)e^{bx}={e^{bx}\over a^2+b^2}(b\cos(ax)+a\sin(ax))+C $$
Edit: $$\int{\cos(\omega t)\gamma e^{-\gamma t}\over \omega}\\ ={\gamma\over\omega}\int\cos(\omega t)e^{-\gamma t}\\ ={\gamma\over\omega}{e^{-\gamma x}\over \omega^2+\gamma^2}(\omega\sin(\omega x)-\gamma\cos(\omega x))$$