# Homework Help: Laplace transform of a piecewise function

1. Nov 8, 2012

### fluidistic

1. The problem statement, all variables and given/known data
I must calculate the Laplace transform of the following function:
$f(x)=1$ for $x \in [0,1] \cap [2,3] \cap [4,5] \cap$ ... , $f(x)=0$ otherwise.

2. Relevant equations
The Laplace transform is $\mathbb{L} [f(x)]=\int _0 ^{\infty} e^{-sx}f(x)dx$.

3. The attempt at a solution
I've applied the formula of the definition of the Laplace transform to the function. It gave me $\mathbb{L} [f(x)] = \int _0 ^1 e^{-sx}dx+\int _2 ^3 e^{-sx}dx+... =\left ( -\frac{1}{s} \right ) (e^{-s\cdot 1} - e^{-s\cdot 0}+e^{-3s}-e^{-2s}+...)=\frac{1}{s} \sum _{n=0}^{\infty} (-1)^n e^{-ns}$.
What bothers me is that I don't recognize any closed form for this solution, hence the doubt of weather I'm right so far and if I'm missing any simplification.
Any input will be happily received.

2. Nov 8, 2012

### vela

Staff Emeritus
I think you mean $x \in [0,1] \cup [2,3] \cup \cdots$. According to what you wrote, f(x)=0 for all x, so F(s)=0.

You can write
$$\sum_{n=0}^\infty (-1)^n e^{-ns} = \sum_{n=0}^\infty (-e^{-s})^n.$$ You should recognize the form of that series.

3. Nov 9, 2012

### fluidistic

Yes.
I see, so the answer would be $\left ( \frac{1}{s} \right ) \left ( \frac{1}{1+e^{-s}} \right )$ right?
Thanks a million for your help!