Inverse laplace transform and Post integration formula - symbolic derivative?

85 views
Skip to first unread message

Maurizio

unread,
Feb 26, 2009, 5:49:19 AM2/26/09
to sage-support
Hi all,

what do you think about the inverse_laplace() now present in SAGE?

I am not very satisfied, I am not able to derive the results for even
simple functions.
What I'd like is to get numerical results, so I thought there should
have been a way to obtain them, but I didn't find. Can you help me?

In addition, I found on the net the Post's inversion Laplace formula
( http://en.wikipedia.org/wiki/Post%27s_inversion_formula ). It has
been successfully implemented in Maple, here:
http://www.mapleprimes.com/blog/alec/numerical-inverse-laplace-transform-0

I wanted to try this out in SAGE, but the problem seems to be the
necessity of doing the k-th derivative of the function, where k is a
symbolic variable (that has to go to +Infinity then). I couldn't do
that, do you know if that's possible?

Thank you very much

Regards

Maurizio

Reference: http://www.rose-hulman.edu/~bryan/invlap.pdf

Robert Bradshaw

unread,
Feb 26, 2009, 3:13:27 PM2/26/09
to sage-s...@googlegroups.com
On Feb 26, 2009, at 2:49 AM, Maurizio wrote:

>
> Hi all,
>
> what do you think about the inverse_laplace() now present in SAGE?
>
> I am not very satisfied, I am not able to derive the results for even
> simple functions.

It is a simple wrapper around the maxima inverse laplace function.

> What I'd like is to get numerical results, so I thought there should
> have been a way to obtain them, but I didn't find. Can you help me?
>
> In addition, I found on the net the Post's inversion Laplace formula
> ( http://en.wikipedia.org/wiki/Post%27s_inversion_formula ). It has
> been successfully implemented in Maple, here:
> http://www.mapleprimes.com/blog/alec/numerical-inverse-laplace-
> transform-0
>
> I wanted to try this out in SAGE, but the problem seems to be the
> necessity of doing the k-th derivative of the function, where k is a
> symbolic variable (that has to go to +Infinity then). I couldn't do
> that, do you know if that's possible?

Not that I am aware of at the moment, but if it would be great if
someone (for instance you) could implement it and send us a patch.

- Robert


Maurizio

unread,
Feb 26, 2009, 4:31:24 PM2/26/09
to sage-support
Well, that was exactly what I was going to do, but I have no idea how
to implement something like a (symbolic) k-th order derivative, such
that I could then do the limit. Moreover, the derivative seems to be
something close to the core of something like a CAS, so I don't think
I could be able to help for that.

That's why I was asking for help at least for this derivative part
(and maybe also the limit is not so easy as well).

I will really try to be helpful, but I still need some support

Regards

Maurizio

On 26 Feb, 21:13, Robert Bradshaw <rober...@math.washington.edu>
wrote:
> On Feb 26, 2009, at 2:49 AM, Maurizio wrote:
>
>
>
> > Hi all,
>
> > what do you think about the inverse_laplace() now present in SAGE?
>
> > I am not very satisfied, I am not able to derive the results for even
> > simple functions.
>
> It is a simple wrapper around the maxima inverse laplace function.
>
> > What I'd like is to get numerical results, so I thought there should
> > have been a way to obtain them, but I didn't find. Can you help me?
>
> > In addition, I found on the net the Post's inversion Laplace formula
> > (http://en.wikipedia.org/wiki/Post%27s_inversion_formula). It has

Robert Bradshaw

unread,
Feb 26, 2009, 5:16:35 PM2/26/09
to sage-s...@googlegroups.com
This is outside my area of expertise, so I don't have any immediate
pointers, but hopefully the new symbolics will have abilities to do
something like this.

- Robert

Maurizio

unread,
Feb 26, 2009, 5:32:19 PM2/26/09
to sage-support
To the best of my knowledge, the new symbolic (are you referring to
pynac?) should just be considered as the core of symbolic, and the
utilities functions should be continue to exist on top of SAGE (or any
other package actually used, like maxima).

Unfortunately, it seems that the inverse laplace function from maxima
is not the very best, see:
http://www.math.utexas.edu/pipermail/maxima/2007/008424.html
http://www.math.utexas.edu/pipermail/maxima/2006/000036.html

Is there any sort of representation of piecewise functions in SAGE?
What about delta function (heaviside) or unit step? These are basics
for implementing inverse laplace in my opinion.

Maxima already has delta() function, and signum() function (that can
be good to represent the unit step, I don't know if it's already built-
in maxima function), can we take advantage of that?
http://www.math.utexas.edu/pipermail/maxima/2006/003249.html

There has been a short discussion about that here:
http://groups.google.com/group/sage-devel/browse_frm/thread/7f33e7001e480d47/4f46fff6a387becc?lnk=gst&q=maxima+delta#4f46fff6a387becc

I know I can seem pretty boring, but I really think that SAGE has a
great potential, and I would like to enhance its engineering power! As
it is right now, it still lacks something from that point of view. For
example (I know, I always go off-topic), has a good units of
measurement manager ever been included? Also about that you had a long
discussion, but I don't know the results:
http://groups.google.com/group/sage-devel/browse_frm/thread/8791448b7a303ce9/9dc4cc27e6d4eafb?lnk=gst&q=units#9dc4cc27e6d4eafb

Please, forgive me again for being so annoying

Maurizio

On 26 Feb, 23:16, Robert Bradshaw <rober...@math.washington.edu>
wrote:

Maurizio

unread,
Feb 26, 2009, 5:35:49 PM2/26/09
to sage-support
Robert,
do you consider these issues relevant? If so, do you consider
worthwhile to forward this discussion to the devel group? I'm sorry,
but I'm always reluctant about choosing where to post my (too
numerous) questions.

Regards

Maurizio

On 26 Feb, 23:32, Maurizio <maurizio.gran...@gmail.com> wrote:
> To the best of my knowledge, the new symbolic (are you referring to
> pynac?) should just be considered as the core of symbolic, and the
> utilities functions should be continue to exist on top of SAGE (or any
> other package actually used, like maxima).
>
> Unfortunately, it seems that the inverse laplace function from maxima
> is not the very best, see:http://www.math.utexas.edu/pipermail/maxima/2007/008424.htmlhttp://www.math.utexas.edu/pipermail/maxima/2006/000036.html
>
> Is there any sort of representation of piecewise functions in SAGE?
> What about delta function (heaviside) or unit step? These are basics
> for implementing inverse laplace in my opinion.
>
> Maxima already has delta() function, and signum() function (that can
> be good to represent the unit step, I don't know if it's already built-
> in maxima function), can we take advantage of that?http://www.math.utexas.edu/pipermail/maxima/2006/003249.html
>
> There has been a short discussion about that here:http://groups.google.com/group/sage-devel/browse_frm/thread/7f33e7001...
>
> I know I can seem pretty boring, but I really think that SAGE has a
> great potential, and I would like to enhance its engineering power! As
> it is right now, it still lacks something from that point of view. For
> example (I know, I always go off-topic), has a good units of
> measurement manager ever been included? Also about that you had a long
> discussion, but I don't know the results:http://groups.google.com/group/sage-devel/browse_frm/thread/8791448b7...

Robert Bradshaw

unread,
Feb 26, 2009, 5:40:06 PM2/26/09
to sage-s...@googlegroups.com
On Feb 26, 2009, at 2:32 PM, Maurizio wrote:

> To the best of my knowledge, the new symbolic (are you referring to
> pynac?) should just be considered as the core of symbolic, and the
> utilities functions should be continue to exist on top of SAGE (or any
> other package actually used, like maxima).
>
> Unfortunately, it seems that the inverse laplace function from maxima
> is not the very best, see:
> http://www.math.utexas.edu/pipermail/maxima/2007/008424.html
> http://www.math.utexas.edu/pipermail/maxima/2006/000036.html
>
> Is there any sort of representation of piecewise functions in SAGE?
> What about delta function (heaviside) or unit step? These are basics
> for implementing inverse laplace in my opinion.
>
> Maxima already has delta() function, and signum() function (that can
> be good to represent the unit step, I don't know if it's already
> built-
> in maxima function), can we take advantage of that?
> http://www.math.utexas.edu/pipermail/maxima/2006/003249.html
>
> There has been a short discussion about that here:
> http://groups.google.com/group/sage-devel/browse_frm/thread/
> 7f33e7001e480d47/4f46fff6a387becc?lnk=gst&q=maxima
> +delta#4f46fff6a387becc

This looks like a good summary of the state of things right now. One
advantage of having Pynac will be we can adjust the core/add what we
need for the higher-level functionality.

> I know I can seem pretty boring, but I really think that SAGE has a
> great potential, and I would like to enhance its engineering power! As
> it is right now, it still lacks something from that point of view. For
> example (I know, I always go off-topic), has a good units of
> measurement manager ever been included? Also about that you had a long
> discussion, but I don't know the results:
> http://groups.google.com/group/sage-devel/browse_frm/thread/
> 8791448b7a303ce9/9dc4cc27e6d4eafb?lnk=gst&q=units#9dc4cc27e6d4eafb
>
> Please, forgive me again for being so annoying

No, it's people like you that push Sage to be better. RIght now the
strengths of Sage are mostly in Number Theory and Combinatorics.
There's lots of room for improvement in calculus and making things
more engineering friendly, which is certainly a goal of ours.

- Robert

David Joyner

unread,
Feb 26, 2009, 5:48:49 PM2/26/09
to sage-s...@googlegroups.com
On Thu, Feb 26, 2009 at 5:32 PM, Maurizio <maurizio...@gmail.com> wrote:
>
> To the best of my knowledge, the new symbolic (are you referring to
> pynac?) should just be considered as the core of symbolic, and the
> utilities functions should be continue to exist on top of SAGE (or any
> other package actually used, like maxima).
>
> Unfortunately, it seems that the inverse laplace function from maxima
> is not the very best, see:
> http://www.math.utexas.edu/pipermail/maxima/2007/008424.html
> http://www.math.utexas.edu/pipermail/maxima/2006/000036.html
>
> Is there any sort of representation of piecewise functions in SAGE?
> What about delta function (heaviside) or unit step? These are basics
> for implementing inverse laplace in my opinion.


The Heaviside function is not the same as the delta function (at least not
in the standard American usage of the term). In any case, piecewise
functions are in
http://hg.sagemath.org/sage-main/file/b0aa7ef45b3c/sage/functions/piecewise.py#l1
The delta functional is not implemented as part of the piecewise
package or with the laplace transform code. In general, there is currently
little or no framework in Sage for linear functionals on the vector space of
continuous functions on a given topological space.

Jason Grout

unread,
Feb 26, 2009, 5:55:09 PM2/26/09
to sage-s...@googlegroups.com
Maurizio wrote:
>
> I know I can seem pretty boring, but I really think that SAGE has a
> great potential, and I would like to enhance its engineering power! As
> it is right now, it still lacks something from that point of view. For
> example (I know, I always go off-topic), has a good units of
> measurement manager ever been included? Also about that you had a long
> discussion, but I don't know the results:
> http://groups.google.com/group/sage-devel/browse_frm/thread/8791448b7a303ce9/9dc4cc27e6d4eafb?lnk=gst&q=units#9dc4cc27e6d4eafb
>

I don't know of any progress: see
http://trac.sagemath.org/sage_trac/ticket/3852

However, I'd love to have the functionality if someone did it! :)

Jason


Maurizio

unread,
Feb 26, 2009, 6:01:52 PM2/26/09
to sage-support
I'm sorry for not being accurate enough to use the correct term for
what I'm talking about.

Luckily, you're smart enough to understand my needs, so it seems that
I should really go for this new symbolic package, so that we can get
something better for symbolic integrals and laplace/inverse laplace
transform. Do you think we will have great improvements from that? I
am quite frightened from the fact that such a stable and well
developed software like maxima still misses this features... how hard
would be for SAGE to overcome those?

I also want to really stress my hope to further enhance the
engineering capabilities of SAGE, and unit of measurements are
certainly part of that. Do you think that reusing some code from
ScientificPython can be affordable? Probably having the whole package
would be too much?

About the piecewise functions, I clearly see that those can be useful
for reasons (like plotting or something like that), but currently they
are not useful at all for things like symbolics and integration. Do
any of you consider this an important lack of feature? Someway, I do,
and I think that this was the same opinion of the other people
previously talking about that (see the discussion linked in my
previous posts).

I have to say that this seems a quite complicated thing to deal
with... Does this kind of feature require a high level mathematical
knowledge isn't it?

Thank you for the very good work

Maurizio

On 26 Feb, 23:48, David Joyner <wdjoy...@gmail.com> wrote:
> On Thu, Feb 26, 2009 at 5:32 PM, Maurizio <maurizio.gran...@gmail.com> wrote:
>
> > To the best of my knowledge, the new symbolic (are you referring to
> > pynac?) should just be considered as the core of symbolic, and the
> > utilities functions should be continue to exist on top of SAGE (or any
> > other package actually used, like maxima).
>
> > Unfortunately, it seems that the inverse laplace function from maxima
> > is not the very best, see:
> >http://www.math.utexas.edu/pipermail/maxima/2007/008424.html
> >http://www.math.utexas.edu/pipermail/maxima/2006/000036.html
>
> > Is there any sort of representation of piecewise functions in SAGE?
> > What about delta function (heaviside) or unit step? These are basics
> > for implementing inverse laplace in my opinion.
>
> The Heaviside function is not the same as the delta function (at least not
> in the standard American usage of the term). In any case, piecewise
> functions are inhttp://hg.sagemath.org/sage-main/file/b0aa7ef45b3c/sage/functions/pie...
> The delta functional is not implemented as part of the piecewise
> package or with the laplace transform code. In general, there is currently
> little or no framework in Sage for linear functionals on the vector space of
> continuous functions on a given topological space.
>
>
>
> > Maxima already has delta() function, and signum() function (that can
> > be good to represent the unit step, I don't know if it's already built-
> > in maxima function), can we take advantage of that?
> >http://www.math.utexas.edu/pipermail/maxima/2006/003249.html
>
> > There has been a short discussion about that here:
> >http://groups.google.com/group/sage-devel/browse_frm/thread/7f33e7001...
>
> > I know I can seem pretty boring, but I really think that SAGE has a
> > great potential, and I would like to enhance its engineering power! As
> > it is right now, it still lacks something from that point of view. For
> > example (I know, I always go off-topic), has a good units of
> > measurement manager ever been included? Also about that you had a long
> > discussion, but I don't know the results:
> >http://groups.google.com/group/sage-devel/browse_frm/thread/8791448b7...

mabshoff

unread,
Feb 26, 2009, 6:24:11 PM2/26/09
to sage-support


On Feb 26, 3:01 pm, Maurizio <maurizio.gran...@gmail.com> wrote:

Hi,

> I'm sorry for not being accurate enough to use the correct term for
> what I'm talking about.
>
> Luckily, you're smart enough to understand my needs, so it seems that
> I should really go for this new symbolic package, so that we can get
> something better for symbolic integrals and laplace/inverse laplace
> transform. Do you think we will have great improvements from that? I
> am quite frightened from the fact that such a stable and well
> developed software like maxima still misses this features...

Have you check with the Maxima folks? There is quite a bit of code in
contrib that isn't particularly well integrated. IMHO this is a place
where the Maxima folks could improve Maxima a lot by integrating the
code into the main Maxima codebase, i.e. there is a solver in there
that can handle a lot more systems than the default one and most
people will not look for another solver once the one in default Maxima
does not do what they want it to do.

> how hard would be for SAGE to overcome those?

Well, we have been told repeatedly that Sage cannot be done in general
or then later on when it become clear that we seem to be doing a lot
better than other open source systems (not in the symbolic
manipulation area yet) and in some areas even than the commercial
competition that this kind of development cannot be sustained and we
will implode/self destruct if we do not do $FOO. We just ignore those
people :)

If one starts building basic functionality like pynac other people
will build on top of it and various people have already started to do
so. Last summer we had a project to enhance symbolics in Sage (i.e.
not pynac) and that didn't work out too well for various reasons, but
we are trying again and sooner or later we will get there.

<SNIP>
> Thank you for the very good work

I want to echo RobertWB's point - thanks for using Sage and wanting to
make it better. Scratching your own itch is what it is all about in
Sage :)

> Maurizio

Cheers,

Michael

Robert Dodier

unread,
Feb 27, 2009, 11:12:21 AM2/27/09
to sage-support
On Feb 26, 4:24 pm, mabshoff <Michael.Absh...@mathematik.uni-
dortmund.de> wrote:

> Have you check with the Maxima folks? There is quite a bit of code in
> contrib that isn't particularly well integrated. IMHO this is a place
> where the Maxima folks could improve Maxima a lot by integrating the
> code into the main Maxima codebase, i.e. there is a solver in there
> that can handle a lot more systems than the default one and most
> people will not look for another solver once the one in default Maxima
> does not do what they want it to do.

One of the projects I have on the back burner is to do a review
of the all the junk in maxima/share, to sort out the stuff that
can be merged into the core, or needs clean up, or should be axed.
Feel free to bother me about it if you don't hear anything.

Robert Dodier

Maurizio

unread,
Feb 27, 2009, 4:16:06 PM2/27/09
to sage-support
Well, I'm already starting to bother!! :)

If you need any help in reviewing that stuff (provided that I'm not a
mathematician), let me know.

Apart from the fact that I'll be out of country for work during next
week..

See you in 7 days!!

Maurizio

Maurizio

unread,
Mar 13, 2009, 8:48:43 PM3/13/09
to sage-support
Hello,
I'm a happy user of SAGE, and I won't stop thanking all you guys for
this wonderful job! Although, I also try to encourage you in getting
something better (from my point of view).

It seems there has been some serious thinking about including a UNITS
of MEASUREMENTS managing package in SAGE:
http://groups.google.com/group/sage-devel/browse_frm/thread/8791448b7a303ce9/9dc4cc27e6d4eafb?lnk=gst&q=units#9dc4cc27e6d4eafb

From this, a SAGE trac ticket has been opened (#3852):
http://trac.sagemath.org/sage_trac/ticket/3852

This is supposed to be a MAJOR priority ticket, and I think this is a
very appropriate description!
The ticket has a very good (although a bit old now) description of the
different packages available to deal with units in Python. One of the
options, was the units package included in Enthought. This had the
issue of being under refactoring at that time.

The actual situation seems to be that the Enthought package has not
been changed (https://svn.enthought.com/enthought/ticket/1524) because
of some priority issues in that community (very understandable!), but
another interesting package was born from this Enthought discussion:
the "quantities" package:
http://packages.python.org/quantities/
http://dale.chess.cornell.edu/chess-wiki/Quantities

As I can see, this has already been mentioned in a comment to our trac
ticket, but with no response.

Honestly, I am not able to understand whether this is good enough to
be included in SAGE, neither I am able of understanding how much
refactoring this would need to make this compatible to all the
wonderful symbolic capabilities of SAGE, but nonetheless I think that
getting something working at least in the numeric domain, could be
very useful

With this, I'm not proposing this package over others (for example,
Unum looks very mature, but outdated), I'm just asking if one of you
can spend some minutes to review our trac ticket about units of
measurement (#3852), and to take some other decision about it.

Thank you so much

Maurizio

On 26 Feb, 23:55, Jason Grout <jason-s...@creativetrax.com> wrote:
> Maurizio wrote:
>
> > I know I can seem pretty boring, but I really think that SAGE has a
> > great potential, and I would like to enhance its engineering power! As
> > it is right now, it still lacks something from that point of view. For
> > example (I know, I always go off-topic), has a goodunitsof
> > measurement manager ever been included? Also about that you had a long
> > discussion, but I don't know the results:
> >http://groups.google.com/group/sage-devel/browse_frm/thread/8791448b7...
>
> I don't know of any progress: seehttp://trac.sagemath.org/sage_trac/ticket/3852

Maurizio

unread,
Mar 13, 2009, 8:51:52 PM3/13/09
to sage-support
Hi Robert,
how are you?

I wonder if you do have any new information about you going through
all this interesting maxima stuff. I always thought that community
stuff have really great features well hidden in it, and I'm really
hoping that you are getting some good results.

Thank you very much

Maurizio

On 27 Feb, 17:12, Robert Dodier <robert.dod...@gmail.com> wrote:
>
Reply all
Reply to author
Forward
0 new messages