6
$\begingroup$

I defined a rectangle function as below:

rect[t_, T_] := (Sign[t] - Sign[t - T])/2

The laplace transform should be

$$ \frac{1-e^{-sT}}{s} $$

But the code below in Mathematica won't work:

LaplaceTransform[rect[t, T], t, s] // Simplify

It just throw out the answer below after some long time:

1/2 (1/s - LaplaceTransform[Sign[t - T], t, s])

I think the problem comes from the factor 'T', because it can handle rect[t,1] or rect[t,10]..., well.

Then how to do the laplace transformation of this function rect[t, T] with 'T' given as a variable.

$\endgroup$

1 Answer 1

8
$\begingroup$

Workaround:

rect[t_, T_] := Sign[t] - HeavisideTheta[t - T];(*Or:Sign[t] - UnitStep[t - T]*)
FullSimplify[LaplaceTransform[rect[t, T], t, s], Assumptions -> T > 0]
(* (1 - E^(-s T))/s  *) 

Edited:

rect[t_, T_] := (Sign[t] - Sign[t - T])/2;
Assuming[T > 0, LaplaceTransform[rect[t, T], t, s]] // Simplify
(* (1 - E^(-s T))/s  *) 
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.