# [Maxima] Problems with the function \$specint

Dieter Kaiser drdieterkaiser at web.de
Sun May 11 17:40:42 CDT 2008

```I started to look at the code of the Maxima function \$specint which calculate
the Laplace transform. I have rearranged the code, drawn flow charts and added a
lot of debug information to find the problems.

To get an overview of the problems with the code I have taken the tabulated
Laplace transforms from the website of EqWorld. There are 99 Examples tabulated.
47 examples pass the test. 53 examples don't give the tabulated answer. The file
Maxima might be correct, but I can't show that the result is identical to the
tabulated answer. I run this test file with the Maxima CVS-Version and GCL
2.6.8.

I have divided the problems in the following cases:

1. Maxima has no algorithmen:

In most cases Maxima gives an internal symbol like
other-defint-to-follow-negtest or arbpow-failed. This is a known problem. In
some cases we get a correct noun form of the unevaluated integral. At last there
are many problems which gives a wrong answer.

A lot of examples include terms like t^(-1) ... or t^(-1/2) ... Maxima can't
calculate these integrals but we know solutions.

A simple type of integral Maxima can't evaluate is the division by the sum of
constants:

(%i7) specint(%e^(-s*t)/(x+y),t);
(%o7) other-defint-to-follow-negtest

In this cases the exponential function is hidden in a summation. I have found a
correction which works generally and gives the correct result:

(%i7) specint(%e^(-s*t)/(x+y),t);
(%o7) (1/(x+y)*s)

2. Maxima has an algorithmen for a special function but don't give the correct
result:

We get no results for functions like bessel_k, bessel_y, log, erf, erfc etc. For
all these functions Laplace transforms are tabulated. Beside the test of EqWorld
I tried to get results for the internal functions %l[n,a](x) - the Laguerre
function - or %he[n](x) - the Hermite function. But I dont' get the expected
result.

Here the example for the Laguerre function:

(%i6) kill(all);
(%o0) done
(%i1) assume(s>0,n>0),declare(n,integer);
(%o1) [s > 0,n > 0]
(%i2) specint(%e^(-2*t)*%l[n,0](t),t);
Maxima encountered a Lisp error:
Error in MACSYMA-TOP-LEVEL [or a callee]: \$N is not of type NUMBER.
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

After correction of the code:

(%i6) kill(all);
(%o0) done
(%i1) assume(s>0,n>0),declare(n,integer);
(%o1) [s > 0,n > 0]
(%i2) specint(%e^(-s*t)*%l[n,0](t),t);
(%o2) (1-1/s)^n/s

In the case of the Laguerre function I have found a bug in the transformation.
After correction, Maxima gives the expected result for the Laguerre function.
There may be further bugs. Or limitations of the algorithmen prevend the
calculation of results. At least, these limitations should be documented for the
user.

3. Maxima gets extra factors or terms in the result

A simple example is the bessel_i function. Here we get an additional phase
factor (v is the order of the Bessel function):

%e^(%i*%pi*v/(-1)^(v/2)

in all calculations. This factor vanishs when we introduce a small correction to
the code. In other cases the problem seems to be more difficult.

The testsuite shows that Maxima can evaluate a lot of different combinations of
special functions. On the other hand it seems to me that Maxima fails on a lot
of more simple examples.

If it is interesting for the project I would like to investigate the problems
further and present some corrections to the code.

Dieter Kaiser

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_eqworld.mac
Type: image/x-macpaint
Size: 20512 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20080512/7f071afa/attachment-0001.bin
```