Unit step function/Heaviside function.

well i have 2 questions.

1) Consider the function given below:

f(t) = 0, 0 < t < 2

sin(t) t > 2

Find the Laplace transform of the function,

Well what i found was:

L[f(t)] = L { 0.[H(t-0) - H(t-2)] + sin(t).H(t-2)}

= integration from 0 to 2 for 0.exp^(-st) + integration from 2 to

infinity for sin(t).exp(-st)

= 0 + integration from 2 to infinity for sin(t).exp(-st)

if i were to use integration by parts will end up with:

= const + integration from 2 to infinity for cos (t).exp(-st)/s

which brings me back to my initial problem of integrating the trigonometry.

So my question now is how do i solve this unending integration?

2) Doing some exercise in a maths book i found another similar question:

f(t) = sin(t), 0 <= t <= p

0 t >= pi

and the goven answer was:

[ 1+ exp(-s.pi) ]/ (s^2 +1)

so what i did for this question was:

L{f(t)} = L{ sin(t) [H(t-0) - H(t-pi)] + 0.H(t-pi)}

= L{ sin(t).H(t)} - L{sin(t).H(t-pi)}

= 1/(s^2 +1) - [exp(-s.pi)] / [(s^2 +1)]

= [ 1+ exp(-s.pi) ]/ (s^2 +1)

the formula given for the heaviside function was:

L{f(t-a)H(t-a)} =exp(-as).F(s)

In the above solution i made i didn't used the general form whereby i was suppose to use L{sin(t-pi).H(t-pi)} instead of L{sin(t).H(t-pi)}. still i get the same answer.

then i look at other examples like:

L{exp(-t).H(t-6)}

the answer was exp[-6(s+1)]/(s+1)

if i were to do the same thing:

a = 6

L{exp(-t)} = 1/(s+1)

since it is a shifting function the solution for the heaviside will be exp[6(s+1)]

combining both i will get exp[-6(s+1)]/(s^2 +1)

**So my question is it correct in what i am doing where i straight away perform Laplace transform on the function before the heaviside without converting (taking the last example) exp(-t) to exp[-(t-6)] before doing the calculations? my lecturer taught me to convert it but i am not sure about the way i am solving it now **

well as a matter of fact i dont really understand how heaviside works yet so this questions could have already been solved or part of the theory itself o.o"

All help is appreciated.