# Find Laplace Transform of the function

$$f_T(t)=\begin{cases}2, & 0\leq t < T \\ 1, & t\geq T \end{cases}$$

-
Hello @SF, welcome to Math.SE! I've edited to include TeX so that your function displays well. But please, start to become used to include more information, what have you tried and so on so that you get better answers to your question. –  user1620696 May 5 '13 at 0:59
thankyou @user1620696, I appreciate your comments and will include my working out even if its wrong from now on –  S F May 5 '13 at 1:22

Another way to look at this is to see that there is a complete LT, plus some extra. To wit:

$$\hat{f}(s) = \int_0^{\infty} dt \, e^{-s t} + \int_0^{T} dt \, e^{-s t}$$

This is easy to evaluate:

$$\hat{f}(s) = \frac{1}{s} + \frac{1}{s} \left ( 1-e^{-s T}\right) = \frac{2-e^{-s T}}{s}$$

-
so $$\int_{0}^{T}2\,e^{-st}dt + \int_{T}^{\infty}1\,e^{-st}dt$$ is not the final answer ? it need more work to get the final solution –  S F May 5 '13 at 1:43
@SF: it should work out to be the same thing. –  Ron Gordon May 5 '13 at 3:10
I get the final answer $$\hat{f}(s) = \frac{2e^{-s T}}{-s}- \frac{1}{-s} -\frac{1}{-s}$$ The denominator will be -s and have to multiply by 2 that went outside the integral –  S F May 7 '13 at 21:48
@SF: check your work again; I get exactly the same answer either way. I do not know how you got yours, but I disagree. –  Ron Gordon May 7 '13 at 21:52
@SF: The first integral is equal to $$2 \frac{1-e^{-s T}}{s}$$ while the second is equal to $$\frac{e^{-s T}}{s}$$. Add these. –  Ron Gordon May 7 '13 at 22:11

Here is it $$\int_{0}^{\infty}f_T(t)e^{-st}dt=\int_{0}^{T}2\,e^{-st}dt + \int_{T}^{\infty}1\,e^{-st}dt$$

$$= 2\int_{0}^{T}e^{-st}dt + \int_{T}^{\infty} e^{-st}dt$$

$$= 2 \frac{e^{-st}}{-s}\Big|_{0}^{T} + \frac{e^{-st}}{-s}\Big|_{T}^{\infty}=\dots\,.$$

I think you can finish it now. Note that you need to assume $Re(s)>0$.

-
thanks could you explain how you got that answer ? normally I work out Laplace transform using page 2 of stanford.edu/~boyd/ee102/laplace-table.pdf . Do you have a link to a document which explains the method you have used ? –  S F May 5 '13 at 1:03
You have a piecewise continuous function, so just split the interval of integration. –  Mhenni Benghorbal May 5 '13 at 1:06
the method I use involved reading off the table, I dont use an interval. Is their another method of finding the laplace transform ? –  S F May 5 '13 at 1:20
You don't need to use Laplace transform tables to do this one... Just evaluate the integrals as they are now with basic calculus knowledge. –  Cameron Williams May 5 '13 at 1:23
thankyou, so the correct method to do thees types of question. Is to multiply the function by e^-st with the limits given in the question. –  S F May 5 '13 at 1:31

For piece-wise defined functions, such as your example, you either apply the definition, as Mhenni solution shows (and that is the easiest for this example) or if you want a more general approach you need to read about the step function also known as Heaviside function. Here is a brief description of what is involved.

For $c\ge0$ define the step function as $u_c(t)=\cases{ 0 & if$t<c$\cr 1 & if$c<t$\cr }$.

Use Mhenni approach (i.e. definition of Laplace transform) to find $\displaystyle \cal L[u_c(t)]={e^{-cs}\over s}$.

Next you need to derive the shift and switch'' formula $\displaystyle {\cal L}[u_c(t) f(t-c)]={e^{-cs} F(s)}$.

Now if you have a piece-wise defined function as in $f(t)=\cases{ f_1(t) & if$t<c_1$\cr f_2(t) & if$c_1<t<c_2$\cr f_3(t) & if$c_2<t$}$, for some given $0\le c_1 < c_2$, write it as $f(t)=f_1(t)+u_{c_1}(t)(f_2(t)-f_1(t))+u_{c_2}(t)(f_3(t)-f_2(t))$, then apply whatever algebra is necessary to match the shift and switch times to use that formula. This generally means that if you have $g(t)=g_1(t)+u_{c_1}(t)g_2(t)+u_{c_2}(t)g_3(t)$ you rewrite it as $g(t)=g_1(t)+u_{c_1}(t)g_2(t-c_1+c_1)+u_{c_2}(t)g_3(t-c_2+c_2)$ and expand each of these functions using whatever identities apply to them.

-
thanks, I will read up on Heaviside Function.There is little mention of this in my lecture notes, are there any online sites which discuss it than you recommend ? –  S F May 5 '13 at 1:45
–  Maesumi May 5 '13 at 1:58
wow thanks soo much, you have potentially saved me 1000s of dollars –  S F May 5 '13 at 2:13