Laplace Transform of a periodic function. Can not obtain the right answer. If $f(t) = 1$ when $0 \leq t < 1$, and $0$ when $1 \leq t < 2$, where $f(t+2) = f(t)$, find the Laplace transform.
I have been at this problem for awhile now and can never get the right answer. The answer in the back of the book is $\displaystyle \frac{\frac{1}{s}}{1+e^{-s}}$. I always just get $\displaystyle \frac{1}{s}$ when I do it.

For a periodic function, $f(t)$ that has period $T$, we have:
$$ \displaystyle \mathcal{L} (f(t)) = \frac{\int_0^{T} e^{-st} f(t) dt}{1-e^{-sT}}$$
Since we have a piecewise function, we get:
$$ \displaystyle \mathcal{L} (f(t)) = \frac{\int_0^{1} e^{-st}(1) dt}{1-e^{-2s}} = \frac{-\frac{1}{s} (e^{s}-1)}{1 - e^{-2s}} =  \frac{\frac{1}{s}}{1 + e^{-s}}$$
Note: $\displaystyle (1-e^{-2s}) = (1+e^{-s})(1-e^{-s})$.
