Why is the LAPLACE command in the Symbolic Toolbox able to handle ABS(t+1) but unable to process ABS(t-1)?

1 view (last 30 days)
I am using the following commands:
syms t s
laplace(abs(t))
ans =
1/s^2
laplace(abs(t+1))
ans =
1/s^2+1/s
laplace(abs(t-1))
ans =
laplace(abs(t-1),t,s)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The problem seems to stem from Maple not knowing whether or not to assume 't' is greater or less than one. For example, if we do the following, we do receive an answer:
maple('assume (t>1)')
ans =
''
laplace(abs(t-1))
ans =
1/s^2*exp(-s)*exp(s)*(1-s)
So, as a workaround you might try the following:
If we have the following as our problem:
Int(0,INF,'abs(t-1)*exp(-s*t)')
We break the integral up into the following two parts:
part1 = integral(1,INF,'(t-1)*exp(-s*t)')
and
part2 = integral(0,1,'(1-t)*exp(-s*t)')
Where our entire integral is the sum of part1 and part2.
For Part 1, a substitution of the following will give a fairly straightforward Laplace transform:
Tau = t-1
For Part 2, we can use MAPLE to symbolically integrate, and then evaluate at the endpoints. For example:
integral = maple('int','(1-t)*exp(-s*t)','t')
integral =
-1/s*(1/s*(-exp(-s*t)*s*t-exp(-s*t))+exp(-s*t))
end1 = subs(integral,1)
end1 =
-1/s*(1/s*(-exp(-s)*s-exp(-s))+exp(-s))
end2 = subs(integral,0)
end2 =
-1/s*(-1/s+1)
answer = end1 - end2
answer =
-1/s*(1/s*(-exp(-s)*s-exp(-s))+exp(-s))+1/s*(-1/s+1)
This will allow you to calculate the transform of abs(t-1) and similar functions.

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!