# Unit step function from piecewise

1. Oct 24, 2011

### cdotter

1. The problem statement, all variables and given/known data
$$f(x) = \begin{cases} 0, & t < \pi \\ t - \pi , & \pi \leq t < 2 \pi \\ 0, & t \geq 2 \pi \end{cases}$$

2. Relevant equations
Unit step function:
$$u_c(t) = \begin{cases} 0, & t < c \\ 1 , & t \geq c \\ \end{cases}$$

3. The attempt at a solution

$u_{\pi}(t)(t-\pi) - u_{2 \pi}(t)(t-2 \pi)$ gives me:

$$f(x) = \begin{cases} 0, & t < \pi \\ t - \pi , & \pi \leq t < 2 \pi \\ \pi, & t \geq 2 \pi \end{cases}$$

I'm not sure what to do to get the last inequality correct?

2. Oct 24, 2011

### cdotter

Is $u_{\pi}(t)(t-\pi) - u_{2 \pi}(t)(t- \pi)$ allowed? That does work but the "c" doesn't match.

3. Oct 24, 2011

### cdotter

I figured it out. It is allowed, it just needs forcing.

$u_{\pi}(t)(t-\pi) - u_{2 \pi}(t)(t- \pi) \rightarrow u_{\pi}(t)(t-\pi) - u_{2 \pi}(t)((t- \pi) - \pi)$

Now that it's in the form $u_c(t)(t-c)$, the Laplace transform can be taken:

\begin{aligned} F(s) &= L\{u_{\pi}t(t- \pi)-u_{2 \pi}(t)((t- \pi)- \pi)\}\\ F(s) &= e^{- \pi s}L\{t\} - e^{-2 \pi s}L\{t- \pi\}\\ F(s) &= \frac{e^{- \pi s}}{s^2} - e^{- 2 \pi s} \cdot (\frac{1}{s^2} - \frac{\pi}{s}) \end{aligned}

4. Oct 24, 2011

### SammyS

Staff Emeritus
What the exact wording of the question?

5. Oct 25, 2011

### cdotter

The question asked to take the Laplace transform of the piecewise function. I had to create a step function and use $L\{u_c(t)f(t-c)\} = e^{-cs}L\{f(t)\}$, which I figured out.