Skip to content

Laplace transform involving time-shifts #22422

@mforets

Description

@mforets
mannequin

Sage allows to compute the inverse Laplace transform through Maxima's ilt function,

    sage: var('s t')
    sage: inverse_laplace(1/s, s, t)
    1

An unevaluated expression is returned when no explicit inverse Laplace transform is computed, as in

    sage: inverse_laplace(exp(-s)/s, s, t)
    ilt(e^(-s)/s, s, t)

The result in this case is h(t-1), where h is the Heaviside step function. In Sage it is available as heaviside.

The problem in this ticket is to extend the current behavior of inverse_laplace to provide explicit expressions for proper real-rational functions with any number of real exponentials linear in the transform variable s (time-shifts) in the numerator. For consistency, the direct Laplace transform with a heaviside should also work as well.

These are some approaches:

(1) Implement an in-house solution, possibly in the lines of this answer.

(2) Add an algorithm flag that allows to choose sympy (similar to integration).

(3) Interface with Giac/XCAS. With this package installed, it is possible to do:

sage: giac('invlaplace(exp(-s)/s, s, t)')
Heaviside(t-1)

IMHO, a combination of (2)-(3) is the more robust approach. A small set of experiments show that (3) is, at the time of writing, more convenient than inverse_laplace_transform of SymPy in terms of quality of solution and execution time. Unfortunately, the giac interface does not currently support automatic translation back to the symbolic ring, as it does with SymPy objects via SR(..).

Any recommendations?

See also:

CC: @kcrisman @paulmasson @frederichan-IMJPRG @rwst

Component: calculus

Keywords: laplace, transform, symbolics, giac, heaviside

Author: Marcelo Forets

Branch/Commit: f845269

Reviewer: Paul Masson, Ralf Stephan

Issue created by migration from https://trac.sagemath.org/ticket/22422

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions