axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] 20080508.01.wxh.patch (intef.spad integrate(asech(x)/x


From: daly
Subject: [Axiom-developer] 20080508.01.wxh.patch (intef.spad integrate(asech(x)/x, x) bug)
Date: Thu, 8 May 2008 13:37:57 -0500

Waldek has proposed a new change to intef to fix the bogus closed form
returned fromn
  integrate(asech(x)/x,x)
it also handles the 
  integrate((z^a+1)^b,z)
infinite recursion problem.

This code needs literate documentation of the theory behind the 
code as well as the actions the actual code takes. 

schaum34.input.pamphlet was changed to reflect the new result.

Tim

====================================================================
diff --git a/changelog b/changelog
index 61271b9..7fa956e 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20080508 tpd src/input/schaum34.input fix int(asech(x)/x,x)
+20080507 wxh src/algebra/intef.spad fix int(asech(x)/x,x)
 20080506 tpd src/input/schaum2.input post-mortem fixes
 20080505 tpd src/input/schaum24.input branch-cut analysis
 20080505 tpd src/input/schaum23.input post-mortem fixes
diff --git a/src/algebra/intef.spad.pamphlet b/src/algebra/intef.spad.pamphlet
index 955d284..d248838 100644
--- a/src/algebra/intef.spad.pamphlet
+++ b/src/algebra/intef.spad.pamphlet
@@ -258,13 +258,27 @@ 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. 
 
+The original patch fixed the infinite regression mentioned above
+but caused Axiom to return a closed form of the integral:
+\[integrate(asech(x)/x,x)\]
+which should not have a closed form. This is referenced in 
+the FriCAS SVN revision 279.
+
+Essentially this new patch uses only logarithms of rational functions
+when integrating rational functions.  It is unclear whether this is
+the correct fix.
+
 <<package INTEF ElementaryIntegration>>=
     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)))
+         g1 :=
+           empty?(l1 := varselect(kernels g,x)) => 0::F
+           kmax(l1) = k => g
+           0::F
+         map(multivariate(#1, k), extendedint(univariate(f, k),
+                                              univariate(g1, 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)
diff --git a/src/input/schaum34.input.pamphlet 
b/src/input/schaum34.input.pamphlet
index 83d7061..f8314e2 100644
--- a/src/input/schaum34.input.pamphlet
+++ b/src/input/schaum34.input.pamphlet
@@ -2132,13 +2132,11 @@ solution to the problem but Schaums gives a series 
solution.
 aa:=integrate(asech(x/a)/x,x)
 --R 
 --R
---R                           +---------+     2
---R           +---------+     |   2    2
---R           |   2    2     \|- x  + a   + a
---R          \|- x  + a  log(----------------)
---R                                  x
---R   (1)  - ----------------------------------
---R                          2a
+--I                   %P
+--R           x asech(--)
+--R         ++         a
+--I   (1)   |   --------- d%P
+--I        ++       %P
 --R                                          Type: Union(Expression 
Integer,...)
 --E 
 @
@@ -2322,13 +2320,11 @@ but Axiom has computed a closed form.
 aa:=integrate(acsch(x/a)/x,x)
 --R 
 --R
---R                         +-------+     2
---R           +-------+     | 2    2
---R           | 2    2     \|x  + a   + a
---R          \|x  + a  log(--------------)
---R                               x
---R   (1)  - ------------------------------
---R                        2a
+--I                   %P
+--R           x acsch(--)
+--R         ++         a
+--I   (1)   |   --------- d%P
+--I        ++       %P
 --R                                          Type: Union(Expression 
Integer,...)
 --E 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]