Laplace transform of a derivative

35 views
Skip to first unread message

Staffan Lundberg

unread,
Jan 18, 2021, 4:42:00 AM1/18/21
to sympy

I am working with a project to replace Matlab with Python, in a calculus course.
Issue: Current versions of SymPy can not explictliy generate the Laplace transform of a derivative.
This is no problem for Matlab. Let me provide an example. In Matlab code:
syms s y(t) Y
# 1st and 2nd derivative of y wrt t
Dy=diff(y(t),t);
D2y=diff(Dy,t);
laplace(Dy)
laplace(D2y)

# Matlab output::
ans =
s*laplace(y(t), t, s) - y(0)
ans =
s^2*laplace(y(t), t, s) - s*y(0) - subs(diff(y(t), t), t, 0)

This property is crucial when solving  Initial Value Problems without Python's dsolve routine.
I address this issue to SymPy developers. Hope that future SymPy versions will do these calculations.

Eric Barth

unread,
Feb 22, 2022, 5:31:44 PM2/22/22
to sympy
Hi Staffan,

I'm thinking of switching from Maxima to python in my math classes, and I recently noticed the same issue you're talking about.  
I have a prototype laplace() code that I believe handles derivatives correctly when solving linear IVPs.  
You can read about it at 

I'd be very happy to hear from others if this is useful to you.
Eric
Reply all
Reply to author
Forward
0 new messages