Inverse Laplace Transform in sympy 1.3 returns InverseLaplaceTransform(s**2/(s**2 + 5*s + 4), s, tiempo, _None)

250 views
Skip to first unread message

Alan Gabriel Barrios Muñoz

unread,
Mar 21, 2019, 2:37:55 PM3/21/19
to sympy
Hello
I am using sympy to get the inverse laplace transform, but when the system compute it, I get InverseLaplaceTransform(s**2/(s**2 + 5*s + 4), s, tiempo, _None) and sympy only do it with the transfer function showed in this example.
The next photos shows the inverse laplace transform of s**2/(s**2 + 5*s + 4) with sympy and then with wolfram mathematica, thank you for your answers.

1.png

with sympy


2.png

with worlfram mathematica



sing...@iitj.ac.in

unread,
Mar 22, 2019, 4:03:16 AM3/22/19
to sympy
If you think this is something that didn't work the way you wanted, kindly raise the issue here, if you are on github. I would work on it. :-)

Regards,
Gagandeep Singh
(Github ID - czgdp1807)

sing...@iitj.ac.in

unread,
Mar 22, 2019, 7:24:29 AM3/22/19
to sympy
The temporary solution to your problem is the following code,

```
from sympy import *
s = symbols('s')
F = apart(s**2/(s**2 + 5*s + 4))
print(F)
c, t = symbols('c, t')
exp = inverse_laplace_transform(F, s, t)
print(exp)
```

Output:
`DiracDelta(x) + exp(-x)*Heaviside(x)/3 - 16*exp(-4*x)*Heaviside(x)/3`

Regards,
czgdp1807
On Friday, March 22, 2019 at 12:07:55 AM UTC+5:30, Alan Gabriel Barrios Muñoz wrote:
Reply all
Reply to author
Forward
0 new messages