Laplace Transform... Find the Laplace transform of $t^2e^{at}cos(bt)$
My attempt:   
$\large\mathit{L}\{t^2e^{at}\cos(bt)\}$        
= $\large\mathit{L}\{\frac12t^2e^{at}(e^{ibt}+e^{-ibt})\}$      
...
...
$=\large\dfrac{1}{(s-a-ib)^3} + \dfrac{1}{(s - a +ib)^3}$
Where $i^2 = -1$ 
My current answer right now was from using the Laplace table 
How can I get rid of $i$?
 A: Method 1: Using A Laplace Transform Table
Use Table item $20$:
$$\tag 1 \mathscr{L}(e^{a t} \cos (b t)) = \dfrac{s-a}{(s-a)^2 + b^2}$$
Use Table item $30$ for $\mathscr{L}(t^2e^{at}\cos(bt))$: 
$$\mathscr{L}(t^n f(t)) = (-1)^n F^{(n)}(s)$$
In other words, take the second derivative of the $(1)$, yielding:
$$\dfrac{d^2}{ds^2}\left(\dfrac{s-a}{(s-a)^2 + b^2}\right) =  -\dfrac{2 (a-s) \left(a^2-2 a s-3 b^2+s^2\right)}{\left(a^2-2 a s+b^2+s^2\right)^3}$$
Method 2: use the definition of the Laplace Transform:
$$F(s) = \displaystyle \int_0^\infty~ f(t) e^{- s t}~dt = \int_0^\infty t^2~e^{a t}\cos(b t)e^{- s t}~dt$$
This yields the same result as above:
$$\mathscr{L}(t^2e^{at}\cos(bt)) = -\dfrac{2 (a-s) \left(a^2-2 a s-3 b^2+s^2\right)}{\left(a^2-2 a s+b^2+s^2\right)^3}$$
A: I prefer using more elementary methods and using standard results for the Laplace transform, we'll get to the same answer but with perhaps a little more insight how we got there. I'll leave you to check that they are in fact true. For the last one you may want to consider the Laplace transform of $\mathrm{e}^{iax}$. These are
\begin{align*}
\mathcal{L}(xf(x))(p) &= -\frac{d}{dp} \bar{f}(p) &&\textbf{ (1)} \\
\mathcal{L}(f(x)\mathrm{e}^{ax})(p) &= \bar{f}(p-a) &&\textbf{ (2)} \\
\mathcal{L}(\operatorname{cos}(ax))(p) &= \frac{p}{p^{2} + a^{2}} &&\textbf{ (3)} \\
\end{align*}
So using these, we can deduce that
\begin{align*}
\mathcal{L}(x^{2}\operatorname{cos}(bx))(p) &= \frac{d^{2}}{dp^{2}}\Bigg(\mathcal{L}(\mathrm{cos(x)})(p)\Bigg) &&\text{ by} \textbf{ (1) } \text{twice} \\
 &= \frac{d^{2}}{dp^{2}}\Bigg(\frac{p}{p^{2} + b^{2}}\Bigg) &&\text{ by} \textbf{ (3) } \\
&= \frac{d}{dp}\Bigg(\frac{b^{2} - p^{2}}{(p^{2} + b^{2})^{2}}\Bigg) \\
&=\frac{2p^{3} - 6pb^{2}}{(p^{2} + b^{2})^{3}}
\end{align*}
And further we arrive at 
\begin{align*}
\mathcal{L}(x^{2}\mathrm{e}^{ax}\operatorname{cos}(bx))(p) &=\frac{2(p-a)^{3} - 6(p-a)b^{2}}{((p-a)^{2} + b^{2})^{3}} &\text{by} \textbf{ (2) } \\
&=(p-a)\Bigg(\frac{2(p-a)^{2} - 6b^{2}}{((p-a)^{2} + b^{2})^{3}}\Bigg) \\
&= -2(a-p)\Bigg(\frac{ p^{2} - 2ap + a^{2} - 3b^{2}}{(p^{2} - 2ap + a^{2} + b^{2})^{3}}\Bigg) \\
\end{align*}
Which I believe agrees with Amzoti's answer.
