"Find the Laplace Transform of $f(t)=2$ for $0≤t<3$, $f(t)=0$ for $t≥3.$"
My Work So Far
This is a concept that's explained pretty poorly in my textbook, but I think I'm supposed to make use of:
$L${$u(t-a)f(t-a)$}$=e^{-as}F(s)$
In conjunction with:
$f(t) = f_1 $ for $t_0<t<t_1$, $f_2$ for $t_1<t<t_2 \to$
$f(t) = f_1(u(t-t_0)-u(t-t_1))+f_2(u(t-t_1)-u(t-t_2))$
The issue is that I run into nonsensical values when I try and add this in:
$f(t) = 2(u(t-0)-u(t-3))+0(u(t-3)-u(t-∞))\to$
$f(t) = 2u(t)-2u(t-3)$
I don't have anything in this result that matches the form $u(t-a)f(t-a)$. I'm clearly overlooking something, but am not sure what, and would appreciate any clarification possible.
Method I: Use the definition of the Laplace transform with the piece-wise function
$$\begin{align} F(s)&= \int_0^3 2 ~e^{-st}~dt \\ & = \left.\left(-\dfrac{2e^{-st}}{s}\right)\right|_0^3 \\ & = \left(-\frac{2e^{-3s}}{s}\right) -\left(-\dfrac{2}{s}\right)\\ & = \dfrac{2}{s}\left(1-e^{-3s}\right) \end{align}$$
Method II: Convert the piece-wise to a unitstep
In general, if:
$$f(t)= \left\{\begin{array} fg(t) &0 \le t < a\\h(t) &t \ge a \end{array}\right.$$
then:
$$f(t) = g(t) - g(t)u(t-a) + h(t) u(t-a)$$
In your example, we have:
$$f(t) = 2 - (2)u(t- 3) + (0) u(t- 3) = 2(1 - ~u(t- 3))$$
We find the Laplace transform (use item $25$ in this table of Laplace Transforms) as
$$\mathscr{L} (2(1 - u(t-3)) = 2\left(\dfrac{1}{s} - \dfrac{e^{-3 s}}{s}\right) = \dfrac{2}{s}\left(1 - e^{-3 s}\right)$$
Note that you can also do that last calculation using the Laplace transform definition, but I just wanted to use two different approaches in the solution.