# Problems with LaPlace transform when 'a' is negative in e^-at

var('s t')
f = t^(-1)*exp(-t)-t^(-1)*exp((-3)*t)
f.laplace(t,s)


The above transform works as expected, however, when (-3) is changed to (3), I get the following error:

Traceback (click to the left of this block for traceback)
...
TypeError: ECL says: Maxima asks: Is  s-3  positive, negative, or zero?


The Solution that I am expecting is:

log((s - 3)/(s + 1))


I don't know how to specify if s-3 is positive, negative, or zero. Any ideas?

Thanks, Taylor Killian

edit retag close merge delete

Sort by » oldest newest most voted You can use the assume command:

sage: var('s t')
(s, t)
sage: f = t^(-1)*exp(-t)-t^(-1)*exp((3)*t)
sage: f.laplace(t,s)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[...]
TypeError: ECL says: Maxima asks: Is  s-3  positive, negative, or zero?

sage: assume(s-3>0)
sage: f = t^(-1)*exp(-t)-t^(-1)*exp((3)*t)
sage: f.laplace(t,s)
log((s - 3)/(s + 1))


This mostly works, at least for simple enough conditions.

more