Laplace transform of $\cos(at)$ I need to find the Laplace transform of $\cos(at)$
I know that $L\{\cos(at)\}= \int_{0}^{\infty} e^{-st} \cos (at) dt$ but I am having trouble finding the integral
Thank you
 A: $$\int_0^\infty e^{ct}e^{-st}dt=\int_0^\infty e^{-t(s-c)}=\frac{ e^{-t(s-c)}}{-(s-c)}|_0^{\infty}=\frac1{s-c}\text{ for }s-c>0$$
Putting $c=ib$   $$\int_0^\infty e^{(ib)t}e^{-st}dt=\frac1{s-ib}$$
Using Euler's formula $e^{ix}=\cos x+i\sin x$ 
$$\int_0^\infty (\cos bt+i\sin bt)e^{-st}dt=\frac1{s-ib}=\frac{s+ib}{s^2+b^2}$$
Equating the real parts, 
$$\int_0^\infty (\cos bt) e^{-st}dt =\frac{s }{s^2+b^2}$$

Alternatively, 
$$\int e^{at}\cos btdt=\cos bt\int e^{at}dt-\int\left(\frac{\cos bt}{dt} \int e^{at}dt\right)dt$$
$$=\frac{e^{at}\cos bt}a+\frac ba\int e^{at}\sin bt dt $$
So, $$\int e^{at}\cos btdt=\frac{e^{at}\cos bt}a+\frac ba\int e^{at}\sin bt dt$$
Converting $bt$ to $bt-\frac\pi2$ as $\cos\left(bt-\frac\pi2\right)=\cos\left(\frac\pi2-bt\right)=\sin bt$ and $\sin\left(bt-\frac\pi2\right)=-\sin\left(\frac\pi2-bt\right)=-\cos bt$
$$\int e^{at}\sin btdt=\frac{e^{at}\sin bt}a-\frac ba\int e^{at}\cos bt dt$$
So, $$I=\int e^{at}\cos btdt=\frac{e^{at}\cos bt}a+\frac ba\left(\frac{e^{at}\sin bt}a-\frac ba\int e^{at}\cos bt dt \right)$$
$$\implies I=\frac{e^{at}\cos bt}a+\frac b{a^2}e^{at}{\sin bt}- \frac{b^2}{a^2}I $$
$$\implies \int e^{at}\cos btdt=I=\frac{e^{at}(a\cos bt+b\sin bt)}{a^2+b^2} $$
$$a=-s, \int e^{-st}\cos btdt=I=\frac{e^{-st}(-s\cos bt+b\sin bt)}{s^2+b^2} $$
$$\int_0^\infty (\cos bt) e^{-st}dt =\frac{e^{-st}(-s\cos bt+b\sin bt)}{s^2+b^2}|_0^\infty=\frac s{s^2+b^2}  $$
A: Hint: integrate by parts twice.
A: Integration by Parts formula:
$\displaystyle \int u \ dv = u v - \int v \ du$
Note: The limits are not taken care of here. Make sure you plug them in later.
Let us put $\displaystyle S = \int e^{a x} \sin bx \ dx$ and $\displaystyle C = \int e^{a x} \cos bx \ dx$.
Let us consider the integral $\displaystyle S =  \int e^{a x} \sin bx \ dx$
Let $u = \sin bx$ and $dv = e^{ax}$.
Then:
$$S = \int e^{a x} \sin bx \ dx = \frac {e^{a x} \sin bx} a - \int \frac {e^{ax} } a b \cos bx \ dx = \frac {e^{a x} \sin bx} a - \frac b a \int e^{ax} \cos bx \ dx = \frac {e^{a x} \sin bx} a - \frac b a C $$
Now consider $\displaystyle C = \int e^{a x} \cos bx \ dx$:
Let $u = \cos bx$ and $dv = e^{ax}$.
Then:
$$ C = \int e^{a x} \cos bx \ dx =\frac {e^{a x} \cos bx} a - \int \frac {e^{ax} } a \left({-b \sin bx}\right) \ dx =\frac {e^{a x} \cos bx} a + \frac b a \int e^{ax} \sin bx \ dx = \frac {e^{a x} \cos bx} a + \frac b a S $$
Eliminate either $S$ or $C$ and obtain the result required.
$$ S \left({a^2 + b^2}\right)=e^{a x} \left({a \sin bx - b \cos bx}\right) \text{ and }$$
$$ C \left({a^2 + b^2}\right)=e^{a x} \left({a \cos bx + b \sin bx}\right) $$
I leave the limit substitution for you to find out.
