# An improved Maxima function for inverse Laplace transform

Maxima has a fairly serviceable Laplace transform utility built-in.  Here’s an example from the popular ordinary differential equations book by Blanchard, Devaney and Hall:

Trouble arises when we look at discontinuous forcing functions, which is especially sad because it seems to me that’s what makes it worthwhile to spend time with Laplace transforms.  In particular, the inverse transform function ilt() fails on the Heaviside Function and Dirac Delta, even though the built-in laplace() treats them correctly:

So, I’ve written an alternative inverse Laplace function laplaceInv() that fixes that problem:

Here are a few differential equation solutions to show how the new function behaves:

A second-order linear equation with a constant forcing function that vanishes at $t=7$

A second-order equation with two impulsive forces:

## 3 thoughts on “An improved Maxima function for inverse Laplace transform”

1. Thanks. I’ve had exactly the same problem when I was trying to solve few electric circuits with step input.

Like

2. Edward Montague says:

The fractional calculus, via the Laplace and Inverse Laplace Transform, is of
some value in solving differential equations and possibly circuits with non
linear components.
Might you implement this for Maxima.

Like

3. igvbar says:

Very useful!!
Thanks!

Like