Ask Your Question

Revision history [back]

Is this what you want?

sage: var('s')
sage: var('t')
sage: L = (s-3)/(s^2-3*s+2)
sage: L.partial_fraction()
2/(s - 1) - 1/(s - 2)
sage: L.inverse_laplace(s,t)
-e^(2*t) + 2*e^t
sage: L.partial_fraction().inverse_laplace(s,t)
-e^(2*t) + 2*e^t

Once you have an expression like L = (s-3)/(s^2-3*s+2), if you type L.<TAB>, it will produce a list of all of the available methods. In this case there are a lot of possibilities, but inverse_laplace and partial_fraction are two of them. (If you can guess that something like partial_fraction might be there, you can also type L.p<TAB> or<TAB> to get a much shorter list.) You can also evaluate L.inverse_laplace? to get documentation.