# Laplace Transform $f(t)=2\cos(3t)$

Determine the laplace transform of the function $f(t)=2\cos(3t)$, without using the table of Laplace transforms.

I use by part integration to solve it, with $u=e^{-st},\, du/dt=-se^{-st}$ and $v=\frac{2}{3}\sin(3t)$. I get $0$ at the end since $\lim_{t\rightarrow \infty} e^{-st}$ and $-se^{-st}$ is $0$. However, the graphic calculator shows the answer is $1/5$.

So how to solve this question?

\begin{align} \mathscr{L} (2 \cos(3t)) & = \int_0^{\infty} ~ 2 \cos(3 t) e^{-s t}~dt \\ \\ &= \dfrac{e^{-s t}( 6 \sin(3 t) - 2 s \cos(3 t))}{s^2 + 9}~\Bigr|_{t=0}^{t = \infty} \\ \\ &= \dfrac{2s}{s^2+9}\end{align}
Consider $$\mathcal{L}[a\cos bx](s)=a\int_0^\infty e^{-sx}\cos(bx)\mathrm dx$$ Then recall that $$\cos x=\text{Re}\,e^{ix}$$. Hence we have $$\mathcal{L}[a\cos bx](s)=a\,\text{Re}\int_0^\infty e^{-(s-ib)x}\mathrm dx$$ Which is \begin{align} \mathcal{L}[a\cos bx](s)&=a\,\text{Re}\,\frac1{s-ib}\\ &=a\,\text{Re}\,\frac{s+ib}{s^2+b^2}\\ &=\frac{as}{s^2+b^2} \end{align} Your case is of course given by $$a=2$$ and $$b=3$$.