Laplace Transformations of a piecewise function This is a piece wise function. I'm not sure how to do piece wise functions in latex.
$$ f(t) =\begin{cases}\sin t &\text{if }  0 \le t < \pi,\\
 0&\text{if }  t \ge \pi.\end{cases} $$
So we want to take the Laplace transform of that equation.
So I get $L\{\sin t\} + L\{0\}$
Using the Laplace identities I get $L\{\sin t\} = \frac{1}{s^{2} + 1}$.
And $L\{0\} = 0$.
So for my answer I get $\frac{1}{s^{2} + 1} + 0$.
But the answer in the back of the book is $$\frac{1 + e^{-\pi s}}{s^{2} + 1}.$$
Where does the $$\frac{e^{- \pi s}}{s^{2} + 1}$$ come from?
 A: Hint: You need to evaluate the integral
$$\int_{0}^{\infty}e^{-st}f(t)dt=\int_{0}^{\pi}e^{-st}\sin t dt$$
Do not use your tables in this case.
A: 
Caveat: One "can't use the identity table of Laplace transforms" when the function one is dealing with is not in the list. The function $f$ is NOT in the list. Hence the only option is to go back to the definition...

By definition, $Lf(s)=\displaystyle\int_0^\infty\mathrm e^{-st}f(t)\mathrm dt=\int_0^\pi\mathrm e^{-st}\sin(t)\mathrm dt$ for every complex number $s$ such that the integral converges (note the upper bound in the integral), hence
$Lf(s)=\frac1{2\mathrm i}(G(s-\mathrm i)-G(s+\mathrm i))$ with
$$
G(z)=\int_0^\pi\mathrm e^{-zt}\mathrm dt=\frac{1-\mathrm e^{-z\pi}}z,
$$
for every $z\ne0$. Thus, for every $s\ne\pm\mathrm i$,
$$
Lf(s)=\frac1{2\mathrm i}(1+\mathrm e^{-s\pi})\left(\frac1{s-\mathrm i}-\frac1{s+\mathrm i}\right)=\frac{1+\mathrm e^{-s\pi}}{1+s^2},
$$
and the remark that $G(0)=\pi$ yields
$$
Lf(s)=-s\frac{\pi}2,\quad s=\pm\mathrm i.
$$
A: A piecewise combination of two functions is not the sum of these two functions.
Rather, your function is $\sin t$ plus a shifted $\sin t$.
More precisely, let
$$g(t)=\begin{cases}\sin t&\text{if }t\ge0,\\0&\text{if }t<0.\end{cases}$$
Then $f(t)=g(t)+g(t-\pi)$.
Do you how to obtain $L\{g(t-\pi)\}$ from $L\{g\}$ (assuming $g(t)=0$ for $t<0$)?
