Let's say you have used the Laplace transform to solve an ordinary differential equation. You have a rational function in the s
domain, and you need to transform it back to the original problem domain. Here are some tools you can use to manipulate the symbolic expression to make it easier to perform the inverse Laplace transform:
var('s') F(s) = (s + 1) / (s^2 * (s + 2)^3) show(F) print("Numerator: ") show(F.numerator()) print("Denominator: ") show(F.denominator()) print("Expanded:") show(F.expand_rational()) print("Partial fraction expansion:") pf(s) = F.partial_fraction() show(pf)
The results are shown in the following screenshot: