[Math] Writing a sum of unit step functions as a piecewise function

laplace transformordinary differential equations

After taking the inverse Laplace transform of the following

$$\mathcal{L}^{-1}\{G(s)\}=\mathcal{L}^{-1}\left\{\frac{e^{-2s}+e^{-3s}}{s^2-3s+2}\right\}$$

I have $g(t)=\mathcal{U}(t-2)[e^{2(t-2)}-e^{t-2}]+\mathcal{U}(t-3)[e^{2(t-3)}-e^{t-3}]$, where $\mathcal{U}$ is the unit step/Heaviside function. Now, I'm trying to write $g$ as a piecewise function, and I'd like to know if this is correct, based on how $g(t)$ is written as a sum of unit step functions:

$g(t) = \begin{cases} 0 &\mbox{if } t \lt 2 \\
e^{2(t-2)}-e^{t-2} & \mbox{if } 2\leq t \lt 3 \\
e^{2(t-3)}-e^{t-3} & \mbox{if } t \geq 3 \end{cases}$

There are no examples in my text in which we have a sum of step functions where the $a$ in $\mathcal{U}(t-a)$ differs, so this is my best shot at converting $g$ into a piecewise function.

Best Answer

From $$g(t)=\mathcal{U}(t-2)[\color{blue}{e^{2(t-2)}-e^{t-2}}]+\mathcal{U}(t-3)[\color{red}{e^{2(t-3)}-e^{t-3}}]$$ where $\mathcal{U}$ is the unit step/Heaviside function, you rather get

$$g(t) = \begin{cases} 0 &\mbox{if } t \lt 2 \\ e^{2(t-2)}-e^{t-2} & \mbox{if } 2\leq t \lt 3 \\ \color{blue}{e^{2(t-2)}-e^{t-2}}+\color{red}{e^{2(t-3)}-e^{t-3}} & \mbox{if } t \geq 3. \end{cases}$$

Related Question