laplace transform



Am Donnerstag, den 26.02.2009, 18:19 +0100 schrieb Andrej Vodopivec:
> On Thu, Feb 26, 2009 at 6:13 PM, Raymond Toy <raymond.toy at stericsson.com> wrote:
> > eric.reyssat at math.unicaen.fr wrote:
> >> Yes, the answer given by specint (all in lowercase) is true, thank you.
> >>
> >> But
> >>
> >> 1/ I still don't understand the error message given by laplace
> >
> > Sounds like a bug in laplace
> >>
> >> 2/ when laplace is unable to compute the answer, it could (should ?) call
> >> specint
> >
> > I think this has been discussed before.  But AFAIK, no one has actually
> > done anything about it.
> 
> Laplace calls defint with wrong arguments:
> 
> (%i4) trace(defint)$
> (%i5) laplace(sin(2*t)/t,t,s);
> 1 Enter defint[2/(s10^2+4),s11,s,inf]
> Integral is divergent
>  -- an error.  To debug this try debugmode(true);
> 
> I guess s11 should be s10

I had a look into the code. The error is due to a change of the code of
the function createname with the following revision:

Mon Apr 30 16:35:28 2007 UTC (21 months, 4 weeks ago) by are_muc 
Branch: MAIN 
Changes since 1.7: +3 -3 lines 
Diff to previous 1.7 
replaced compilcated implode/explode with gentemp and format.


This is the old code:

(implode (nconc (explodec head) (explodec tail)))

And this the new code which does not work:

(gentemp (format nil "~S~S" head tail)))

If we insert the old code we get

(%i6) laplace (sin(t)/t,t,s);
(%o6) %pi/2-atan(s)

That is equivalent to atan(2/s) and correct. So laplace is able to find
a solution for sin(t)/t.

The reason is that gentemp does more than the algorithm expected.
gentemp produce for every call a new symbol. But the function createname
should return the same symbol when the arguments head and tail have not
changed.

But there are more problems. sin(t)/t works, but with sin(t)/t^2 we get
a endlessly loop. For sin(t)/t^2 specint fails too, but returns a noun
form.

Perhaps this is a very old problem. Perhaps there are more changes of
the code which have changed the algorithm.

Dieter Kaiser