[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Schaums-Axiom difference
From: |
root |
Subject: |
[Axiom-developer] Schaums-Axiom difference |
Date: |
Wed, 7 May 2008 03:17:21 -0400 |
This bug occurs in an area where the code has changed.
The original NAG code returns the integral unevaluated.
Thus it is a new Axiom bug.
Unfortunately, the NAG code has a bug which I've detailed
below. I show the new Axiom code and the prior NAG code.
The problem is related to my comment that Axiom seems to have
really odd results on some of the integral results. That is,
I see a lot of non-reduced exponents of the form:
a log(z)
%e
The problem was tracked to this code (as I explain below)
but clearly the "fix" isn't correct in theory, although it
does fix the infinite regression that crashes Axiom.
Waldek coded this fix for the infinite regression (bug #100)
but it fails in the Schaums case. I'm going to back out
the change and consider bug #100 still unsolved.
My best guess is that the problem lies in the code that fails to
simplify %e^(n log(x)) to x^n.
Since it does not simplify, the call to varselect(kernels ....
continue to loop since %e^(n log(x)) is a kernel.
Do you have a guess as to where I might expect this simplification
to occur? I could probably force the simplification here but that
would only mask the real problem elsewhere.
Tim
=========================================================================
New Axiom Code
=========================================================================
Bug 100 is an infinite loop that eventually kills Axiom
from the input
integrate((z^a+1)^b,z)
Line 2 of this function used to read:
symbolIfCan(k := kmax(l := union(l, varselect(kernels g, x))))
The loop occurs when the call to union causes
a log(z)
%e
to get added to the list every time. This gives the argument to kmax
a log(z)
arg1= [z,%e ]
and the result being
a log(z)
%e
We keep coming back to process this term, which ends up
putting the same term back on the list and we loop.
Waldek's solution is to remove the union call.
lfextendedint(f, x, g) ==
empty?(l := varselect(kernels f, x)) => [x::F * f, 0]
symbolIfCan(k := kmax(l))
case SE =>
map(multivariate(#1, k), extendedint(univariate(f, k),
univariate(g, k)))
is?(k, "exp"::SE) => expextint(f, x, k, g)
prim?(k, x) => primextint(f, x, k, g)
has?(operator k, ALGOP) => alglfextint(f, k, l, x, g)
unkextint(f, x, g)
This is part of the fix for bug 100. Line 2 of this function used to read:
symbolIfCan(k := kmax(l := union(l, vark(lu, x)))) case SE =>
See the above discussion for why this causes an infinite loop.
lflimitedint(f, x, lu) ==
empty?(l := varselect(kernels f, x)) => [x::F * f, empty()]
symbolIfCan(k := kmax(l)) case SE =>
map(multivariate(#1, k), limitedint(univariate(f, k),
[univariate(u, k) for u in lu]))
is?(k, "exp"::SE) => explimint(f, x, k, lu)
prim?(k, x) => primlimint(f, x, k, lu)
has?(operator k, ALGOP) => alglflimint(f, k, l, x, lu)
unklimint(f, x, lu)
=========================================================================
Original NAG Code
=========================================================================
lfextendedint(f, x, g) ==
empty?(l := varselect(kernels f, x)) => [x::F * f, 0]
symbolIfCan(k := kmax(l := union(l, varselect(kernels g, x))))
case SE =>
map(multivariate(#1, k), extendedint(univariate(f, k),
univariate(g, k)))
is?(k, "exp"::SE) => expextint(f, x, k, g)
prim?(k, x) => primextint(f, x, k, g)
has?(operator k, ALGOP) => alglfextint(f, k, l, x, g)
unkextint(f, x, g)
lflimitedint(f, x, lu) ==
empty?(l := varselect(kernels f, x)) => [x::F * f, empty()]
symbolIfCan(k := kmax(l := union(l, vark(lu, x)))) case SE =>
map(multivariate(#1, k), limitedint(univariate(f, k),
[univariate(u, k) for u in lu]))
is?(k, "exp"::SE) => explimint(f, x, k, lu)
prim?(k, x) => primlimint(f, x, k, lu)
has?(operator k, ALGOP) => alglflimint(f, k, l, x, lu)
unklimint(f, x, lu)
Tim
- [Axiom-developer] Schaums-Axiom difference,
root <=