\start
Date: 01 May 2008 00:51:27 -0400
From: Stephen Wilson
To: Zach Smith
Subject: Re: Build problem on Slackware Linux 12

Hi Zach, Tim, 

Zach Smith writes:

> Similar to the approach in another thread, I replaced all occurrences of
> ${XLIB}/libXpm.a with -lXpm in the Makefile.pamphlet file.  I believe that
> such a replacement will make this work on my system (and others like it) but
> not break any other installations.  The linker should automatically look for
> libXpm.a and libXpm.so on the linker directories when it encounters a -l
> flag, right?  Why is the libXpm archive's path hard coded into makefile
> maker?

Zach, thanks for your report!

Without a configure stage in the build process, we are basically stuck with
hard-wired paths.  That said, the attached patch should work for generic linux
distros.  It appeals to the search paths which the linker follows by default in
addition to /usr/X11R6/lib.

I built a fresh checkout with this patch against slackware 11, which does have
libXpm.a, and all is well (so no backwards breakage, AFAICT).

Tim, could you consider this patch in your next build/test cycle?

Thanks,
Steve


--=-=-=

diff --git a/Makefile.pamphlet b/Makefile.pamphlet
index 0c6eb1d..9f6b15a 100644
--- a/Makefile.pamphlet
+++ b/Makefile.pamphlet
@@ -1236,7 +1236,7 @@ PLF=LINUXplatform
 # C compiler flags
 CCF="-O2 -fno-strength-reduce -Wall -D_GNU_SOURCE -D${PLF} -I/usr/X11/include"
 # Loader flags
-LDF=" -L/usr/X11R6/lib ${XLIB}/libXpm.a "
+LDF=" -L${XLIB} -lXpm "
 # C compiler to use
 CC=gcc 
 AWK=gawk

--=-=-=--

\start
Date: Thu, 1 May 2008 00:01:49 -0500
From: Tim Daly
To: list
Subject: 20080429.01.tpd.patch (CATS post-mortem typo fixes for schaum12)

The failing cases in this file are all due to typos.
These have been fixed.

Tim
=========================================================================
diff --git a/changelog b/changelog
index 6e74f31..0086e15 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080429 tpd src/input/schaum12.input post-mortem fixes
 20080428 tpd src/input/schaum19.input post-mortem fixes
 20080428 tpd src/input/schaum23.input post-mortem fixes
 20080428 tpd src/input/schaum24.input post-mortem fixes
diff --git a/src/input/schaum12.input.pamphlet b/src/input/schaum12.input.pamphlet
index 1c0d0b2..7d5d77a 100644
--- a/src/input/schaum12.input.pamphlet
+++ b/src/input/schaum12.input.pamphlet
@@ -25,36 +25,37 @@ $$
 )clear all
 
 --S 1
-aa:=integrate(1/sqrt(a*x^2+b*x+c),x)
---R 
+aa:=integrate(1/(a*x^2+b*x+c),x)
 --R
 --R   (1)
 --R   [
 --R       log
---R                                 +--------------+
---R                 +-+ +-+         |   2                   +-+
---R              (2\|a \|c  - 2a x)\|a x  + b x + c  + 2a x\|c
+--R                                           +-----------+
+--R                 2 2                    2  |          2       2        2
+--R              (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (8a c - 2a b )x
 --R            + 
---R                     2             +-+
---R              (- 2a x  - b x - 2c)\|a
+--R                        3
+--R              4a b c - b
 --R         /
---R                  +--------------+
---R              +-+ |   2
---R            2\|c \|a x  + b x + c  - b x - 2c
+--R               2
+--R            a x  + b x + c
 --R    /
---R        +-+
---R       \|a
+--R        +-----------+
+--R        |          2
+--R       \|- 4a c + b
 --R     ,
---R                 +--------------+
---R           +---+ |   2               +---+ +-+
---R          \|- a \|a x  + b x + c  - \|- a \|c
---R    2atan(------------------------------------)
---R                           a x
---R    -------------------------------------------]
---R                        +---+
---R                       \|- a
+--R                     +---------+
+--R                     |        2
+--R          (2a x + b)\|4a c - b
+--R    2atan(----------------------)
+--R                         2
+--R                 4a c - b
+--R    -----------------------------]
+--R              +---------+
+--R              |        2
+--R             \|4a c - b
 --R                                     Type: Union(List Expression Integer,...)
---E 
+--E
 
 --S 2
 bb1:=2/sqrt(4*a*c-b^2)*atan((2*a*x+b)/sqrt(4*a*c-b^2))
@@ -99,26 +100,26 @@ cc1:=aa.1-bb1
 --R         \|4a c - b
 --R      *
 --R         log
---R                                   +--------------+
---R                   +-+ +-+         |   2                   +-+
---R                (2\|a \|c  - 2a x)\|a x  + b x + c  + 2a x\|c
+--R                                             +-----------+
+--R                   2 2                    2  |          2       2        2
+--R                (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (8a c - 2a b )x
 --R              + 
---R                       2             +-+
---R                (- 2a x  - b x - 2c)\|a
+--R                          3
+--R                4a b c - b
 --R           /
---R                    +--------------+
---R                +-+ |   2
---R              2\|c \|a x  + b x + c  - b x - 2c
+--R                 2
+--R              a x  + b x + c
 --R     + 
---R           +-+       2a x + b
---R       - 2\|a atan(------------)
---R                    +---------+
---R                    |        2
---R                   \|4a c - b
+--R           +-----------+
+--R           |          2        2a x + b
+--R       - 2\|- 4a c + b  atan(------------)
+--R                              +---------+
+--R                              |        2
+--R                             \|4a c - b
 --R  /
---R          +---------+
---R      +-+ |        2
---R     \|a \|4a c - b
+--R      +-----------+ +---------+
+--R      |          2  |        2
+--R     \|- 4a c + b  \|4a c - b
 --R                                                     Type: Expression Integer
 --E
 
@@ -126,81 +127,142 @@ cc1:=aa.1-bb1
 cc2:=aa.1-bb2
 --R
 --R   (5)
---R          +-----------+
---R          |          2
---R         \|- 4a c + b
---R      *
---R         log
---R                                   +--------------+
---R                   +-+ +-+         |   2                   +-+
---R                (2\|a \|c  - 2a x)\|a x  + b x + c  + 2a x\|c
---R              + 
---R                       2             +-+
---R                (- 2a x  - b x - 2c)\|a
---R           /
---R                    +--------------+
---R                +-+ |   2
---R              2\|c \|a x  + b x + c  - b x - 2c
+--R       log
+--R                                           +-----------+
+--R                 2 2                    2  |          2       2        2
+--R              (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (8a c - 2a b )x
+--R            + 
+--R                        3
+--R              4a b c - b
+--R         /
+--R               2
+--R            a x  + b x + c
 --R     + 
---R                    +-----------+
---R                    |          2
---R          +-+    - \|- 4a c + b   + 2a x + b
---R       - \|a log(---------------------------)
---R                   +-----------+
---R                   |          2
---R                  \|- 4a c + b   + 2a x + b
+--R                +-----------+
+--R                |          2
+--R             - \|- 4a c + b   + 2a x + b
+--R       - log(---------------------------)
+--R               +-----------+
+--R               |          2
+--R              \|- 4a c + b   + 2a x + b
 --R  /
 --R      +-----------+
---R      |          2  +-+
---R     \|- 4a c + b  \|a
+--R      |          2
+--R     \|- 4a c + b
 --R                                                     Type: Expression Integer
 --E
 
 --S 6
 cc3:=aa.2-bb1
 --R
---R   (6)
---R                                +--------------+
---R         +---------+      +---+ |   2               +---+ +-+
---R         |        2      \|- a \|a x  + b x + c  - \|- a \|c
---R       2\|4a c - b  atan(------------------------------------)
---R                                          a x
---R     + 
---R           +---+       2a x + b
---R       - 2\|- a atan(------------)
---R                      +---------+
---R                      |        2
---R                     \|4a c - b
---R  /
---R            +---------+
---R      +---+ |        2
---R     \|- a \|4a c - b
+--R                         +---------+
+--R                         |        2
+--R              (2a x + b)\|4a c - b              2a x + b
+--R        2atan(----------------------) - 2atan(------------)
+--R                             2                 +---------+
+--R                     4a c - b                  |        2
+--R                                              \|4a c - b
+--R   (6)  ---------------------------------------------------
+--R                             +---------+
+--R                             |        2
+--R                            \|4a c - b
 --R                                                     Type: Expression Integer
 --E
 
---S 7      14:265 Axiom cannot simplify these expressions
+--S 7
 cc4:=aa.2-bb2
 --R
 --R   (7)
---R                      +-----------+
---R                      |          2
---R          +---+    - \|- 4a c + b   + 2a x + b
---R       - \|- a log(---------------------------)
---R                     +-----------+
---R                     |          2
---R                    \|- 4a c + b   + 2a x + b
+--R                            +-----------+
+--R          +---------+       |          2
+--R          |        2     - \|- 4a c + b   + 2a x + b
+--R       - \|4a c - b  log(---------------------------)
+--R                           +-----------+
+--R                           |          2
+--R                          \|- 4a c + b   + 2a x + b
 --R     + 
---R                                  +--------------+
---R         +-----------+      +---+ |   2               +---+ +-+
---R         |          2      \|- a \|a x  + b x + c  - \|- a \|c
---R       2\|- 4a c + b  atan(------------------------------------)
---R                                            a x
+--R                                      +---------+
+--R         +-----------+                |        2
+--R         |          2      (2a x + b)\|4a c - b
+--R       2\|- 4a c + b  atan(----------------------)
+--R                                          2
+--R                                  4a c - b
 --R  /
---R      +-----------+
---R      |          2  +---+
---R     \|- 4a c + b  \|- a
+--R      +-----------+ +---------+
+--R      |          2  |        2
+--R     \|- 4a c + b  \|4a c - b
 --R                                                     Type: Expression Integer
 --E
+
+--S 8
+atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
+--R
+--R                            - x + %i
+--R                     %i log(--------)
+--R                             x + %i
+--R   (8)  atan(x) == - ----------------
+--R                             2
+--R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
+--E
+
+--S 9
+dd3:=atanrule cc3
+--R
+--R   (9)
+--R               +---------+
+--R               |        2
+--R              \|4a c - b   + 2%i a x + %i b
+--R       %i log(-----------------------------)
+--R               +---------+
+--R               |        2
+--R              \|4a c - b   - 2%i a x - %i b
+--R     + 
+--R                             +---------+
+--R                             |        2                  2
+--R                (- 2a x - b)\|4a c - b   + 4%i a c - %i b
+--R       - %i log(------------------------------------------)
+--R                            +---------+
+--R                            |        2                  2
+--R                 (2a x + b)\|4a c - b   + 4%i a c - %i b
+--R  /
+--R      +---------+
+--R      |        2
+--R     \|4a c - b
+--R                                             Type: Expression Complex Integer
+--E
+
+--S 10
+ee3:=expandLog dd3
+--R
+--R   (10)
+--R                         +---------+
+--R                         |        2                  2
+--R       %i log((2a x + b)\|4a c - b   + 4%i a c - %i b )
+--R     + 
+--R                           +---------+
+--R                           |        2                  2
+--R       - %i log((2a x + b)\|4a c - b   - 4%i a c + %i b )
+--R     + 
+--R               +---------+
+--R               |        2
+--R       %i log(\|4a c - b   + 2%i a x + %i b)
+--R     + 
+--R                 +---------+
+--R                 |        2
+--R       - %i log(\|4a c - b   - 2%i a x - %i b) - %i log(- 1)
+--R  /
+--R      +---------+
+--R      |        2
+--R     \|4a c - b
+--R                                             Type: Expression Complex Integer
+--E
+
+--S 11     14:265 Schaums and Axiom agree
+ff3:=complexNormalize ee3
+--R
+--R   (11)  0
+--R                                             Type: Expression Complex Integer
+--E
 @
 
 \section{\cite{1}:14.266~~~~~$\displaystyle
@@ -211,59 +273,46 @@ $$
 <<*>>=
 )clear all
 
---S 8
-aa:=integrate(x/sqrt(a*x^2+b*x+c),x)
---R 
+--S 12
+aa:=integrate(x/(a*x^2+b*x+c),x)
 --R
 --R   (1)
 --R   [
---R                   +--------------+
---R               +-+ |   2               2
---R           (2b\|c \|a x  + b x + c  - b x - 2b c)
+--R           b
 --R        *
 --R           log
---R                                     +--------------+
---R                     +-+ +-+         |   2                   +-+
---R                  (2\|a \|c  + 2a x)\|a x  + b x + c  - 2a x\|c
+--R                                               +-----------+
+--R                     2 2                    2  |          2         2        2
+--R                  (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (- 8a c + 2a b )x
 --R                + 
---R                         2             +-+
---R                  (- 2a x  - b x - 2c)\|a
+--R                              3
+--R                  - 4a b c + b
 --R             /
---R                      +--------------+
---R                  +-+ |   2
---R                2\|c \|a x  + b x + c  - b x - 2c
+--R                   2
+--R                a x  + b x + c
 --R       + 
---R                    +--------------+
---R                +-+ |   2                   2         +-+ +-+
---R         - 2b x\|a \|a x  + b x + c  + (4a x  + 2b x)\|a \|c
+--R                             +-----------+
+--R                2            |          2
+--R         log(a x  + b x + c)\|- 4a c + b
 --R    /
---R                  +--------------+
---R          +-+ +-+ |   2                                +-+
---R       4a\|a \|c \|a x  + b x + c  + (- 2a b x - 4a c)\|a
+--R          +-----------+
+--R          |          2
+--R       2a\|- 4a c + b
 --R     ,
---R
---R                     +--------------+
---R                 +-+ |   2               2
---R           (- 2b\|c \|a x  + b x + c  + b x + 2b c)
---R        *
---R                       +--------------+
---R                 +---+ |   2               +---+ +-+
---R                \|- a \|a x  + b x + c  - \|- a \|c
---R           atan(------------------------------------)
---R                                 a x
---R       + 
---R                     +--------------+
---R               +---+ |   2                   2        +---+ +-+
---R         - b x\|- a \|a x  + b x + c  + (2a x  + b x)\|- a \|c
---R    /
---R                    +--------------+
---R          +---+ +-+ |   2                               +---+
---R       2a\|- a \|c \|a x  + b x + c  + (- a b x - 2a c)\|- a
---R     ]
+--R                         +---------+
+--R                         |        2                         +---------+
+--R              (2a x + b)\|4a c - b             2            |        2
+--R    - 2b atan(----------------------) + log(a x  + b x + c)\|4a c - b
+--R                             2
+--R                     4a c - b
+--R    -------------------------------------------------------------------]
+--R                                  +---------+
+--R                                  |        2
+--R                               2a\|4a c - b
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 9
+--S 13
 t1:=integrate(1/(a*x^2+b*x+c),x)
 --R 
 --R
@@ -297,7 +346,7 @@ t1:=integrate(1/(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 10
+--S 14
 bb1:=1/(2*a)*log(a*x^2+b*x+c)-b/(2*a)*t1.1
 --R 
 --R
@@ -326,7 +375,7 @@ bb1:=1/(2*a)*log(a*x^2+b*x+c)-b/(2*a)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 11
+--S 15
 bb2:=1/(2*a)*log(a*x^2+b*x+c)-b/(2*a)*t1.2
 --R 
 --R
@@ -343,29 +392,11 @@ bb2:=1/(2*a)*log(a*x^2+b*x+c)-b/(2*a)*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 12
+--S 16
 cc1:=aa.1-bb1
 --R
 --R   (5)
---R             +-----------+     +--------------+                  +-----------+
---R             |          2  +-+ |   2                  2          |          2
---R         (2b\|- 4a c + b  \|c \|a x  + b x + c  + (- b x - 2b c)\|- 4a c + b  )
---R      *
---R         log
---R                                   +--------------+
---R                   +-+ +-+         |   2                   +-+
---R                (2\|a \|c  + 2a x)\|a x  + b x + c  - 2a x\|c
---R              + 
---R                       2             +-+
---R                (- 2a x  - b x - 2c)\|a
---R           /
---R                    +--------------+
---R                +-+ |   2
---R              2\|c \|a x  + b x + c  - b x - 2c
---R     + 
---R                     +--------------+
---R             +-+ +-+ |   2                  2          +-+
---R         (2b\|a \|c \|a x  + b x + c  + (- b x - 2b c)\|a )
+--R         b
 --R      *
 --R         log
 --R                                             +-----------+
@@ -378,39 +409,32 @@ cc1:=aa.1-bb1
 --R                 2
 --R              a x  + b x + c
 --R     + 
---R                                 +-----------+                +-----------+
---R                    2            |          2  +-+ +-+        |          2  +-+
---R         (- 2log(a x  + b x + c)\|- 4a c + b  \|a \|c  - 2b x\|- 4a c + b  \|a )
+--R         b
 --R      *
---R          +--------------+
---R          |   2
---R         \|a x  + b x + c
---R     + 
---R                      +-----------+
---R            2         |          2  +-+ +-+
---R       (4a x  + 2b x)\|- 4a c + b  \|a \|c
---R     + 
---R                                     +-----------+
---R                        2            |          2  +-+
---R       (b x + 2c)log(a x  + b x + c)\|- 4a c + b  \|a
+--R         log
+--R                                             +-----------+
+--R                   2 2                    2  |          2         2        2
+--R                (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (- 8a c + 2a b )x
+--R              + 
+--R                            3
+--R                - 4a b c + b
+--R           /
+--R                 2
+--R              a x  + b x + c
 --R  /
---R          +-----------+         +--------------+
---R          |          2  +-+ +-+ |   2
---R       4a\|- 4a c + b  \|a \|c \|a x  + b x + c
---R     + 
---R                         +-----------+
---R                         |          2  +-+
---R       (- 2a b x - 4a c)\|- 4a c + b  \|a
+--R        +-----------+
+--R        |          2
+--R     2a\|- 4a c + b
 --R                                                     Type: Expression Integer
 --E
 
---S 13
+--S 17
 cc2:=aa.2-bb1
 --R
 --R   (6)
---R                       +--------------+
---R             +---+ +-+ |   2                  2          +---+
---R         (2b\|- a \|c \|a x  + b x + c  + (- b x - 2b c)\|- a )
+--R           +---------+
+--R           |        2
+--R         b\|4a c - b
 --R      *
 --R         log
 --R                                             +-----------+
@@ -423,53 +447,26 @@ cc2:=aa.2-bb1
 --R                 2
 --R              a x  + b x + c
 --R     + 
---R               +-----------+     +--------------+                 +-----------+
---R               |          2  +-+ |   2                 2          |          2
---R         (- 4b\|- 4a c + b  \|c \|a x  + b x + c  + (2b x + 4b c)\|- 4a c + b  )
---R      *
---R                     +--------------+
---R               +---+ |   2               +---+ +-+
---R              \|- a \|a x  + b x + c  - \|- a \|c
---R         atan(------------------------------------)
---R                               a x
---R     + 
---R                                  +-----------+
---R                     2            |          2  +---+ +-+
---R           - 2log(a x  + b x + c)\|- 4a c + b  \|- a \|c
---R         + 
---R                  +-----------+
---R                  |          2  +---+
---R           - 2b x\|- 4a c + b  \|- a
---R      *
---R          +--------------+
---R          |   2
---R         \|a x  + b x + c
---R     + 
---R                      +-----------+
---R            2         |          2  +---+ +-+
---R       (4a x  + 2b x)\|- 4a c + b  \|- a \|c
---R     + 
---R                                     +-----------+
---R                        2            |          2  +---+
---R       (b x + 2c)log(a x  + b x + c)\|- 4a c + b  \|- a
+--R                                         +---------+
+--R            +-----------+                |        2
+--R            |          2      (2a x + b)\|4a c - b
+--R       - 2b\|- 4a c + b  atan(----------------------)
+--R                                             2
+--R                                     4a c - b
 --R  /
---R          +-----------+           +--------------+
---R          |          2  +---+ +-+ |   2
---R       4a\|- 4a c + b  \|- a \|c \|a x  + b x + c
---R     + 
---R                         +-----------+
---R                         |          2  +---+
---R       (- 2a b x - 4a c)\|- 4a c + b  \|- a
+--R        +-----------+ +---------+
+--R        |          2  |        2
+--R     2a\|- 4a c + b  \|4a c - b
 --R                                                     Type: Expression Integer
 --E
 
---S 14
+--S 18
 cc3:=aa.2-bb1
 --R
 --R   (7)
---R                       +--------------+
---R             +---+ +-+ |   2                  2          +---+
---R         (2b\|- a \|c \|a x  + b x + c  + (- b x - 2b c)\|- a )
+--R           +---------+
+--R           |        2
+--R         b\|4a c - b
 --R      *
 --R         log
 --R                                             +-----------+
@@ -482,93 +479,23 @@ cc3:=aa.2-bb1
 --R                 2
 --R              a x  + b x + c
 --R     + 
---R               +-----------+     +--------------+                 +-----------+
---R               |          2  +-+ |   2                 2          |          2
---R         (- 4b\|- 4a c + b  \|c \|a x  + b x + c  + (2b x + 4b c)\|- 4a c + b  )
---R      *
---R                     +--------------+
---R               +---+ |   2               +---+ +-+
---R              \|- a \|a x  + b x + c  - \|- a \|c
---R         atan(------------------------------------)
---R                               a x
---R     + 
---R                                  +-----------+
---R                     2            |          2  +---+ +-+
---R           - 2log(a x  + b x + c)\|- 4a c + b  \|- a \|c
---R         + 
---R                  +-----------+
---R                  |          2  +---+
---R           - 2b x\|- 4a c + b  \|- a
---R      *
---R          +--------------+
---R          |   2
---R         \|a x  + b x + c
---R     + 
---R                      +-----------+
---R            2         |          2  +---+ +-+
---R       (4a x  + 2b x)\|- 4a c + b  \|- a \|c
---R     + 
---R                                     +-----------+
---R                        2            |          2  +---+
---R       (b x + 2c)log(a x  + b x + c)\|- 4a c + b  \|- a
+--R                                         +---------+
+--R            +-----------+                |        2
+--R            |          2      (2a x + b)\|4a c - b
+--R       - 2b\|- 4a c + b  atan(----------------------)
+--R                                             2
+--R                                     4a c - b
 --R  /
---R          +-----------+           +--------------+
---R          |          2  +---+ +-+ |   2
---R       4a\|- 4a c + b  \|- a \|c \|a x  + b x + c
---R     + 
---R                         +-----------+
---R                         |          2  +---+
---R       (- 2a b x - 4a c)\|- 4a c + b  \|- a
+--R        +-----------+ +---------+
+--R        |          2  |        2
+--R     2a\|- 4a c + b  \|4a c - b
 --R                                                     Type: Expression Integer
 --E
 
---S 15     14:266 Axiom cannot simplify these expressions
+--S 19     14:266 Schaums and Axiom agree
 cc4:=aa.2-bb2
 --R
---R   (8)
---R                   +---------+ +--------------+                 +---------+
---R               +-+ |        2  |   2                 2          |        2
---R         (- 4b\|c \|4a c - b  \|a x  + b x + c  + (2b x + 4b c)\|4a c - b  )
---R      *
---R                     +--------------+
---R               +---+ |   2               +---+ +-+
---R              \|- a \|a x  + b x + c  - \|- a \|c
---R         atan(------------------------------------)
---R                               a x
---R     + 
---R                       +--------------+
---R             +---+ +-+ |   2                   2          +---+
---R         (4b\|- a \|c \|a x  + b x + c  + (- 2b x - 4b c)\|- a )
---R      *
---R                         +---------+
---R                         |        2
---R              (2a x + b)\|4a c - b
---R         atan(----------------------)
---R                             2
---R                     4a c - b
---R     + 
---R                                                         +---------+
---R                    2            +---+ +-+        +---+  |        2
---R         (- 2log(a x  + b x + c)\|- a \|c  - 2b x\|- a )\|4a c - b
---R      *
---R          +--------------+
---R          |   2
---R         \|a x  + b x + c
---R     + 
---R               2         +---+ +-+                    2            +---+
---R         ((4a x  + 2b x)\|- a \|c  + (b x + 2c)log(a x  + b x + c)\|- a )
---R      *
---R          +---------+
---R          |        2
---R         \|4a c - b
---R  /
---R                    +---------+ +--------------+
---R          +---+ +-+ |        2  |   2
---R       4a\|- a \|c \|4a c - b  \|a x  + b x + c
---R     + 
---R                               +---------+
---R                         +---+ |        2
---R       (- 2a b x - 4a c)\|- a \|4a c - b
+--R   (8)  0
 --R                                                     Type: Expression Integer
 --E
 
@@ -583,7 +510,7 @@ $$
 <<*>>=
 )clear all
 
---S 16
+--S 20
 aa:=integrate(x^2/(a*x^2+b*x+c),x)
 --R 
 --R
@@ -630,7 +557,7 @@ aa:=integrate(x^2/(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 17
+--S 21
 t1:=integrate(1/(a*x^2+b*x+c),x)
 --R 
 --R
@@ -664,7 +591,7 @@ t1:=integrate(1/(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 18
+--S 22
 bb1:=x/a-b/(2*a^2)*log(a*x^2+b*x+c)+(b^2-2*a*c)/(2*a^2)*t1.1
 --R 
 --R
@@ -693,7 +620,7 @@ bb1:=x/a-b/(2*a^2)*log(a*x^2+b*x+c)+(b^2-2*a*c)/(2*a^2)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 19
+--S 23
 bb2:=x/a-b/(2*a^2)*log(a*x^2+b*x+c)+(b^2-2*a*c)/(2*a^2)*t1.2
 --R 
 --R
@@ -715,7 +642,7 @@ bb2:=x/a-b/(2*a^2)*log(a*x^2+b*x+c)+(b^2-2*a*c)/(2*a^2)*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 20
+--S 24
 cc1:=bb1-aa.1
 --R
 --R   (5)
@@ -753,7 +680,7 @@ cc1:=bb1-aa.1
 --R                                                     Type: Expression Integer
 --E
 
---S 21     14:267 Schaums and Axiom differ by a constant
+--S 25     14:267 Schaums and Axiom differ by a constant
 dd1:=complexNormalize cc1
 --R
 --R                   2          3      2 2
@@ -775,7 +702,7 @@ $$
 <<*>>=
 )clear all
 
---S 22     14:268 Axiom cannot compute this integral
+--S 26     14:268 Axiom cannot compute this integral
 aa:=integrate(x^m/(a*x^2+b*x+c),x)
 --R 
 --R
@@ -798,7 +725,7 @@ $$
 <<*>>=
 )clear all
 
---S 23
+--S 27
 aa:=integrate(1/(x*(a*x^2+b*x+c)),x)
 --R 
 --R
@@ -844,7 +771,7 @@ aa:=integrate(1/(x*(a*x^2+b*x+c)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 24
+--S 28
 t1:=integrate(1/(a*x^2+b*x+c),x)
 --R 
 --R
@@ -878,7 +805,7 @@ t1:=integrate(1/(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 25
+--S 29
 bb1:=1/(2*c)*log(x^2/(a*x^2+b*x+c))-b/(2*c)*t1.1
 --R 
 --R
@@ -909,7 +836,7 @@ bb1:=1/(2*c)*log(x^2/(a*x^2+b*x+c))-b/(2*c)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 26
+--S 30
 bb2:=1/(2*c)*log(x^2/(a*x^2+b*x+c))-b/(2*c)*t1.2
 --R 
 --R
@@ -926,7 +853,7 @@ bb2:=1/(2*c)*log(x^2/(a*x^2+b*x+c))-b/(2*c)*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 27
+--S 31
 cc1:=bb1-aa.1
 --R
 --R   (5)
@@ -970,7 +897,7 @@ cc1:=bb1-aa.1
 --R                                                     Type: Expression Integer
 --E
 
---S 28
+--S 32
 dd1:=expandLog cc1
 --R
 --R   (6)
@@ -1005,7 +932,7 @@ dd1:=expandLog cc1
 --R                                                     Type: Expression Integer
 --E
 
---S 29     14:269 Schaums and Axiom differ by a constant
+--S 33     14:269 Schaums and Axiom differ by a constant
 ee1:=complexNormalize dd1
 --R
 --R                     3      2 2
@@ -1027,7 +954,7 @@ $$
 <<*>>=
 )clear all
 
---S 30
+--S 34
 aa:=integrate(1/(x^2*(a*x^2+b*x+c)),x)
 --R 
 --R
@@ -1074,7 +1001,7 @@ aa:=integrate(1/(x^2*(a*x^2+b*x+c)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 31
+--S 35
 t1:=integrate(1/(a*x^2+b*x+c),x)
 --R 
 --R
@@ -1108,7 +1035,7 @@ t1:=integrate(1/(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 32
+--S 36
 bb1:=b/(2*c^2)*log((a*x^2+b*x+c)/x^2)-1/(c*x)+(b^2-2*a*c)/(2*c^2)*t1.1
 --R 
 --R
@@ -1139,7 +1066,7 @@ bb1:=b/(2*c^2)*log((a*x^2+b*x+c)/x^2)-1/(c*x)+(b^2-2*a*c)/(2*c^2)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 33
+--S 37
 bb2:=b/(2*c^2)*log((a*x^2+b*x+c)/x^2)-1/(c*x)+(b^2-2*a*c)/(2*c^2)*t1.2
 --R 
 --R
@@ -1163,7 +1090,7 @@ bb2:=b/(2*c^2)*log((a*x^2+b*x+c)/x^2)-1/(c*x)+(b^2-2*a*c)/(2*c^2)*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 34
+--S 38
 cc1:=bb1-aa.1
 --R
 --R   (5)
@@ -1207,7 +1134,7 @@ cc1:=bb1-aa.1
 --R                                                     Type: Expression Integer
 --E
 
---S 35
+--S 39
 dd1:=expandLog cc1
 --R
 --R   (6)
@@ -1242,7 +1169,7 @@ dd1:=expandLog cc1
 --R                                                     Type: Expression Integer
 --E
 
---S 36     14:270 Schaums and Axiom differ by a constant
+--S 40     14:270 Schaums and Axiom differ by a constant
 ee1:=complexNormalize dd1
 --R
 --R                   2          3      2 2
@@ -1265,7 +1192,7 @@ $$
 <<*>>=
 )clear all
 
---S 37     14:271 Axiom cannot compute this integral
+--S 41     14:271 Axiom cannot compute this integral
 aa:=integrate(1/(x^n*(a*x^2+b*x+c)),x)
 --R 
 --R
@@ -1288,7 +1215,7 @@ $$
 <<*>>=
 )clear all
 
---S 38
+--S 42
 aa:=integrate(1/(a*x^2+b*x+c)^2,x)
 --R 
 --R
@@ -1330,7 +1257,7 @@ aa:=integrate(1/(a*x^2+b*x+c)^2,x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 39
+--S 43
 t1:=integrate(1/(a*x^2+b*x+c),x)
 --R 
 --R
@@ -1364,13 +1291,12 @@ t1:=integrate(1/(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 40
-bb1:=(b*x+2*c)/((4*a*c-b^2)*(a*x^2+b*x+c))-b/(4*a*c-b^2)*t1.1
---R 
+--S 44
+bb1:=(2*a*x+b)/((4*a*c-b^2)*(a*x^2+b*x+c))+(2*a)/(4*a*c-b^2)*t1.1
 --R
 --R   (3)
---R                 2    2
---R         (- a b x  - b x - b c)
+--R            2 2
+--R         (2a x  + 2a b x + 2a c)
 --R      *
 --R         log
 --R                                             +-----------+
@@ -1385,7 +1311,7 @@ bb1:=(b*x+2*c)/((4*a*c-b^2)*(a*x^2+b*x+c))-b/(4*a*c-b^2)*t1.1
 --R     + 
 --R                  +-----------+
 --R                  |          2
---R       (b x + 2c)\|- 4a c + b
+--R       (2a x + b)\|- 4a c + b
 --R  /
 --R                                                      +-----------+
 --R         2       2  2              3         2    2   |          2
@@ -1393,99 +1319,70 @@ bb1:=(b*x+2*c)/((4*a*c-b^2)*(a*x^2+b*x+c))-b/(4*a*c-b^2)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 41
-bb2:=(b*x+2*c)/((4*a*c-b^2)*(a*x^2+b*x+c))-b/(4*a*c-b^2)*t1.2
---R 
+--S 45
+bb2:=(2*a*x+b)/((4*a*c-b^2)*(a*x^2+b*x+c))+(2*a)/(4*a*c-b^2)*t1.2
 --R
 --R   (4)
---R                                                +---------+
---R                                                |        2
---R                2     2              (2a x + b)\|4a c - b
---R       (- 2a b x  - 2b x - 2b c)atan(----------------------)
---R                                                    2
---R                                            4a c - b
---R     + 
---R                  +---------+
---R                  |        2
---R       (b x + 2c)\|4a c - b
---R  /
---R                                                      +---------+
---R         2       2  2              3         2    2   |        2
---R     ((4a c - a b )x  + (4a b c - b )x + 4a c  - b c)\|4a c - b
+--R                                          +---------+
+--R                                          |        2                +---------+
+--R      2 2                      (2a x + b)\|4a c - b                 |        2
+--R   (4a x  + 4a b x + 4a c)atan(----------------------) + (2a x + b)\|4a c - b
+--R                                              2
+--R                                      4a c - b
+--R   ----------------------------------------------------------------------------
+--R                                                            +---------+
+--R               2       2  2              3         2    2   |        2
+--R           ((4a c - a b )x  + (4a b c - b )x + 4a c  - b c)\|4a c - b
 --R                                                     Type: Expression Integer
 --E
 
---S 42
+--S 46
 cc1:=aa.1-bb1
 --R
---R   (5)
---R                   2  2     2
---R         ((a b + 2a )x  + (b  + 2a b)x + (b + 2a)c)
---R      *
---R         log
---R                                             +-----------+
---R                   2 2                    2  |          2       2        2
---R                (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (8a c - 2a b )x
---R              + 
---R                          3
---R                4a b c - b
---R           /
---R                 2
---R              a x  + b x + c
---R     + 
---R                              +-----------+
---R                              |          2
---R       ((- b + 2a)x - 2c + b)\|- 4a c + b
---R  /
---R                                                      +-----------+
---R         2       2  2              3         2    2   |          2
---R     ((4a c - a b )x  + (4a b c - b )x + 4a c  - b c)\|- 4a c + b
+--R   (5)  0
 --R                                                     Type: Expression Integer
 --E
 
---S 43
+--S 47
 cc2:=aa.2-bb1
 --R
 --R   (6)
---R                              +---------+
---R               2    2         |        2
---R         (a b x  + b x + b c)\|4a c - b
---R      *
---R         log
---R                                             +-----------+
---R                   2 2                    2  |          2       2        2
---R                (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (8a c - 2a b )x
---R              + 
---R                          3
---R                4a b c - b
---R           /
---R                 2
---R              a x  + b x + c
---R     + 
---R                                                            +---------+
---R                               +-----------+                |        2
---R          2 2                  |          2      (2a x + b)\|4a c - b
---R       (4a x  + 4a b x + 4a c)\|- 4a c + b  atan(----------------------)
---R                                                                2
---R                                                        4a c - b
+--R       -
+--R               +---------+
+--R               |        2
+--R            2a\|4a c - b
+--R         *
+--R            log
+--R                                                +-----------+
+--R                      2 2                    2  |          2       2        2
+--R                   (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (8a c - 2a b )x
+--R                 + 
+--R                             3
+--R                   4a b c - b
+--R              /
+--R                    2
+--R                 a x  + b x + c
 --R     + 
---R                              +-----------+ +---------+
---R                              |          2  |        2
---R       ((- b + 2a)x - 2c + b)\|- 4a c + b  \|4a c - b
+--R                                       +---------+
+--R          +-----------+                |        2
+--R          |          2      (2a x + b)\|4a c - b
+--R       4a\|- 4a c + b  atan(----------------------)
+--R                                           2
+--R                                   4a c - b
 --R  /
---R                                                      +-----------+ +---------+
---R         2       2  2              3         2    2   |          2  |        2
---R     ((4a c - a b )x  + (4a b c - b )x + 4a c  - b c)\|- 4a c + b  \|4a c - b
+--R                 +-----------+ +---------+
+--R              2  |          2  |        2
+--R     (4a c - b )\|- 4a c + b  \|4a c - b
 --R                                                     Type: Expression Integer
 --E
 
---S 44
+--S 48
 cc3:=aa.1-bb2
 --R
 --R   (7)
---R                                 +---------+
---R            2 2                  |        2
---R         (2a x  + 2a b x + 2a c)\|4a c - b
+--R            +---------+
+--R            |        2
+--R         2a\|4a c - b
 --R      *
 --R         log
 --R                                             +-----------+
@@ -1498,41 +1395,23 @@ cc3:=aa.1-bb2
 --R                 2
 --R              a x  + b x + c
 --R     + 
---R                                                            +---------+
---R                               +-----------+                |        2
---R              2     2          |          2      (2a x + b)\|4a c - b
---R       (2a b x  + 2b x + 2b c)\|- 4a c + b  atan(----------------------)
---R                                                                2
---R                                                        4a c - b
---R     + 
---R                              +-----------+ +---------+
---R                              |          2  |        2
---R       ((- b + 2a)x - 2c + b)\|- 4a c + b  \|4a c - b
+--R                                         +---------+
+--R            +-----------+                |        2
+--R            |          2      (2a x + b)\|4a c - b
+--R       - 4a\|- 4a c + b  atan(----------------------)
+--R                                             2
+--R                                     4a c - b
 --R  /
---R                                                      +-----------+ +---------+
---R         2       2  2              3         2    2   |          2  |        2
---R     ((4a c - a b )x  + (4a b c - b )x + 4a c  - b c)\|- 4a c + b  \|4a c - b
+--R                 +-----------+ +---------+
+--R              2  |          2  |        2
+--R     (4a c - b )\|- 4a c + b  \|4a c - b
 --R                                                     Type: Expression Integer
 --E
 
---S 45     14:272 Axiom cannot simplify these expressions
+--S 49     14:272 Schaums and Axiom agree
 cc4:=aa.2-bb2
 --R
---R   (8)
---R                                                                    +---------+
---R                                                                    |        2
---R                  2  2      2                            (2a x + b)\|4a c - b
---R       ((2a b + 4a )x  + (2b  + 4a b)x + (2b + 4a)c)atan(----------------------)
---R                                                                        2
---R                                                                4a c - b
---R     + 
---R                              +---------+
---R                              |        2
---R       ((- b + 2a)x - 2c + b)\|4a c - b
---R  /
---R                                                      +---------+
---R         2       2  2              3         2    2   |        2
---R     ((4a c - a b )x  + (4a b c - b )x + 4a c  - b c)\|4a c - b
+--R   (8)  0
 --R                                                     Type: Expression Integer
 --E
 
@@ -1547,7 +1426,7 @@ $$
 <<*>>=
 )clear all
 
---S 46
+--S 50
 aa:=integrate(x/(a*x^2+b*x+c)^2,x)
 --R 
 --R
@@ -1594,7 +1473,7 @@ aa:=integrate(x/(a*x^2+b*x+c)^2,x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 47
+--S 51
 t1:=integrate(1/(a*x^2+b*x+c),x)
 --R 
 --R
@@ -1628,7 +1507,7 @@ t1:=integrate(1/(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 48
+--S 52
 bb1:=-(b*x+2*c)/((4*a*c-b^2)*(a*x^2+b*x+c))-b/(4*a*c-b^2)*t1.1
 --R 
 --R
@@ -1657,7 +1536,7 @@ bb1:=-(b*x+2*c)/((4*a*c-b^2)*(a*x^2+b*x+c))-b/(4*a*c-b^2)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 49
+--S 53
 bb2:=-(b*x+2*c)/((4*a*c-b^2)*(a*x^2+b*x+c))-b/(4*a*c-b^2)*t1.2
 --R 
 --R
@@ -1679,7 +1558,7 @@ bb2:=-(b*x+2*c)/((4*a*c-b^2)*(a*x^2+b*x+c))-b/(4*a*c-b^2)*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 50
+--S 54
 cc1:=bb1-aa.1
 --R
 --R   (5)
@@ -1717,7 +1596,7 @@ cc1:=bb1-aa.1
 --R                                                     Type: Expression Integer
 --E
 
---S 51
+--S 55
 dd1:=expandLog cc1
 --R
 --R   (6)
@@ -1752,7 +1631,7 @@ dd1:=expandLog cc1
 --R                                                     Type: Expression Integer
 --E
 
---S 52     14:273 Schaums and Axiom differ by a constant
+--S 56     14:273 Schaums and Axiom differ by a constant
 ee1:=complexNormalize dd1
 --R
 --R                       3      2 2
@@ -1775,7 +1654,7 @@ $$
 <<*>>=
 )clear all
 
---S 53
+--S 57
 aa:=integrate(x^2/(a*x^2+b*x+c)^2,x)
 --R 
 --R
@@ -1822,7 +1701,7 @@ aa:=integrate(x^2/(a*x^2+b*x+c)^2,x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 54
+--S 58
 t1:=integrate(1/(a*x^2+b*x+c),x)
 --R 
 --R
@@ -1856,7 +1735,7 @@ t1:=integrate(1/(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 55
+--S 59
 bb1:=((b^2-2*a*c)*x+b*c)/(a*(4*a*c-b^2)*(a*x^2+b*x+c))+(2*c)/(4*a*c-b^2)*t1.1
 --R
 --R   (3)
@@ -1884,7 +1763,7 @@ bb1:=((b^2-2*a*c)*x+b*c)/(a*(4*a*c-b^2)*(a*x^2+b*x+c))+(2*c)/(4*a*c-b^2)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 56
+--S 60
 bb2:=((b^2-2*a*c)*x+b*c)/(a*(4*a*c-b^2)*(a*x^2+b*x+c))+(2*c)/(4*a*c-b^2)*t1.2
 --R
 --R   (4)
@@ -1905,7 +1784,7 @@ bb2:=((b^2-2*a*c)*x+b*c)/(a*(4*a*c-b^2)*(a*x^2+b*x+c))+(2*c)/(4*a*c-b^2)*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 57     14:274 Schaums and Axiom agree
+--S 61     14:274 Schaums and Axiom agree
 cc1:=aa.1-bb1
 --R
 --R   (5)  0
@@ -1928,7 +1807,7 @@ $$
 <<*>>=
 )clear all
 
---S 58     14:275 Axiom cannot compute this integral
+--S 62     14:275 Axiom cannot compute this integral
 aa:=integrate(x^m/(a*x^2+b*x+c)^n,x)
 --R 
 --R
@@ -1956,7 +1835,7 @@ $$
 <<*>>=
 )clear all
 
---S 59     14:276 Axiom cannot compute this integral
+--S 63     14:276 Axiom cannot compute this integral
 aa:=integrate(x^(2*n-1)/(a*x^2+b*x+c)^n,x)
 --R 
 --R
@@ -1984,7 +1863,7 @@ $$
 <<*>>=
 )clear all
 
---S 60
+--S 64
 aa:=integrate(1/(x*(a*x^2+b*x+c)^2),x)
 --R 
 --R
@@ -2058,7 +1937,7 @@ aa:=integrate(1/(x*(a*x^2+b*x+c)^2),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 61
+--S 65
 t1:=integrate(1/(a*x^2+b*x+c)^2,x)
 --R 
 --R
@@ -2100,7 +1979,7 @@ t1:=integrate(1/(a*x^2+b*x+c)^2,x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 62
+--S 66
 t2:=integrate(1/(x*(a*x^2+b*x+c)),x)
 --R 
 --R
@@ -2146,7 +2025,7 @@ t2:=integrate(1/(x*(a*x^2+b*x+c)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 63
+--S 67
 bb1:=1/(2*c*(a*x^2+b*x+c))-b/(2*c)*t1.1+1/c*t2.1
 --R 
 --R
@@ -2201,7 +2080,7 @@ bb1:=1/(2*c*(a*x^2+b*x+c))-b/(2*c)*t1.1+1/c*t2.1
 --R                                                     Type: Expression Integer
 --E
 
---S 64
+--S 68
 bb2:=1/(2*c*(a*x^2+b*x+c))-b/(2*c)*t1.2+1/c*t2.1
 --R 
 --R
@@ -2258,7 +2137,7 @@ bb2:=1/(2*c*(a*x^2+b*x+c))-b/(2*c)*t1.2+1/c*t2.1
 --R                                                     Type: Expression Integer
 --E
 
---S 65
+--S 69
 bb3:=1/(2*c*(a*x^2+b*x+c))-b/(2*c)*t1.1+1/c*t2.2
 --R 
 --R
@@ -2314,7 +2193,7 @@ bb3:=1/(2*c*(a*x^2+b*x+c))-b/(2*c)*t1.1+1/c*t2.2
 --R                                                     Type: Expression Integer
 --E
 
---S 66
+--S 70
 bb4:=1/(2*c*(a*x^2+b*x+c))-b/(2*c)*t1.2+1/c*t2.2
 --R 
 --R
@@ -2351,7 +2230,7 @@ bb4:=1/(2*c*(a*x^2+b*x+c))-b/(2*c)*t1.2+1/c*t2.2
 --R                                                     Type: Expression Integer
 --E
 
---S 67
+--S 71
 cc1:=aa.1-bb1
 --R
 --R   (8)
@@ -2387,7 +2266,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 68
+--S 72
 dd1:=expandLog cc1
 --R
 --R   (9)
@@ -2420,7 +2299,7 @@ dd1:=expandLog cc1
 --R                                                     Type: Expression Integer
 --E
 
---S 69     14:277 Schaums and Axiom differ by a constant
+--S 73     14:277 Schaums and Axiom differ by a constant
 ee1:=complexNormalize dd1
 --R
 --R                        3      2 2
@@ -2447,7 +2326,7 @@ $$
 <<*>>=
 )clear all
 
---S 70
+--S 74
 aa:=integrate(1/(x^2*(a*x^2+b*x+c)^2),x)
 --R 
 --R
@@ -2531,7 +2410,7 @@ aa:=integrate(1/(x^2*(a*x^2+b*x+c)^2),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 71
+--S 75
 t1:=integrate(1/(a*x^2+b*x+c)^2,x)
 --R 
 --R
@@ -2573,7 +2452,7 @@ t1:=integrate(1/(a*x^2+b*x+c)^2,x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 72
+--S 76
 t2:=integrate(1/(x*(a*x^2+b*x+c)^2),x)
 --R 
 --R
@@ -2647,7 +2526,7 @@ t2:=integrate(1/(x*(a*x^2+b*x+c)^2),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 73
+--S 77
 bb1:=-1/(c*x*(a*x^2+b*x+c))-((3*a)/c)*t1.1-(2*b)/c*t2.1
 --R 
 --R
@@ -2704,7 +2583,7 @@ bb1:=-1/(c*x*(a*x^2+b*x+c))-((3*a)/c)*t1.1-(2*b)/c*t2.1
 --R                                                     Type: Expression Integer
 --E
 
---S 74
+--S 78
 bb2:=-1/(c*x*(a*x^2+b*x+c))-((3*a)/c)*t1.2-(2*b)/c*t2.1
 --R 
 --R
@@ -2766,7 +2645,7 @@ bb2:=-1/(c*x*(a*x^2+b*x+c))-((3*a)/c)*t1.2-(2*b)/c*t2.1
 --R                                                     Type: Expression Integer
 --E
 
---S 75
+--S 79
 bb3:=-1/(c*x*(a*x^2+b*x+c))-((3*a)/c)*t1.1-(2*b)/c*t2.2
 --R 
 --R
@@ -2824,7 +2703,7 @@ bb3:=-1/(c*x*(a*x^2+b*x+c))-((3*a)/c)*t1.1-(2*b)/c*t2.2
 --R                                                     Type: Expression Integer
 --E
 
---S 76
+--S 80
 bb4:=-1/(c*x*(a*x^2+b*x+c))-((3*a)/c)*t1.2-(2*b)/c*t2.2
 --R 
 --R
@@ -2866,7 +2745,7 @@ bb4:=-1/(c*x*(a*x^2+b*x+c))-((3*a)/c)*t1.2-(2*b)/c*t2.2
 --R                                                     Type: Expression Integer
 --E
 
---S 77
+--S 81
 cc1:=aa.1-bb1
 --R
 --R   (8)
@@ -2904,7 +2783,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 78
+--S 82
 dd1:=expandLog cc1
 --R
 --R   (9)
@@ -2939,7 +2818,7 @@ dd1:=expandLog cc1
 --R                                                     Type: Expression Integer
 --E
 
---S 79     14:278 Schaums and Axiom differ by a constant
+--S 83     14:278 Schaums and Axiom differ by a constant
 ee1:=complexNormalize dd1
 --R
 --R             2         3      2 2
@@ -2966,7 +2845,7 @@ $$
 <<*>>=
 )clear all
 
---S 80     14:279 Axiom cannot compute this integral
+--S 84     14:279 Axiom cannot compute this integral
 aa:=integrate(1/(x^m*(a*x^2+b*x+c)^n),x)
 --R 
 --R

\start
Date: Thu, 1 May 2008 02:21:10 -0400
From: Tim Daly
To: Stephen Wilson
Subject: Re: Build problem on Slackware Linux 12

Thanks for the patch. I'll apply it and test it on various systems.
It should make the next release if I find no problems.

\start
Date: Fri, 2 May 2008 02:12:31 -0500
From: Tim Daly
To: list
Subject: Schaums help

My copy of Schaums (1968, printing 4) shows

14:334:

int(1/(x*sqrt(x^n-a^n)),x) == 2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))

It seems this cannot be the answers.
Can someone with a later version please check for a typo?

\start
Date: Fri, 2 May 2008 01:36:13 -0500
From: Tim Daly
To: list
Subject: 20080430.01.tpd.patch (CATS schaum13 post-mortem fixup)

Thanks to Barry Trager's help, I can show that this set of expressions
(at least the closed forms) all result in differences by a constant.

14:280 Schaums and Axiom differ by a constant
14:281 Schaums and Axiom differ by a constant
14:282 Schaums and Axiom differ by a constant
14:283 Schaums and Axiom differ by a constant
14:284 Schaums and Axiom differ by a constant
14:285 Schaums and Axiom differ by a constant
14:286 Schaums and Axiom differ by a constant
14:287 Schaums and Axiom differ by a constant
14:288 Schaums and Axiom differ by a constant
14:289 Schaums and Axiom differ by a constant
14:290 Schaums and Axiom differ by a constant
14:291 Schaums and Axiom differ by a constant
14:292 Schaums and Axiom differ by a constant
14:293 Schaums and Axiom differ by a constant
14:294 Schaums and Axiom differ by a constant
14:295 Axiom cannot compute this integral
14:296 Axiom cannot compute this integral
14:297 Axiom cannot compute this integral
14:298 Axiom cannot compute this integral
=========================================================================
diff --git a/changelog b/changelog
index 0086e15..7587673 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080430 tpd src/input/schaum13.input post-mortem fixes
 20080429 tpd src/input/schaum12.input post-mortem fixes
 20080428 tpd src/input/schaum19.input post-mortem fixes
 20080428 tpd src/input/schaum23.input post-mortem fixes
diff --git a/src/input/schaum13.input.pamphlet b/src/input/schaum13.input.pamphlet
index c4a0351..70acff6 100644
--- a/src/input/schaum13.input.pamphlet
+++ b/src/input/schaum13.input.pamphlet
@@ -31,7 +31,6 @@ $$
 
 --S 1
 aa:=integrate(1/sqrt(a*x^2+b*x+c),x)
---R 
 --R
 --R   (1)
 --R   [
@@ -62,14 +61,14 @@ aa:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --E 
 
 --S 2
-bb1:=1/sqrt(a)*log(2*sqrt(a)*sqrt(a*x^2+b*x+c)*2*a*x+b)
+bb1:=1/sqrt(a)*log(2*sqrt(a)*sqrt(a*x^2+b*x+c)+2*a*x+b)
 --R
---R                     +--------------+
---R                 +-+ |   2
---R        log(4a x\|a \|a x  + b x + c  + b)
---R   (2)  ----------------------------------
---R                        +-+
---R                       \|a
+--R                  +--------------+
+--R              +-+ |   2
+--R        log(2\|a \|a x  + b x + c  + 2a x + b)
+--R   (2)  --------------------------------------
+--R                          +-+
+--R                         \|a
 --R                                                     Type: Expression Integer
 --E
 
@@ -105,9 +104,9 @@ bb3:=1/sqrt(a)*asinh((2*a*x+b)/sqrt(4*a*c-b^2))
 cc1:=bb1-aa.1
 --R
 --R   (5)
---R                    +--------------+
---R                +-+ |   2
---R       log(4a x\|a \|a x  + b x + c  + b)
+--R                 +--------------+
+--R             +-+ |   2
+--R       log(2\|a \|a x  + b x + c  + 2a x + b)
 --R     + 
 --R       -
 --R          log
@@ -131,9 +130,9 @@ cc1:=bb1-aa.1
 cc2:=bb1-aa.2
 --R
 --R   (6)
---R                          +--------------+
---R        +---+         +-+ |   2
---R       \|- a log(4a x\|a \|a x  + b x + c  + b)
+--R                       +--------------+
+--R        +---+      +-+ |   2
+--R       \|- a log(2\|a \|a x  + b x + c  + 2a x + b)
 --R     + 
 --R                          +--------------+
 --R                    +---+ |   2               +---+ +-+
@@ -221,7 +220,7 @@ cc5:=bb3-aa.1
 --R                                                     Type: Expression Integer
 --E
 
---S 10     14:280 Axiom cannot simplify these expressions
+--S 10
 cc6:=bb3-aa.2
 --R
 --R   (10)
@@ -237,6 +236,42 @@ cc6:=bb3-aa.2
 --R                                     \|- a \|a
 --R                                                     Type: Expression Integer
 --E
+
+--S 11
+dd1:=simplifyLog cc1
+--R
+--R   (11)
+--R     log
+--R                                                  +--------------+
+--R                         +-+                 +-+  |   2
+--R            ((4a x + 2b)\|c  + (- 2b x - 4c)\|a )\|a x  + b x + c
+--R          + 
+--R                 2              +-+ +-+         2              2
+--R            (4a x  + 4b x + 4c)\|a \|c  - 2a b x  + (- 4a c - b )x - 2b c
+--R       /
+--R                               +--------------+
+--R               +-+ +-+         |   2                   +-+
+--R            (2\|a \|c  - 2a x)\|a x  + b x + c  + 2a x\|c
+--R          + 
+--R                   2             +-+
+--R            (- 2a x  - b x - 2c)\|a
+--R  /
+--R      +-+
+--R     \|a
+--R                                                     Type: Expression Integer
+--E
+
+--S 12     14:280 Schaums and Axiom differ by a constant
+ee1:=ratDenom dd1
+--R
+--R                      +-+     +-+
+--R          +-+    - 2a\|c  + b\|a
+--R         \|a log(----------------)
+--R                         a
+--R   (12)  -------------------------
+--R                     a
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.281~~~~~$\displaystyle
@@ -499,7 +534,7 @@ cc3:=bb2-aa.1
 --R                                                     Type: Expression Integer
 --E
 
---S 18     14:281 Axiom cannot simplify these expressions
+--S 18
 cc4:=bb2-aa.2
 --R
 --R             +--------------+
@@ -512,6 +547,15 @@ cc4:=bb2-aa.2
 --R                                                     Type: Expression Integer
 --E
 
+--S 19     14:281 Schaums and Axiom differ by a constant
+dd1:=ratDenom cc4
+--R
+--R           +-+
+--R          \|c
+--R   (9)  - ----
+--R            a
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.282~~~~~$\displaystyle
@@ -524,48 +568,85 @@ $$
 )clear all
 
 --S 19
-aa:=integrate(x^2/(a*x^2+b*x+c),x)
---R 
+aa:=integrate(x^2/sqrt(a*x^2+b*x+c),x)
 --R
 --R   (1)
 --R   [
---R                    2
---R           (2a c - b )
+--R                                                      +--------------+
+--R                            3          2      2   +-+ |   2
+--R             ((16a b c - 12b )x + 32a c  - 24b c)\|c \|a x  + b x + c
+--R           + 
+--R                 2 2       2      4  2             2      3           3      2 2
+--R           (- 16a c  + 8a b c + 3b )x  + (- 32a b c  + 24b c)x - 32a c  + 24b c
 --R        *
 --R           log
---R                                               +-----------+
---R                     2 2                    2  |          2         2        2
---R                  (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (- 8a c + 2a b )x
+--R                                     +--------------+
+--R                     +-+ +-+         |   2                   +-+
+--R                  (2\|a \|c  + 2a x)\|a x  + b x + c  - 2a x\|c
 --R                + 
---R                              3
---R                  - 4a b c + b
+--R                         2             +-+
+--R                  (- 2a x  - b x - 2c)\|a
 --R             /
---R                   2
---R                a x  + b x + c
+--R                      +--------------+
+--R                  +-+ |   2
+--R                2\|c \|a x  + b x + c  - b x - 2c
 --R       + 
---R                                          +-----------+
---R                     2                    |          2
---R         (- b log(a x  + b x + c) + 2a x)\|- 4a c + b
+--R                  2        2  3                 3  2           2      2     +-+
+--R           ((- 16a c - 4a b )x  + (- 8a b c + 6b )x  + (- 32a c  + 24b c)x)\|a
+--R        *
+--R            +--------------+
+--R            |   2
+--R           \|a x  + b x + c
+--R       + 
+--R                  2   4       2        2  3                 3  2
+--R               16a b x  + (32a c - 8a b )x  + (24a b c - 18b )x
+--R             + 
+--R                     2      2
+--R               (32a c  - 24b c)x
+--R        *
+--R            +-+ +-+
+--R           \|a \|c
 --R    /
---R           +-----------+
---R         2 |          2
---R       2a \|- 4a c + b
+--R                                   +--------------+
+--R             2         2   +-+ +-+ |   2
+--R         (32a b x + 64a c)\|a \|c \|a x  + b x + c
+--R       + 
+--R                3      2 2  2      2           2 2  +-+
+--R         ((- 32a c - 8a b )x  - 64a b c x - 64a c )\|a
 --R     ,
 --R
---R                                       +---------+
---R                                       |        2
---R                     2      (2a x + b)\|4a c - b
---R         (- 4a c + 2b )atan(----------------------)
---R                                           2
---R                                   4a c - b
+--R                                                        +--------------+
+--R                              3          2      2   +-+ |   2
+--R             ((- 16a b c + 12b )x - 32a c  + 24b c)\|c \|a x  + b x + c
+--R           + 
+--R                 2 2       2      4  2           2      3           3      2 2
+--R             (16a c  - 8a b c - 3b )x  + (32a b c  - 24b c)x + 32a c  - 24b c
+--R        *
+--R                       +--------------+
+--R                 +---+ |   2               +---+ +-+
+--R                \|- a \|a x  + b x + c  - \|- a \|c
+--R           atan(------------------------------------)
+--R                                 a x
+--R       + 
+--R                 2        2  3                 3  2           2      2     +---+
+--R           ((- 8a c - 2a b )x  + (- 4a b c + 3b )x  + (- 16a c  + 12b c)x)\|- a
+--R        *
+--R            +--------------+
+--R            |   2
+--R           \|a x  + b x + c
 --R       + 
---R                                          +---------+
---R                     2                    |        2
---R         (- b log(a x  + b x + c) + 2a x)\|4a c - b
+--R              2   4       2        2  3                3  2         2      2
+--R           (8a b x  + (16a c - 4a b )x  + (12a b c - 9b )x  + (16a c  - 12b c)x)
+--R        *
+--R            +---+ +-+
+--R           \|- a \|c
 --R    /
---R           +---------+
---R         2 |        2
---R       2a \|4a c - b
+--R                                     +--------------+
+--R             2         2   +---+ +-+ |   2
+--R         (16a b x + 32a c)\|- a \|c \|a x  + b x + c
+--R       + 
+--R                3      2 2  2      2           2 2  +---+
+--R         ((- 16a c - 4a b )x  - 32a b c x - 32a c )\|- a
 --R     ]
 --R                                     Type: Union(List Expression Integer,...)
 --E
@@ -652,14 +733,17 @@ bb2:=(2*a*x-3*b)/(4*a^2)*sqrt(a*x^2+b*x+c)+(3*b^2-4*a*c)/(8*a^2)*t1.2
 cc1:=aa.1-bb1
 --R
 --R   (5)
---R                      +-----------+
---R                   2  |          2
---R         (4a c - 3b )\|- 4a c + b
+--R                                                    +--------------+
+--R                          3          2      2   +-+ |   2
+--R           ((16a b c - 12b )x + 32a c  - 24b c)\|c \|a x  + b x + c
+--R         + 
+--R               2 2       2      4  2             2      3           3      2 2
+--R         (- 16a c  + 8a b c + 3b )x  + (- 32a b c  + 24b c)x - 32a c  + 24b c
 --R      *
 --R         log
 --R                                   +--------------+
 --R                   +-+ +-+         |   2                   +-+
---R                (2\|a \|c  - 2a x)\|a x  + b x + c  + 2a x\|c
+--R                (2\|a \|c  + 2a x)\|a x  + b x + c  - 2a x\|c
 --R              + 
 --R                       2             +-+
 --R                (- 2a x  - b x - 2c)\|a
@@ -668,31 +752,38 @@ cc1:=aa.1-bb1
 --R                +-+ |   2
 --R              2\|c \|a x  + b x + c  - b x - 2c
 --R     + 
---R                   2  +-+
---R         (8a c - 4b )\|a
+--R                                                    +--------------+
+--R                          3          2      2   +-+ |   2
+--R           ((16a b c - 12b )x + 32a c  - 24b c)\|c \|a x  + b x + c
+--R         + 
+--R               2 2       2      4  2             2      3           3      2 2
+--R         (- 16a c  + 8a b c + 3b )x  + (- 32a b c  + 24b c)x - 32a c  + 24b c
 --R      *
 --R         log
---R                                             +-----------+
---R                   2 2                    2  |          2         2        2
---R                (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (- 8a c + 2a b )x
+--R                                   +--------------+
+--R                   +-+ +-+         |   2                   +-+
+--R                (2\|a \|c  - 2a x)\|a x  + b x + c  + 2a x\|c
 --R              + 
---R                            3
---R                - 4a b c + b
+--R                       2             +-+
+--R                (- 2a x  - b x - 2c)\|a
 --R           /
---R                 2
---R              a x  + b x + c
+--R                    +--------------+
+--R                +-+ |   2
+--R              2\|c \|a x  + b x + c  - b x - 2c
 --R     + 
---R                     +-----------+     +--------------+
---R                     |          2  +-+ |   2
---R       (- 4a x + 6b)\|- 4a c + b  \|a \|a x  + b x + c
+--R                                +--------------+
+--R             2           2  +-+ |   2
+--R       (- 24b c x - 48b c )\|a \|a x  + b x + c
 --R     + 
---R                                         +-----------+
---R                    2                    |          2  +-+
---R       (- 4b log(a x  + b x + c) + 8a x)\|- 4a c + b  \|a
+--R                     3  2      2           2  +-+ +-+
+--R       ((24a b c + 6b )x  + 48b c x + 48b c )\|a \|c
 --R  /
---R         +-----------+
---R       2 |          2  +-+
---R     8a \|- 4a c + b  \|a
+--R                                 +--------------+
+--R           2         2   +-+ +-+ |   2
+--R       (32a b x + 64a c)\|a \|c \|a x  + b x + c
+--R     + 
+--R              3      2 2  2      2           2 2  +-+
+--R       ((- 32a c - 8a b )x  - 64a b c x - 64a c )\|a
 --R                                                     Type: Expression Integer
 --E
 
@@ -700,9 +791,18 @@ cc1:=aa.1-bb1
 cc2:=aa.2-bb1
 --R
 --R   (6)
---R                      +---------+
---R                   2  |        2
---R         (4a c - 3b )\|4a c - b
+--R                                                          +--------------+
+--R                          3          2      2   +---+ +-+ |   2
+--R           ((16a b c - 12b )x + 32a c  - 24b c)\|- a \|c \|a x  + b x + c
+--R         + 
+--R                     2 2       2      4  2             2      3           3
+--R               (- 16a c  + 8a b c + 3b )x  + (- 32a b c  + 24b c)x - 32a c
+--R             + 
+--R                  2 2
+--R               24b c
+--R          *
+--R              +---+
+--R             \|- a
 --R      *
 --R         log
 --R                                   +--------------+
@@ -716,24 +816,38 @@ cc2:=aa.2-bb1
 --R                +-+ |   2
 --R              2\|c \|a x  + b x + c  - b x - 2c
 --R     + 
---R                                          +---------+
---R                                          |        2
---R                    2  +-+     (2a x + b)\|4a c - b
---R       (- 16a c + 8b )\|a atan(----------------------)
---R                                              2
---R                                      4a c - b
+--R                                                          +--------------+
+--R                            3          2      2   +-+ +-+ |   2
+--R           ((- 32a b c + 24b )x - 64a c  + 48b c)\|a \|c \|a x  + b x + c
+--R         + 
+--R                     2 2        2      4  2           2      3           3
+--R                 (32a c  - 16a b c - 6b )x  + (64a b c  - 48b c)x + 64a c
+--R               + 
+--R                      2 2
+--R                 - 48b c
+--R          *
+--R              +-+
+--R             \|a
+--R      *
+--R                     +--------------+
+--R               +---+ |   2               +---+ +-+
+--R              \|- a \|a x  + b x + c  - \|- a \|c
+--R         atan(------------------------------------)
+--R                               a x
 --R     + 
---R                         +---------+ +--------------+
---R                     +-+ |        2  |   2
---R       (- 4a x + 6b)\|a \|4a c - b  \|a x  + b x + c
+--R                                      +--------------+
+--R             2           2  +---+ +-+ |   2
+--R       (- 24b c x - 48b c )\|- a \|a \|a x  + b x + c
 --R     + 
---R                                             +---------+
---R                    2                    +-+ |        2
---R       (- 4b log(a x  + b x + c) + 8a x)\|a \|4a c - b
+--R                     3  2      2           2  +---+ +-+ +-+
+--R       ((24a b c + 6b )x  + 48b c x + 48b c )\|- a \|a \|c
 --R  /
---R             +---------+
---R       2 +-+ |        2
---R     8a \|a \|4a c - b
+--R                                       +--------------+
+--R           2         2   +---+ +-+ +-+ |   2
+--R       (32a b x + 64a c)\|- a \|a \|c \|a x  + b x + c
+--R     + 
+--R              3      2 2  2      2           2 2  +---+ +-+
+--R       ((- 32a c - 8a b )x  - 64a b c x - 64a c )\|- a \|a
 --R                                                     Type: Expression Integer
 --E
 
@@ -741,9 +855,18 @@ cc2:=aa.2-bb1
 cc3:=aa.2-bb1
 --R
 --R   (7)
---R                      +---------+
---R                   2  |        2
---R         (4a c - 3b )\|4a c - b
+--R                                                          +--------------+
+--R                          3          2      2   +---+ +-+ |   2
+--R           ((16a b c - 12b )x + 32a c  - 24b c)\|- a \|c \|a x  + b x + c
+--R         + 
+--R                     2 2       2      4  2             2      3           3
+--R               (- 16a c  + 8a b c + 3b )x  + (- 32a b c  + 24b c)x - 32a c
+--R             + 
+--R                  2 2
+--R               24b c
+--R          *
+--R              +---+
+--R             \|- a
 --R      *
 --R         log
 --R                                   +--------------+
@@ -757,58 +880,71 @@ cc3:=aa.2-bb1
 --R                +-+ |   2
 --R              2\|c \|a x  + b x + c  - b x - 2c
 --R     + 
---R                                          +---------+
---R                                          |        2
---R                    2  +-+     (2a x + b)\|4a c - b
---R       (- 16a c + 8b )\|a atan(----------------------)
---R                                              2
---R                                      4a c - b
+--R                                                          +--------------+
+--R                            3          2      2   +-+ +-+ |   2
+--R           ((- 32a b c + 24b )x - 64a c  + 48b c)\|a \|c \|a x  + b x + c
+--R         + 
+--R                     2 2        2      4  2           2      3           3
+--R                 (32a c  - 16a b c - 6b )x  + (64a b c  - 48b c)x + 64a c
+--R               + 
+--R                      2 2
+--R                 - 48b c
+--R          *
+--R              +-+
+--R             \|a
+--R      *
+--R                     +--------------+
+--R               +---+ |   2               +---+ +-+
+--R              \|- a \|a x  + b x + c  - \|- a \|c
+--R         atan(------------------------------------)
+--R                               a x
 --R     + 
---R                         +---------+ +--------------+
---R                     +-+ |        2  |   2
---R       (- 4a x + 6b)\|a \|4a c - b  \|a x  + b x + c
+--R                                      +--------------+
+--R             2           2  +---+ +-+ |   2
+--R       (- 24b c x - 48b c )\|- a \|a \|a x  + b x + c
 --R     + 
---R                                             +---------+
---R                    2                    +-+ |        2
---R       (- 4b log(a x  + b x + c) + 8a x)\|a \|4a c - b
+--R                     3  2      2           2  +---+ +-+ +-+
+--R       ((24a b c + 6b )x  + 48b c x + 48b c )\|- a \|a \|c
 --R  /
---R             +---------+
---R       2 +-+ |        2
---R     8a \|a \|4a c - b
+--R                                       +--------------+
+--R           2         2   +---+ +-+ +-+ |   2
+--R       (32a b x + 64a c)\|- a \|a \|c \|a x  + b x + c
+--R     + 
+--R              3      2 2  2      2           2 2  +---+ +-+
+--R       ((- 32a c - 8a b )x  - 64a b c x - 64a c )\|- a \|a
 --R                                                     Type: Expression Integer
 --E
 
---S 26     14:282 Axiom cannot simplify these expressions
+--S 26
 cc4:=aa.2-bb2
 --R
 --R   (8)
---R                                           +--------------+
---R                    +---------+      +---+ |   2               +---+ +-+
---R                 2  |        2      \|- a \|a x  + b x + c  - \|- a \|c
---R       (4a c - 3b )\|4a c - b  atan(------------------------------------)
---R                                                     a x
---R     + 
---R                                           +---------+
---R                                           |        2
---R                   2  +---+     (2a x + b)\|4a c - b
---R       (- 8a c + 4b )\|- a atan(----------------------)
---R                                               2
---R                                       4a c - b
---R     + 
---R                           +---------+ +--------------+
---R                     +---+ |        2  |   2
---R       (- 2a x + 3b)\|- a \|4a c - b  \|a x  + b x + c
---R     + 
---R                                               +---------+
---R                    2                    +---+ |        2
---R       (- 2b log(a x  + b x + c) + 4a x)\|- a \|4a c - b
+--R                            +--------------+
+--R             2           2  |   2
+--R       (- 12b c x - 24b c )\|a x  + b x + c
+--R     + 
+--R                     3  2      2           2  +-+
+--R       ((12a b c + 3b )x  + 24b c x + 24b c )\|c
 --R  /
---R               +---------+
---R       2 +---+ |        2
---R     4a \|- a \|4a c - b
+--R                             +--------------+
+--R           2         2   +-+ |   2                    3      2 2  2      2
+--R       (16a b x + 32a c)\|c \|a x  + b x + c  + (- 16a c - 4a b )x  - 32a b c x
+--R     + 
+--R            2 2
+--R       - 32a c
 --R                                                     Type: Expression Integer
 --E
 
+--S 27     14:282 Schaums and Axiom differ by a constant
+dd4:=ratDenom cc4
+--R
+--R             +-+
+--R          3b\|c
+--R   (9)  - ------
+--R              2
+--R            4a
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.283~~~~~$\displaystyle
@@ -832,13 +968,16 @@ $$
 )clear all
 
 --S 27
-aa:=integrate(1/x*(a*x^2+b*x+c),x)
---R 
+aa:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R
---R                       2
---R        2c log(x) + a x  + 2b x
---R   (1)  -----------------------
---R                   2
+--R                  +--------------+
+--R              +-+ |   2
+--R            2\|c \|a x  + b x + c  - b x - 2c
+--R        log(---------------------------------)
+--R                            x
+--R   (1)  --------------------------------------
+--R                          +-+
+--R                         \|c
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
@@ -871,16 +1010,16 @@ bb2:=1/sqrt(-c)*asin((b*x+2*c)/(x*sqrt(b^2-4*a*c)))
 --E
 
 --S 30
-bb3:=-1/sqrt(c)*asinh((b*x+2*c)/(x*sqrt(b^2-4*a*c)))
---R
---R                    b x + 2c
---R          asinh(---------------)
---R                  +-----------+
---R                  |          2
---R                x\|- 4a c + b
---R   (4)  - ----------------------
---R                    +-+
---R                   \|c
+bb3:=-1/sqrt(c)*asinh((b*x+2*c)/(x*sqrt(4*a*c-b^2)))
+--R
+--R                   b x + 2c
+--R          asinh(-------------)
+--R                  +---------+
+--R                  |        2
+--R                x\|4a c - b
+--R   (4)  - --------------------
+--R                   +-+
+--R                  \|c
 --R                                                     Type: Expression Integer
 --E
 
@@ -888,42 +1027,96 @@ bb3:=-1/sqrt(c)*asinh((b*x+2*c)/(x*sqrt(b^2-4*a*c)))
 cc1:=aa-bb1
 --R
 --R   (5)
---R              +--------------+
---R          +-+ |   2
---R        2\|c \|a x  + b x + c  + b x + 2c                    2         +-+
---R   2log(---------------------------------) + (2c log(x) + a x  + 2b x)\|c
---R                        x
---R   -----------------------------------------------------------------------
---R                                      +-+
---R                                    2\|c
+--R                 +--------------+
+--R             +-+ |   2
+--R           2\|c \|a x  + b x + c  + b x + 2c
+--R       log(---------------------------------)
+--R                           x
+--R     + 
+--R                 +--------------+
+--R             +-+ |   2
+--R           2\|c \|a x  + b x + c  - b x - 2c
+--R       log(---------------------------------)
+--R                           x
+--R  /
+--R      +-+
+--R     \|c
 --R                                                     Type: Expression Integer
 --E
 
 --S 32
 cc2:=aa-bb2
 --R
---R                    b x + 2c                       2         +---+
---R        - 2asin(---------------) + (2c log(x) + a x  + 2b x)\|- c
---R                  +-----------+
---R                  |          2
---R                x\|- 4a c + b
---R   (6)  ----------------------------------------------------------
---R                                    +---+
---R                                  2\|- c
+--R   (6)
+--R                   +--------------+
+--R               +-+ |   2
+--R    +---+    2\|c \|a x  + b x + c  - b x - 2c     +-+         b x + 2c
+--R   \|- c log(---------------------------------) - \|c asin(---------------)
+--R                             x                               +-----------+
+--R                                                             |          2
+--R                                                           x\|- 4a c + b
+--R   ------------------------------------------------------------------------
+--R                                   +---+ +-+
+--R                                  \|- c \|c
 --R                                                     Type: Expression Integer
 --E
 
---S 33     14:283 Axiom cannot simplify these expressions
+--S 33
 cc3:=aa-bb3
 --R
---R                   b x + 2c                       2         +-+
---R        2asinh(---------------) + (2c log(x) + a x  + 2b x)\|c
---R                 +-----------+
---R                 |          2
---R               x\|- 4a c + b
---R   (7)  -------------------------------------------------------
---R                                   +-+
---R                                 2\|c
+--R                  +--------------+
+--R              +-+ |   2
+--R            2\|c \|a x  + b x + c  - b x - 2c             b x + 2c
+--R        log(---------------------------------) + asinh(-------------)
+--R                            x                            +---------+
+--R                                                         |        2
+--R                                                       x\|4a c - b
+--R   (7)  -------------------------------------------------------------
+--R                                      +-+
+--R                                     \|c
+--R                                                     Type: Expression Integer
+--E
+
+--S 34
+dd1:=expandLog cc1
+--R
+--R   (8)
+--R                 +--------------+
+--R             +-+ |   2
+--R       log(2\|c \|a x  + b x + c  + b x + 2c)
+--R     + 
+--R                 +--------------+
+--R             +-+ |   2
+--R       log(2\|c \|a x  + b x + c  - b x - 2c) - 2log(x)
+--R  /
+--R      +-+
+--R     \|c
+--R                                                     Type: Expression Integer
+--E
+
+--S 35
+ee1:=ratDenom dd1
+--R
+--R   (9)
+--R                     +--------------+
+--R        +-+      +-+ |   2
+--R       \|c log(2\|c \|a x  + b x + c  + b x + 2c)
+--R     + 
+--R                     +--------------+
+--R        +-+      +-+ |   2                                  +-+
+--R       \|c log(2\|c \|a x  + b x + c  - b x - 2c) - 2log(x)\|c
+--R  /
+--R     c
+--R                                                     Type: Expression Integer
+--E
+
+--S 36     14:283 Schaums and Axiom differ by a constant
+ff1:=complexNormalize ee1
+--R
+--R                     2  +-+
+--R         log(4a c - b )\|c
+--R   (10)  ------------------
+--R                  c
 --R                                                     Type: Expression Integer
 --E
 @
@@ -936,54 +1129,31 @@ $$
 <<*>>=
 )clear all
 
---S 34
-aa:=integrate(1/(x^2*(a*x^2+b*x+c)),x)
---R 
+--S 37
+aa:=integrate(1/(x^2*sqrt(a*x^2+b*x+c)),x)
 --R
 --R   (1)
---R   [
---R                    2
---R           (2a c - b )x
---R        *
---R           log
---R                                               +-----------+
---R                     2 2                    2  |          2         2        2
---R                  (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (- 8a c + 2a b )x
---R                + 
---R                              3
---R                  - 4a b c + b
---R             /
---R                   2
---R                a x  + b x + c
---R       + 
---R                                                      +-----------+
---R                     2                                |          2
---R         (b x log(a x  + b x + c) - 2b x log(x) - 2c)\|- 4a c + b
---R    /
---R            +-----------+
---R         2  |          2
---R       2c x\|- 4a c + b
---R     ,
---R
---R                                         +---------+
---R                                         |        2
---R                     2        (2a x + b)\|4a c - b
---R         (- 4a c + 2b )x atan(----------------------)
---R                                             2
---R                                     4a c - b
---R       + 
---R                                                      +---------+
---R                     2                                |        2
---R         (b x log(a x  + b x + c) - 2b x log(x) - 2c)\|4a c - b
---R    /
---R            +---------+
---R         2  |        2
---R       2c x\|4a c - b
---R     ]
---R                                     Type: Union(List Expression Integer,...)
+--R                     +--------------+
+--R                 +-+ |   2                2 2
+--R         (- 4b x\|c \|a x  + b x + c  + 2b x  + 4b c x)
+--R      *
+--R                +--------------+
+--R                |   2                           +-+
+--R             2c\|a x  + b x + c  + (- b x - 2c)\|c
+--R         log(--------------------------------------)
+--R                              2c x
+--R     + 
+--R                       +--------------+
+--R                   +-+ |   2                         2  2              2
+--R       (2b x + 8c)\|c \|a x  + b x + c  + (- 8a c + b )x  - 6b c x - 8c
+--R  /
+--R          +--------------+
+--R       2  |   2                       2     2   +-+
+--R     8c x\|a x  + b x + c  + (- 4b c x  - 8c x)\|c
+--R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 35
+--S 38
 t1:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R
 --R                  +--------------+
@@ -997,13 +1167,13 @@ t1:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 36
-bb:=-sqrt(a*x^2+b*x+c)/(c*x)-b/(2*x)*t1
+--S 39
+bb:=-sqrt(a*x^2+b*x+c)/(c*x)-b/(2*c)*t1
 --R
 --R                        +--------------+
 --R                    +-+ |   2                                +--------------+
 --R                  2\|c \|a x  + b x + c  - b x - 2c      +-+ |   2
---R        - b c log(---------------------------------) - 2\|c \|a x  + b x + c
+--R        - b x log(---------------------------------) - 2\|c \|a x  + b x + c
 --R                                  x
 --R   (3)  ---------------------------------------------------------------------
 --R                                            +-+
@@ -1011,64 +1181,104 @@ bb:=-sqrt(a*x^2+b*x+c)/(c*x)-b/(2*x)*t1
 --R                                                     Type: Expression Integer
 --E
 
---S 37
-cc1:=aa.1-bb1
+--S 40
+cc:=aa-bb
 --R
 --R   (4)
---R                  2
---R         (2a c - b )x
+--R               +--------------+
+--R               |   2                   2          +-+
+--R         (4b c\|a x  + b x + c  + (- 2b x - 4b c)\|c )
 --R      *
---R         log
---R                                             +-----------+
---R                   2 2                    2  |          2         2        2
---R                (2a x  + 2a b x - 2a c + b )\|- 4a c + b   + (- 8a c + 2a b )x
---R              + 
---R                            3
---R                - 4a b c + b
---R           /
---R                 2
---R              a x  + b x + c
+--R                   +--------------+
+--R               +-+ |   2
+--R             2\|c \|a x  + b x + c  - b x - 2c
+--R         log(---------------------------------)
+--R                             x
+--R     + 
+--R                 +--------------+
+--R                 |   2                 2          +-+
+--R         (- 4b c\|a x  + b x + c  + (2b x + 4b c)\|c )
+--R      *
+--R                +--------------+
+--R                |   2                           +-+
+--R             2c\|a x  + b x + c  + (- b x - 2c)\|c
+--R         log(--------------------------------------)
+--R                              2c x
 --R     + 
---R                                                               +-----------+
---R                   2                                  2        |          2
---R       (b x log(a x  + b x + c) - 2b x log(x) - 2bb1 c x - 2c)\|- 4a c + b
+--R              +--------------+
+--R              |   2                2          +-+
+--R       - 2b c\|a x  + b x + c  + (b x + 2b c)\|c
 --R  /
---R          +-----------+
---R       2  |          2
---R     2c x\|- 4a c + b
+--R             +--------------+
+--R       2 +-+ |   2                  2      3
+--R     8c \|c \|a x  + b x + c  - 4b c x - 8c
 --R                                                     Type: Expression Integer
 --E
 
---S 38     14:284 Axiom cannot simplify these expressions
-cc2:=aa.2-bb
+--S 41
+dd:=expandLog cc
 --R
 --R   (5)
---R                                 +--------------+
---R            +---------+      +-+ |   2
---R          2 |        2     2\|c \|a x  + b x + c  - b x - 2c
---R       b c \|4a c - b  log(---------------------------------)
---R                                           x
---R     + 
---R                                          +---------+
---R                                          |        2
---R                   2   +-+     (2a x + b)\|4a c - b
---R       (- 4a c + 2b )x\|c atan(----------------------)
---R                                              2
---R                                      4a c - b
---R     + 
---R              +---------+ +--------------+
---R          +-+ |        2  |   2
---R       2c\|c \|4a c - b  \|a x  + b x + c
---R     + 
---R                                                        +---------+
---R                   2                                +-+ |        2
---R       (b x log(a x  + b x + c) - 2b x log(x) - 2c)\|c \|4a c - b
+--R               +--------------+
+--R               |   2                   2          +-+
+--R         (4b c\|a x  + b x + c  + (- 2b x - 4b c)\|c )
+--R      *
+--R                   +--------------+
+--R               +-+ |   2
+--R         log(2\|c \|a x  + b x + c  - b x - 2c)
+--R     + 
+--R                 +--------------+
+--R                 |   2                 2          +-+
+--R         (- 4b c\|a x  + b x + c  + (2b x + 4b c)\|c )
+--R      *
+--R                +--------------+
+--R                |   2                           +-+
+--R         log(2c\|a x  + b x + c  + (- b x - 2c)\|c )
+--R     + 
+--R                                          +--------------+
+--R                                          |   2
+--R       (4b c log(c) + 4b c log(2) - 2b c)\|a x  + b x + c
+--R     + 
+--R             2                       2                   2          +-+
+--R       ((- 2b x - 4b c)log(c) + (- 2b x - 4b c)log(2) + b x + 2b c)\|c
 --R  /
---R              +---------+
---R       2  +-+ |        2
---R     2c x\|c \|4a c - b
+--R             +--------------+
+--R       2 +-+ |   2                  2      3
+--R     8c \|c \|a x  + b x + c  - 4b c x - 8c
+--R                                                     Type: Expression Integer
+--E
+
+--S 42
+ee:=ratDenom dd
+--R
+--R   (6)
+--R                       +--------------+
+--R          +-+      +-+ |   2
+--R       2b\|c log(2\|c \|a x  + b x + c  - b x - 2c)
+--R     + 
+--R                      +--------------+
+--R            +-+       |   2                           +-+
+--R       - 2b\|c log(2c\|a x  + b x + c  + (- b x - 2c)\|c )
+--R     + 
+--R                                   +-+
+--R       (2b log(c) + 2b log(2) - b)\|c
+--R  /
+--R       2
+--R     4c
+--R                                                     Type: Expression Integer
+--E
+
+--S 43     14:284 Schaums and Axiom differ by a constant
+ff:=complexNormalize ee
+--R
+--R                                   +-+
+--R        (b log(c) + 2b log(2) - b)\|c
+--R   (7)  ------------------------------
+--R                        2
+--R                      4c
 --R                                                     Type: Expression Integer
 --E
+
 @
 
 \section{\cite{1}:14.285~~~~~$\displaystyle
@@ -1080,7 +1290,7 @@ $$
 <<*>>=
 )clear all
 
---S 39
+--S 44
 aa:=integrate(sqrt(a*x^2+b*x+c),x)
 --R 
 --R
@@ -1165,7 +1375,7 @@ aa:=integrate(sqrt(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 40
+--S 45
 t1:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --R
 --R   (2)
@@ -1196,7 +1406,7 @@ t1:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 41
+--S 46
 bb1:=((2*a*x+b)*sqrt(a*x^2+b*x+c))/(4*a)+(4*a*c-b^2)/(8*a)*t1.1
 --R
 --R   (3)
@@ -1224,7 +1434,7 @@ bb1:=((2*a*x+b)*sqrt(a*x^2+b*x+c))/(4*a)+(4*a*c-b^2)/(8*a)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 42
+--S 47
 bb2:=((2*a*x+b)*sqrt(a*x^2+b*x+c))/(4*a)+(4*a*c-b^2)/(8*a)*t1.2
 --R
 --R   (4)
@@ -1243,7 +1453,7 @@ bb2:=((2*a*x+b)*sqrt(a*x^2+b*x+c))/(4*a)+(4*a*c-b^2)/(8*a)*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 43
+--S 48
 cc1:=aa.1-bb1
 --R
 --R   (5)
@@ -1263,7 +1473,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 44
+--S 49
 cc2:=aa.2-bb1
 --R
 --R   (6)
@@ -1315,7 +1525,7 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 45
+--S 50
 cc3:=aa.1-bb2
 --R
 --R   (7)
@@ -1367,7 +1577,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 46     14:285 Axiom cannot simplify these expressions
+--S 51
 cc4:=aa.2-bb2
 --R
 --R   (8)
@@ -1386,6 +1596,16 @@ cc4:=aa.2-bb2
 --R       - 32a c
 --R                                                     Type: Expression Integer
 --E
+
+--S 52     14:285 Schaums and Axiom differ by a constant
+dd4:=ratDenom cc4
+--R
+--R          +-+
+--R        b\|c
+--R   (9)  -----
+--R          4a
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.286~~~~~$\displaystyle
@@ -1403,7 +1623,7 @@ $$
 <<*>>=
 )clear all
 
---S 47
+--S 53
 aa:=integrate(x*sqrt(a*x^2+b*x+c),x)
 --R 
 --R
@@ -1548,7 +1768,7 @@ aa:=integrate(x*sqrt(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 48
+--S 54
 t1:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --R
 --R   (2)
@@ -1579,7 +1799,7 @@ t1:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 49
+--S 55
 bb1:=(a*x^2+b*x+c)^(3/2)/(3*a)-(b*(2*a*x+b))/(8*a^2)*sqrt(a*x^2+b*x+c)-(b*(4*a*c-b^2))/(16*a^2)*t1.1
 --R
 --R   (3)
@@ -1607,7 +1827,7 @@ bb1:=(a*x^2+b*x+c)^(3/2)/(3*a)-(b*(2*a*x+b))/(8*a^2)*sqrt(a*x^2+b*x+c)-(b*(4*a*c
 --R                                                     Type: Expression Integer
 --E
 
---S 50
+--S 56
 bb2:=(a*x^2+b*x+c)^(3/2)/(3*a)-(b*(2*a*x+b))/(8*a^2)*sqrt(a*x^2+b*x+c)-(b*(4*a*c-b^2))/(16*a^2)*t1.2
 --R
 --R   (4)
@@ -1626,7 +1846,7 @@ bb2:=(a*x^2+b*x+c)^(3/2)/(3*a)-(b*(2*a*x+b))/(8*a^2)*sqrt(a*x^2+b*x+c)-(b*(4*a*c
 --R                                                     Type: Expression Integer
 --E
 
---S 51
+--S 57
 cc1:=aa.1-bb1
 --R
 --R   (5)
@@ -1720,7 +1940,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 52
+--S 58
 cc2:=aa.2-bb1
 --R
 --R   (6)
@@ -1823,7 +2043,7 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 53
+--S 59
 cc3:=aa.1-bb2
 --R
 --R   (7)
@@ -1926,7 +2146,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 54     14:286 Axiom cannot simplify these expressions
+--S 60
 cc4:=aa.2-bb2
 --R
 --R   (8)
@@ -1957,6 +2177,17 @@ cc4:=aa.2-bb2
 --R     (- 288a b c - 24a b )x  + (- 576a c  - 432a b c)x  - 1152a b c x - 768a c
 --R                                                     Type: Expression Integer
 --E
+
+--S 61     14:286 Schaums and Axiom differ by a constant
+dd4:=ratDenom cc4
+--R
+--R                  2  +-+
+--R        (8a c - 3b )\|c
+--R   (9)  ----------------
+--R                 2
+--R              24a
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.287~~~~~$\displaystyle
@@ -1968,7 +2199,7 @@ $$
 <<*>>=
 )clear all
 
---S 55
+--S 62
 aa:=integrate(x^2*sqrt(a*x^2+b*x+c),x)
 --R 
 --R
@@ -2200,7 +2431,7 @@ aa:=integrate(x^2*sqrt(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 56
+--S 63
 t1:=integrate(sqrt(a*x^2+b*x+c),x)
 --R
 --R   (2)
@@ -2284,7 +2515,7 @@ t1:=integrate(sqrt(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 57
+--S 64
 bb1:=(6*a*x-5*b)/(24*a^2)*(a*x^2+b*x+c)^(3/2)+(5*b^2-4*a*c)/(16*a^2)*t1.1
 --R
 --R   (3)
@@ -2347,7 +2578,7 @@ bb1:=(6*a*x-5*b)/(24*a^2)*(a*x^2+b*x+c)^(3/2)+(5*b^2-4*a*c)/(16*a^2)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 58
+--S 65
 bb2:=(6*a*x-5*b)/(24*a^2)*(a*x^2+b*x+c)^(3/2)+(5*b^2-4*a*c)/(16*a^2)*t1.2
 --R
 --R   (4)
@@ -2404,7 +2635,7 @@ bb2:=(6*a*x-5*b)/(24*a^2)*(a*x^2+b*x+c)^(3/2)+(5*b^2-4*a*c)/(16*a^2)*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 59
+--S 66
 cc1:=aa.1-bb1
 --R
 --R   (5)
@@ -2600,7 +2831,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 60
+--S 67
 cc2:=aa.2-bb1
 --R
 --R   (6)
@@ -2808,7 +3039,7 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 61
+--S 68
 cc3:=aa.1-bb2
 --R
 --R   (7)
@@ -3016,7 +3247,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 62     14:287 Axiom cannot simplify these expressions
+--S 69
 cc4:=aa.2-bb2
 --R
 --R   (8)
@@ -3083,6 +3314,17 @@ cc4:=aa.2-bb2
 --R       - 147456a b c x - 49152a c
 --R                                                     Type: Expression Integer
 --E
+
+--S 70     14:287 Schaums and Axiom differ by a constant
+dd4:=ratDenom cc4
+--R
+--R               +-+
+--R          5b c\|c
+--R   (9)  - --------
+--R               2
+--R            24a
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.288~~~~~$\displaystyle
@@ -3094,7 +3336,7 @@ $$
 <<*>>=
 )clear all
 
---S 63
+--S 71
 aa:=integrate(sqrt(a*x^2+b*x+c)/x,x)
 --R 
 --R
@@ -3178,7 +3420,7 @@ aa:=integrate(sqrt(a*x^2+b*x+c)/x,x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 64
+--S 72
 t1:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --R
 --R   (2)
@@ -3209,7 +3451,7 @@ t1:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 65
+--S 73
 t2:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R
 --R                  +--------------+
@@ -3223,7 +3465,7 @@ t2:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 66
+--S 74
 bb1:=sqrt(a*x^2+b*x+c)+b/2*t1.1+c*t2
 --R
 --R   (4)
@@ -3257,7 +3499,7 @@ bb1:=sqrt(a*x^2+b*x+c)+b/2*t1.1+c*t2
 --R                                                     Type: Expression Integer
 --E
 
---S 67
+--S 75
 bb2:=sqrt(a*x^2+b*x+c)+b/2*t1.2+c*t2
 --R
 --R   (5)
@@ -3282,7 +3524,7 @@ bb2:=sqrt(a*x^2+b*x+c)+b/2*t1.2+c*t2
 --R                                                     Type: Expression Integer
 --E
 
---S 68
+--S 76
 cc1:=aa.1-bb1
 --R
 --R   (6)
@@ -3347,7 +3589,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 69
+--S 77
 cc2:=aa.2-bb1
 --R
 --R   (7)
@@ -3392,7 +3634,7 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 70
+--S 78
 cc3:=aa.1-bb2
 --R
 --R   (8)
@@ -3444,7 +3686,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 71     14:288 Axiom cannot simplify these expressions
+--S 79
 cc4:=aa.2-bb2
 --R
 --R   (9)
@@ -3478,6 +3720,48 @@ cc4:=aa.2-bb2
 --R     \|- a \|c
 --R                                                     Type: Expression Integer
 --E
+
+--S 80
+dd4:=ratDenom cc4
+--R
+--R   (10)
+--R                     +--------------+
+--R                 +-+ |   2
+--R        +-+    2\|c \|a x  + b x + c  - b x - 2c
+--R     - \|c log(---------------------------------)
+--R                               x
+--R   + 
+--R                +--------------+
+--R                |   2                           +-+
+--R      +-+    2c\|a x  + b x + c  + (- b x - 2c)\|c      +-+
+--R     \|c log(--------------------------------------) + \|c
+--R                              2c x
+--R                                                     Type: Expression Integer
+--E
+
+--S 81
+ee4:=expandLog dd4
+--R
+--R   (11)
+--R                     +--------------+
+--R        +-+      +-+ |   2
+--R     - \|c log(2\|c \|a x  + b x + c  - b x - 2c)
+--R   + 
+--R              +--------------+
+--R    +-+       |   2                           +-+                            +-+
+--R   \|c log(2c\|a x  + b x + c  + (- b x - 2c)\|c ) + (- log(c) - log(2) + 1)\|c
+--R                                                     Type: Expression Integer
+--E
+
+--S 82     14:288 Schaums and Axiom differ by a constant
+ff4:=complexNormalize ee4
+--R
+--R                                  +-+
+--R         (- log(c) - 2log(2) + 2)\|c
+--R   (12)  ----------------------------
+--R                       2
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.289~~~~~$\displaystyle
@@ -3490,7 +3774,7 @@ $$
 <<*>>=
 )clear all
 
---S 72
+--S 83
 aa:=integrate(sqrt(a*x^2+b*x+c)/x^2,x)
 --R 
 --R
@@ -3559,7 +3843,7 @@ aa:=integrate(sqrt(a*x^2+b*x+c)/x^2,x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 73
+--S 84
 t1:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --R
 --R   (2)
@@ -3590,7 +3874,7 @@ t1:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 74
+--S 85
 t2:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R
 --R                  +--------------+
@@ -3604,7 +3888,7 @@ t2:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 75
+--S 86
 bb1:=-sqrt(a*x^2+b*x+c)/x+a*t1.1+b/2*t2
 --R
 --R   (4)
@@ -3638,7 +3922,7 @@ bb1:=-sqrt(a*x^2+b*x+c)/x+a*t1.1+b/2*t2
 --R                                                     Type: Expression Integer
 --E
 
---S 76
+--S 87
 bb2:=-sqrt(a*x^2+b*x+c)/x+a*t1.2+b/2*t2
 --R
 --R   (5)
@@ -3663,7 +3947,7 @@ bb2:=-sqrt(a*x^2+b*x+c)/x+a*t1.2+b/2*t2
 --R                                                     Type: Expression Integer
 --E
 
---S 77
+--S 88
 cc1:=aa.1-bb1
 --R
 --R   (6)
@@ -3725,7 +4009,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 78
+--S 89
 cc2:=aa.2-bb1
 --R
 --R   (7)
@@ -3786,7 +4070,7 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 79
+--S 90
 cc3:=aa.1-bb2
 --R
 --R   (8)
@@ -3842,7 +4126,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 80     14:289 Axiom cannot simplify these expressions
+--S 91
 cc4:=aa.2-bb2
 --R
 --R   (9)
@@ -3896,6 +4180,55 @@ cc4:=aa.2-bb2
 --R     8c\|- a \|c \|a x  + b x + c  + (- 4b c x - 8c )\|- a
 --R                                                     Type: Expression Integer
 --E
+
+--S 92
+dd4:=ratDenom cc4
+--R
+--R   (10)
+--R                         +--------------+
+--R                     +-+ |   2
+--R            +-+    2\|c \|a x  + b x + c  - b x - 2c
+--R       - 2b\|c log(---------------------------------)
+--R                                   x
+--R     + 
+--R                    +--------------+
+--R                    |   2                           +-+
+--R          +-+    2c\|a x  + b x + c  + (- b x - 2c)\|c       +-+
+--R       2b\|c log(--------------------------------------) - b\|c
+--R                                  2c x
+--R  /
+--R     4c
+--R                                                     Type: Expression Integer
+--E
+
+--S 93
+ee4:=expandLog dd4
+--R
+--R   (11)
+--R                         +--------------+
+--R            +-+      +-+ |   2
+--R       - 2b\|c log(2\|c \|a x  + b x + c  - b x - 2c)
+--R     + 
+--R                    +--------------+
+--R          +-+       |   2                           +-+
+--R       2b\|c log(2c\|a x  + b x + c  + (- b x - 2c)\|c )
+--R     + 
+--R                                     +-+
+--R       (- 2b log(c) - 2b log(2) - b)\|c
+--R  /
+--R     4c
+--R                                                     Type: Expression Integer
+--E
+
+--S 94     14:289 Schaums and Axiom differ by a constant
+ff4:=complexNormalize ee4
+--R
+--R                                      +-+
+--R         (- b log(c) - 2b log(2) - b)\|c
+--R   (12)  --------------------------------
+--R                        4c
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.290~~~~~$\displaystyle
@@ -3907,7 +4240,7 @@ $$
 <<*>>=
 )clear all
 
---S 81
+--S 95
 aa:=integrate(1/(a*x^2+b*x+c)^(3/2),x)
 --R 
 --R
@@ -3921,7 +4254,7 @@ aa:=integrate(1/(a*x^2+b*x+c)^(3/2),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 82
+--S 96
 bb:=(2*(2*a*x+b))/((4*a*c-b^2)*sqrt(a*x^2+b*x+c))
 --R
 --R                  4a x + 2b
@@ -3932,7 +4265,7 @@ bb:=(2*(2*a*x+b))/((4*a*c-b^2)*sqrt(a*x^2+b*x+c))
 --R                                                     Type: Expression Integer
 --E
 
---S 83     14:290 Axiom cannot simplify these expressions
+--S 97
 cc:=aa-bb
 --R
 --R   (3)
@@ -3945,6 +4278,17 @@ cc:=aa-bb
 --R   (8a c  - 2b c)\|a x  + b x + c  + ((- 4a b c + b )x - 8a c  + 2b c)\|c
 --R                                                     Type: Expression Integer
 --E
+
+--S 98     14:290 Schaums and Axiom differ by a constant
+dd:=ratDenom cc
+--R
+--R              +-+
+--R           2b\|c
+--R   (4)  -----------
+--R            2    2
+--R        4a c  - b c
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.291~~~~~$\displaystyle
@@ -3955,7 +4299,7 @@ $$
 <<*>>=
 )clear all
 
---S 84
+--S 99
 aa:=integrate(x/(a*x^2+b*x+c)^(3/2),x)
 --R 
 --R
@@ -3968,7 +4312,7 @@ aa:=integrate(x/(a*x^2+b*x+c)^(3/2),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 85
+--S 100
 bb:=(2*(b*x+2*c))/((b^2-4*a*c)*sqrt(a*x^2+b*x+c))
 --R
 --R                 - 2b x - 4c
@@ -3979,7 +4323,7 @@ bb:=(2*(b*x+2*c))/((b^2-4*a*c)*sqrt(a*x^2+b*x+c))
 --R                                                     Type: Expression Integer
 --E
 
---S 86     14:291 Axiom cannot simplify these expressions
+--S 101
 cc:=aa-bb
 --R
 --R   (3)
@@ -3992,6 +4336,17 @@ cc:=aa-bb
 --R   (8a c  - 2b c)\|a x  + b x + c  + ((- 4a b c + b )x - 8a c  + 2b c)\|c
 --R                                                     Type: Expression Integer
 --E
+
+--S 102    14:291 Schaums and Axiom differ by a constant
+dd:=ratDenom cc
+--R
+--R              +-+
+--R            4\|c
+--R   (4)  - ---------
+--R                  2
+--R          4a c - b
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.292~~~~~$\displaystyle
@@ -4003,7 +4358,7 @@ $$
 <<*>>=
 )clear all
 
---S 87
+--S 103
 aa:=integrate(x^2/(a*x^2+b*x+c)^(3/2),x)
 --R 
 --R
@@ -4061,7 +4416,7 @@ aa:=integrate(x^2/(a*x^2+b*x+c)^(3/2),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 88
+--S 104
 t1:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --R
 --R   (2)
@@ -4092,13 +4447,13 @@ t1:=integrate(1/sqrt(a*x^2+b*x+c),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 89
-bb1:=((2*b^2-4*a*c)*x+2*b*c)/(4*(4*a*c-b^2)*sqrt(a*x^2+b*x+c))+1/a*t1.1
+--S 105
+bb1:=((2*b^2-4*a*c)*x+2*b*c)/(a*(4*a*c-b^2)*sqrt(a*x^2+b*x+c))+1/a*t1.1
 --R
 --R   (3)
---R                      +--------------+
---R                   2  |   2
---R         (8a c - 2b )\|a x  + b x + c
+--R                     +--------------+
+--R                  2  |   2
+--R         (4a c - b )\|a x  + b x + c
 --R      *
 --R         log
 --R                                   +--------------+
@@ -4112,94 +4467,58 @@ bb1:=((2*b^2-4*a*c)*x+2*b*c)/(4*(4*a*c-b^2)*sqrt(a*x^2+b*x+c))+1/a*t1.1
 --R                +-+ |   2
 --R              2\|c \|a x  + b x + c  - b x - 2c
 --R     + 
---R             2       2            +-+
---R       ((- 2a c + a b )x + a b c)\|a
+--R                    2           +-+
+--R       ((- 4a c + 2b )x + 2b c)\|a
 --R  /
---R                        +--------------+
---R        2        2  +-+ |   2
---R     (8a c - 2a b )\|a \|a x  + b x + c
+--R                       +--------------+
+--R        2       2  +-+ |   2
+--R     (4a c - a b )\|a \|a x  + b x + c
 --R                                                     Type: Expression Integer
 --E
 
---S 90
-bb2:=((2*b^2-4*a*c)*x+2*b*c)/(4*(4*a*c-b^2)*sqrt(a*x^2+b*x+c))+1/a*t1.2
+--S 106
+bb2:=((2*b^2-4*a*c)*x+2*b*c)/(a*(4*a*c-b^2)*sqrt(a*x^2+b*x+c))+1/a*t1.2
 --R
 --R   (4)
---R                                                 +--------------+
---R                     +--------------+      +---+ |   2               +---+ +-+
---R                  2  |   2                \|- a \|a x  + b x + c  - \|- a \|c
---R       (16a c - 4b )\|a x  + b x + c atan(------------------------------------)
---R                                                           a x
---R     + 
---R             2       2            +---+
---R       ((- 2a c + a b )x + a b c)\|- a
+--R                                                +--------------+
+--R                    +--------------+      +---+ |   2               +---+ +-+
+--R                 2  |   2                \|- a \|a x  + b x + c  - \|- a \|c
+--R       (8a c - 2b )\|a x  + b x + c atan(------------------------------------)
+--R                                                          a x
+--R     + 
+--R                    2           +---+
+--R       ((- 4a c + 2b )x + 2b c)\|- a
 --R  /
---R                          +--------------+
---R        2        2  +---+ |   2
---R     (8a c - 2a b )\|- a \|a x  + b x + c
+--R                         +--------------+
+--R        2       2  +---+ |   2
+--R     (4a c - a b )\|- a \|a x  + b x + c
 --R                                                     Type: Expression Integer
 --E
 
---S 91
+--S 107
 cc1:=aa.1-bb1
 --R
 --R   (5)
---R                 2                     3  2         2        2            2
---R           ((- 2a  + 16a)b c + (a - 4)b )x  + ((- 4a  + 16a)c  + (3a - 4)b c)x
---R         + 
---R                 2
---R           2a b c
---R      *
---R              +--------------+
---R          +-+ |   2
---R         \|c \|a x  + b x + c
---R     + 
---R           3      2  2        2       2   3
---R       ((4a  - 16a )c  + (- 2a  + 4a)b c)x
---R     + 
---R           2          2              3   2       2        3              2 2
---R       ((2a  - 16a)b c  + (- 2a + 4)b c)x  + ((4a  - 16a)c  + (- 4a + 4)b c )x
---R     + 
---R               3
---R       - 2a b c
---R  /
---R              3 2     2 2   2       2   2       3         2 3       2 2
---R         ((16a c  - 4a b c)x  + (16a b c  - 4a b c)x + 16a c  - 4a b c )
---R      *
---R          +--------------+
---R          |   2
---R         \|a x  + b x + c
---R     + 
---R                3        2 3  3         3 2     2 2        4  2
---R           (- 8a b c + 2a b )x  + (- 16a c  - 4a b c + 2a b )x
---R         + 
---R                 2   2       3         2 3       2 2
---R           (- 24a b c  + 6a b c)x - 16a c  + 4a b c
---R      *
---R          +-+
---R         \|c
+--R                              +--------------+
+--R                          +-+ |   2                2          2
+--R                     4b c\|c \|a x  + b x + c  - 2b c x - 4b c
+--R   -----------------------------------------------------------------------------
+--R                    +--------------+
+--R      2 2       2   |   2                    2         3       2 2       2   +-+
+--R   (8a c  - 2a b c)\|a x  + b x + c  + ((- 4a b c + a b )x - 8a c  + 2a b c)\|c
 --R                                                     Type: Expression Integer
 --E
 
---S 92
+--S 108
 cc2:=aa.2-bb1
 --R
 --R   (6)
---R                    2 2       2   2             2     3           3     2 2
---R             ((- 16a c  + 4a b c)x  + (- 16a b c  + 4b c)x - 16a c  + 4b c )
---R          *
---R                    +--------------+
---R              +---+ |   2
---R             \|- a \|a x  + b x + c
+--R                                  +--------------+
+--R                  2     2   +---+ |   2
+--R           (- 8a c  + 2b c)\|- a \|a x  + b x + c
 --R         + 
---R                  2          3  3       2 2       2      4  2
---R               (8a b c - 2a b )x  + (16a c  + 4a b c - 2b )x
---R             + 
---R                       2     3           3     2 2
---R               (24a b c  - 6b c)x + 16a c  - 4b c
---R          *
---R              +---+ +-+
---R             \|- a \|c
+--R                       3         2     2   +---+ +-+
+--R           ((4a b c - b )x + 8a c  - 2b c)\|- a \|c
 --R      *
 --R         log
 --R                                   +--------------+
@@ -4213,21 +4532,12 @@ cc2:=aa.2-bb1
 --R                +-+ |   2
 --R              2\|c \|a x  + b x + c  - b x - 2c
 --R     + 
---R                  2 2       2   2           2     3           3     2 2  +-+
---R             ((32a c  - 8a b c)x  + (32a b c  - 8b c)x + 32a c  - 8b c )\|a
---R          *
---R              +--------------+
---R              |   2
---R             \|a x  + b x + c
+--R                               +--------------+
+--R                 2     2   +-+ |   2
+--R           (16a c  - 4b c)\|a \|a x  + b x + c
 --R         + 
---R                     2          3  3         2 2       2      4  2
---R               (- 16a b c + 4a b )x  + (- 32a c  - 8a b c + 4b )x
---R             + 
---R                         2      3           3     2 2
---R               (- 48a b c  + 12b c)x - 32a c  + 8b c
---R          *
---R              +-+ +-+
---R             \|a \|c
+--R                          3          2     2   +-+ +-+
+--R           ((- 8a b c + 2b )x - 16a c  + 4b c)\|a \|c
 --R      *
 --R                     +--------------+
 --R               +---+ |   2               +---+ +-+
@@ -4235,65 +4545,29 @@ cc2:=aa.2-bb1
 --R         atan(------------------------------------)
 --R                               a x
 --R     + 
---R                 2                     3  2         2        2            2
---R           ((- 2a  + 16a)b c + (a - 4)b )x  + ((- 4a  + 16a)c  + (3a - 4)b c)x
---R         + 
---R                 2
---R           2a b c
---R      *
---R                        +--------------+
---R          +---+ +-+ +-+ |   2
---R         \|- a \|a \|c \|a x  + b x + c
---R     + 
---R               3      2  2        2       2   3
---R           ((4a  - 16a )c  + (- 2a  + 4a)b c)x
---R         + 
---R               2          2              3   2
---R           ((2a  - 16a)b c  + (- 2a + 4)b c)x
---R         + 
---R               2        3              2 2           3
---R           ((4a  - 16a)c  + (- 4a + 4)b c )x - 2a b c
---R      *
---R          +---+ +-+
---R         \|- a \|a
+--R                          +--------------+
+--R            +---+ +-+ +-+ |   2                   2          2  +---+ +-+
+--R       4b c\|- a \|a \|c \|a x  + b x + c  + (- 2b c x - 4b c )\|- a \|a
 --R  /
---R              3 2     2 2   2       2   2       3         2 3       2 2  +---+
---R         ((16a c  - 4a b c)x  + (16a b c  - 4a b c)x + 16a c  - 4a b c )\|- a
---R      *
---R              +--------------+
---R          +-+ |   2
---R         \|a \|a x  + b x + c
+--R                                  +--------------+
+--R          2 2       2   +---+ +-+ |   2
+--R       (8a c  - 2a b c)\|- a \|a \|a x  + b x + c
 --R     + 
---R                3        2 3  3         3 2     2 2        4  2
---R           (- 8a b c + 2a b )x  + (- 16a c  - 4a b c + 2a b )x
---R         + 
---R                 2   2       3         2 3       2 2
---R           (- 24a b c  + 6a b c)x - 16a c  + 4a b c
---R      *
---R          +---+ +-+ +-+
---R         \|- a \|a \|c
+--R             2         3       2 2       2   +---+ +-+ +-+
+--R       ((- 4a b c + a b )x - 8a c  + 2a b c)\|- a \|a \|c
 --R                                                     Type: Expression Integer
 --E
 
---S 93
+--S 109
 cc3:=aa.1-bb2
 --R
 --R   (7)
---R                  2 2       2   2           2     3           3     2 2  +---+
---R             ((16a c  - 4a b c)x  + (16a b c  - 4b c)x + 16a c  - 4b c )\|- a
---R          *
---R              +--------------+
---R              |   2
---R             \|a x  + b x + c
+--R                                +--------------+
+--R                2     2   +---+ |   2
+--R           (8a c  - 2b c)\|- a \|a x  + b x + c
 --R         + 
---R                    2          3  3         2 2       2      4  2
---R               (- 8a b c + 2a b )x  + (- 16a c  - 4a b c + 2b )x
---R             + 
---R                         2     3           3     2 2
---R               (- 24a b c  + 6b c)x - 16a c  + 4b c
---R          *
---R              +---+ +-+
---R             \|- a \|c
+--R                         3         2     2   +---+ +-+
+--R           ((- 4a b c + b )x - 8a c  + 2b c)\|- a \|c
 --R      *
 --R         log
 --R                                   +--------------+
@@ -4307,21 +4581,12 @@ cc3:=aa.1-bb2
 --R                +-+ |   2
 --R              2\|c \|a x  + b x + c  - b x - 2c
 --R     + 
---R                    2 2       2   2             2     3           3     2 2  +-+
---R             ((- 32a c  + 8a b c)x  + (- 32a b c  + 8b c)x - 32a c  + 8b c )\|a
---R          *
---R              +--------------+
---R              |   2
---R             \|a x  + b x + c
+--R                                 +--------------+
+--R                   2     2   +-+ |   2
+--R           (- 16a c  + 4b c)\|a \|a x  + b x + c
 --R         + 
---R                   2          3  3       2 2       2      4  2
---R               (16a b c - 4a b )x  + (32a c  + 8a b c - 4b )x
---R             + 
---R                       2      3           3     2 2
---R               (48a b c  - 12b c)x + 32a c  - 8b c
---R          *
---R              +-+ +-+
---R             \|a \|c
+--R                        3          2     2   +-+ +-+
+--R           ((8a b c - 2b )x + 16a c  - 4b c)\|a \|c
 --R      *
 --R                     +--------------+
 --R               +---+ |   2               +---+ +-+
@@ -4329,87 +4594,43 @@ cc3:=aa.1-bb2
 --R         atan(------------------------------------)
 --R                               a x
 --R     + 
---R                 2                     3  2         2        2            2
---R           ((- 2a  + 16a)b c + (a - 4)b )x  + ((- 4a  + 16a)c  + (3a - 4)b c)x
---R         + 
---R                 2
---R           2a b c
---R      *
---R                        +--------------+
---R          +---+ +-+ +-+ |   2
---R         \|- a \|a \|c \|a x  + b x + c
---R     + 
---R               3      2  2        2       2   3
---R           ((4a  - 16a )c  + (- 2a  + 4a)b c)x
---R         + 
---R               2          2              3   2
---R           ((2a  - 16a)b c  + (- 2a + 4)b c)x
---R         + 
---R               2        3              2 2           3
---R           ((4a  - 16a)c  + (- 4a + 4)b c )x - 2a b c
---R      *
---R          +---+ +-+
---R         \|- a \|a
+--R                          +--------------+
+--R            +---+ +-+ +-+ |   2                   2          2  +---+ +-+
+--R       4b c\|- a \|a \|c \|a x  + b x + c  + (- 2b c x - 4b c )\|- a \|a
 --R  /
---R              3 2     2 2   2       2   2       3         2 3       2 2  +---+
---R         ((16a c  - 4a b c)x  + (16a b c  - 4a b c)x + 16a c  - 4a b c )\|- a
---R      *
---R              +--------------+
---R          +-+ |   2
---R         \|a \|a x  + b x + c
+--R                                  +--------------+
+--R          2 2       2   +---+ +-+ |   2
+--R       (8a c  - 2a b c)\|- a \|a \|a x  + b x + c
 --R     + 
---R                3        2 3  3         3 2     2 2        4  2
---R           (- 8a b c + 2a b )x  + (- 16a c  - 4a b c + 2a b )x
---R         + 
---R                 2   2       3         2 3       2 2
---R           (- 24a b c  + 6a b c)x - 16a c  + 4a b c
---R      *
---R          +---+ +-+ +-+
---R         \|- a \|a \|c
+--R             2         3       2 2       2   +---+ +-+ +-+
+--R       ((- 4a b c + a b )x - 8a c  + 2a b c)\|- a \|a \|c
 --R                                                     Type: Expression Integer
 --E
 
---S 94     14:292 Axiom cannot simplify these expressions
+--S 110
 cc4:=aa.2-bb2
 --R
 --R   (8)
---R                 2                     3  2         2        2            2
---R           ((- 2a  + 16a)b c + (a - 4)b )x  + ((- 4a  + 16a)c  + (3a - 4)b c)x
---R         + 
---R                 2
---R           2a b c
---R      *
---R              +--------------+
---R          +-+ |   2
---R         \|c \|a x  + b x + c
---R     + 
---R           3      2  2        2       2   3
---R       ((4a  - 16a )c  + (- 2a  + 4a)b c)x
---R     + 
---R           2          2              3   2       2        3              2 2
---R       ((2a  - 16a)b c  + (- 2a + 4)b c)x  + ((4a  - 16a)c  + (- 4a + 4)b c )x
---R     + 
---R               3
---R       - 2a b c
---R  /
---R              3 2     2 2   2       2   2       3         2 3       2 2
---R         ((16a c  - 4a b c)x  + (16a b c  - 4a b c)x + 16a c  - 4a b c )
---R      *
---R          +--------------+
---R          |   2
---R         \|a x  + b x + c
---R     + 
---R                3        2 3  3         3 2     2 2        4  2
---R           (- 8a b c + 2a b )x  + (- 16a c  - 4a b c + 2a b )x
---R         + 
---R                 2   2       3         2 3       2 2
---R           (- 24a b c  + 6a b c)x - 16a c  + 4a b c
---R      *
---R          +-+
---R         \|c
+--R                              +--------------+
+--R                          +-+ |   2                2          2
+--R                     4b c\|c \|a x  + b x + c  - 2b c x - 4b c
+--R   -----------------------------------------------------------------------------
+--R                    +--------------+
+--R      2 2       2   |   2                    2         3       2 2       2   +-+
+--R   (8a c  - 2a b c)\|a x  + b x + c  + ((- 4a b c + a b )x - 8a c  + 2a b c)\|c
 --R                                                     Type: Expression Integer
 --E
 
+--S 111    14:292 Schaums and Axiom differ by a constant
+dd4:=ratDenom cc4
+--R
+--R              +-+
+--R           2b\|c
+--R   (9)  -----------
+--R          2       2
+--R        4a c - a b
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.293~~~~~$\displaystyle
@@ -4422,7 +4643,7 @@ $$
 <<*>>=
 )clear all
 
---S 95
+--S 112
 aa:=integrate(1/(x*(a*x^2+b*x+c)^(3/2)),x)
 --R 
 --R
@@ -4448,7 +4669,7 @@ aa:=integrate(1/(x*(a*x^2+b*x+c)^(3/2)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 96
+--S 113
 t1:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R
 --R                  +--------------+
@@ -4462,7 +4683,7 @@ t1:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 97
+--S 114
 t2:=integrate(1/(a*x^2+b*x+c)^(3/2),x)
 --R
 --R                          +--------------+
@@ -4475,7 +4696,7 @@ t2:=integrate(1/(a*x^2+b*x+c)^(3/2),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 98
+--S 115
 bb:=1/(c*sqrt(a*x^2+b*x+c))+1/c*t1-b/(2*c)*t2
 --R
 --R   (4)
@@ -4505,7 +4726,7 @@ bb:=1/(c*sqrt(a*x^2+b*x+c))+1/c*t1-b/(2*c)*t2
 --R                                                     Type: Expression Integer
 --E
 
---S 99     14:293 Axiom cannot simplify these expressions
+--S 116
 cc:=aa-bb
 --R
 --R   (5)
@@ -4551,6 +4772,58 @@ cc:=aa-bb
 --R       (- 8a c  - 4b c )x  - 12b c x - 8c
 --R                                                     Type: Expression Integer
 --E
+
+--S 117
+dd:=ratDenom cc
+--R
+--R   (6)
+--R                       +--------------+
+--R                   +-+ |   2
+--R          +-+    2\|c \|a x  + b x + c  - b x - 2c
+--R       - \|c log(---------------------------------)
+--R                                 x
+--R     + 
+--R                  +--------------+
+--R                  |   2                           +-+
+--R        +-+    2c\|a x  + b x + c  + (- b x - 2c)\|c      +-+
+--R       \|c log(--------------------------------------) + \|c
+--R                                2c x
+--R  /
+--R      2
+--R     c
+--R                                                     Type: Expression Integer
+--E
+
+--S 118
+ee:=expandLog dd
+--R
+--R   (7)
+--R                       +--------------+
+--R          +-+      +-+ |   2
+--R       - \|c log(2\|c \|a x  + b x + c  - b x - 2c)
+--R     + 
+--R                  +--------------+
+--R        +-+       |   2                           +-+
+--R       \|c log(2c\|a x  + b x + c  + (- b x - 2c)\|c )
+--R     + 
+--R                               +-+
+--R       (- log(c) - log(2) + 1)\|c
+--R  /
+--R      2
+--R     c
+--R                                                     Type: Expression Integer
+--E
+
+--S 119    14:293 Schaums and Axiom differ by a constant
+ff:=complexNormalize ee
+--R
+--R                                 +-+
+--R        (- log(c) - 2log(2) + 2)\|c
+--R   (8)  ----------------------------
+--R                       2
+--R                     2c
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.294~~~~~$\displaystyle
@@ -4567,7 +4840,7 @@ $$
 <<*>>=
 )clear all
 
---S 100
+--S 120
 aa:=integrate(1/(x^2*(a*x^2+b*x+c)^(3/2)),x)
 --R 
 --R
@@ -4608,7 +4881,7 @@ aa:=integrate(1/(x^2*(a*x^2+b*x+c)^(3/2)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 101
+--S 121
 t1:=integrate(1/(a*x^2+b*x+c)^(3/2),x)
 --R
 --R                          +--------------+
@@ -4621,7 +4894,7 @@ t1:=integrate(1/(a*x^2+b*x+c)^(3/2),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 102
+--S 122
 t2:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R
 --R                  +--------------+
@@ -4635,8 +4908,8 @@ t2:=integrate(1/(x*sqrt(a*x^2+b*x+c)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 103
-bb:=-(a*x^2+b*x+c)/(c^2*x*sqrt(a*x^2+b*x+c))+(b^2-2*a*c)/(2*c^2)*t1-(3*b)/(2*c^2)*t2
+--S 123
+bb:=-(a*x^2+2*b*x+c)/(c^2*x*sqrt(a*x^2+b*x+c))+(b^2-2*a*c)/(2*c^2)*t1-(3*b)/(2*c^2)*t2
 --R
 --R   (4)
 --R                                            +--------------+
@@ -4652,15 +4925,15 @@ bb:=-(a*x^2+b*x+c)/(c^2*x*sqrt(a*x^2+b*x+c))+(b^2-2*a*c)/(2*c^2)*t1-(3*b)/(2*c^2
 --R         log(---------------------------------)
 --R                             x
 --R     + 
---R                                            +--------------+
---R                3       2 2       2      3  |   2
---R       (2a b c x  + 8a c x  + 6b c x + 4c )\|a x  + b x + c
+--R                                                      +--------------+
+--R                3        2     2   2        2      3  |   2
+--R       (2a b c x  + (8a c  + 2b c)x  + 10b c x + 4c )\|a x  + b x + c
 --R     + 
 --R                2        2  4                  3  3           2     2   2
---R           (- 8a c + 2a b )x  + (- 12a b c + 2b )x  + (- 12a c  - 2b c)x
+--R           (- 8a c + 2a b )x  + (- 16a b c + 2b )x  + (- 12a c  - 6b c)x
 --R         + 
---R                 2      3
---R           - 8b c x - 4c
+--R                  2      3
+--R           - 12b c x - 4c
 --R      *
 --R          +-+
 --R         \|c
@@ -4674,7 +4947,7 @@ bb:=-(a*x^2+b*x+c)/(c^2*x*sqrt(a*x^2+b*x+c))+(b^2-2*a*c)/(2*c^2)*t1-(3*b)/(2*c^2
 --R                                                     Type: Expression Integer
 --E
 
---S 104    14:284 Axiom cannot simplify these expressions
+--S 124
 cc:=aa-bb
 --R
 --R   (5)
@@ -4720,18 +4993,18 @@ cc:=aa-bb
 --R                              +-+
 --R                           2x\|c
 --R     + 
---R                  2      4  3             2      3   2       2 2         3  +-+
---R         ((- 60a b c - 5b )x  + (- 88a b c  - 66b c)x  - 112b c x - 32b c )\|c
+--R                  2      4  3              2      3   2       2 2          3
+--R         ((- 60a b c - 5b )x  + (- 120a b c  - 90b c)x  - 240b c x - 160b c )
 --R      *
---R          +--------------+
---R          |   2
---R         \|a x  + b x + c
+--R              +--------------+
+--R          +-+ |   2
+--R         \|c \|a x  + b x + c
 --R     + 
 --R           2   2        3   4          2 2      4   3            3       3 2  2
---R       (40a b c  + 30a b c)x  + (152a b c  + 26b c)x  + (104a b c  + 118b c )x
+--R       (40a b c  + 30a b c)x  + (200a b c  + 30b c)x  + (200a b c  + 190b c )x
 --R     + 
---R           2 3         4
---R       128b c x + 32b c
+--R           2 3          4
+--R       320b c x + 160b c
 --R  /
 --R                  4     3 3  3         5      2 4  2         5        6
 --R         ((48a b c  + 4b c )x  + (96a c  + 72b c )x  + 192b c x + 128c )
@@ -4750,6 +5023,58 @@ cc:=aa-bb
 --R         \|c
 --R                                                     Type: Expression Integer
 --E
+
+--S 125
+dd:=ratDenom cc
+--R
+--R   (6)
+--R                       +--------------+
+--R                   +-+ |   2
+--R          +-+    2\|c \|a x  + b x + c  - b x - 2c
+--R       6b\|c log(---------------------------------)
+--R                                 x
+--R     + 
+--R                      +--------------+
+--R                      |   2                           +-+
+--R            +-+    2c\|a x  + b x + c  + (- b x - 2c)\|c        +-+
+--R       - 6b\|c log(--------------------------------------) - 5b\|c
+--R                                    2c x
+--R  /
+--R       3
+--R     4c
+--R                                                     Type: Expression Integer
+--E
+
+--S 126
+ee:=expandLog dd
+--R
+--R   (7)
+--R                       +--------------+
+--R          +-+      +-+ |   2
+--R       6b\|c log(2\|c \|a x  + b x + c  - b x - 2c)
+--R     + 
+--R                      +--------------+
+--R            +-+       |   2                           +-+
+--R       - 6b\|c log(2c\|a x  + b x + c  + (- b x - 2c)\|c )
+--R     + 
+--R                                    +-+
+--R       (6b log(c) + 6b log(2) - 5b)\|c
+--R  /
+--R       3
+--R     4c
+--R                                                     Type: Expression Integer
+--E
+
+--S 127    14:284 Schaums and Axiom differ by a constant
+ff:=complexNormalize ee
+--R
+--R                                     +-+
+--R        (3b log(c) + 6b log(2) - 5b)\|c
+--R   (8)  --------------------------------
+--R                         3
+--R                       4c
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.295~~~~~$\displaystyle
@@ -4765,7 +5090,7 @@ $$
 <<*>>=
 )clear all
 
---S 105    14:295 Axiom cannot compute this integral
+--S 128    14:295 Axiom cannot compute this integral
 aa:=integrate((a*x^2+b*x+c)^(n+1/2),x)
 --R 
 --R
@@ -4787,7 +5112,7 @@ $$
 <<*>>=
 )clear all
 
---S 106    14:296 Axiom cannot compute this integral
+--S 129    14:296 Axiom cannot compute this integral
 aa:=integrate(x*(a*x^2+b*x+c)^(n+1/2),x)
 --R 
 --R
@@ -4813,7 +5138,7 @@ $$
 <<*>>=
 )clear all
 
---S 107    14:297 Axiom cannot compute this integral
+--S 130    14:297 Axiom cannot compute this integral
 aa:=integrate(1/(a*x^2+b*x+c)^(n+1/2),x)
 --R 
 --R
@@ -4844,7 +5169,7 @@ $$
 <<*>>=
 )clear all
 
---S 108    14:298 Axiom cannot compute this integral
+--S 131    14:298 Axiom cannot compute this integral
 aa:=integrate(1/(x*(a*x^2+b*x+c)^(n+1/2)),x)
 --R 
 --R

\start
Date: Fri, 02 May 2008 07:25:53 -0400
From: Doug Stewart
To: Tim Daly
Subject: Re: Schaums help

Tim Daly wrote:
> My copy of Schaums (1968, printing 4) shows
>
> 14:334:
>
> int(1/(x*sqrt(x^n-a^n)),x) == 2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
>
> It seems this cannot be the answers.
> Can someone with a later version please check for a typo?
>

My schaums shows that answer.
also usind Maxima to do the derivative  I get the LHS.
(%i5) diff(2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n)),x);
(%o5) (a^n*x^(-n-1))/(sqrt(a^n)*sqrt(a^n/x^n)*sqrt(1-a^n/x^n))
(%i6) radcan(%);
(%o6) 1/(x*sqrt(x^n-a^n))

\start
Date: Sat, 3 May 2008 00:10:04 -0400
From: Tim Daly
To: Doug Stewart
Subject: Re: Schaums help

>> My copy of Schaums (1968, printing 4) shows
>>
>> 14:334:
>>
>> int(1/(x*sqrt(x^n-a^n)),x) == 2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
>>
>> It seems this cannot be the answers.
>> Can someone with a later version please check for a typo?
>>
>> Tim
>>
>>
>> _______________________________________________
>> Axiom-developer mailing list
>> list
>> http://lists.nongnu.org/mailman/listinfo/axiom-developer
>>
>>   
>My schaums shows that answer.
>also usind Maxima to do the derivative  I get the LHS.
>(%i5) diff(2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n)),x);
>(%o5) (a^n*x^(-n-1))/(sqrt(a^n)*sqrt(a^n/x^n)*sqrt(1-a^n/x^n))
>(%i6) radcan(%);
>(%o6) 1/(x*sqrt(x^n-a^n))

If you compute
aa:=integrate(1/(x*sqrt(x^n-a^n)),x)
bb:=2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
cc1:=aa.1-bb
cc2:=aa.2-bb

Can you find a simplification path (in Axiom) such that either 
cc1 or cc2 simplify to a constant?

Alternatively, can you use Maxima to find the constant?

I'm failing to do either, although I'm still trying.

\start
Date: Fri, 02 May 2008 23:33:40 -0400
From: Doug Stewart
To: Tim Daly
Subject: Re: Schaums help

root wrote:
>>> My copy of Schaums (1968, printing 4) shows
>>>
>>> 14:334:
>>>
>>> int(1/(x*sqrt(x^n-a^n)),x) == 2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
>>>
>>> It seems this cannot be the answers.
>>> Can someone with a later version please check for a typo?
>>>
>>> Tim
>>>
>>>
>>> _______________________________________________
>>> Axiom-developer mailing list
>>> list
>>> http://lists.nongnu.org/mailman/listinfo/axiom-developer
>>>
>>>   
>>>       
>> My schaums shows that answer.
>> also usind Maxima to do the derivative  I get the LHS.
>> (%i5) diff(2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n)),x);
>> (%o5) (a^n*x^(-n-1))/(sqrt(a^n)*sqrt(a^n/x^n)*sqrt(1-a^n/x^n))
>> (%i6) radcan(%);
>> (%o6) 1/(x*sqrt(x^n-a^n))
>>     
>
> If you compute
> aa:=integrate(1/(x*sqrt(x^n-a^n)),x)
> bb:=2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
> cc1:=aa.1-bb
> cc2:=aa.2-bb
>
> Can you find a simplification path (in Axiom) such that either 
> cc1 or cc2 simplify to a constant?
>
> Alternatively, can you use Maxima to find the constant?
>
> I'm failing to do either, although I'm still trying.
>
> Tim
>
>   

Maxima seems to give a wrong answer for this integration.


(%i1) aa:integrate(1/(x*sqrt(x^n-a^n)),x);
Is  a  positive or negative?p;

(%o1) (2*atan(sqrt(x^n-a^n)/a^(n/2)))/(a^(n/2)*n)

and
(%i2) aa:integrate(1/(x*sqrt(x^n-a^n)),x);
Is  a  positive or negative?n;
(%o2) 
log((2*sqrt(x^n-a^n)-2*sqrt(-a^n))/(2*sqrt(x^n-a^n)+2*sqrt(-a^n)))/(sqrt(-a^n)*n)


I'm not good enough at simplifying to help you.

\start
Date: Sat, 3 May 2008 01:21:23 -0500
From: Tim Daly
To: list
Subject: 20080501.01.tpd.patch (CATS Schaums-Axiom post-mortem fixes)

More simplifications achieved.

===================================================================
diff --git a/changelog b/changelog
index 7587673..9139a97 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20080501 tpd src/input/schaum16.input post-mortem fixes
+20080501 tpd src/input/schaum13.input post-mortem fixes
 20080430 tpd src/input/schaum13.input post-mortem fixes
 20080429 tpd src/input/schaum12.input post-mortem fixes
 20080428 tpd src/input/schaum19.input post-mortem fixes
diff --git a/src/input/schaum13.input.pamphlet b/src/input/schaum13.input.pamphlet
index 70acff6..678e41c 100644
--- a/src/input/schaum13.input.pamphlet
+++ b/src/input/schaum13.input.pamphlet
@@ -5065,7 +5065,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 127    14:284 Schaums and Axiom differ by a constant
+--S 127    14:294 Schaums and Axiom differ by a constant
 ff:=complexNormalize ee
 --R
 --R                                     +-+
diff --git a/src/input/schaum16.input.pamphlet b/src/input/schaum16.input.pamphlet
index b058a54..caf8bfd 100644
--- a/src/input/schaum16.input.pamphlet
+++ b/src/input/schaum16.input.pamphlet
@@ -19,13 +19,13 @@ $$
 )clear all
 
 --S 1
-aa:=integrate(1/x*(x^n+a^n),x)
---R 
+aa:=integrate(1/(x*(x^n+a^n)),x)
 --R
---R          n log(x)            n
---R        %e         + n log(x)a
---R   (1)  -----------------------
---R                   n
+--R                n log(x)    n
+--R        - log(%e         + a ) + n log(x)
+--R   (1)  ---------------------------------
+--R                          n
+--R                       n a
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
@@ -46,59 +46,32 @@ bb:=1/(n*a^n)*log(x^n/(x^n+a^n))
 --S 3
 cc:=aa-bb
 --R
---R                  n
---R                 x        n  n log(x)             n 2
---R        - log(-------) + a %e         + n log(x)(a )
---R               n    n
---R              x  + a
---R   (3)  ---------------------------------------------
---R                                n
---R                             n a
+--R                                         n
+--R                n log(x)    n           x
+--R        - log(%e         + a ) - log(-------) + n log(x)
+--R                                      n    n
+--R                                     x  + a
+--R   (3)  ------------------------------------------------
+--R                                 n
+--R                              n a
 --R                                                     Type: Expression Integer
 --E
 
 --S 4
 dd:=expandLog cc
 --R
---R             n    n         n     n  n log(x)            2n
---R        log(x  + a ) - log(x ) + a %e         + n log(x)a
---R   (4)  ---------------------------------------------------
---R                                   n
---R                                n a
+--R                n log(x)    n         n    n         n
+--R        - log(%e         + a ) + log(x  + a ) - log(x ) + n log(x)
+--R   (4)  ----------------------------------------------------------
+--R                                      n
+--R                                   n a
 --R                                                     Type: Expression Integer
 --E
 
---S 5
+--S 5      14:325 Schaums and Axiom agree
 ee:=complexNormalize dd
 --R
---R   (5)
---R             n log(x)     n log(a)      n log(a)  n log(x)
---R       log(%e         + %e        ) + %e        %e
---R     + 
---R                  n log(a) 2
---R       n log(x)(%e        )  - n log(x)
---R  /
---R         n log(a)
---R     n %e
---R                                                     Type: Expression Integer
---E
-
---S 6
-explog:=rule(%e^(n*log(x)) == x^n)
---R
---R          n log(x)     n
---R   (6)  %e         == x
---R                        Type: RewriteRule(Integer,Integer,Expression Integer)
---E
-
---S 7      14:325 Axiom cannot simplify this expression
-ff:=explog ee
---R
---R             n    n     n n            2n
---R        log(x  + a ) + a x  + n log(x)a   - n log(x)
---R   (7)  --------------------------------------------
---R                               n
---R                            n a
+--R   (5)  0
 --R                                                     Type: Expression Integer
 --E
 @

\start
Date: 03 May 2008 09:02:20 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: Schaums help

Tim Daly writes:
> If you compute
> aa:=integrate(1/(x*sqrt(x^n-a^n)),x)
> bb:=2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
> cc1:=aa.1-bb
> cc2:=aa.2-bb

at least 
ex := 1/(x*sqrt(x^n-a^n))
normalize(D(aa.1,x)-ex)
normalize(D(aa.2,x)-ex)

both return 0. Also

expRule := rule %e^(n*log x) == x^n
(20) -> expRule normalize(bb-aa.2)

                                           +-------+
                                           | n    n
                                           |x  - a
                  +--+ +-------+           |-------
                  | n  | n    n            |    n
                 \|a  \|x  - a            \|   x
         - 2atan(---------------) + 2atan(----------)
                         n                    +--+
                        a                     | n
                                              |a
                                              |--
                                              | n
                                             \|x
   (20)  --------------------------------------------
                              +--+
                              | n
                            n\|a
                                                     Type: Expression Integer

seems to be zero.

\start
Date: Sat, 03 May 2008 10:05:49 -0400
From: Doug Stewart
To: Tim Daly
Subject: Re: Schaums help

Doug Stewart wrote:
> root wrote:
>>>> My copy of Schaums (1968, printing 4) shows
>>>>
>>>> 14:334:
>>>>
>>>> int(1/(x*sqrt(x^n-a^n)),x) == 2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
>>>>
>>>> It seems this cannot be the answers.
>>>> Can someone with a later version please check for a typo?
>>>>
>>>> Tim
>>>>
>>>>
>>>> _______________________________________________
>>>> Axiom-developer mailing list
>>>> list
>>>> http://lists.nongnu.org/mailman/listinfo/axiom-developer
>>>>
>>>>         
>>> My schaums shows that answer.
>>> also usind Maxima to do the derivative  I get the LHS.
>>> (%i5) diff(2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n)),x);
>>> (%o5) (a^n*x^(-n-1))/(sqrt(a^n)*sqrt(a^n/x^n)*sqrt(1-a^n/x^n))
>>> (%i6) radcan(%);
>>> (%o6) 1/(x*sqrt(x^n-a^n))
>>>     
>>
>> If you compute
>> aa:=integrate(1/(x*sqrt(x^n-a^n)),x)
>> bb:=2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
>> cc1:=aa.1-bb
>> cc2:=aa.2-bb
>>
>> Can you find a simplification path (in Axiom) such that either cc1 or 
>> cc2 simplify to a constant?
>>
>> Alternatively, can you use Maxima to find the constant?
>>
>> I'm failing to do either, although I'm still trying.
>>
>> Tim
>>
>>   
>
> Maxima seems to give a wrong answer for this integration.
>
>
> (%i1) aa:integrate(1/(x*sqrt(x^n-a^n)),x);
> Is  a  positive or negative?p;
>
> (%o1) (2*atan(sqrt(x^n-a^n)/a^(n/2)))/(a^(n/2)*n)
>
> and
> (%i2) aa:integrate(1/(x*sqrt(x^n-a^n)),x);
> Is  a  positive or negative?n;
> (%o2) 
> log((2*sqrt(x^n-a^n)-2*sqrt(-a^n))/(2*sqrt(x^n-a^n)+2*sqrt(-a^n)))/(sqrt(-a^n)*n) 
>
>
>
> I'm not good enough at simplifying to help you.
> Doug
>
>
> _______________________________________________
with help from Maxima
> >Can you show me how to start with
> >
> >(2*atan(sqrt(x^n-a^n)/a^(n/2)))/(a^(n/2)*n)
> >
> >and differentiate it to get
> >
> >1/(x*sqrt(x^n-a^n)
> >
> >using Maxima.
>   

(%i4) (2*atan(sqrt(x^n-a^n)/a^(n/2)))/(a^(n/2)*n)$
(%i5) ratsimp(diff(%,x));
(%o5) 1/(x*sqrt(x^n-a^n))

Barton

so Maxima is not wrong.

\start
Date: Sat, 3 May 2008 14:03:13 -0400
From: Tim Daly
To: Doug Stewart
Subject: Re: Schaums help

>Doug Stewart wrote:
>> root wrote:
>>>>> My copy of Schaums (1968, printing 4) shows
>>>>>
>>>>> 14:334:
>>>>>
>>>>> int(1/(x*sqrt(x^n-a^n)),x) == 2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
>>>>>
>>>>> It seems this cannot be the answers.
>>>>> Can someone with a later version please check for a typo?
>>>>>
>>>>> Tim
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Axiom-developer mailing list
>>>>> list
>>>>> http://lists.nongnu.org/mailman/listinfo/axiom-developer
>>>>>
>>>>>         
>>>> My schaums shows that answer.
>>>> also usind Maxima to do the derivative  I get the LHS.
>>>> (%i5) diff(2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n)),x);
>>>> (%o5) (a^n*x^(-n-1))/(sqrt(a^n)*sqrt(a^n/x^n)*sqrt(1-a^n/x^n))
>>>> (%i6) radcan(%);
>>>> (%o6) 1/(x*sqrt(x^n-a^n))
>>>>     
>>>
>>> If you compute
>>> aa:=integrate(1/(x*sqrt(x^n-a^n)),x)
>>> bb:=2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
>>> cc1:=aa.1-bb
>>> cc2:=aa.2-bb
>>>
>>> Can you find a simplification path (in Axiom) such that either cc1 or 
>>> cc2 simplify to a constant?
>>>
>>> Alternatively, can you use Maxima to find the constant?
>>>
>>> I'm failing to do either, although I'm still trying.
>>>
>>> Tim
>>>
>>>   
>>
>> Maxima seems to give a wrong answer for this integration.
>>
>>
>> (%i1) aa:integrate(1/(x*sqrt(x^n-a^n)),x);
>> Is  a  positive or negative?p;
>>
>> (%o1) (2*atan(sqrt(x^n-a^n)/a^(n/2)))/(a^(n/2)*n)
>>
>> and
>> (%i2) aa:integrate(1/(x*sqrt(x^n-a^n)),x);
>> Is  a  positive or negative?n;
>> (%o2) 
>> log((2*sqrt(x^n-a^n)-2*sqrt(-a^n))/(2*sqrt(x^n-a^n)+2*sqrt(-a^n)))/(sqrt(-a^n)*n) 
>>
>>
>>
>> I'm not good enough at simplifying to help you.
>> Doug
>>
>>
>> _______________________________________________
>with help from Maxima
>> >Can you show me how to start with
>> >
>> >(2*atan(sqrt(x^n-a^n)/a^(n/2)))/(a^(n/2)*n)
>> >
>> >and differentiate it to get
>> >
>> >1/(x*sqrt(x^n-a^n)
>> >
>> >using Maxima.
>>   
>
>(%i4) (2*atan(sqrt(x^n-a^n)/a^(n/2)))/(a^(n/2)*n)$
>(%i5) ratsimp(diff(%,x));
>(%o5) 1/(x*sqrt(x^n-a^n))
>
>Barton
>
>so Maxima is not wrong.

None of these system are wrong and I believe that both expressions
are equal up to a constant.

What I'm looking for is a sequence of commands that will reduce
the difference of (Axiom's result)-(Schaums result) to that constant.

The subtle part is that there are many possible reduction paths
and the order of the transformations matter. It seems pretty
trivial to walk into a corner that will no longer reduce automatically.

Simplification is one of the hardest problems.

The problems in Schaums from 14.354 - 14.359 all seem to include 
the term:

   tan(%pi/4-(a*x)/2)

which seems to be a source of difficulty for the simplifications.
The original author had some insight that introduced this term
and I can't figure out what transformation I can use to reverse it.
The %pi/4 is clearly 45 degrees but I don't see many quarter-angle
reductions anywhere.

\start
Date: 03 May 2008 20:29:38 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: Schaums help

Tim Daly writes:

> None of these system are wrong and I believe that both expressions
> are equal up to a constant.
> 
> What I'm looking for is a sequence of commands that will reduce
> the difference of (Axiom's result)-(Schaums result) to that constant.

So you aren't satisfied with my answer (repeated below)?  Why?

Martin

ex := 1/(x*sqrt(x^n-a^n))
aa := integrate(ex, x)
bb:=2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))

expRule := rule %e^(n*log x) == x^n
sqrtRule := rule 1/sqrt z == sqrt(1/z)
sqrtRule2 := rule sqrt w * sqrt z == sqrt(w*z)
sqrtRule3 := rule sqrt(w/z) == sqrt(w*z)/z
powerRule := rule z^(2*n)==(z^n)^2

(17) -> powerRule sqrtRule3 sqrtRule2 sqrtRule expRule normalize(aa.2 - bb)

   (17)  0
                                                     Type: Expression Integer

\start
Date: Sat, 3 May 2008 22:05:58 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: Schaums help

>> None of these system are wrong and I believe that both expressions
>> are equal up to a constant.
>> 
>> What I'm looking for is a sequence of commands that will reduce
>> the difference of (Axiom's result)-(Schaums result) to that constant.
>
>So you aren't satisfied with my answer (repeated below)?  Why?
>
>Martin
>
>ex := 1/(x*sqrt(x^n-a^n))
>aa := integrate(ex, x)
>bb:=2/(n*sqrt(a^n))*acos(sqrt(a^n/x^n))
>
>expRule := rule %e^(n*log x) == x^n
>sqrtRule := rule 1/sqrt z == sqrt(1/z)
>sqrtRule2 := rule sqrt w * sqrt z == sqrt(w*z)
>sqrtRule3 := rule sqrt(w/z) == sqrt(w*z)/z
>powerRule := rule z^(2*n)==(z^n)^2
>
>(17) -> powerRule sqrtRule3 sqrtRule2 sqrtRule expRule normalize(aa.2 - bb)
>
>   (17)  0
>

Don't recall seeing your post at the time. Excellent. Thanks. 

\start
Date: Sat, 3 May 2008 22:59:45 -0500
From: Tim Daly
To: list
Subject: 20080502.01.tpd.patch (CATS Schaums-Axiom post	mortem fixup)

More agreement between Schaums and Axiom.
=====================================================================
diff --git a/changelog b/changelog
index 9139a97..aa128b6 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080502 tpd src/input/schaum17.input post-mortem fixes
 20080501 tpd src/input/schaum16.input post-mortem fixes
 20080501 tpd src/input/schaum13.input post-mortem fixes
 20080430 tpd src/input/schaum13.input post-mortem fixes
diff --git a/src/input/schaum17.input.pamphlet b/src/input/schaum17.input.pamphlet
index a11b623..6092400 100644
--- a/src/input/schaum17.input.pamphlet
+++ b/src/input/schaum17.input.pamphlet
@@ -598,27 +598,34 @@ aa:=integrate(sin(p*x)*sin(q*x),x)
 --E
 
 --S 45
-bb:=(sin(p-q)*x)/(2*(p-q))-(sin(p+q)*x)/(2*(p+q))
+bb:=sin((p-q)*x)/(2*(p-q))-sin((p+q)*x)/(2*(p+q))
 --R
---R        (- q + p)x sin(q + p) + (q + p)x sin(q - p)
---R   (2)  -------------------------------------------
---R                           2     2
---R                         2q  - 2p
+--R        (- q + p)sin((q + p)x) + (q + p)sin((q - p)x)
+--R   (2)  ---------------------------------------------
+--R                            2     2
+--R                          2q  - 2p
 --R                                                     Type: Expression Integer
 --E 
 
---S 46     14:353 Axiom cannot simplify this expression
+--S 46
 cc:=aa-bb
 --R
 --R   (3)
---R       2p cos(p x)sin(q x) - 2q cos(q x)sin(p x) + (q - p)x sin(q + p)
+--R       (q - p)sin((q + p)x) + 2p cos(p x)sin(q x) + (- q - p)sin((q - p)x)
 --R     + 
---R       (- q - p)x sin(q - p)
+--R       - 2q cos(q x)sin(p x)
 --R  /
 --R       2     2
 --R     2q  - 2p
 --R                                                     Type: Expression Integer
 --E
+
+--S 47     14:353 Schams and Axiom agree
+dd:=complexNormalize cc
+--R
+--R   (4)  0
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.354~~~~~$\displaystyle
@@ -629,7 +636,7 @@ $$
 <<*>>=
 )clear all
 
---S 47
+--S 48
 aa:=integrate(1/(1-sin(a*x)),x)
 --R 
 --R
@@ -639,7 +646,7 @@ aa:=integrate(1/(1-sin(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 48
+--S 49
 bb:=1/a*tan(%pi/4+(a*x)/2)
 --R
 --R            2a x + %pi
@@ -650,7 +657,7 @@ bb:=1/a*tan(%pi/4+(a*x)/2)
 --R                                                     Type: Expression Integer
 --E 
 
---S 49
+--S 50
 cc:=aa-bb
 --R
 --R                                       2a x + %pi
@@ -661,7 +668,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 50     14:354 Schaums and Axiom differ by a constant
+--S 51     14:354 Schaums and Axiom differ by a constant
 dd:=complexNormalize cc
 --R
 --R        1
@@ -680,7 +687,7 @@ $$
 <<*>>=
 )clear all
 
---S 51
+--S 52
 aa:=integrate(x/(1-sin(ax)),x)
 --R 
 --R
@@ -691,7 +698,7 @@ aa:=integrate(x/(1-sin(ax)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 52
+--S 53
 bb:=x/a*tan(%pi/4+(a*x)/2)+2/a^2*log(sin(%pi/4-(a*x)/2))
 --R
 --R                   2a x - %pi             2a x + %pi
@@ -703,7 +710,7 @@ bb:=x/a*tan(%pi/4+(a*x)/2)+2/a^2*log(sin(%pi/4-(a*x)/2))
 --R                                                     Type: Expression Integer
 --E
 
---S 53     14:355 Axiom cannot simplify this expression
+--S 54     14:355 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R   (3)
@@ -729,7 +736,7 @@ $$
 <<*>>=
 )clear all
 
---S 54
+--S 55
 aa:=integrate(1/(1+sin(ax)),x)
 --R 
 --R
@@ -739,7 +746,7 @@ aa:=integrate(1/(1+sin(ax)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 55
+--S 56
 bb:=-1/a*tan(%pi/4-(a*x)/2)
 --R
 --R            2a x - %pi
@@ -750,7 +757,7 @@ bb:=-1/a*tan(%pi/4-(a*x)/2)
 --R                                                     Type: Expression Integer
 --E
 
---S 56
+--S 57
 cc:=aa-bb
 --R
 --R                           2a x - %pi
@@ -761,7 +768,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 57
+--S 58
 tanrule:=rule(tan(a/b) == sin(a)/cos(b))
 --R
 --R            a     sin(a)
@@ -770,7 +777,7 @@ tanrule:=rule(tan(a/b) == sin(a)/cos(b))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 58     14:356 Axiom cannot simplify this expression
+--S 59     14:356 Axiom cannot simplify this expression
 dd:=tanrule cc
 --R
 --R        (- sin(ax) - 1)sin(2a x - %pi) + a x cos(4)
@@ -789,7 +796,7 @@ $$
 <<*>>=
 )clear all
 
---S 59
+--S 60
 aa:=integrate(x/(1+sin(a*x)),x)
 --R 
 --R
@@ -809,7 +816,7 @@ aa:=integrate(x/(1+sin(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 60
+--S 61
 bb:=-x/a*tan(%pi/4-(a*x)/2)+2/a^2*log(sin(%pi/4+(a*x)/2))
 --R
 --R                 2a x + %pi             2a x - %pi
@@ -821,7 +828,7 @@ bb:=-x/a*tan(%pi/4-(a*x)/2)+2/a^2*log(sin(%pi/4+(a*x)/2))
 --R                                                     Type: Expression Integer
 --E
 
---S 61
+--S 62     14:257 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R   (3)
@@ -848,60 +855,6 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 62
-dd:=expandLog cc
---R
---R   (4)
---R       (2sin(a x) + 2cos(a x) + 2)log(sin(a x) + cos(a x) + 1)
---R     + 
---R                                            2a x + %pi
---R       (- 2sin(a x) - 2cos(a x) - 2)log(sin(----------))
---R                                                 4
---R     + 
---R       (- sin(a x) - cos(a x) - 1)log(cos(a x) + 1)
---R     + 
---R                                                2a x - %pi
---R       (- a x sin(a x) - a x cos(a x) - a x)tan(----------)
---R                                                     4
---R     + 
---R       (- log(2) + a x)sin(a x) + (- log(2) - a x)cos(a x) - log(2) - a x
---R  /
---R      2            2            2
---R     a sin(a x) + a cos(a x) + a
---R                                                     Type: Expression Integer
---E
-
---S 63
-tanrule:=rule(tan(a/b) == sin(a)/cos(b))
---R
---R            a     sin(a)
---R   (5)  tan(-) == ------
---R            b     cos(b)
---R                        Type: RewriteRule(Integer,Integer,Expression Integer)
---E
-
---S 64     14:357 Axiom cannot simplify this expression
-ee:=tanrule dd
---R
---R   (6)
---R       (2cos(4)sin(a x) + 2cos(4)cos(a x) + 2cos(4))log(sin(a x) + cos(a x) + 1)
---R     + 
---R                                                              2a x + %pi
---R       (- 2cos(4)sin(a x) - 2cos(4)cos(a x) - 2cos(4))log(sin(----------))
---R                                                                   4
---R     + 
---R       (- cos(4)sin(a x) - cos(4)cos(a x) - cos(4))log(cos(a x) + 1)
---R     + 
---R       (- a x sin(a x) - a x cos(a x) - a x)sin(2a x - %pi)
---R     + 
---R       (- cos(4)log(2) + a x cos(4))sin(a x)
---R     + 
---R       (- cos(4)log(2) - a x cos(4))cos(a x) - cos(4)log(2) - a x cos(4)
---R  /
---R      2                  2                  2
---R     a cos(4)sin(a x) + a cos(4)cos(a x) + a cos(4)
---R                                                     Type: Expression Integer
---E
 @
 
 \section{\cite{1}:14.358~~~~~$\displaystyle
@@ -913,9 +866,8 @@ $$
 <<*>>=
 )clear all
 
---S 65
+--S 63
 aa:=integrate(1/(1-sin(a*x))^2,x)
---R 
 --R
 --R                                               2
 --R             (3cos(a x) + 3)sin(a x) + cos(a x)  - 4cos(a x) - 5
@@ -925,18 +877,18 @@ aa:=integrate(1/(1-sin(a*x))^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 66
-bb:=-1/(2*a)*tan(%pi/4+(a*x)/2)+1/(6*a)*tan(%pi/4+(a*x)/2)^3
+--S 64
+bb:=1/(2*a)*tan(%pi/4+(a*x)/2)+1/(6*a)*tan(%pi/4+(a*x)/2)^3
 --R
 --R            2a x + %pi 3        2a x + %pi
---R        tan(----------)  - 3tan(----------)
+--R        tan(----------)  + 3tan(----------)
 --R                 4                   4
 --R   (2)  -----------------------------------
 --R                         6a
 --R                                                     Type: Expression Integer
 --E 
 
---S 67
+--S 65
 cc:=aa-bb
 --R
 --R   (3)
@@ -944,9 +896,9 @@ cc:=aa-bb
 --R       ((- cos(a x) - 2)sin(a x) - cos(a x)  + cos(a x) + 2)tan(----------)
 --R                                                                     4
 --R     + 
---R                                           2                     2a x + %pi
---R       ((3cos(a x) + 6)sin(a x) + 3cos(a x)  - 3cos(a x) - 6)tan(----------)
---R                                                                      4
+--R                                             2                     2a x + %pi
+--R       ((- 3cos(a x) - 6)sin(a x) - 3cos(a x)  + 3cos(a x) + 6)tan(----------)
+--R                                                                        4
 --R     + 
 --R                                          2
 --R       (6cos(a x) + 6)sin(a x) + 2cos(a x)  - 8cos(a x) - 10
@@ -956,41 +908,199 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 68
-tanrule:=rule(tan(a/b) == sin(a)/cos(b))
+--S 66
+tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
---R            a     sin(a)
---R   (4)  tan(-) == ------
---R            b     cos(b)
+--R                  sin(a)
+--R   (4)  tan(a) == ------
+--R                  cos(a)
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 69     14:358 Axiom cannot simplify this expression
+--S 67
 dd:=tanrule cc
 --R
 --R   (5)
---R                                           2                               3
---R       ((- cos(a x) - 2)sin(a x) - cos(a x)  + cos(a x) + 2)sin(2a x + %pi)
+--R                               2a x + %pi 3
+--R           (- cos(a x) - 2)sin(----------)
+--R                                    4
+--R         + 
+--R                   2a x + %pi 2                2a x + %pi 2     2a x + %pi
+--R           (- 3cos(----------) cos(a x) - 6cos(----------) )sin(----------)
+--R                        4                           4                4
+--R         + 
+--R                2a x + %pi 3                2a x + %pi 3
+--R           6cos(----------) cos(a x) + 6cos(----------)
+--R                     4                           4
+--R      *
+--R         sin(a x)
+--R     + 
+--R                  2                    2a x + %pi 3
+--R       (- cos(a x)  + cos(a x) + 2)sin(----------)
+--R                                            4
 --R     + 
---R                   2                  2                   2        2
---R           (3cos(4) cos(a x) + 6cos(4) )sin(a x) + 3cos(4) cos(a x)
+--R                  2a x + %pi 2        2        2a x + %pi 2
+--R           - 3cos(----------) cos(a x)  + 3cos(----------) cos(a x)
+--R                       4                            4
+--R         + 
+--R                2a x + %pi 2
+--R           6cos(----------)
+--R                     4
+--R      *
+--R             2a x + %pi
+--R         sin(----------)
+--R                  4
+--R     + 
+--R          2a x + %pi 3        2        2a x + %pi 3                 2a x + %pi 3
+--R     2cos(----------) cos(a x)  - 8cos(----------) cos(a x) - 10cos(----------)
+--R               4                            4                            4
+--R  /
+--R               2a x + %pi 3                   2a x + %pi 3
+--R       (6a cos(----------) cos(a x) + 12a cos(----------) )sin(a x)
+--R                    4                              4
+--R     + 
+--R              2a x + %pi 3        2          2a x + %pi 3
+--R       6a cos(----------) cos(a x)  - 6a cos(----------) cos(a x)
+--R                   4                              4
+--R     + 
+--R                 2a x + %pi 3
+--R       - 12a cos(----------)
+--R                      4
+--R                                                     Type: Expression Integer
+--E
+
+--S 68
+sindiffrule2:=rule(sin((a-b)/4) == sin(a/4)*cos(b/4)-cos(a/4)*sin(b/4))
+--R
+--R                 b - a              a     b           b     a
+--I   (6)  - %K sin(-----) == - %K cos(-)sin(-) + %K cos(-)sin(-)
+--R                   4                4     4           4     4
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E
+
+--S 69
+ee:=sindiffrule2 dd
+--R
+--R   (7)
+--R                               2a x + %pi 3
+--R           (- cos(a x) - 2)sin(----------)
+--R                                    4
 --R         + 
---R                    2                  2
---R           - 3cos(4) cos(a x) - 6cos(4)
+--R                   2a x + %pi 2                2a x + %pi 2     2a x + %pi
+--R           (- 3cos(----------) cos(a x) - 6cos(----------) )sin(----------)
+--R                        4                           4                4
+--R         + 
+--R                2a x + %pi 3                2a x + %pi 3
+--R           6cos(----------) cos(a x) + 6cos(----------)
+--R                     4                           4
 --R      *
---R         sin(2a x + %pi)
+--R         sin(a x)
+--R     + 
+--R                  2                    2a x + %pi 3
+--R       (- cos(a x)  + cos(a x) + 2)sin(----------)
+--R                                            4
 --R     + 
---R               3                  3                   3        2
---R       (6cos(4) cos(a x) + 6cos(4) )sin(a x) + 2cos(4) cos(a x)
+--R                  2a x + %pi 2        2        2a x + %pi 2
+--R           - 3cos(----------) cos(a x)  + 3cos(----------) cos(a x)
+--R                       4                            4
+--R         + 
+--R                2a x + %pi 2
+--R           6cos(----------)
+--R                     4
+--R      *
+--R             2a x + %pi
+--R         sin(----------)
+--R                  4
 --R     + 
---R                3                   3
---R       - 8cos(4) cos(a x) - 10cos(4)
+--R          2a x + %pi 3        2        2a x + %pi 3                 2a x + %pi 3
+--R     2cos(----------) cos(a x)  - 8cos(----------) cos(a x) - 10cos(----------)
+--R               4                            4                            4
 --R  /
---R                 3                     3                     3        2
---R       (6a cos(4) cos(a x) + 12a cos(4) )sin(a x) + 6a cos(4) cos(a x)
+--R               2a x + %pi 3                   2a x + %pi 3
+--R       (6a cos(----------) cos(a x) + 12a cos(----------) )sin(a x)
+--R                    4                              4
 --R     + 
---R                  3                     3
---R       - 6a cos(4) cos(a x) - 12a cos(4)
+--R              2a x + %pi 3        2          2a x + %pi 3
+--R       6a cos(----------) cos(a x)  - 6a cos(----------) cos(a x)
+--R                   4                              4
+--R     + 
+--R                 2a x + %pi 3
+--R       - 12a cos(----------)
+--R                      4
+--R                                                     Type: Expression Integer
+--E
+
+--S 70
+sincuberule:=rule(sin(a)^3 == 3/4*sin(a)-1/4*sin(3*a))
+--R
+--R              3    - sin(3a) + 3sin(a)
+--R   (8)  sin(a)  == -------------------
+--R                            4
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E
+
+--S 71
+ff:=sincuberule ee
+--R
+--R   (9)
+--R                                         2                    6a x + 3%pi
+--R       ((cos(a x) + 2)sin(a x) + cos(a x)  - cos(a x) - 2)sin(-----------)
+--R                                                                   4
+--R     + 
+--R                       2a x + %pi 2                      2a x + %pi 2
+--R             ((- 12cos(----------)  - 3)cos(a x) - 24cos(----------)  - 6)
+--R                            4                                 4
+--R          *
+--R                 2a x + %pi
+--R             sin(----------)
+--R                      4
+--R         + 
+--R                 2a x + %pi 3                 2a x + %pi 3
+--R           24cos(----------) cos(a x) + 24cos(----------)
+--R                      4                            4
+--R      *
+--R         sin(a x)
+--R     + 
+--R                    2a x + %pi 2             2
+--R           (- 12cos(----------)  - 3)cos(a x)
+--R                         4
+--R         + 
+--R                  2a x + %pi 2                      2a x + %pi 2
+--R           (12cos(----------)  + 3)cos(a x) + 24cos(----------)  + 6
+--R                       4                                 4
+--R      *
+--R             2a x + %pi
+--R         sin(----------)
+--R                  4
+--R     + 
+--R            2a x + %pi 3        2         2a x + %pi 3
+--R       8cos(----------) cos(a x)  - 32cos(----------) cos(a x)
+--R                 4                             4
+--R     + 
+--R               2a x + %pi 3
+--R       - 40cos(----------)
+--R                    4
+--R  /
+--R                2a x + %pi 3                   2a x + %pi 3
+--R       (24a cos(----------) cos(a x) + 48a cos(----------) )sin(a x)
+--R                     4                              4
+--R     + 
+--R               2a x + %pi 3        2           2a x + %pi 3
+--R       24a cos(----------) cos(a x)  - 24a cos(----------) cos(a x)
+--R                    4                               4
+--R     + 
+--R                 2a x + %pi 3
+--R       - 48a cos(----------)
+--R                      4
+--R                                                     Type: Expression Integer
+--E
+
+--S 72     14:358 Schaums and Axiom differ by a constant
+complexNormalize %
+--R
+--R          2
+--R   (10)  --
+--R         3a
 --R                                                     Type: Expression Integer
 --E
 @
@@ -1004,9 +1114,8 @@ $$
 <<*>>=
 )clear all
 
---S 70
+--S 73
 aa:=integrate(1/(1+sin(a*x))^2,x)
---R 
 --R
 --R                                                2
 --R            (- 3cos(a x) - 3)sin(a x) + cos(a x)  - 4cos(a x) - 5
@@ -1016,7 +1125,7 @@ aa:=integrate(1/(1+sin(a*x))^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 71
+--S 74
 bb:=-1/(2*a)*tan(%pi/4-(a*x)/2)-1/(6*a)*tan(%pi/4-(a*x)/2)^3
 --R
 --R            2a x - %pi 3        2a x - %pi
@@ -1027,7 +1136,7 @@ bb:=-1/(2*a)*tan(%pi/4-(a*x)/2)-1/(6*a)*tan(%pi/4-(a*x)/2)^3
 --R                                                     Type: Expression Integer
 --E 
 
---S 72     14:359 Axiom cannot simplify this expression
+--S 75
 cc:=aa-bb
 --R
 --R   (3)
@@ -1046,6 +1155,211 @@ cc:=aa-bb
 --R     (6a cos(a x) + 12a)sin(a x) - 6a cos(a x)  + 6a cos(a x) + 12a
 --R                                                     Type: Expression Integer
 --E
+
+--S 76
+tanrule:=rule(tan(a) == sin(a)/cos(a))
+--R
+--R                  sin(a)
+--R   (4)  tan(a) == ------
+--R                  cos(a)
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E
+
+--S 77
+dd:=tanrule cc
+--R
+--R   (5)
+--R                               2a x - %pi 3
+--R           (- cos(a x) - 2)sin(----------)
+--R                                    4
+--R         + 
+--R                   2a x - %pi 2                2a x - %pi 2     2a x - %pi
+--R           (- 3cos(----------) cos(a x) - 6cos(----------) )sin(----------)
+--R                        4                           4                4
+--R         + 
+--R                  2a x - %pi 3                2a x - %pi 3
+--R           - 6cos(----------) cos(a x) - 6cos(----------)
+--R                       4                           4
+--R      *
+--R         sin(a x)
+--R     + 
+--R                2                    2a x - %pi 3
+--R       (cos(a x)  - cos(a x) - 2)sin(----------)
+--R                                          4
+--R     + 
+--R                2a x - %pi 2        2        2a x - %pi 2
+--R           3cos(----------) cos(a x)  - 3cos(----------) cos(a x)
+--R                     4                            4
+--R         + 
+--R                  2a x - %pi 2
+--R           - 6cos(----------)
+--R                       4
+--R      *
+--R             2a x - %pi
+--R         sin(----------)
+--R                  4
+--R     + 
+--R          2a x - %pi 3        2        2a x - %pi 3                 2a x - %pi 3
+--R     2cos(----------) cos(a x)  - 8cos(----------) cos(a x) - 10cos(----------)
+--R               4                            4                            4
+--R  /
+--R               2a x - %pi 3                   2a x - %pi 3
+--R       (6a cos(----------) cos(a x) + 12a cos(----------) )sin(a x)
+--R                    4                              4
+--R     + 
+--R                2a x - %pi 3        2          2a x - %pi 3
+--R       - 6a cos(----------) cos(a x)  + 6a cos(----------) cos(a x)
+--R                     4                              4
+--R     + 
+--R               2a x - %pi 3
+--R       12a cos(----------)
+--R                    4
+--R                                                     Type: Expression Integer
+--E
+
+--S 78
+sindiffrule2:=rule(sin((a-b)/4) == sin(a/4)*cos(b/4)-cos(a/4)*sin(b/4))
+--R 
+--R
+--R                 b - a              a     b           b     a
+--I   (6)  - %U sin(-----) == - %U cos(-)sin(-) + %U cos(-)sin(-)
+--R                   4                4     4           4     4
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E
+
+--S 79
+ee:=sindiffrule2 dd
+--R
+--R   (7)
+--R                +-+    2a x - %pi 2             +-+    2a x - %pi 2     a x
+--R           (- 3\|2 cos(----------) cos(a x) - 6\|2 cos(----------) )sin(---)
+--R                            4                               4            2
+--R         + 
+--R                                2a x - %pi 3
+--R           (- 2cos(a x) - 4)sin(----------)
+--R                                     4
+--R         + 
+--R              +-+    2a x - %pi 2    a x          2a x - %pi 3
+--R           (3\|2 cos(----------) cos(---) - 12cos(----------) )cos(a x)
+--R                          4           2                4
+--R         + 
+--R             +-+    2a x - %pi 2    a x          2a x - %pi 3
+--R           6\|2 cos(----------) cos(---) - 12cos(----------)
+--R                         4           2                4
+--R      *
+--R         sin(a x)
+--R     + 
+--R            +-+    2a x - %pi 2             +-+    2a x - %pi 2     a x
+--R       (- 3\|2 cos(----------) cos(a x) - 6\|2 cos(----------) )sin(---)
+--R                        4                               4            2
+--R     + 
+--R                 2                     2a x - %pi 3
+--R       (2cos(a x)  - 2cos(a x) - 4)sin(----------)
+--R                                            4
+--R     + 
+--R            2a x - %pi 2        2    2a x - %pi         2a x - %pi 3        2
+--R       6cos(----------) cos(a x) sin(----------) + 4cos(----------) cos(a x)
+--R                 4                        4                  4
+--R     + 
+--R          +-+    2a x - %pi 2    a x          2a x - %pi 3
+--R       (3\|2 cos(----------) cos(---) - 16cos(----------) )cos(a x)
+--R                      4           2                4
+--R     + 
+--R         +-+    2a x - %pi 2    a x          2a x - %pi 3
+--R       6\|2 cos(----------) cos(---) - 20cos(----------)
+--R                     4           2                4
+--R  /
+--R                2a x - %pi 3                   2a x - %pi 3
+--R       (12a cos(----------) cos(a x) + 24a cos(----------) )sin(a x)
+--R                     4                              4
+--R     + 
+--R                 2a x - %pi 3        2           2a x - %pi 3
+--R       - 12a cos(----------) cos(a x)  + 12a cos(----------) cos(a x)
+--R                      4                               4
+--R     + 
+--R               2a x - %pi 3
+--R       24a cos(----------)
+--R                    4
+--R                                                     Type: Expression Integer
+--E
+
+--S 80
+sincuberule:=rule(sin(a)^3 == 3/4*sin(a)-1/4*sin(3*a))
+--R
+--R              3    - sin(3a) + 3sin(a)
+--R   (8)  sin(a)  == -------------------
+--R                            4
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E
+
+--S 81
+ff:=sincuberule ee
+--R
+--R   (9)
+--R                                         2                    6a x - 3%pi
+--R       ((cos(a x) + 2)sin(a x) - cos(a x)  + cos(a x) + 2)sin(-----------)
+--R                                                                   4
+--R     + 
+--R                +-+    2a x - %pi 2              +-+    2a x - %pi 2     a x
+--R           (- 6\|2 cos(----------) cos(a x) - 12\|2 cos(----------) )sin(---)
+--R                            4                                4            2
+--R         + 
+--R                                2a x - %pi
+--R           (- 3cos(a x) - 6)sin(----------)
+--R                                     4
+--R         + 
+--R              +-+    2a x - %pi 2    a x          2a x - %pi 3
+--R           (6\|2 cos(----------) cos(---) - 24cos(----------) )cos(a x)
+--R                          4           2                4
+--R         + 
+--R              +-+    2a x - %pi 2    a x          2a x - %pi 3
+--R           12\|2 cos(----------) cos(---) - 24cos(----------)
+--R                          4           2                4
+--R      *
+--R         sin(a x)
+--R     + 
+--R            +-+    2a x - %pi 2              +-+    2a x - %pi 2     a x
+--R       (- 6\|2 cos(----------) cos(a x) - 12\|2 cos(----------) )sin(---)
+--R                        4                                4            2
+--R     + 
+--R               2a x - %pi 2             2                     2a x - %pi
+--R       ((12cos(----------)  + 3)cos(a x)  - 3cos(a x) - 6)sin(----------)
+--R                    4                                              4
+--R     + 
+--R            2a x - %pi 3        2
+--R       8cos(----------) cos(a x)
+--R                 4
+--R     + 
+--R          +-+    2a x - %pi 2    a x          2a x - %pi 3
+--R       (6\|2 cos(----------) cos(---) - 32cos(----------) )cos(a x)
+--R                      4           2                4
+--R     + 
+--R          +-+    2a x - %pi 2    a x          2a x - %pi 3
+--R       12\|2 cos(----------) cos(---) - 40cos(----------)
+--R                      4           2                4
+--R  /
+--R                2a x - %pi 3                   2a x - %pi 3
+--R       (24a cos(----------) cos(a x) + 48a cos(----------) )sin(a x)
+--R                     4                              4
+--R     + 
+--R                 2a x - %pi 3        2           2a x - %pi 3
+--R       - 24a cos(----------) cos(a x)  + 24a cos(----------) cos(a x)
+--R                      4                               4
+--R     + 
+--R               2a x - %pi 3
+--R       48a cos(----------)
+--R                    4
+--R                                                     Type: Expression Integer
+--E
+
+--S 82     14:359 Schaums and Axiom differ by a constant
+complexNormalize %
+--R
+--R            2
+--R   (10)  - --
+--R           3a
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.360~~~~~$\displaystyle
@@ -1066,9 +1380,8 @@ $$
 <<*>>=
 )clear all
 
---S 73
+--S 83
 aa:=integrate(1/(p+q*sin(a*x)),x)
---R 
 --R
 --R   (1)
 --R   [
@@ -1099,37 +1412,35 @@ aa:=integrate(1/(p+q*sin(a*x)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 74
-bb1:=2/(a*sqrt(p^2-q^2))*atan((p*tan((a*x)/2+q))/sqrt(p^2-q^2))
---R
---R                    a x + 2q
---R              p tan(--------)
---R                        2
---R        2atan(---------------)
---R                 +---------+
---R                 |   2    2
---R                \|- q  + p
---R   (2)  ----------------------
---R               +---------+
---R               |   2    2
---R             a\|- q  + p
+--S 84
+bb1:=2/(a*sqrt(p^2-q^2))*atan((p*tan(a*x/2)+q)/sqrt(p^2-q^2))
+--R
+--R                    a x
+--R              p tan(---) + q
+--R                     2
+--R        2atan(--------------)
+--R                +---------+
+--R                |   2    2
+--R               \|- q  + p
+--R   (2)  ---------------------
+--R              +---------+
+--R              |   2    2
+--R            a\|- q  + p
 --R                                                     Type: Expression Integer
 --E
 
---S 75
-bb2:=1/(a*sqrt(q^2-p^2))*log((p*tan((a*x)/2+q-sqrt(q^2-p^2)))/(p*tan((a*x)/2+q+sqrt(q^2-p^2))))
---R
---R                    +-------+
---R                    | 2    2
---R                  2\|q  - p   - a x - 2q
---R              tan(----------------------)
---R                             2
---R        log(- ---------------------------)
---R                    +-------+
---R                    | 2    2
---R                  2\|q  - p   + a x + 2q
---R              tan(----------------------)
---R                             2
+--S 85
+bb2:=1/(a*sqrt(q^2-p^2))*log((p*tan((a*x)/2)+q-sqrt(q^2-p^2))/(p*tan((a*x)/2)+q+sqrt(q^2-p^2)))
+--R
+--R               +-------+
+--R               | 2    2          a x
+--R            - \|q  - p   + p tan(---) + q
+--R                                  2
+--R        log(-----------------------------)
+--R              +-------+
+--R              | 2    2          a x
+--R             \|q  - p   + p tan(---) + q
+--R                                 2
 --R   (3)  ----------------------------------
 --R                      +-------+
 --R                      | 2    2
@@ -1137,7 +1448,7 @@ bb2:=1/(a*sqrt(q^2-p^2))*log((p*tan((a*x)/2+q-sqrt(q^2-p^2)))/(p*tan((a*x)/2+q+s
 --R                                                     Type: Expression Integer
 --E
 
---S 76
+--S 86
 cc1:=aa.1-bb1
 --R
 --R   (4)
@@ -1155,13 +1466,13 @@ cc1:=aa.1-bb1
 --R           /
 --R              q sin(a x) + p
 --R     + 
---R                               a x + 2q
---R           +-------+     p tan(--------)
---R           | 2    2                2
---R       - 2\|q  - p  atan(---------------)
---R                            +---------+
---R                            |   2    2
---R                           \|- q  + p
+--R                               a x
+--R           +-------+     p tan(---) + q
+--R           | 2    2             2
+--R       - 2\|q  - p  atan(--------------)
+--R                           +---------+
+--R                           |   2    2
+--R                          \|- q  + p
 --R  /
 --R       +---------+ +-------+
 --R       |   2    2  | 2    2
@@ -1169,40 +1480,28 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 77
+--S 87
 cc2:=aa.2-bb1
 --R
 --R   (5)
---R                                         +---------+                a x + 2q
---R                                         |   2    2           p tan(--------)
---R           (p sin(a x) + q cos(a x) + q)\|- q  + p                      2
---R   - 2atan(-----------------------------------------) - 2atan(---------------)
---R                    2    2             2    2                    +---------+
---R                  (q  - p )cos(a x) + q  - p                     |   2    2
---R                                                                \|- q  + p
---R   ---------------------------------------------------------------------------
+--R                                         +---------+                a x
+--R                                         |   2    2           p tan(---) + q
+--R           (p sin(a x) + q cos(a x) + q)\|- q  + p                   2
+--R   - 2atan(-----------------------------------------) - 2atan(--------------)
+--R                    2    2             2    2                   +---------+
+--R                  (q  - p )cos(a x) + q  - p                    |   2    2
+--R                                                               \|- q  + p
+--R   --------------------------------------------------------------------------
 --R                                    +---------+
 --R                                    |   2    2
 --R                                  a\|- q  + p
 --R                                                     Type: Expression Integer
 --E
 
---S 78
+--S 88
 cc3:=aa.1-bb2
 --R
 --R   (6)
---R                     +-------+
---R                     | 2    2
---R                   2\|q  - p   - a x - 2q
---R               tan(----------------------)
---R                              2
---R       - log(- ---------------------------)
---R                     +-------+
---R                     | 2    2
---R                   2\|q  - p   + a x + 2q
---R               tan(----------------------)
---R                              2
---R     + 
 --R       log
 --R                                                      +-------+
 --R                                2    2             2  | 2    2
@@ -1212,6 +1511,16 @@ cc3:=aa.1-bb2
 --R              (- p q  + p )sin(a x) + (- q  + p q)cos(a x) - q  + p q
 --R         /
 --R            q sin(a x) + p
+--R     + 
+--R                +-------+
+--R                | 2    2          a x
+--R             - \|q  - p   + p tan(---) + q
+--R                                   2
+--R       - log(-----------------------------)
+--R               +-------+
+--R               | 2    2          a x
+--R              \|q  - p   + p tan(---) + q
+--R                                  2
 --R  /
 --R       +-------+
 --R       | 2    2
@@ -1219,21 +1528,19 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 79     14:360 Axiom cannot simplify these equations
+--S 89
 cc4:=aa.2-bb2
 --R
 --R   (7)
---R                                 +-------+
---R                                 | 2    2
---R                               2\|q  - p   - a x - 2q
---R          +---------+      tan(----------------------)
---R          |   2    2                      2
---R       - \|- q  + p  log(- ---------------------------)
---R                                 +-------+
---R                                 | 2    2
---R                               2\|q  - p   + a x + 2q
---R                           tan(----------------------)
---R                                          2
+--R                            +-------+
+--R                            | 2    2          a x
+--R          +---------+    - \|q  - p   + p tan(---) + q
+--R          |   2    2                           2
+--R       - \|- q  + p  log(-----------------------------)
+--R                           +-------+
+--R                           | 2    2          a x
+--R                          \|q  - p   + p tan(---) + q
+--R                                              2
 --R     + 
 --R                                                       +---------+
 --R           +-------+                                   |   2    2
@@ -1248,6 +1555,233 @@ cc4:=aa.2-bb2
 --R                                                     Type: Expression Integer
 --E
 
+--S 90
+dd2:=ratDenom cc2
+--R
+--R   (8)
+--R                                            +---------+
+--R                                  a x       |   2    2
+--R           +---------+     (p tan(---) + q)\|- q  + p
+--R           |   2    2              2
+--R       - 2\|- q  + p  atan(----------------------------)
+--R                                       2    2
+--R                                      q  - p
+--R     + 
+--R                                                       +---------+
+--R         +---------+                                   |   2    2
+--R         |   2    2      (p sin(a x) + q cos(a x) + q)\|- q  + p
+--R       2\|- q  + p  atan(-----------------------------------------)
+--R                                  2    2             2    2
+--R                                (q  - p )cos(a x) + q  - p
+--R  /
+--R        2      2
+--R     a q  - a p
+--R                                                     Type: Expression Integer
+--E
+
+--S 91
+atanrule2:=rule(atan(x) == 1/2*%i*(log(1-%i*x)-log(1+%i*x)))
+--R
+--R                     1                    1
+--R   (9)  atan(x) == - - %i log(%i x + 1) + - %i log(- %i x + 1)
+--R                     2                    2
+--RType: RewriteRule(Integer,Complex Fraction Integer,Expression Complex Fraction Integer)
+--E
+
+--S 92
+ee2:=atanrule2 dd2
+--R
+--R   (10)
+--R                                                  +---------+
+--R                                   1              |   2    2     2    2
+--R          +---------+    (%i p tan(- a x) + %i q)\|- q  + p   + q  - p
+--R          |   2    2               2
+--R       %i\|- q  + p  log(----------------------------------------------)
+--R                                              2    2
+--R                                             q  - p
+--R     + 
+--R       -
+--R               +---------+
+--R               |   2    2
+--R            %i\|- q  + p
+--R         *
+--R            log
+--R                                                          +---------+
+--R                                                          |   2    2
+--R                   (%i p sin(a x) + %i q cos(a x) + %i q)\|- q  + p
+--R                 + 
+--R                     2    2             2    2
+--R                   (q  - p )cos(a x) + q  - p
+--R              /
+--R                   2    2             2    2
+--R                 (q  - p )cos(a x) + q  - p
+--R     + 
+--R            +---------+
+--R            |   2    2
+--R         %i\|- q  + p
+--R      *
+--R         log
+--R                                                         +---------+
+--R                                                         |   2    2
+--R                (- %i p sin(a x) - %i q cos(a x) - %i q)\|- q  + p
+--R              + 
+--R                  2    2             2    2
+--R                (q  - p )cos(a x) + q  - p
+--R           /
+--R                2    2             2    2
+--R              (q  - p )cos(a x) + q  - p
+--R     + 
+--R                                                      +---------+
+--R                                       1              |   2    2     2    2
+--R            +---------+    (- %i p tan(- a x) - %i q)\|- q  + p   + q  - p
+--R            |   2    2                 2
+--R       - %i\|- q  + p  log(------------------------------------------------)
+--R                                                 2    2
+--R                                                q  - p
+--R  /
+--R        2      2
+--R     a q  - a p
+--R                                    Type: Expression Complex Fraction Integer
+--E
+
+--S 93
+ff2:=expandLog ee2
+--R
+--R   (11)
+--R            +---------+                       +---------+
+--R            |   2    2            1           |   2    2        2       2
+--R       - %i\|- q  + p  log((p tan(- a x) + q)\|- q  + p   + %i q  - %i p )
+--R                                  2
+--R     + 
+--R          +---------+                       +---------+
+--R          |   2    2            1           |   2    2        2       2
+--R       %i\|- q  + p  log((p tan(- a x) + q)\|- q  + p   - %i q  + %i p )
+--R                                2
+--R     + 
+--R            +---------+
+--R            |   2    2
+--R         %i\|- q  + p
+--R      *
+--R         log
+--R                                            +---------+
+--R                                            |   2    2
+--R              (p sin(a x) + q cos(a x) + q)\|- q  + p
+--R            + 
+--R                   2       2                2       2
+--R              (%i q  - %i p )cos(a x) + %i q  - %i p
+--R     + 
+--R       -
+--R               +---------+
+--R               |   2    2
+--R            %i\|- q  + p
+--R         *
+--R            log
+--R                                               +---------+
+--R                                               |   2    2
+--R                 (p sin(a x) + q cos(a x) + q)\|- q  + p
+--R               + 
+--R                        2       2                2       2
+--R                 (- %i q  + %i p )cos(a x) - %i q  + %i p
+--R  /
+--R        2      2
+--R     a q  - a p
+--R                                    Type: Expression Complex Fraction Integer
+--E
+
+--S 94
+gg2:=numer(ff2)/denom(ff2)
+--R
+--R   (12)
+--R            +---------+                       +---------+
+--R            |   2    2            1           |   2    2        2       2
+--R       - %i\|- q  + p  log((p tan(- a x) + q)\|- q  + p   + %i q  - %i p )
+--R                                  2
+--R     + 
+--R          +---------+                       +---------+
+--R          |   2    2            1           |   2    2        2       2
+--R       %i\|- q  + p  log((p tan(- a x) + q)\|- q  + p   - %i q  + %i p )
+--R                                2
+--R     + 
+--R            +---------+
+--R            |   2    2
+--R         %i\|- q  + p
+--R      *
+--R         log
+--R                                            +---------+
+--R                                            |   2    2
+--R              (p sin(a x) + q cos(a x) + q)\|- q  + p
+--R            + 
+--R                   2       2                2       2
+--R              (%i q  - %i p )cos(a x) + %i q  - %i p
+--R     + 
+--R       -
+--R               +---------+
+--R               |   2    2
+--R            %i\|- q  + p
+--R         *
+--R            log
+--R                                               +---------+
+--R                                               |   2    2
+--R                 (p sin(a x) + q cos(a x) + q)\|- q  + p
+--R               + 
+--R                        2       2                2       2
+--R                 (- %i q  + %i p )cos(a x) - %i q  + %i p
+--R  /
+--R        2      2
+--R     a q  - a p
+--RType: Fraction SparseMultivariatePolynomial(Complex Fraction Integer,Kernel Expression Complex Fraction Integer)
+--E
+
+--S 95
+hh2:=gg2::Expression Complex Fraction Integer
+--R
+--R   (13)
+--R            +---------+                       +---------+
+--R            |   2    2            1           |   2    2        2       2
+--R       - %i\|- q  + p  log((p tan(- a x) + q)\|- q  + p   + %i q  - %i p )
+--R                                  2
+--R     + 
+--R          +---------+                       +---------+
+--R          |   2    2            1           |   2    2        2       2
+--R       %i\|- q  + p  log((p tan(- a x) + q)\|- q  + p   - %i q  + %i p )
+--R                                2
+--R     + 
+--R            +---------+
+--R            |   2    2
+--R         %i\|- q  + p
+--R      *
+--R         log
+--R                                            +---------+
+--R                                            |   2    2
+--R              (p sin(a x) + q cos(a x) + q)\|- q  + p
+--R            + 
+--R                   2       2                2       2
+--R              (%i q  - %i p )cos(a x) + %i q  - %i p
+--R     + 
+--R       -
+--R               +---------+
+--R               |   2    2
+--R            %i\|- q  + p
+--R         *
+--R            log
+--R                                               +---------+
+--R                                               |   2    2
+--R                 (p sin(a x) + q cos(a x) + q)\|- q  + p
+--R               + 
+--R                        2       2                2       2
+--R                 (- %i q  + %i p )cos(a x) - %i q  + %i p
+--R  /
+--R        2      2
+--R     a q  - a p
+--R                                    Type: Expression Complex Fraction Integer
+--E
+
+--S 96     14:360 Schaums and Axiom agree
+complexNormalize hh2
+--R
+--R   (14)  0
+--R                                    Type: Expression Complex Fraction Integer
+--E
 @
 
 \section{\cite{1}:14.361~~~~~$\displaystyle
@@ -1259,7 +1793,7 @@ $$
 <<*>>=
 )clear all
 
---S 80
+--S 97
 aa:=integrate(1/(p+q*sin(a*x))^2,x)
 --R 
 --R
@@ -1305,7 +1839,7 @@ aa:=integrate(1/(p+q*sin(a*x))^2,x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 81
+--S 98
 t1:=integrate(1/(p+q*sin(a*x)),x)
 --R
 --R   (2)
@@ -1337,7 +1871,7 @@ t1:=integrate(1/(p+q*sin(a*x)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 82
+--S 99
 bb1:=(q*cos(a*x))/(a*(p^2-q^2)*(p+q*sin(a*x)))+p/(p^2-q^2)*t1.1
 --R
 --R   (3)
@@ -1364,7 +1898,7 @@ bb1:=(q*cos(a*x))/(a*(p^2-q^2)*(p+q*sin(a*x)))+p/(p^2-q^2)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 83
+--S 100
 bb2:=(q*cos(a*x))/(a*(p^2-q^2)*(p+q*sin(a*x)))+p/(p^2-q^2)*t1.2
 --R
 --R   (4)
@@ -1385,7 +1919,7 @@ bb2:=(q*cos(a*x))/(a*(p^2-q^2)*(p+q*sin(a*x)))+p/(p^2-q^2)*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 84
+--S 101
 cc1:=aa.1-bb1
 --R
 --R   (5)
@@ -1425,7 +1959,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 85
+--S 102
 cc2:=aa.2-bb1
 --R
 --R   (6)
@@ -1460,7 +1994,7 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 86
+--S 103
 cc3:=aa.1-bb2
 --R
 --R   (7)
@@ -1495,7 +2029,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 87     14:361 Schaums and Axiom differ by a constant
+--S 104    14:361 Schaums and Axiom differ by a constant
 cc4:=aa.2-bb2
 --R
 --R                q
@@ -1514,41 +2048,31 @@ $$
 <<*>>=
 )clear all
 
---S 88
-aa:=integrate(1/(p^2+a^2*sin(a*x)),x)
---R 
+--S 105
+aa:=integrate(1/(p^2+q^2*sin(a*x)^2),x)
 --R
 --R   (1)
---R   [
---R       log
---R                                                        +---------+
---R                2 2               4    4             4  |   4    4
---R              (a p sin(a x) + (- p  + a )cos(a x) + a )\|- p  + a
---R            + 
---R                6    4 2              2 4    6             2 4    6
---R              (p  - a p )sin(a x) + (a p  - a )cos(a x) + a p  - a
---R         /
---R             2            2
---R            a sin(a x) + p
---R    /
---R         +---------+
---R         |   4    4
---R       a\|- p  + a
---R     ,
---R                                         +-------+
---R            2            2            2  | 4    4
---R          (p sin(a x) + a cos(a x) + a )\|p  - a
---R    2atan(----------------------------------------)
---R                   4    4             4    4
---R                 (p  - a )cos(a x) + p  - a
---R    -----------------------------------------------]
---R                        +-------+
---R                        | 4    4
---R                      a\|p  - a
---R                                     Type: Union(List Expression Integer,...)
+--R                             +-------+
+--R                             | 2    2
+--R                  p sin(a x)\|q  + p
+--R       atan(-------------------------------)
+--R               2     2              2     2
+--R            (2q  + 2p )cos(a x) + 2q  + 2p
+--R     + 
+--R                 2    2              2     2
+--R             ((2q  + p )cos(a x) + 2q  + 2p )sin(a x)
+--R       atan(-----------------------------------------)
+--R                                            +-------+
+--R                       2                    | 2    2
+--R            (p cos(a x)  + 2p cos(a x) + p)\|q  + p
+--R  /
+--R         +-------+
+--R         | 2    2
+--R     a p\|q  + p
+--R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 89
+--S 106
 bb:=1/(a*p*sqrt(p^2+q^2))*atan((sqrt(p^2+q^2)*tan(a*x))/p)
 --R
 --R                      +-------+
@@ -1563,60 +2087,368 @@ bb:=1/(a*p*sqrt(p^2+q^2))*atan((sqrt(p^2+q^2)*tan(a*x))/p)
 --R                                                     Type: Expression Integer
 --E
 
---S 90
-cc1:=aa.1-bb
+--S 107
+cc:=aa-bb
 --R
 --R   (3)
---R           +-------+
---R           | 2    2
---R         p\|q  + p
---R      *
---R         log
---R                                                          +---------+
---R                  2 2               4    4             4  |   4    4
---R                (a p sin(a x) + (- p  + a )cos(a x) + a )\|- p  + a
---R              + 
---R                  6    4 2              2 4    6             2 4    6
---R                (p  - a p )sin(a x) + (a p  - a )cos(a x) + a p  - a
---R           /
---R               2            2
---R              a sin(a x) + p
+--R                       +-------+                          +-------+
+--R                       | 2    2                           | 2    2
+--R              tan(a x)\|q  + p                 p sin(a x)\|q  + p
+--R       - atan(------------------) + atan(-------------------------------)
+--R                       p                    2     2              2     2
+--R                                         (2q  + 2p )cos(a x) + 2q  + 2p
 --R     + 
---R                                   +-------+
---R          +---------+              | 2    2
---R          |   4    4      tan(a x)\|q  + p
---R       - \|- p  + a  atan(------------------)
---R                                   p
+--R                 2    2              2     2
+--R             ((2q  + p )cos(a x) + 2q  + 2p )sin(a x)
+--R       atan(-----------------------------------------)
+--R                                            +-------+
+--R                       2                    | 2    2
+--R            (p cos(a x)  + 2p cos(a x) + p)\|q  + p
 --R  /
---R         +---------+ +-------+
---R         |   4    4  | 2    2
---R     a p\|- p  + a  \|q  + p
+--R         +-------+
+--R         | 2    2
+--R     a p\|q  + p
 --R                                                     Type: Expression Integer
 --E
 
---S 91     14:362 Axiom cannot simplify this expression
-cc2:=aa.2-bb
+--S 108
+dd:=ratDenom cc
 --R
 --R   (4)
 --R                                 +-------+
 --R          +-------+              | 2    2
---R          | 4    4      tan(a x)\|q  + p
---R       - \|p  - a  atan(------------------)
+--R          | 2    2      tan(a x)\|q  + p
+--R       - \|q  + p  atan(------------------)
 --R                                 p
 --R     + 
---R                                                       +-------+
---R          +-------+       2            2            2  | 4    4
---R          | 2    2      (p sin(a x) + a cos(a x) + a )\|p  - a
---R       2p\|q  + p  atan(----------------------------------------)
---R                                 4    4             4    4
---R                               (p  - a )cos(a x) + p  - a
+--R                                                                  +-------+
+--R        +-------+            2    2              2     2          | 2    2
+--R        | 2    2         ((2q  + p )cos(a x) + 2q  + 2p )sin(a x)\|q  + p
+--R       \|q  + p  atan(--------------------------------------------------------)
+--R                          2    3         2        2     3               2    3
+--R                      (p q  + p )cos(a x)  + (2p q  + 2p )cos(a x) + p q  + p
+--R     + 
+--R                                       +-------+
+--R        +-------+                      | 2    2
+--R        | 2    2            p sin(a x)\|q  + p
+--R       \|q  + p  atan(-------------------------------)
+--R                         2     2              2     2
+--R                      (2q  + 2p )cos(a x) + 2q  + 2p
 --R  /
---R         +-------+ +-------+
---R         | 4    4  | 2    2
---R     a p\|p  - a  \|q  + p
+--R          2      3
+--R     a p q  + a p
 --R                                                     Type: Expression Integer
 --E
 
+--S 109
+atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
+--R
+--R                            - x + %i
+--R                     %i log(--------)
+--R                             x + %i
+--R   (5)  atan(x) == - ----------------
+--R                             2
+--R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
+--E
+
+--S 110
+ee:=atanrule dd
+--R
+--R   (6)
+--R       -
+--R               +-------+
+--R               | 2    2
+--R            %i\|q  + p
+--R         *
+--R            log
+--R                                +-------+
+--R                                | 2    2          2        2                 2
+--R                   - p sin(a x)\|q  + p   + (2%i q  + 2%i p )cos(a x) + 2%i q
+--R                 + 
+--R                        2
+--R                   2%i p
+--R              /
+--R                              +-------+
+--R                              | 2    2          2        2                 2
+--R                   p sin(a x)\|q  + p   + (2%i q  + 2%i p )cos(a x) + 2%i q
+--R                 + 
+--R                        2
+--R                   2%i p
+--R     + 
+--R       -
+--R               +-------+
+--R               | 2    2
+--R            %i\|q  + p
+--R         *
+--R            log
+--R                                                              +-------+
+--R                         2    2              2     2          | 2    2
+--R                   ((- 2q  - p )cos(a x) - 2q  - 2p )sin(a x)\|q  + p
+--R                 + 
+--R                          2       3         2           2        3
+--R                   (%i p q  + %i p )cos(a x)  + (2%i p q  + 2%i p )cos(a x)
+--R                 + 
+--R                         2       3
+--R                   %i p q  + %i p
+--R              /
+--R                                                            +-------+
+--R                       2    2              2     2          | 2    2
+--R                   ((2q  + p )cos(a x) + 2q  + 2p )sin(a x)\|q  + p
+--R                 + 
+--R                          2       3         2           2        3
+--R                   (%i p q  + %i p )cos(a x)  + (2%i p q  + 2%i p )cos(a x)
+--R                 + 
+--R                         2       3
+--R                   %i p q  + %i p
+--R     + 
+--R                                  +-------+
+--R          +-------+               | 2    2
+--R          | 2    2     - tan(a x)\|q  + p   + %i p
+--R       %i\|q  + p  log(---------------------------)
+--R                                 +-------+
+--R                                 | 2    2
+--R                        tan(a x)\|q  + p   + %i p
+--R  /
+--R           2       3
+--R     2a p q  + 2a p
+--R                                             Type: Expression Complex Integer
+--E
+
+--S 111
+ff:=expandLog ee
+--R
+--R   (7)
+--R            +-------+             +-------+
+--R            | 2    2              | 2    2
+--R       - %i\|q  + p  log(tan(a x)\|q  + p   + %i p)
+--R     + 
+--R          +-------+             +-------+
+--R          | 2    2              | 2    2
+--R       %i\|q  + p  log(tan(a x)\|q  + p   - %i p)
+--R     + 
+--R            +-------+
+--R            | 2    2
+--R         %i\|q  + p
+--R      *
+--R         log
+--R                                                       +-------+
+--R                  2    2              2     2          | 2    2
+--R              ((2q  + p )cos(a x) + 2q  + 2p )sin(a x)\|q  + p
+--R            + 
+--R                     2       3         2           2        3                  2
+--R              (%i p q  + %i p )cos(a x)  + (2%i p q  + 2%i p )cos(a x) + %i p q
+--R            + 
+--R                  3
+--R              %i p
+--R     + 
+--R       -
+--R               +-------+
+--R               | 2    2
+--R            %i\|q  + p
+--R         *
+--R            log
+--R                                                          +-------+
+--R                     2    2              2     2          | 2    2
+--R                 ((2q  + p )cos(a x) + 2q  + 2p )sin(a x)\|q  + p
+--R               + 
+--R                          2       3         2             2        3
+--R                 (- %i p q  - %i p )cos(a x)  + (- 2%i p q  - 2%i p )cos(a x)
+--R               + 
+--R                         2       3
+--R                 - %i p q  - %i p
+--R     + 
+--R            +-------+
+--R            | 2    2
+--R         %i\|q  + p
+--R      *
+--R                      +-------+
+--R                      | 2    2          2        2                 2        2
+--R       log(p sin(a x)\|q  + p   + (2%i q  + 2%i p )cos(a x) + 2%i q  + 2%i p )
+--R     + 
+--R       -
+--R               +-------+
+--R               | 2    2
+--R            %i\|q  + p
+--R         *
+--R            log
+--R                            +-------+
+--R                            | 2    2            2        2                 2
+--R                 p sin(a x)\|q  + p   + (- 2%i q  - 2%i p )cos(a x) - 2%i q
+--R               + 
+--R                        2
+--R                 - 2%i p
+--R     + 
+--R                     +-------+
+--R                     | 2    2
+--R       - %i log(- 1)\|q  + p
+--R  /
+--R           2       3
+--R     2a p q  + 2a p
+--R                                             Type: Expression Complex Integer
+--E
+
+--S 112
+tanrule2:RewriteRule(INT,COMPLEX(INT),EXPR(COMPLEX(INT))):=rule(tan(a) == sin(a)/cos(a))
+--R
+--R                  sin(a)
+--R   (8)  tan(a) == ------
+--R                  cos(a)
+--R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
+--E
+
+--S 113
+gg:=tanrule2 ff
+--R
+--R   (9)
+--R            +-------+
+--R            | 2    2
+--R         %i\|q  + p
+--R      *
+--R         log
+--R                                                       +-------+
+--R                  2    2              2     2          | 2    2
+--R              ((2q  + p )cos(a x) + 2q  + 2p )sin(a x)\|q  + p
+--R            + 
+--R                     2       3         2           2        3                  2
+--R              (%i p q  + %i p )cos(a x)  + (2%i p q  + 2%i p )cos(a x) + %i p q
+--R            + 
+--R                  3
+--R              %i p
+--R     + 
+--R       -
+--R               +-------+
+--R               | 2    2
+--R            %i\|q  + p
+--R         *
+--R            log
+--R                                                          +-------+
+--R                     2    2              2     2          | 2    2
+--R                 ((2q  + p )cos(a x) + 2q  + 2p )sin(a x)\|q  + p
+--R               + 
+--R                          2       3         2             2        3
+--R                 (- %i p q  - %i p )cos(a x)  + (- 2%i p q  - 2%i p )cos(a x)
+--R               + 
+--R                         2       3
+--R                 - %i p q  - %i p
+--R     + 
+--R            +-------+
+--R            | 2    2
+--R         %i\|q  + p
+--R      *
+--R                      +-------+
+--R                      | 2    2          2        2                 2        2
+--R       log(p sin(a x)\|q  + p   + (2%i q  + 2%i p )cos(a x) + 2%i q  + 2%i p )
+--R     + 
+--R       -
+--R               +-------+
+--R               | 2    2
+--R            %i\|q  + p
+--R         *
+--R            log
+--R                            +-------+
+--R                            | 2    2            2        2                 2
+--R                 p sin(a x)\|q  + p   + (- 2%i q  - 2%i p )cos(a x) - 2%i q
+--R               + 
+--R                        2
+--R                 - 2%i p
+--R     + 
+--R                                  +-------+
+--R            +-------+             | 2    2
+--R            | 2    2     sin(a x)\|q  + p   + %i p cos(a x)
+--R       - %i\|q  + p  log(----------------------------------)
+--R                                      cos(a x)
+--R     + 
+--R                              +-------+
+--R        +-------+             | 2    2                                 +-------+
+--R        | 2    2     sin(a x)\|q  + p   - %i p cos(a x)                | 2    2
+--R     %i\|q  + p  log(----------------------------------) - %i log(- 1)\|q  + p
+--R                                  cos(a x)
+--R  /
+--R           2       3
+--R     2a p q  + 2a p
+--R                                             Type: Expression Complex Integer
+--E
+
+--S 114
+hh:=expandLog gg
+--R
+--R   (10)
+--R            +-------+
+--R            | 2    2
+--R         %i\|q  + p
+--R      *
+--R         log
+--R                                                       +-------+
+--R                  2    2              2     2          | 2    2
+--R              ((2q  + p )cos(a x) + 2q  + 2p )sin(a x)\|q  + p
+--R            + 
+--R                     2       3         2           2        3                  2
+--R              (%i p q  + %i p )cos(a x)  + (2%i p q  + 2%i p )cos(a x) + %i p q
+--R            + 
+--R                  3
+--R              %i p
+--R     + 
+--R       -
+--R               +-------+
+--R               | 2    2
+--R            %i\|q  + p
+--R         *
+--R            log
+--R                                                          +-------+
+--R                     2    2              2     2          | 2    2
+--R                 ((2q  + p )cos(a x) + 2q  + 2p )sin(a x)\|q  + p
+--R               + 
+--R                          2       3         2             2        3
+--R                 (- %i p q  - %i p )cos(a x)  + (- 2%i p q  - 2%i p )cos(a x)
+--R               + 
+--R                         2       3
+--R                 - %i p q  - %i p
+--R     + 
+--R            +-------+
+--R            | 2    2
+--R         %i\|q  + p
+--R      *
+--R                      +-------+
+--R                      | 2    2          2        2                 2        2
+--R       log(p sin(a x)\|q  + p   + (2%i q  + 2%i p )cos(a x) + 2%i q  + 2%i p )
+--R     + 
+--R       -
+--R               +-------+
+--R               | 2    2
+--R            %i\|q  + p
+--R         *
+--R            log
+--R                            +-------+
+--R                            | 2    2            2        2                 2
+--R                 p sin(a x)\|q  + p   + (- 2%i q  - 2%i p )cos(a x) - 2%i q
+--R               + 
+--R                        2
+--R                 - 2%i p
+--R     + 
+--R            +-------+             +-------+
+--R            | 2    2              | 2    2
+--R       - %i\|q  + p  log(sin(a x)\|q  + p   + %i p cos(a x))
+--R     + 
+--R        +-------+             +-------+                                +-------+
+--R        | 2    2              | 2    2                                 | 2    2
+--R     %i\|q  + p  log(sin(a x)\|q  + p   - %i p cos(a x)) - %i log(- 1)\|q  + p
+--R  /
+--R           2       3
+--R     2a p q  + 2a p
+--R                                             Type: Expression Complex Integer
+--E
+
+--S 115    14:362 Schaums and Axiom differ by a constant
+ii:=complexNormalize hh
+--R
+--R                                                   +-------+
+--R                                                   | 2    2
+--R         (%i log(%i) - %i log(- %i) - %i log(- 1))\|q  + p
+--R   (11)  ---------------------------------------------------
+--R                                 2       3
+--R                           2a p q  + 2a p
+--R                                             Type: Expression Complex Integer
+--E
 @
 
 \section{\cite{1}:14.363~~~~~$\displaystyle
@@ -1636,9 +2468,8 @@ $$
 <<*>>=
 )clear all
 
---S 92
+--S 116
 aa:=integrate(1/(p^2-q^2*sin(a*x)^2),x)
---R 
 --R
 --R   (1)
 --R   [
@@ -1679,7 +2510,7 @@ aa:=integrate(1/(p^2-q^2*sin(a*x)^2),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 93
+--S 117
 bb1:=1/(a*p*sqrt(p^2-q^2))*atan((sqrt(p^2-q^2)*tan(a*x))/p)
 --R
 --R                      +---------+
@@ -1694,7 +2525,7 @@ bb1:=1/(a*p*sqrt(p^2-q^2))*atan((sqrt(p^2-q^2)*tan(a*x))/p)
 --R                                                     Type: Expression Integer
 --E
 
---S 94
+--S 118
 bb2:=1/(2*a*p*sqrt(q^2-p^2))*log((sqrt(q^2-p^2)*tan(a*x)+p)/(sqrt(q^2-p^2)*tan(a*x)-p))
 --R
 --R                     +-------+
@@ -1711,7 +2542,7 @@ bb2:=1/(2*a*p*sqrt(q^2-p^2))*log((sqrt(q^2-p^2)*tan(a*x)+p)/(sqrt(q^2-p^2)*tan(a
 --R                                                     Type: Expression Integer
 --E
 
---S 95
+--S 119
 cc1:=aa.1-bb1
 --R
 --R   (4)
@@ -1742,7 +2573,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 96
+--S 120
 cc2:=aa.2-bb1
 --R
 --R   (5)
@@ -1766,7 +2597,7 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 97
+--S 121
 cc3:=aa.1-bb2
 --R
 --R   (6)
@@ -1795,7 +2626,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 98     14:363 Axiom cannot simplify this expression
+--S 122
 cc4:=aa.2-bb2
 --R
 --R   (7)
@@ -1826,6 +2657,305 @@ cc4:=aa.2-bb2
 --R     2a p\|- q  + p  \|q  - p
 --R                                                     Type: Expression Integer
 --E
+
+--S 123
+tanrule:=rule(tan(a) == sin(a)/cos(a))
+--R
+--R                  sin(a)
+--R   (8)  tan(a) == ------
+--R                  cos(a)
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E
+
+--S 124
+dd2:=tanrule cc2
+--R
+--R   (9)
+--R                       +---------+                         +---------+
+--R                       |   2    2                          |   2    2
+--R              sin(a x)\|- q  + p                p sin(a x)\|- q  + p
+--R       - atan(--------------------) - atan(-------------------------------)
+--R                   p cos(a x)                 2     2              2     2
+--R                                           (2q  - 2p )cos(a x) + 2q  - 2p
+--R     + 
+--R                    2    2              2     2
+--R                ((2q  - p )cos(a x) + 2q  - 2p )sin(a x)
+--R       - atan(-------------------------------------------)
+--R                                              +---------+
+--R                         2                    |   2    2
+--R              (p cos(a x)  + 2p cos(a x) + p)\|- q  + p
+--R  /
+--R         +---------+
+--R         |   2    2
+--R     a p\|- q  + p
+--R                                                     Type: Expression Integer
+--E
+
+--S 125
+ee2:=ratDenom dd2
+--R
+--R   (10)
+--R       -
+--R             +---------+
+--R             |   2    2
+--R            \|- q  + p
+--R         *
+--R                                                            +---------+
+--R                       2    2              2     2          |   2    2
+--R                   ((2q  - p )cos(a x) + 2q  - 2p )sin(a x)\|- q  + p
+--R            atan(--------------------------------------------------------)
+--R                     2    3         2        2     3               2    3
+--R                 (p q  - p )cos(a x)  + (2p q  - 2p )cos(a x) + p q  - p
+--R     + 
+--R                                 +---------+
+--R        +---------+              |   2    2
+--R        |   2    2      sin(a x)\|- q  + p
+--R       \|- q  + p  atan(--------------------)
+--R                             p cos(a x)
+--R     + 
+--R                                        +---------+
+--R        +---------+                     |   2    2
+--R        |   2    2           p sin(a x)\|- q  + p
+--R       \|- q  + p  atan(-------------------------------)
+--R                           2     2              2     2
+--R                        (2q  - 2p )cos(a x) + 2q  - 2p
+--R  /
+--R          2      3
+--R     a p q  - a p
+--R                                                     Type: Expression Integer
+--E
+
+--S 126
+atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
+--R
+--R                             - x + %i
+--R                      %i log(--------)
+--R                              x + %i
+--R   (11)  atan(x) == - ----------------
+--R                              2
+--R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
+--E
+
+--S 127
+ff2:=atanrule ee2
+--R
+--R   (12)
+--R       -
+--R               +---------+
+--R               |   2    2
+--R            %i\|- q  + p
+--R         *
+--R            log
+--R                                +---------+
+--R                                |   2    2          2        2                 2
+--R                   - p sin(a x)\|- q  + p   + (2%i q  - 2%i p )cos(a x) + 2%i q
+--R                 + 
+--R                          2
+--R                   - 2%i p
+--R              /
+--R                              +---------+
+--R                              |   2    2          2        2                 2
+--R                   p sin(a x)\|- q  + p   + (2%i q  - 2%i p )cos(a x) + 2%i q
+--R                 + 
+--R                          2
+--R                   - 2%i p
+--R     + 
+--R                                      +---------+
+--R            +---------+               |   2    2
+--R            |   2    2     - sin(a x)\|- q  + p   + %i p cos(a x)
+--R       - %i\|- q  + p  log(--------------------------------------)
+--R                                     +---------+
+--R                                     |   2    2
+--R                            sin(a x)\|- q  + p   + %i p cos(a x)
+--R     + 
+--R            +---------+
+--R            |   2    2
+--R         %i\|- q  + p
+--R      *
+--R         log
+--R                                                           +---------+
+--R                      2    2              2     2          |   2    2
+--R                ((- 2q  + p )cos(a x) - 2q  + 2p )sin(a x)\|- q  + p
+--R              + 
+--R                       2       3         2           2        3
+--R                (%i p q  - %i p )cos(a x)  + (2%i p q  - 2%i p )cos(a x)
+--R              + 
+--R                      2       3
+--R                %i p q  - %i p
+--R           /
+--R                                                         +---------+
+--R                    2    2              2     2          |   2    2
+--R                ((2q  - p )cos(a x) + 2q  - 2p )sin(a x)\|- q  + p
+--R              + 
+--R                       2       3         2           2        3
+--R                (%i p q  - %i p )cos(a x)  + (2%i p q  - 2%i p )cos(a x)
+--R              + 
+--R                      2       3
+--R                %i p q  - %i p
+--R  /
+--R           2       3
+--R     2a p q  - 2a p
+--R                                             Type: Expression Complex Integer
+--E
+
+--S 128
+gg2:=expandLog ff2
+--R
+--R   (13)
+--R       -
+--R               +---------+
+--R               |   2    2
+--R            %i\|- q  + p
+--R         *
+--R            log
+--R                                                          +---------+
+--R                     2    2              2     2          |   2    2
+--R                 ((2q  - p )cos(a x) + 2q  - 2p )sin(a x)\|- q  + p
+--R               + 
+--R                        2       3         2           2        3
+--R                 (%i p q  - %i p )cos(a x)  + (2%i p q  - 2%i p )cos(a x)
+--R               + 
+--R                       2       3
+--R                 %i p q  - %i p
+--R     + 
+--R            +---------+
+--R            |   2    2
+--R         %i\|- q  + p
+--R      *
+--R         log
+--R                                                       +---------+
+--R                  2    2              2     2          |   2    2
+--R              ((2q  - p )cos(a x) + 2q  - 2p )sin(a x)\|- q  + p
+--R            + 
+--R                       2       3         2             2        3
+--R              (- %i p q  + %i p )cos(a x)  + (- 2%i p q  + 2%i p )cos(a x)
+--R            + 
+--R                      2       3
+--R              - %i p q  + %i p
+--R     + 
+--R            +---------+
+--R            |   2    2
+--R         %i\|- q  + p
+--R      *
+--R                      +---------+
+--R                      |   2    2          2        2                 2        2
+--R       log(p sin(a x)\|- q  + p   + (2%i q  - 2%i p )cos(a x) + 2%i q  - 2%i p )
+--R     + 
+--R       -
+--R               +---------+
+--R               |   2    2
+--R            %i\|- q  + p
+--R         *
+--R            log
+--R                            +---------+
+--R                            |   2    2            2        2                 2
+--R                 p sin(a x)\|- q  + p   + (- 2%i q  + 2%i p )cos(a x) - 2%i q
+--R               + 
+--R                      2
+--R                 2%i p
+--R     + 
+--R          +---------+             +---------+
+--R          |   2    2              |   2    2
+--R       %i\|- q  + p  log(sin(a x)\|- q  + p   + %i p cos(a x))
+--R     + 
+--R            +---------+             +---------+
+--R            |   2    2              |   2    2
+--R       - %i\|- q  + p  log(sin(a x)\|- q  + p   - %i p cos(a x))
+--R     + 
+--R                     +---------+
+--R                     |   2    2
+--R       - %i log(- 1)\|- q  + p
+--R  /
+--R           2       3
+--R     2a p q  - 2a p
+--R                                             Type: Expression Complex Integer
+--E
+
+--S 129
+rootrule4a:RewriteRule(INT,COMPLEX(INT),EXPR(COMPLEX(INT))):=rule(sqrt(p^2-q^2)==sqrt(p-q)*sqrt(q+p))
+--R
+--R          +---------+
+--R          |   2    2      +-------+ +-----+
+--R   (14)  \|- q  + p   == \|- q + p \|q + p
+--R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
+--E
+
+--S 130
+hh2:=rootrule4a gg2
+--R
+--R   (15)
+--R       -
+--R               +-------+ +-----+
+--R            %i\|- q + p \|q + p
+--R         *
+--R            log
+--R                     2    2              2     2          +-------+ +-----+
+--R                 ((2q  - p )cos(a x) + 2q  - 2p )sin(a x)\|- q + p \|q + p
+--R               + 
+--R                        2       3         2           2        3
+--R                 (%i p q  - %i p )cos(a x)  + (2%i p q  - 2%i p )cos(a x)
+--R               + 
+--R                       2       3
+--R                 %i p q  - %i p
+--R     + 
+--R            +-------+ +-----+
+--R         %i\|- q + p \|q + p
+--R      *
+--R         log
+--R                  2    2              2     2          +-------+ +-----+
+--R              ((2q  - p )cos(a x) + 2q  - 2p )sin(a x)\|- q + p \|q + p
+--R            + 
+--R                       2       3         2             2        3
+--R              (- %i p q  + %i p )cos(a x)  + (- 2%i p q  + 2%i p )cos(a x)
+--R            + 
+--R                      2       3
+--R              - %i p q  + %i p
+--R     + 
+--R            +-------+ +-----+
+--R         %i\|- q + p \|q + p
+--R      *
+--R         log
+--R                         +-------+ +-----+         2        2                 2
+--R              p sin(a x)\|- q + p \|q + p  + (2%i q  - 2%i p )cos(a x) + 2%i q
+--R            + 
+--R                     2
+--R              - 2%i p
+--R     + 
+--R       -
+--R               +-------+ +-----+
+--R            %i\|- q + p \|q + p
+--R         *
+--R            log
+--R                            +-------+ +-----+           2        2
+--R                 p sin(a x)\|- q + p \|q + p  + (- 2%i q  + 2%i p )cos(a x)
+--R               + 
+--R                        2        2
+--R                 - 2%i q  + 2%i p
+--R     + 
+--R          +-------+ +-----+             +-------+ +-----+
+--R       %i\|- q + p \|q + p log(sin(a x)\|- q + p \|q + p  + %i p cos(a x))
+--R     + 
+--R            +-------+ +-----+             +-------+ +-----+
+--R       - %i\|- q + p \|q + p log(sin(a x)\|- q + p \|q + p  - %i p cos(a x))
+--R     + 
+--R                     +-------+ +-----+
+--R       - %i log(- 1)\|- q + p \|q + p
+--R  /
+--R           2       3
+--R     2a p q  - 2a p
+--R                                             Type: Expression Complex Integer
+--E
+
+--S 131    14:363 Schaums and Axiom differ by a constant
+ii2:=complexNormalize hh2
+--R
+--R                                                   +-------+ +-----+
+--R         (%i log(%i) - %i log(- %i) - %i log(- 1))\|- q + p \|q + p
+--R   (16)  -----------------------------------------------------------
+--R                                     2       3
+--R                               2a p q  - 2a p
+--R                                             Type: Expression Complex Integer
+--E
 @
 
 \section{\cite{1}:14.364~~~~~$\displaystyle
@@ -1837,7 +2967,7 @@ $$
 <<*>>=
 )clear all
 
---S 99     14:364 Axiom cannot compute this integral
+--S 132    14:364 Axiom cannot compute this integral
 aa:=integrate(x^m*sin(a*x),x)
 --R 
 --R
@@ -1857,7 +2987,7 @@ $$
 <<*>>=
 )clear all
 
---S 100    14:365 Axiom cannot compute this integral
+--S 133    14:365 Axiom cannot compute this integral
 aa:=integrate(sin(a*x)/x^n,x)
 --R 
 --R
@@ -1878,7 +3008,7 @@ $$
 <<*>>=
 )clear all
 
---S 101    14:366 Axiom cannot compute this integral
+--S 134    14:366 Axiom cannot compute this integral
 aa:=integrate(sin(a*x)^n,x)
 --R 
 --R
@@ -1899,7 +3029,7 @@ $$
 <<*>>=
 )clear all
 
---S 102    14:367 Axiom cannot compute this integral
+--S 135    14:367 Axiom cannot compute this integral
 aa:=integrate(1/(sin(a*x))^n,x)
 --R 
 --R
@@ -1922,7 +3052,7 @@ $$
 <<*>>=
 )clear all
 
---S 103    14:368 Axiom cannot compute this integral
+--S 136    14:368 Axiom cannot compute this integral
 aa:=integrate(x/sin(a*x)^n,x)
 --R 
 --R

\start
Date: Sun, 4 May 2008 16:58:31 -0400
From: Tim Daly
To: list
Subject: Function images, visual mathematics

This is interesting. Visual mathematics of functions.
http://nylander.wordpress.com

\start
Date: Sun, 4 May 2008 16:32:08 -0700 (PDT)
From: Cliff Yapp
To: list
Subject: Am I posing this solve problem wrong?

I'm trying to solve for y.  In Axiom:

(1) -> E1 := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2
(1) -> 
          2  2      2         2 2     2 2     2  2
   (1)  C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1
                                                     Type: Polynomial
Integer
(2) -> solve(E1=0,y)                           
(2) -> 
           2  2      2         2 2     2 2     2  2
   (2)  [C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1 = 0]
                              Type: List Equation Fraction Polynomial
Integer

Am I doing something wrong?  Maxima doesn't seem to have a problem:

(%i2) E1 : x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2;
                          2   2    2   2           2   2
(%o2)                 - C1  D1  + x  D1  + (y - y1)  C1
(%i3) solve(E1 = 0, y);
                     2    2                         2    2
              sqrt(C1  - x ) D1 - y1 C1      sqrt(C1  - x ) D1 + y1 C1
(%o3)  [y = - -------------------------, z = -------------------------]
                         C1                             C1


\start
Date: Sun, 4 May 2008 19:58:23 -0500
From: Tim Daly
To: list
Subject: 20080504.01.tpd.patch (CATS Schaums-Axiom post-mortem fixes)

More fixes
=========================================================================
diff --git a/changelog b/changelog
index aa128b6..0bc440d 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080504 tpd src/input/schaum18.input post-mortem fixes
 20080502 tpd src/input/schaum17.input post-mortem fixes
 20080501 tpd src/input/schaum16.input post-mortem fixes
 20080501 tpd src/input/schaum13.input post-mortem fixes
diff --git a/src/input/schaum18.input.pamphlet b/src/input/schaum18.input.pamphlet
index 95fceae..f01b63d 100644
--- a/src/input/schaum18.input.pamphlet
+++ b/src/input/schaum18.input.pamphlet
@@ -257,7 +257,7 @@ cc1:=aa-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 19     14:375 Axiom cannot simplify these expressions
+--S 19
 cc2:=aa-bb2
 --R
 --R   (5)
@@ -273,6 +273,15 @@ cc2:=aa-bb2
 --R                                                     Type: Expression Integer
 --E
 
+--S 20     14:375 Schaums and Axiom differ by a constant
+complexNormalize cc1
+--R
+--R        log(- 1)
+--R   (6)  --------
+--R            a
+--R                                                     Type: Expression Integer
+--E
+
 @
 
 \section{\cite{1}:14.376~~~~~$\displaystyle
@@ -286,7 +295,7 @@ $$
 <<*>>=
 )clear all
 
---S 20     14:376 Axiom cannot compute this integral
+--S 21     14:376 Axiom cannot compute this integral
 aa:=integrate(x/cos(a*x),x)
 --R 
 --R
@@ -306,7 +315,7 @@ $$
 <<*>>=
 )clear all
 
---S 21
+--S 22
 aa:=integrate(cos(a*x)^2,x)
 --R 
 --R
@@ -316,7 +325,7 @@ aa:=integrate(cos(a*x)^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 22
+--S 23
 bb:=x/2+sin(2*a*x)/(4*a)
 --R
 --R        sin(2a x) + 2a x
@@ -325,7 +334,7 @@ bb:=x/2+sin(2*a*x)/(4*a)
 --R                                                     Type: Expression Integer
 --E
 
---S 23
+--S 24
 cc:=aa-bb
 --R
 --R        - sin(2a x) + 2cos(a x)sin(a x)
@@ -334,16 +343,17 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 24
+--S 25
 cossinrule:=rule(cos(b)*sin(a) == 1/2*(sin(a-b)+sin(a+b)))
+--R 
 --R
---I                           %S sin(b + a) - %S sin(b - a)
---I   (4)  %S cos(b)sin(a) == -----------------------------
+--I                           %M sin(b + a) - %M sin(b - a)
+--I   (4)  %M cos(b)sin(a) == -----------------------------
 --R                                         2
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 25     14:377 Schaums and Axiom agree
+--S 26     14:377 Schaums and Axiom agree
 dd:=cossinrule cc
 --R
 --R   (5)  0
@@ -359,7 +369,7 @@ $$
 <<*>>=
 )clear all
 
---S 26
+--S 27
 aa:=integrate(x*cos(a*x)^2,x)
 --R 
 --R
@@ -371,7 +381,7 @@ aa:=integrate(x*cos(a*x)^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 27
+--S 28
 bb:=x^2/4+(x*sin(2*a*x))/(4*a)+cos(2*a*x)/(8*a^2)
 --R
 --R                                       2 2
@@ -382,7 +392,7 @@ bb:=x^2/4+(x*sin(2*a*x))/(4*a)+cos(2*a*x)/(8*a^2)
 --R                                                     Type: Expression Integer
 --E
 
---S 28
+--S 29
 cc:=aa-bb
 --R
 --R                                                                        2
@@ -393,16 +403,17 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 29
+--S 30
 cossinrule:=rule(cos(b)*sin(a) == 1/2*(sin(a-b)+sin(a+b)))
+--R 
 --R
---I                           %T sin(b + a) - %T sin(b - a)
---I   (4)  %T cos(b)sin(a) == -----------------------------
+--I                           %N sin(b + a) - %N sin(b - a)
+--I   (4)  %N cos(b)sin(a) == -----------------------------
 --R                                         2
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 30
+--S 31
 dd:=cossinrule cc
 --R
 --R                               2
@@ -413,16 +424,17 @@ dd:=cossinrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 31
+--S 32
 coscosrule:=rule(cos(a)*cos(b) == 1/2*(cos(a-b)+cos(a+b)))
+--R 
 --R
---I                           %U cos(b + a) + %U cos(b - a)
---I   (6)  %U cos(a)cos(b) == -----------------------------
+--R                           %O cos(b + a) + %O cos(b - a)
+--R   (6)  %O cos(a)cos(b) == -----------------------------
 --R                                         2
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 32
+--S 33
 ee:=coscosrule dd
 --R
 --R                               2
@@ -433,7 +445,7 @@ ee:=coscosrule dd
 --R                                                     Type: Expression Integer
 --E
 
---S 33
+--S 34
 cossqrrule1:=rule(cos(a)^2 == 1/2+1/2*cos(2*a))
 --R
 --R              2    cos(2a) + 1
@@ -442,7 +454,7 @@ cossqrrule1:=rule(cos(a)^2 == 1/2+1/2*cos(2*a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 34     14:378 Schaums and Axiom differ by a constant
+--S 35     14:378 Schaums and Axiom differ by a constant
 ff:=cossqrrule1 ee
 --R
 --R         1
@@ -461,7 +473,7 @@ $$
 <<*>>=
 )clear all
 
---S 35
+--S 36
 aa:=integrate(cos(a*x)^3,x)
 --R 
 --R
@@ -472,7 +484,7 @@ aa:=integrate(cos(a*x)^3,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 36
+--S 37
 bb:=sin(a*x)/a-sin(a*x)^3/(3*a)
 --R
 --R                  3
@@ -482,7 +494,7 @@ bb:=sin(a*x)/a-sin(a*x)^3/(3*a)
 --R                                                     Type: Expression Integer
 --E 
 
---S 37
+--S 38
 cc:=aa-bb
 --R
 --R                3            2
@@ -492,7 +504,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 38
+--S 39
 cossqrrule:=rule(cos(a)^2 == 1-sin(a)^2)
 --R
 --R              2            2
@@ -500,7 +512,7 @@ cossqrrule:=rule(cos(a)^2 == 1-sin(a)^2)
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 39     14:379 Schaums and Axiom agree
+--S 40     14:379 Schaums and Axiom agree
 dd:=cossqrrule cc
 --R
 --R   (5)  0
@@ -516,7 +528,7 @@ $$
 <<*>>=
 )clear all
 
---S 40
+--S 41
 aa:=integrate(cos(a*x)^4,x)
 --R 
 --R
@@ -527,7 +539,7 @@ aa:=integrate(cos(a*x)^4,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 41
+--S 42
 bb:=(3*x)/8+sin(2*a*x)/(4*a)+sin(4*a*x)/(32*a)
 --R
 --R        sin(4a x) + 8sin(2a x) + 12a x
@@ -536,7 +548,7 @@ bb:=(3*x)/8+sin(2*a*x)/(4*a)+sin(4*a*x)/(32*a)
 --R                                                     Type: Expression Integer
 --E 
 
---S 42     14:380 Axiom cannot simplify this expression
+--S 43
 cc:=aa-bb
 --R
 --R                                             3
@@ -545,6 +557,13 @@ cc:=aa-bb
 --R                                     32a
 --R                                                     Type: Expression Integer
 --E
+
+--S 44     14:380 Schaums and Axiom agree
+complexNormalize cc
+--R
+--R   (4)  0
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.381~~~~~$\displaystyle
@@ -555,7 +574,7 @@ $$
 <<*>>=
 )clear all
 
---S 43
+--S 45
 aa:=integrate(1/cos(a*x)^2,x)
 --R 
 --R
@@ -565,7 +584,7 @@ aa:=integrate(1/cos(a*x)^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 44
+--S 46
 bb:=tan(a*x)/a
 --R
 --R        tan(a x)
@@ -574,7 +593,7 @@ bb:=tan(a*x)/a
 --R                                                     Type: Expression Integer
 --E 
 
---S 45
+--S 47
 cc:=aa-bb
 --R
 --R        - cos(a x)tan(a x) + sin(a x)
@@ -583,7 +602,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 46
+--S 48
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -592,7 +611,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 47     14:381 Schaums and Axiom agree
+--S 49     14:381 Schaums and Axiom agree
 dd:=tanrule cc
 --R
 --R   (5)  0
@@ -609,7 +628,7 @@ $$
 <<*>>=
 )clear all
 
---S 48
+--S 50
 aa:=integrate(1/cos(a*x)^3,x)
 --R 
 --R
@@ -627,7 +646,7 @@ aa:=integrate(1/cos(a*x)^3,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 49
+--S 51
 bb:=sin(a*x)/(2*a*cos(a*x)^2)+1/(2*a)*log(tan(%pi/4+(a*x)/2))
 --R
 --R                2        2a x + %pi
@@ -639,7 +658,7 @@ bb:=sin(a*x)/(2*a*cos(a*x)^2)+1/(2*a)*log(tan(%pi/4+(a*x)/2))
 --R                                                     Type: Expression Integer
 --E 
 
---S 50     14:382 Axiom cannot simplify this expression
+--S 52
 cc:=aa-bb
 --R
 --R   (3)
@@ -654,6 +673,15 @@ cc:=aa-bb
 --R     2a
 --R                                                     Type: Expression Integer
 --E
+
+--S 53     14:382 Schaums and Axiom differ by a constant
+complexNormalize cc
+--R
+--R        log(- 1)
+--R   (4)  --------
+--R           2a
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.383~~~~~$\displaystyle
@@ -664,42 +692,43 @@ $$
 <<*>>=
 )clear all
 
---S 51
-aa:=integrate(cos(p*x)*cos(q*x),x)
---R 
+--S 54
+aa:=integrate(cos(a*x)*cos(p*x),x)
 --R
---R        q cos(p x)sin(q x) - p cos(q x)sin(p x)
+--R        p cos(a x)sin(p x) - a cos(p x)sin(a x)
 --R   (1)  ---------------------------------------
 --R                         2    2
---R                        q  - p
+--R                        p  - a
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 52
-bb:=(sin(a-p)*x)/(2*(a-p))+(sin(a+p)*x)/(2*(a+p))
+--S 55
+bb:=(sin((a-p)*x))/(2*(a-p))+(sin((a+p)*x))/(2*(a+p))
 --R
---R        (p - a)x sin(p + a) + (p + a)x sin(p - a)
---R   (2)  -----------------------------------------
---R                          2     2
---R                        2p  - 2a
+--R        (p - a)sin((p + a)x) + (p + a)sin((p - a)x)
+--R   (2)  -------------------------------------------
+--R                           2     2
+--R                         2p  - 2a
 --R                                                     Type: Expression Integer
 --E 
 
---S 53     14:383 Axiom cannot simplify this expression
+--S 56
 cc:=aa-bb
 --R
 --R   (3)
---R          2     2                           3     2
---R       (2p  - 2a )q cos(p x)sin(q x) + (- 2p  + 2a p)cos(q x)sin(p x)
---R     + 
---R                  2    3      2
---R       ((- p + a)q  + p  - a p )x sin(p + a)
+--R       (- p + a)sin((p + a)x) + 2p cos(a x)sin(p x) + (- p - a)sin((p - a)x)
 --R     + 
---R                  2    3      2
---R       ((- p - a)q  + p  + a p )x sin(p - a)
+--R       - 2a cos(p x)sin(a x)
 --R  /
---R        2     2  2     4     2 2
---R     (2p  - 2a )q  - 2p  + 2a p
+--R       2     2
+--R     2p  - 2a
+--R                                                     Type: Expression Integer
+--E
+
+--S 57     14:383 Schaums and Axiom agree
+complexNormalize cc
+--R
+--R   (4)  0
 --R                                                     Type: Expression Integer
 --E
 @
@@ -712,7 +741,7 @@ $$
 <<*>>=
 )clear all
 
---S 54
+--S 58
 aa:=integrate(1/(1-cos(a*x)),x)
 --R 
 --R
@@ -722,21 +751,32 @@ aa:=integrate(1/(1-cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 55
-bb:=-1/a*cot(a*x)/2
+--S 59
+bb:=-1/a*cot((a*x)/2)
 --R
---R          cot(a x)
+--R              a x
+--R          cot(---)
+--R               2
 --R   (2)  - --------
---R             2a
+--R              a
 --R                                                     Type: Expression Integer
 --E
 
---S 56     14:384 Axiom cannot simplify this expression
+--S 60
 cc:=aa-bb
 --R
---R        cot(a x)sin(a x) - 2cos(a x) - 2
---R   (3)  --------------------------------
---R                   2a sin(a x)
+--R            a x
+--R        cot(---)sin(a x) - cos(a x) - 1
+--R             2
+--R   (3)  -------------------------------
+--R                   a sin(a x)
+--R                                                     Type: Expression Integer
+--E
+
+--S 61     14:384 Schaums and Axiom agree
+dd:=complexNormalize cc
+--R
+--R   (4)  0
 --R                                                     Type: Expression Integer
 --E
 @
@@ -750,38 +790,105 @@ $$
 <<*>>=
 )clear all
 
---S 57
-aa:=integrate(x/(1-cos(ax)),x)
---R 
+--S 62
+aa:=integrate(x/(1-cos(a*x)),x)
 --R
---R                2
---R               x
---R   (1)  - ------------
---R          2cos(ax) - 2
+--R   (1)
+--R                  sin(a x)                        2
+--R   2sin(a x)log(------------) - sin(a x)log(------------) - a x cos(a x) - a x
+--R                cos(a x) + 1                cos(a x) + 1
+--R   ---------------------------------------------------------------------------
+--R                                     2
+--R                                    a sin(a x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 58
-bb:=-x/a*cot(a*x)/2+2/a^2*log(sin((a*x)/2))
+--S 63
+bb:=-x/a*cot((a*x)/2)+2/a^2*log(sin((a*x)/2))
 --R
---R                 a x
---R        4log(sin(---)) - a x cot(a x)
---R                  2
+--R                 a x             a x
+--R        2log(sin(---)) - a x cot(---)
+--R                  2               2
 --R   (2)  -----------------------------
 --R                       2
---R                     2a
+--R                      a
 --R                                                     Type: Expression Integer
 --E
 
---S 59     14:385 Axiom cannot simplify this expression
+--S 64
 cc:=aa-bb
 --R
---R                                a x                                    2 2
---R        (- 4cos(ax) + 4)log(sin(---)) + (a x cos(ax) - a x)cot(a x) - a x
---R                                 2
---R   (3)  ------------------------------------------------------------------
---R                                   2            2
---R                                 2a cos(ax) - 2a
+--R   (3)
+--R                      sin(a x)                       a x
+--R       2sin(a x)log(------------) - 2sin(a x)log(sin(---))
+--R                    cos(a x) + 1                      2
+--R     + 
+--R                           2                 a x
+--R       - sin(a x)log(------------) + a x cot(---)sin(a x) - a x cos(a x) - a x
+--R                     cos(a x) + 1             2
+--R  /
+--R      2
+--R     a sin(a x)
+--R                                                     Type: Expression Integer
+--E
+
+--S 65
+cotrule:=rule(cot(a) == cos(a)/sin(a))
+--R
+--R                  cos(a)
+--R   (4)  cot(a) == ------
+--R                  sin(a)
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E
+
+--S 66
+dd:=cotrule cc
+--R
+--R   (5)
+--R            a x               sin(a x)           a x                 a x
+--R       2sin(---)sin(a x)log(------------) - 2sin(---)sin(a x)log(sin(---))
+--R             2              cos(a x) + 1          2                   2
+--R     + 
+--R             a x                   2                 a x
+--R       - sin(---)sin(a x)log(------------) + a x cos(---)sin(a x)
+--R              2              cos(a x) + 1             2
+--R     + 
+--R                                 a x
+--R       (- a x cos(a x) - a x)sin(---)
+--R                                  2
+--R  /
+--R      2    a x
+--R     a sin(---)sin(a x)
+--R            2
+--R                                                     Type: Expression Integer
+--E
+
+--S 67
+ee:=expandLog dd
+--R
+--R   (6)
+--R            a x                              a x                 a x
+--R       2sin(---)sin(a x)log(sin(a x)) - 2sin(---)sin(a x)log(sin(---))
+--R             2                                2                   2
+--R     + 
+--R             a x
+--R       - sin(---)sin(a x)log(cos(a x) + 1)
+--R              2
+--R     + 
+--R                  a x            a x                                       a x
+--R     (- log(2)sin(---) + a x cos(---))sin(a x) + (- a x cos(a x) - a x)sin(---)
+--R                   2              2                                         2
+--R  /
+--R      2    a x
+--R     a sin(---)sin(a x)
+--R            2
+--R                                                     Type: Expression Integer
+--E
+
+--S 68     14:385 Schaums and Axiom agree
+complexNormalize ee
+--R
+--R   (7)  0
 --R                                                     Type: Expression Integer
 --E
 @
@@ -794,31 +901,41 @@ $$
 <<*>>=
 )clear all
 
---S 60
-aa:=integrate(1/(1+cos(ax)),x)
---R 
+--S 69
+aa:=integrate(1/(1+cos(a*x)),x)
 --R
---R             x
---R   (1)  -----------
---R        cos(ax) + 1
+--R           sin(a x)
+--R   (1)  --------------
+--R        a cos(a x) + a
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 61
-bb:=1/a*tan(a*x)/2
+--S 70
+bb:=1/a*tan((a*x)/2)
 --R
---R        tan(a x)
+--R            a x
+--R        tan(---)
+--R             2
 --R   (2)  --------
---R           2a
+--R            a
 --R                                                     Type: Expression Integer
 --E
 
---S 62     14:386 Axiom cannot simplify this expression
+--S 71
 cc:=aa-bb
 --R
---R        (- cos(ax) - 1)tan(a x) + 2a x
---R   (3)  ------------------------------
---R                2a cos(ax) + 2a
+--R                            a x
+--R        (- cos(a x) - 1)tan(---) + sin(a x)
+--R                             2
+--R   (3)  -----------------------------------
+--R                   a cos(a x) + a
+--R                                                     Type: Expression Integer
+--E
+
+--S 72     14:386 Schaums and Axiom agree
+complexNormalize cc
+--R
+--R   (4)  0
 --R                                                     Type: Expression Integer
 --E
 @
@@ -832,7 +949,7 @@ $$
 <<*>>=
 )clear all
 
---S 63
+--S 73
 aa:=integrate(x/(1+cos(a*x)),x)
 --R 
 --R
@@ -845,7 +962,7 @@ aa:=integrate(x/(1+cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 64
+--S 74
 bb:=x/a*tan((a*x)/2)+2/a^2*log(cos((a*x)/2))
 --R
 --R                 a x             a x
@@ -857,7 +974,7 @@ bb:=x/a*tan((a*x)/2)+2/a^2*log(cos((a*x)/2))
 --R                                                     Type: Expression Integer
 --E
 
---S 65     14:387 Axiom cannot simplify this expression
+--S 75
 cc:=aa-bb
 --R
 --R   (3)
@@ -873,6 +990,30 @@ cc:=aa-bb
 --R     a cos(a x) + a
 --R                                                     Type: Expression Integer
 --E
+
+--S 76
+dd:=expandLog cc
+--R
+--R   (4)
+--R                                                                  a x
+--R       (cos(a x) + 1)log(cos(a x) + 1) + (- 2cos(a x) - 2)log(cos(---))
+--R                                                                   2
+--R     + 
+--R                                 a x
+--R       (- a x cos(a x) - a x)tan(---) + a x sin(a x) - log(2)cos(a x) - log(2)
+--R                                  2
+--R  /
+--R      2            2
+--R     a cos(a x) + a
+--R                                                     Type: Expression Integer
+--E
+
+--S 77     14:387 Schaums and Axiom agree
+complexNormalize dd
+--R
+--R   (5)  0
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.388~~~~~$\displaystyle
@@ -884,7 +1025,7 @@ $$
 <<*>>=
 )clear all
 
---S 66
+--S 78
 aa:=integrate(1/(1-cos(a*x))^2,x)
 --R 
 --R
@@ -895,7 +1036,7 @@ aa:=integrate(1/(1-cos(a*x))^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 67
+--S 79
 bb:=-1/(2*a)*cot((a*x)/2)-1/(6*a)*cot((a*x)/2)^3
 --R
 --R              a x 3        a x
@@ -906,7 +1047,7 @@ bb:=-1/(2*a)*cot((a*x)/2)-1/(6*a)*cot((a*x)/2)^3
 --R                                                     Type: Expression Integer
 --E 
 
---S 68     14:388 Axiom cannot simplify this expression
+--S 80
 cc:=aa-bb
 --R
 --R   (3)
@@ -919,6 +1060,13 @@ cc:=aa-bb
 --R     (6a cos(a x) - 6a)sin(a x)
 --R                                                     Type: Expression Integer
 --E
+
+--S 81     14:388 Schaums and Axiom agree
+complexNormalize cc
+--R
+--R   (4)  0
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.389~~~~~$\displaystyle
@@ -930,7 +1078,7 @@ $$
 <<*>>=
 )clear all
 
---S 69
+--S 82
 aa:=integrate(1/(1+cos(a*x))^2,x)
 --R 
 --R
@@ -941,10 +1089,10 @@ aa:=integrate(1/(1+cos(a*x))^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 70
-bb:=1/(2*a)*tan((a*x)/2)+1/(6*a)*tan((a*x)/2)^2
+--S 83
+bb:=1/(2*a)*tan((a*x)/2)+1/(6*a)*tan((a*x)/2)^3
 --R
---R            a x 2        a x
+--R            a x 3        a x
 --R        tan(---)  + 3tan(---)
 --R             2            2
 --R   (2)  ---------------------
@@ -952,11 +1100,11 @@ bb:=1/(2*a)*tan((a*x)/2)+1/(6*a)*tan((a*x)/2)^2
 --R                                                     Type: Expression Integer
 --E
 
---S 71     14:389 Axiom cannot simplify this expression
+--S 84
 cc:=aa-bb
 --R
 --R   (3)
---R                  2                     a x 2
+--R                  2                     a x 3
 --R       (- cos(a x)  - 2cos(a x) - 1)tan(---)
 --R                                         2
 --R     + 
@@ -968,6 +1116,13 @@ cc:=aa-bb
 --R     6a cos(a x)  + 12a cos(a x) + 6a
 --R                                                     Type: Expression Integer
 --E
+
+--S 85     14:389 Schaums and Axiom agree
+complexNormalize cc
+--R
+--R   (4)  0
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.390~~~~~$\displaystyle
@@ -989,9 +1144,8 @@ $$
 <<*>>=
 )clear all
 
---S 72
+--S 86
 aa:=integrate(1/(p+q*cos(a*x)),x)
---R 
 --R
 --R   (1)
 --R                           +-------+
@@ -1015,13 +1169,14 @@ aa:=integrate(1/(p+q*cos(a*x)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 73
-bb1:=2/(a*sqrt(p^2-q^2))*atan(sqrt((p-q)/(p+q)))*tan(1/2*a*x)
+--S 87
+bb1:=2/(a*sqrt(p^2-q^2))*atan(sqrt((p-q)/(p+q))*tan(1/2*a*x))
+--R 
 --R
 --R                       +-------+
---R             a x       |- q + p
---R        2tan(---)atan( |------- )
---R              2       \| q + p
+--R                  a x  |- q + p
+--R        2atan(tan(---) |------- )
+--R                   2  \| q + p
 --R   (2)  -------------------------
 --R                +---------+
 --R                |   2    2
@@ -1029,8 +1184,8 @@ bb1:=2/(a*sqrt(p^2-q^2))*atan(sqrt((p-q)/(p+q)))*tan(1/2*a*x)
 --R                                                     Type: Expression Integer
 --E
 
---S 74
-bb2:=a/(a*sqrt(q^2-p^2))*log((tan(1/2*a*x)+sqrt((q+p)/(q-p)))/(tan(1/2*a*x)-sqrt((q+p)/(q-p))))
+--S 88
+bb2:=1/(a*sqrt(q^2-p^2))*log((tan(1/2*a*x)+sqrt((q+p)/(q-p)))/(tan(1/2*a*x)-sqrt((q+p)/(q-p))))
 --R
 --R               +-----+
 --R               |q + p        a x
@@ -1042,14 +1197,15 @@ bb2:=a/(a*sqrt(q^2-p^2))*log((tan(1/2*a*x)+sqrt((q+p)/(q-p)))/(tan(1/2*a*x)-sqrt
 --R              |-----  - tan(---)
 --R             \|q - p         2
 --R   (3)  --------------------------
---R                 +-------+
---R                 | 2    2
---R                \|q  - p
+--R                  +-------+
+--R                  | 2    2
+--R                a\|q  - p
 --R                                                     Type: Expression Integer
 --E
 
---S 75
+--S 89
 cc1:=aa.1-bb1
+--R 
 --R
 --R   (4)
 --R                                          +-------+
@@ -1058,10 +1214,10 @@ cc1:=aa.1-bb1
 --R       \|- q  + p  log(--------------------------------------------------)
 --R                                         q cos(a x) + p
 --R     + 
---R                   +-------+      +-------+
---R              a x  | 2    2       |- q + p
---R       - 2tan(---)\|q  - p  atan( |------- )
---R               2                 \| q + p
+--R           +-------+              +-------+
+--R           | 2    2          a x  |- q + p
+--R       - 2\|q  - p  atan(tan(---) |------- )
+--R                              2  \| q + p
 --R  /
 --R       +---------+ +-------+
 --R       |   2    2  | 2    2
@@ -1069,14 +1225,15 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 76
+--S 90
 cc2:=aa.2-bb1
+--R 
 --R
 --R                                                       +---------+
 --R                         +-------+                     |   2    2
---R               a x       |- q + p             sin(a x)\|- q  + p
---R        - 2tan(---)atan( |------- ) + 2atan(-----------------------)
---R                2       \| q + p            (q + p)cos(a x) + q + p
+--R                    a x  |- q + p             sin(a x)\|- q  + p
+--R        - 2atan(tan(---) |------- ) + 2atan(-----------------------)
+--R                     2  \| q + p            (q + p)cos(a x) + q + p
 --R   (5)  ------------------------------------------------------------
 --R                                  +---------+
 --R                                  |   2    2
@@ -1084,19 +1241,19 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 77
+--S 91
 cc3:=aa.1-bb2
 --R
 --R   (6)
---R                  +-----+
---R                  |q + p        a x
---R               -  |-----  - tan(---)
---R                 \|q - p         2
---R       - a log(---------------------)
---R                 +-----+
---R                 |q + p        a x
---R                 |-----  - tan(---)
---R                \|q - p         2
+--R                +-----+
+--R                |q + p        a x
+--R             -  |-----  - tan(---)
+--R               \|q - p         2
+--R       - log(---------------------)
+--R               +-----+
+--R               |q + p        a x
+--R               |-----  - tan(---)
+--R              \|q - p         2
 --R     + 
 --R                              +-------+
 --R                              | 2    2        2    2
@@ -1110,19 +1267,19 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 78     14:390 Axiom cannot simplify these expressions
+--S 92     14:390 Axiom cannot simplify these expressions
 cc4:=aa.2-bb2
 --R
 --R   (7)
---R                             +-----+
---R                             |q + p        a x
---R           +---------+    -  |-----  - tan(---)
---R           |   2    2       \|q - p         2
---R       - a\|- q  + p  log(---------------------)
 --R                            +-----+
 --R                            |q + p        a x
---R                            |-----  - tan(---)
---R                           \|q - p         2
+--R          +---------+    -  |-----  - tan(---)
+--R          |   2    2       \|q - p         2
+--R       - \|- q  + p  log(---------------------)
+--R                           +-----+
+--R                           |q + p        a x
+--R                           |-----  - tan(---)
+--R                          \|q - p         2
 --R     + 
 --R                                  +---------+
 --R         +-------+                |   2    2
@@ -1147,7 +1304,7 @@ $$
 <<*>>=
 )clear all
 
---S 79
+--S 93
 aa:=integrate(1/(p+q*cos(a*x))^2,x)
 --R 
 --R
@@ -1188,7 +1345,7 @@ aa:=integrate(1/(p+q*cos(a*x))^2,x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 80
+--S 94
 t1:=integrate(1/(p+q*cos(a*x)),x)
 --R
 --R   (2)
@@ -1213,7 +1370,7 @@ t1:=integrate(1/(p+q*cos(a*x)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 81
+--S 95
 bb1:=(q*sin(a*x))/(a*(q^2-p^2)*(p+q*cos(a*x)))-p/(q^2-p^2)*t1.1
 --R
 --R   (3)
@@ -1236,7 +1393,7 @@ bb1:=(q*sin(a*x))/(a*(q^2-p^2)*(p+q*cos(a*x)))-p/(q^2-p^2)*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 82
+--S 96
 bb2:=(q*sin(a*x))/(a*(q^2-p^2)*(p+q*cos(a*x)))-p/(q^2-p^2)*t1.2
 --R
 --R   (4)
@@ -1252,7 +1409,7 @@ bb2:=(q*sin(a*x))/(a*(q^2-p^2)*(p+q*cos(a*x)))-p/(q^2-p^2)*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 83
+--S 97
 cc1:=aa.1-bb1
 --R
 --R   (5)
@@ -1274,7 +1431,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 84
+--S 98
 cc2:=aa.2-bb1
 --R
 --R   (6)
@@ -1296,7 +1453,7 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 85
+--S 99
 cc3:=aa.1-bb2
 --R
 --R   (7)
@@ -1318,7 +1475,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 86     14:391 Schaums and Axiom agree
+--S 100    14:391 Schaums and Axiom agree
 cc4:=aa.2-bb2
 --R
 --R   (8)  0
@@ -1334,35 +1491,26 @@ $$
 <<*>>=
 )clear all
 
---S 87
-aa:=integrate(1/(p^2+a^2*cos(a*x)),x)
+--S 101
+aa:=integrate(1/(p^2+q^2*cos(a*x)^2),x)
 --R 
 --R
 --R   (1)
---R                            +---------+
---R            2            2  |   4    4      4    4
---R        (- p cos(a x) - a )\|- p  + a   + (p  - a )sin(a x)
---R    log(---------------------------------------------------)
---R                           2            2
---R                          a cos(a x) + p
---R   [--------------------------------------------------------,
---R                            +---------+
---R                            |   4    4
---R                          a\|- p  + a
---R                        +-------+
---R                        | 4    4
---R               sin(a x)\|p  - a
---R    2atan(---------------------------)
---R            2    2             2    2
---R          (p  + a )cos(a x) + p  + a
---R    ----------------------------------]
---R                  +-------+
---R                  | 4    4
---R                a\|p  - a
---R                                     Type: Union(List Expression Integer,...)
+--R                 +-------+
+--R                 | 2    2                 2    2              2
+--R        sin(a x)\|q  + p               ((q  - p )cos(a x) - 2p )sin(a x)
+--R   atan(------------------) - atan(-----------------------------------------)
+--R         2p cos(a x) + 2p                                          +-------+
+--R                                              2                    | 2    2
+--R                                   (p cos(a x)  + 2p cos(a x) + p)\|q  + p
+--R   --------------------------------------------------------------------------
+--R                                      +-------+
+--R                                      | 2    2
+--R                                  a p\|q  + p
+--R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 88
+--S 102
 bb:=1/(a*p*sqrt(p^2+q^2))*atan((p*tan(a*x))/sqrt(p^2+q^2))
 --R
 --R             p tan(a x)
@@ -1377,47 +1525,232 @@ bb:=1/(a*p*sqrt(p^2+q^2))*atan((p*tan(a*x))/sqrt(p^2+q^2))
 --R                                                     Type: Expression Integer
 --E
 
---S 89
-cc1:=aa.1-bb
+--S 103
+cc:=aa-bb
 --R
 --R   (3)
---R                                          +---------+
---R         +-------+        2            2  |   4    4      4    4
---R         | 2    2     (- p cos(a x) - a )\|- p  + a   + (p  - a )sin(a x)
---R       p\|q  + p  log(---------------------------------------------------)
---R                                         2            2
---R                                        a cos(a x) + p
+--R                     +-------+
+--R                     | 2    2
+--R            sin(a x)\|q  + p           p tan(a x)
+--R       atan(------------------) - atan(----------)
+--R             2p cos(a x) + 2p           +-------+
+--R                                        | 2    2
+--R                                       \|q  + p
 --R     + 
---R          +---------+
---R          |   4    4      p tan(a x)
---R       - \|- p  + a  atan(----------)
---R                           +-------+
---R                           | 2    2
---R                          \|q  + p
+--R                     2    2              2
+--R                  ((q  - p )cos(a x) - 2p )sin(a x)
+--R       - atan(-----------------------------------------)
+--R                                              +-------+
+--R                         2                    | 2    2
+--R              (p cos(a x)  + 2p cos(a x) + p)\|q  + p
 --R  /
---R         +---------+ +-------+
---R         |   4    4  | 2    2
---R     a p\|- p  + a  \|q  + p
+--R         +-------+
+--R         | 2    2
+--R     a p\|q  + p
 --R                                                     Type: Expression Integer
 --E
 
---S 90     14:392 Axiom cannot simplify these expressions
-cc2:=aa.2-bb
+--S 104
+dd:=ratDenom cc
 --R
 --R   (4)
---R                                  +-------+
---R      +-------+                   | 4    4          +-------+
---R      | 2    2           sin(a x)\|p  - a           | 4    4      p tan(a x)
---R   2p\|q  + p  atan(---------------------------) - \|p  - a  atan(----------)
---R                      2    2             2    2                    +-------+
---R                    (p  + a )cos(a x) + p  + a                     | 2    2
---R                                                                  \|q  + p
---R   --------------------------------------------------------------------------
---R                                 +-------+ +-------+
---R                                 | 4    4  | 2    2
---R                             a p\|p  - a  \|q  + p
+--R                                   +-------+
+--R          +-------+                | 2    2
+--R          | 2    2      p tan(a x)\|q  + p
+--R       - \|q  + p  atan(--------------------)
+--R                                2    2
+--R                               q  + p
+--R     + 
+--R       -
+--R             +-------+
+--R             | 2    2
+--R            \|q  + p
+--R         *
+--R                                                          +-------+
+--R                           2    2              2          | 2    2
+--R                        ((q  - p )cos(a x) - 2p )sin(a x)\|q  + p
+--R            atan(--------------------------------------------------------)
+--R                     2    3         2        2     3               2    3
+--R                 (p q  + p )cos(a x)  + (2p q  + 2p )cos(a x) + p q  + p
+--R     + 
+--R                               +-------+
+--R        +-------+              | 2    2
+--R        | 2    2      sin(a x)\|q  + p
+--R       \|q  + p  atan(------------------)
+--R                       2p cos(a x) + 2p
+--R  /
+--R          2      3
+--R     a p q  + a p
 --R                                                     Type: Expression Integer
 --E
+
+--S 105
+atanrule2:=rule(atan(x) == 1/2*%i*(log(1-%i*x)-log(1+%i*x)))
+--R
+--R                     1                    1
+--R   (5)  atan(x) == - - %i log(%i x + 1) + - %i log(- %i x + 1)
+--R                     2                    2
+--RType: RewriteRule(Integer,Complex Fraction Integer,Expression Complex Fraction Integer)
+--E
+
+--S 106
+ee:=atanrule2 dd
+--R
+--R   (6)
+--R                                       +-------+
+--R            +-------+                  | 2    2     2    2
+--R       1    | 2    2     %i p tan(a x)\|q  + p   + q  + p
+--R       - %i\|q  + p  log(---------------------------------)
+--R       2                               2    2
+--R                                      q  + p
+--R     + 
+--R              +-------+
+--R         1    | 2    2
+--R         - %i\|q  + p
+--R         2
+--R      *
+--R         log
+--R                                                           +-------+
+--R                      2       2                 2          | 2    2
+--R                ((%i q  - %i p )cos(a x) - 2%i p )sin(a x)\|q  + p
+--R              + 
+--R                    2    3         2        2     3               2    3
+--R                (p q  + p )cos(a x)  + (2p q  + 2p )cos(a x) + p q  + p
+--R           /
+--R                  2    3         2        2     3               2    3
+--R              (p q  + p )cos(a x)  + (2p q  + 2p )cos(a x) + p q  + p
+--R     + 
+--R                                         +-------+
+--R                           1             | 2    2
+--R              +-------+    - %i sin(a x)\|q  + p   + p cos(a x) + p
+--R         1    | 2    2     2
+--R       - - %i\|q  + p  log(----------------------------------------)
+--R         2                              p cos(a x) + p
+--R     + 
+--R                                         +-------+
+--R                           1             | 2    2
+--R            +-------+    - - %i sin(a x)\|q  + p   + p cos(a x) + p
+--R       1    | 2    2       2
+--R       - %i\|q  + p  log(------------------------------------------)
+--R       2                               p cos(a x) + p
+--R     + 
+--R       -
+--R                 +-------+
+--R            1    | 2    2
+--R            - %i\|q  + p
+--R            2
+--R         *
+--R            log
+--R                                                                +-------+
+--R                           2       2                 2          | 2    2
+--R                   ((- %i q  + %i p )cos(a x) + 2%i p )sin(a x)\|q  + p
+--R                 + 
+--R                       2    3         2        2     3               2    3
+--R                   (p q  + p )cos(a x)  + (2p q  + 2p )cos(a x) + p q  + p
+--R              /
+--R                     2    3         2        2     3               2    3
+--R                 (p q  + p )cos(a x)  + (2p q  + 2p )cos(a x) + p q  + p
+--R     + 
+--R                                           +-------+
+--R              +-------+                    | 2    2     2    2
+--R         1    | 2    2     - %i p tan(a x)\|q  + p   + q  + p
+--R       - - %i\|q  + p  log(-----------------------------------)
+--R         2                                2    2
+--R                                         q  + p
+--R  /
+--R          2      3
+--R     a p q  + a p
+--R                                    Type: Expression Complex Fraction Integer
+--E
+
+--S 107
+ff:=expandLog ee
+--R
+--R   (7)
+--R              +-------+               +-------+
+--R         1    | 2    2                | 2    2        2       2
+--R       - - %i\|q  + p  log(p tan(a x)\|q  + p   + %i q  + %i p )
+--R         2
+--R     + 
+--R            +-------+               +-------+
+--R       1    | 2    2                | 2    2        2       2
+--R       - %i\|q  + p  log(p tan(a x)\|q  + p   - %i q  - %i p )
+--R       2
+--R     + 
+--R       -
+--R                 +-------+
+--R            1    | 2    2
+--R            - %i\|q  + p
+--R            2
+--R         *
+--R            log
+--R                                                   +-------+
+--R                    2    2              2          | 2    2
+--R                 ((q  - p )cos(a x) - 2p )sin(a x)\|q  + p
+--R               + 
+--R                        2       3         2           2        3
+--R                 (%i p q  + %i p )cos(a x)  + (2%i p q  + 2%i p )cos(a x)
+--R               + 
+--R                       2       3
+--R                 %i p q  + %i p
+--R     + 
+--R              +-------+
+--R         1    | 2    2
+--R         - %i\|q  + p
+--R         2
+--R      *
+--R         log
+--R                                                +-------+
+--R                 2    2              2          | 2    2
+--R              ((q  - p )cos(a x) - 2p )sin(a x)\|q  + p
+--R            + 
+--R                       2       3         2             2        3
+--R              (- %i p q  - %i p )cos(a x)  + (- 2%i p q  - 2%i p )cos(a x)
+--R            + 
+--R                      2       3
+--R              - %i p q  - %i p
+--R     + 
+--R            +-------+             +-------+
+--R       1    | 2    2              | 2    2
+--R       - %i\|q  + p  log(sin(a x)\|q  + p   + 2%i p cos(a x) + 2%i p)
+--R       2
+--R     + 
+--R              +-------+             +-------+
+--R         1    | 2    2              | 2    2
+--R       - - %i\|q  + p  log(sin(a x)\|q  + p   - 2%i p cos(a x) - 2%i p)
+--R         2
+--R     + 
+--R                                                                     +-------+
+--R                   1        1       1          1                     | 2    2
+--R     (%i log(%i) - - %i log(- %i) + - %i log(- - %i) - %i log(- %i))\|q  + p
+--R                   2        2       2          2
+--R  /
+--R          2      3
+--R     a p q  + a p
+--R                                    Type: Expression Complex Fraction Integer
+--E
+
+--S 108    14:392 Schaums and Axiom differ by a constant
+complexNormalize ff
+--R
+--R   (8)
+--R                      1        1       1          1
+--R         %i log(%i) - - %i log(- %i) + - %i log(- - %i) - %i log(- %i)
+--R                      2        2       2          2
+--R       + 
+--R           1
+--R         - - %i log(- 1)
+--R           2
+--R    *
+--R        +-------+
+--R        | 2    2
+--R       \|q  + p
+--R  /
+--R          2      3
+--R     a p q  + a p
+--R                                    Type: Expression Complex Fraction Integer
+--E
+
 @
 
 \section{\cite{1}:14.393~~~~~$\displaystyle
@@ -1437,7 +1770,7 @@ $$
 <<*>>=
 )clear all
 
---S 91
+--S 109
 aa:=integrate(1/(p^2-q^2*cos(a*x)^2),x)
 --R 
 --R
@@ -1473,8 +1806,8 @@ aa:=integrate(1/(p^2-q^2*cos(a*x)^2),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 92
-bb1:=1/(a*p*sqrt(p^2-a^2))*atan((p*tan(a*x))/sqrt(p^2-q^2))
+--S 110
+bb1:=1/(a*p*sqrt(p^2-q^2))*atan((p*tan(a*x))/sqrt(p^2-q^2))
 --R
 --R              p tan(a x)
 --R        atan(------------)
@@ -1482,13 +1815,13 @@ bb1:=1/(a*p*sqrt(p^2-a^2))*atan((p*tan(a*x))/sqrt(p^2-q^2))
 --R              |   2    2
 --R             \|- q  + p
 --R   (2)  ------------------
---R               +-------+
---R               | 2    2
---R           a p\|p  - a
+--R              +---------+
+--R              |   2    2
+--R          a p\|- q  + p
 --R                                                     Type: Expression Integer
 --E
 
---S 93
+--S 111
 bb2:=1/(2*a*p*sqrt(q^2-p^2))*log((p*tan(a*x)-sqrt(q^2-p^2))/(p*tan(a*x)+sqrt(q^2-p^2)))
 --R
 --R               +-------+
@@ -1505,13 +1838,13 @@ bb2:=1/(2*a*p*sqrt(q^2-p^2))*log((p*tan(a*x)-sqrt(q^2-p^2))/(p*tan(a*x)+sqrt(q^2
 --R                                                     Type: Expression Integer
 --E
 
---S 94
+--S 112
 cc1:=aa.1-bb1
 --R
 --R   (4)
---R          +-------+
---R          | 2    2
---R         \|p  - a
+--R          +---------+
+--R          |   2    2
+--R         \|- q  + p
 --R      *
 --R         log
 --R                                           +-------+
@@ -1531,38 +1864,38 @@ cc1:=aa.1-bb1
 --R                          |   2    2
 --R                         \|- q  + p
 --R  /
---R          +-------+ +-------+
---R          | 2    2  | 2    2
---R     2a p\|p  - a  \|q  - p
+--R          +---------+ +-------+
+--R          |   2    2  | 2    2
+--R     2a p\|- q  + p  \|q  - p
 --R                                                     Type: Expression Integer
 --E
 
---S 95
+--S 113
 cc2:=aa.2-bb1
 --R
 --R   (5)
---R                               +---------+
---R        +-------+              |   2    2      +---------+
---R        | 2    2      sin(a x)\|- q  + p       |   2    2       p tan(a x)
---R       \|p  - a  atan(--------------------) - \|- q  + p  atan(------------)
---R                        2p cos(a x) + 2p                        +---------+
---R                                                                |   2    2
---R                                                               \|- q  + p
+--R                     +---------+
+--R                     |   2    2
+--R            sin(a x)\|- q  + p            p tan(a x)
+--R       atan(--------------------) - atan(------------)
+--R              2p cos(a x) + 2p            +---------+
+--R                                          |   2    2
+--R                                         \|- q  + p
 --R     + 
---R        +-------+             2    2              2
---R        | 2    2           ((q  + p )cos(a x) + 2p )sin(a x)
---R       \|p  - a  atan(-------------------------------------------)
---R                                                      +---------+
---R                                 2                    |   2    2
---R                      (p cos(a x)  + 2p cos(a x) + p)\|- q  + p
+--R                    2    2              2
+--R                 ((q  + p )cos(a x) + 2p )sin(a x)
+--R       atan(-------------------------------------------)
+--R                                            +---------+
+--R                       2                    |   2    2
+--R            (p cos(a x)  + 2p cos(a x) + p)\|- q  + p
 --R  /
---R         +---------+ +-------+
---R         |   2    2  | 2    2
---R     a p\|- q  + p  \|p  - a
+--R         +---------+
+--R         |   2    2
+--R     a p\|- q  + p
 --R                                                     Type: Expression Integer
 --E
 
---S 96
+--S 114
 cc3:=aa.1-bb2
 --R
 --R   (6)
@@ -1588,7 +1921,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 97     14:393 Axiom cannot simplify these expressions
+--S 115
 cc4:=aa.2-bb2
 --R
 --R   (7)
@@ -1618,6 +1951,244 @@ cc4:=aa.2-bb2
 --R     2a p\|- q  + p  \|q  - p
 --R                                                     Type: Expression Integer
 --E
+
+--S 116
+dd2:=ratDenom cc2
+--R
+--R   (8)
+--R                                     +---------+
+--R          +---------+                |   2    2
+--R          |   2    2      p tan(a x)\|- q  + p
+--R       - \|- q  + p  atan(----------------------)
+--R                                   2    2
+--R                                  q  - p
+--R     + 
+--R          +---------+
+--R          |   2    2
+--R         \|- q  + p
+--R      *
+--R                                                      +---------+
+--R                       2    2              2          |   2    2
+--R                    ((q  + p )cos(a x) + 2p )sin(a x)\|- q  + p
+--R         atan(--------------------------------------------------------)
+--R                  2    3         2        2     3               2    3
+--R              (p q  - p )cos(a x)  + (2p q  - 2p )cos(a x) + p q  - p
+--R     + 
+--R                                   +---------+
+--R          +---------+              |   2    2
+--R          |   2    2      sin(a x)\|- q  + p
+--R       - \|- q  + p  atan(--------------------)
+--R                            2p cos(a x) + 2p
+--R  /
+--R          2      3
+--R     a p q  - a p
+--R                                                     Type: Expression Integer
+--E
+
+--S 117
+tanrule:=rule(tan(a) == sin(a)/cos(a))
+--R
+--R                  sin(a)
+--R   (9)  tan(a) == ------
+--R                  cos(a)
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E
+
+--S 118
+ee2:=tanrule dd2
+--R
+--R   (10)
+--R          +---------+
+--R          |   2    2
+--R         \|- q  + p
+--R      *
+--R                                                      +---------+
+--R                       2    2              2          |   2    2
+--R                    ((q  + p )cos(a x) + 2p )sin(a x)\|- q  + p
+--R         atan(--------------------------------------------------------)
+--R                  2    3         2        2     3               2    3
+--R              (p q  - p )cos(a x)  + (2p q  - 2p )cos(a x) + p q  - p
+--R     + 
+--R                                   +---------+
+--R          +---------+              |   2    2
+--R          |   2    2      sin(a x)\|- q  + p
+--R       - \|- q  + p  atan(--------------------)
+--R                            2p cos(a x) + 2p
+--R     + 
+--R                                     +---------+
+--R          +---------+                |   2    2
+--R          |   2    2      p sin(a x)\|- q  + p
+--R       - \|- q  + p  atan(----------------------)
+--R                               2    2
+--R                             (q  - p )cos(a x)
+--R  /
+--R          2      3
+--R     a p q  - a p
+--R                                                     Type: Expression Integer
+--E
+
+--S 119
+atanrule2:=rule(atan(x) == 1/2*%i*(log(1-%i*x)-log(1+%i*x)))
+--R
+--R                      1                    1
+--R   (11)  atan(x) == - - %i log(%i x + 1) + - %i log(- %i x + 1)
+--R                      2                    2
+--RType: RewriteRule(Integer,Complex Fraction Integer,Expression Complex Fraction Integer)
+--E
+
+--S 120
+ff2:=atanrule2 ee2
+--R
+--R   (12)
+--R       -
+--R                 +---------+
+--R            1    |   2    2
+--R            - %i\|- q  + p
+--R            2
+--R         *
+--R            log
+--R                                                              +---------+
+--R                         2       2                 2          |   2    2
+--R                   ((%i q  + %i p )cos(a x) + 2%i p )sin(a x)\|- q  + p
+--R                 + 
+--R                       2    3         2        2     3               2    3
+--R                   (p q  - p )cos(a x)  + (2p q  - 2p )cos(a x) + p q  - p
+--R              /
+--R                     2    3         2        2     3               2    3
+--R                 (p q  - p )cos(a x)  + (2p q  - 2p )cos(a x) + p q  - p
+--R     + 
+--R                                         +---------+
+--R                           1             |   2    2
+--R            +---------+    - %i sin(a x)\|- q  + p   + p cos(a x) + p
+--R       1    |   2    2     2
+--R       - %i\|- q  + p  log(------------------------------------------)
+--R       2                                 p cos(a x) + p
+--R     + 
+--R                                         +---------+
+--R            +---------+                  |   2    2      2    2
+--R       1    |   2    2     %i p sin(a x)\|- q  + p   + (q  - p )cos(a x)
+--R       - %i\|- q  + p  log(---------------------------------------------)
+--R       2                                   2    2
+--R                                         (q  - p )cos(a x)
+--R     + 
+--R                                             +---------+
+--R              +---------+                    |   2    2      2    2
+--R         1    |   2    2     - %i p sin(a x)\|- q  + p   + (q  - p )cos(a x)
+--R       - - %i\|- q  + p  log(-----------------------------------------------)
+--R         2                                    2    2
+--R                                            (q  - p )cos(a x)
+--R     + 
+--R                                             +---------+
+--R                               1             |   2    2
+--R              +---------+    - - %i sin(a x)\|- q  + p   + p cos(a x) + p
+--R         1    |   2    2       2
+--R       - - %i\|- q  + p  log(--------------------------------------------)
+--R         2                                  p cos(a x) + p
+--R     + 
+--R              +---------+
+--R         1    |   2    2
+--R         - %i\|- q  + p
+--R         2
+--R      *
+--R         log
+--R                                                             +---------+
+--R                        2       2                 2          |   2    2
+--R                ((- %i q  - %i p )cos(a x) - 2%i p )sin(a x)\|- q  + p
+--R              + 
+--R                    2    3         2        2     3               2    3
+--R                (p q  - p )cos(a x)  + (2p q  - 2p )cos(a x) + p q  - p
+--R           /
+--R                  2    3         2        2     3               2    3
+--R              (p q  - p )cos(a x)  + (2p q  - 2p )cos(a x) + p q  - p
+--R  /
+--R          2      3
+--R     a p q  - a p
+--R                                    Type: Expression Complex Fraction Integer
+--E
+
+--S 121
+gg2:=expandLog ff2
+--R
+--R   (13)
+--R              +---------+
+--R         1    |   2    2
+--R         - %i\|- q  + p
+--R         2
+--R      *
+--R         log
+--R                                                +---------+
+--R                 2    2              2          |   2    2
+--R              ((q  + p )cos(a x) + 2p )sin(a x)\|- q  + p
+--R            + 
+--R                     2       3         2           2        3                  2
+--R              (%i p q  - %i p )cos(a x)  + (2%i p q  - 2%i p )cos(a x) + %i p q
+--R            + 
+--R                    3
+--R              - %i p
+--R     + 
+--R       -
+--R                 +---------+
+--R            1    |   2    2
+--R            - %i\|- q  + p
+--R            2
+--R         *
+--R            log
+--R                                                   +---------+
+--R                    2    2              2          |   2    2
+--R                 ((q  + p )cos(a x) + 2p )sin(a x)\|- q  + p
+--R               + 
+--R                          2       3         2             2        3
+--R                 (- %i p q  + %i p )cos(a x)  + (- 2%i p q  + 2%i p )cos(a x)
+--R               + 
+--R                         2       3
+--R                 - %i p q  + %i p
+--R     + 
+--R              +---------+               +---------+
+--R         1    |   2    2                |   2    2         2       2
+--R       - - %i\|- q  + p  log(p sin(a x)\|- q  + p   + (%i q  - %i p )cos(a x))
+--R         2
+--R     + 
+--R            +---------+               +---------+
+--R       1    |   2    2                |   2    2           2       2
+--R       - %i\|- q  + p  log(p sin(a x)\|- q  + p   + (- %i q  + %i p )cos(a x))
+--R       2
+--R     + 
+--R              +---------+             +---------+
+--R         1    |   2    2              |   2    2
+--R       - - %i\|- q  + p  log(sin(a x)\|- q  + p   + 2%i p cos(a x) + 2%i p)
+--R         2
+--R     + 
+--R            +---------+             +---------+
+--R       1    |   2    2              |   2    2
+--R       - %i\|- q  + p  log(sin(a x)\|- q  + p   - 2%i p cos(a x) - 2%i p)
+--R       2
+--R     + 
+--R                                           +---------+
+--R        1        1       1          1      |   2    2
+--R       (- %i log(- %i) - - %i log(- - %i))\|- q  + p
+--R        2        2       2          2
+--R  /
+--R          2      3
+--R     a p q  - a p
+--R                                    Type: Expression Complex Fraction Integer
+--E
+
+--S 122    14:393 Schaums and Axiom differ by a constant
+hh2:=complexNormalize gg2
+--R
+--R   (14)
+--R          1              1        1       1          1       1
+--R       (- - %i log(%i) + - %i log(- %i) - - %i log(- - %i) + - %i log(- %i))
+--R          2              2        2       2          2       2
+--R    *
+--R        +---------+
+--R        |   2    2
+--R       \|- q  + p
+--R  /
+--R          2      3
+--R     a p q  - a p
+--R                                    Type: Expression Complex Fraction Integer
+--E
 @
 
 \section{\cite{1}:14.394~~~~~$\displaystyle
@@ -1629,7 +2200,7 @@ $$
 <<*>>=
 )clear all
 
---S 98     14:394 Axiom cannot compute this integral
+--S 123    14:394 Axiom cannot compute this integral
 aa:=integrate(x^m*cos(a*x),x)
 --R 
 --R
@@ -1649,7 +2220,7 @@ $$
 <<*>>=
 )clear all
 
---S 99     14:395 Axiom cannot compute this integral
+--S 124    14:395 Axiom cannot compute this integral
 aa:=integrate(cos(a*x)/x^n,x)
 --R 
 --R
@@ -1670,7 +2241,7 @@ $$
 <<*>>=
 )clear all
 
---S 100    14:396 Axiom cannot compute this integral
+--S 125    14:396 Axiom cannot compute this integral
 aa:=integrate(cos(a*x)^n,x)
 --R 
 --R
@@ -1691,7 +2262,7 @@ $$
 <<*>>=
 )clear all
 
---S 101    14:397 Axiom cannot compute this integral
+--S 126    14:397 Axiom cannot compute this integral
 aa:=integrate(1/(cos(a*x))^n,x)
 --R 
 --R
@@ -1714,7 +2285,7 @@ $$
 <<*>>=
 )clear all
 
---S 102    14:398 Axiom cannot compute this integral
+--S 127    14:398 Axiom cannot compute this integral
 aa:=integrate(x/cos(a*x)^n,x)
 --R 
 --R

\start
Date: Sun, 4 May 2008 21:49:20 -0400
From: Bill Page
To: Cliff Yapp
Subject: Re: Am I posing this solve problem wrong?

On Sun, May 4, 2008 at 7:32 PM, C Y  wrote:
> I'm trying to solve for y.  In Axiom:
>
> (1) -> E1 := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2
> (1) ->
>          2  2      2         2 2     2 2     2  2
>   (1)  C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1
>                                                     Type: Polynomial
> Integer
> (2) -> solve(E1=0,y)
> (2) ->
>           2  2      2         2 2     2 2     2  2
>   (2)  [C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1 = 0]
>                              Type: List Equation Fraction Polynomial
> Integer
>
> Am I doing something wrong?

I guess you need to be a little more explicit about the variables:

(1) -> E1:MPOLY([x,y],EXPR INT) := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2

          2 2     2 2      2         2  2     2  2
   (1)  D1 x  + C1 y  - 2C1 y1 y + C1 y1  - C1 D1
                       Type: MultivariatePolynomial([x,y],Expression Integer)
(2) -> solve(E1=0,y)

               +----------+                 +----------+
               |   2     2                  |   2     2
            D1\|- x  + C1   + C1 y1    - D1\|- x  + C1   + C1 y1
   (2)  [y= -----------------------,y= -------------------------]
                       C1                          C1
                                       Type: List Equation Expression Integer
(3) ->

\start
Date: Sun, 4 May 2008 19:23:42 -0700 (PDT)
From: Cliff Yapp
To: Bill Page
Subject: Re: Am I posing this solve problem wrong?

> I guess you need to be a little more explicit about the variables:

Ah.  Thanks Bill.  I wonder if this is the desired default behavior?

\start
Date: Sun, 4 May 2008 23:46:16 -0400
From: Bill Page
To: Cliff Yapp
Subject: Re: Am I posing this solve problem wrong?

On Sun, May 4, 2008 at 10:23 PM, C Y wrote:
>
> --- Bill Page wrote:
>
>> I guess you need to be a little more explicit about the variables:
>
> Ah.  Thanks Bill.  I wonder if this is the desired default behavior?
>

Well, Axiom is a strongly typed system so specifying the main
variables of a multivariate polynomial with coefficients from some
other ring is not entirely unexpected. But Axiom also provides a
domain that is more like the expressions in Maxima. Probably this is
more like you expected:

(1) -> E1:Expression Integer := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2

          2  2      2         2 2     2 2     2  2
   (1)  C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1
                                                     Type: Expression Integer
(2) -> solve(E1=0,y)

               +----------+                 +----------+
               |   2     2                  |   2     2
            D1\|- x  + C1   + C1 y1    - D1\|- x  + C1   + C1 y1
   (2)  [y= -----------------------,y= -------------------------]
                       C1                          C1
                                       Type: List Equation Expression Integer
(3) ->

This way you can be less specific about the type of expressions you
are working with.

You can analyze in more technical detail what actually happened in
your case by tracing the function selection process with the

)set message bottomup on

as follows:

(1) -> E1:= x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2

          2  2      2         2 2     2 2     2  2
   (1)  C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1
                                                     Type: Polynomial Integer
(2) -> )set mes bot on
(2) -> solve(E1=0,y)

 Function Selection for equation
      Arguments: (POLY INT,NNI)

 [1]  signature:   (POLY INT,POLY INT) -> EQ POLY INT
      implemented: slot $(Polynomial (Integer))(Polynomial (Integer))
from EQ POLY INT


 Function Selection for solve
      Arguments: (EQ POLY INT,VARIABLE y)

 [1]  signature:   (EQ FRAC POLY INT,SYMBOL) -> LIST EQ FRAC POLY INT
      implemented: slot (List (Equation (Fraction (Polynomial
(Integer)))))(Equation (Fraction (Polynomial (Integer))))(Symbol) from
SYSSOLP INT


 Function Selection for map by coercion facility (map)
      Arguments: ((POLY INT -> FRAC POLY INT),EQ POLY INT)
      Target type: EQ FRAC POLY INT

 [1]  signature:   ((POLY INT -> FRAC POLY INT),EQ POLY INT) -> EQ FRAC POLY INT
      implemented: slot (Equation (Fraction (Polynomial
(Integer))))(Mapping (Fraction (Polynomial (Integer))) (Polynomial
(Integer)))(Equation (Polynomial (Integer))) from EQ2(POLY INT,FRAC
POLY INT)


           2  2      2         2 2     2 2     2  2
   (2)  [C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1 = 0]
                              Type: List Equation Fraction Polynomial Integer
(3) ->

-------------

You can see from this that the interpreter chooses the solve operation
with signature:

  (EQ FRAC POLY INT,SYMBOL) -> LIST EQ FRAC POLY INT

Of course this version of solve cannot return something of the form
you were expecting.

\start
Date: Sun, 4 May 2008 23:15:21 -0500
From: Tim Daly
To: list
Subject: 20080504.02.tpd.patch (CATS Schaums-Axiom post-mortem fixes)

More results agree
=====================================================================
diff --git a/changelog b/changelog
index 0bc440d..0a7317c 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080504 tpd src/input/schaum19.input post-mortem fixes
 20080504 tpd src/input/schaum18.input post-mortem fixes
 20080502 tpd src/input/schaum17.input post-mortem fixes
 20080501 tpd src/input/schaum16.input post-mortem fixes
diff --git a/src/input/schaum19.input.pamphlet b/src/input/schaum19.input.pamphlet
index 343ab8a..eeb4d9d 100644
--- a/src/input/schaum19.input.pamphlet
+++ b/src/input/schaum19.input.pamphlet
@@ -87,27 +87,34 @@ aa:=integrate(sin(p*x)*cos(q*x),x)
 --E 
 
 --S 7
-bb:=-(cos(p-q)*x)/(2*(p-q))-(cos(p+q)*x)/(2*(p+q))
+bb:=-cos((p-q)*x)/(2*(p-q))-cos((p+q)*x)/(2*(p+q))
 --R
---R        (- q + p)x cos(q + p) + (q + p)x cos(q - p)
---R   (2)  -------------------------------------------
---R                           2     2
---R                         2q  - 2p
+--R        (- q + p)cos((q + p)x) + (q + p)cos((q - p)x)
+--R   (2)  ---------------------------------------------
+--R                            2     2
+--R                          2q  - 2p
 --R                                                     Type: Expression Integer
 --E
 
---S 8      14:400 Axiom is unable to simplify this expression
+--S 8
 cc:=aa-bb
 --R
 --R   (3)
---R       2q sin(p x)sin(q x) + 2p cos(p x)cos(q x) + (q - p)x cos(q + p)
+--R       2q sin(p x)sin(q x) + (q - p)cos((q + p)x) + 2p cos(p x)cos(q x)
 --R     + 
---R       (- q - p)x cos(q - p)
+--R       (- q - p)cos((q - p)x)
 --R  /
 --R       2     2
 --R     2q  - 2p
 --R                                                     Type: Expression Integer
 --E
+
+--S 9      14:400 Schaums and Axiom agree
+complexNormalize cc
+--R
+--R   (4)  0
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.401~~~~~$\displaystyle
@@ -118,7 +125,7 @@ $$
 <<*>>=
 )clear all
 
---S 9
+--S 10
 aa:=integrate(sin(a*x)^n*cos(a*x),x)
 --R 
 --R
@@ -129,7 +136,7 @@ aa:=integrate(sin(a*x)^n*cos(a*x),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 10
+--S 11
 bb:=sin(a*x)^(n+1)/((n+1)*a)
 --R
 --R                n + 1
@@ -139,7 +146,7 @@ bb:=sin(a*x)^(n+1)/((n+1)*a)
 --R                                                     Type: Expression Integer
 --E
 
---S 11
+--S 12
 cc:=aa-bb
 --R
 --R                  n log(sin(a x))           n + 1
@@ -149,7 +156,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 12
+--S 13
 explog:=rule(%e^(n*log(x)) == x^n)
 --R
 --R          n log(x)     n
@@ -157,7 +164,7 @@ explog:=rule(%e^(n*log(x)) == x^n)
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 13
+--S 14
 dd:=explog cc
 --R
 --R                  n + 1                   n
@@ -167,7 +174,7 @@ dd:=explog cc
 --R                                                     Type: Expression Integer
 --E
 
---S 14     14:401 Schaums and Axiom agree
+--S 15     14:401 Schaums and Axiom agree
 ee:=complexNormalize dd
 --R
 --R   (6)  0
@@ -183,7 +190,7 @@ $$
 <<*>>=
 )clear all
 
---S 15
+--S 16
 aa:=integrate(cos(a*x)^n*sin(a*x),x)
 --R 
 --R
@@ -194,7 +201,7 @@ aa:=integrate(cos(a*x)^n*sin(a*x),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 16
+--S 17
 bb:=-cos(a*x)^(n+1)/((n+1)*a)
 --R
 --R                  n + 1
@@ -204,7 +211,7 @@ bb:=-cos(a*x)^(n+1)/((n+1)*a)
 --R                                                     Type: Expression Integer
 --E 
 
---S 17
+--S 18
 cc:=aa-bb
 --R
 --R                    n log(cos(a x))           n + 1
@@ -214,7 +221,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 18
+--S 19
 explog:=rule(%e^(n*log(x)) == x^n)
 --R
 --R          n log(x)     n
@@ -222,7 +229,7 @@ explog:=rule(%e^(n*log(x)) == x^n)
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 19
+--S 20
 dd:=explog cc
 --R
 --R                n + 1                   n
@@ -232,7 +239,7 @@ dd:=explog cc
 --R                                                     Type: Expression Integer
 --E
 
---S 20     14:402 Schaums and Axiom agree
+--S 21     14:402 Schaums and Axiom agree
 ee:=complexNormalize dd
 --R
 --R   (6)  0
@@ -248,7 +255,7 @@ $$
 <<*>>=
 )clear all
 
---S 21
+--S 22
 aa:=integrate(sin(a*x)^2*cos(a*x)^2,x)
 --R 
 --R
@@ -259,7 +266,7 @@ aa:=integrate(sin(a*x)^2*cos(a*x)^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 22
+--S 23
 bb:=x/8-sin(4*a*x)/(32*a)
 --R
 --R        - sin(4a x) + 4a x
@@ -268,7 +275,7 @@ bb:=x/8-sin(4*a*x)/(32*a)
 --R                                                     Type: Expression Integer
 --E
 
---S 23
+--S 24
 cc:=aa-bb
 --R
 --R                                3
@@ -278,7 +285,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 24     14:403 Schaums and Axiom agree
+--S 25     14:403 Schaums and Axiom agree
 dd:=complexNormalize cc
 --R
 --R   (4)  0
@@ -294,7 +301,7 @@ $$
 <<*>>=
 )clear all
 
---S 25
+--S 26
 aa:=integrate(1/(sin(a*x)*cos(a*x)),x)
 --R 
 --R
@@ -306,7 +313,7 @@ aa:=integrate(1/(sin(a*x)*cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 26
+--S 27
 bb:=1/a*log(tan(a*x))
 --R
 --R        log(tan(a x))
@@ -315,7 +322,7 @@ bb:=1/a*log(tan(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 27
+--S 28
 cc:=aa-bb
 --R
 --R                                sin(a x)              2cos(a x)
@@ -326,7 +333,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 28
+--S 29
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -335,7 +342,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 29
+--S 30
 dd:=tanrule cc
 --R
 --R              sin(a x)          sin(a x)              2cos(a x)
@@ -346,7 +353,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 30     14:404 Schaums and Axiom differ by a constant
+--S 31     14:404 Schaums and Axiom differ by a constant
 ee:=expandLog dd
 --R
 --R          log(- 2)
@@ -364,7 +371,7 @@ $$
 <<*>>=
 )clear all
 
---S 31
+--S 32
 aa:=integrate(1/(sin(a*x)^2*cos(a*x)),x)
 --R 
 --R
@@ -381,7 +388,7 @@ aa:=integrate(1/(sin(a*x)^2*cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 32
+--S 33
 bb:=1/a*log(tan(%pi/4+(a*x)/2))-1/(a*sin(a*x))
 --R
 --R                        2a x + %pi
@@ -392,7 +399,7 @@ bb:=1/a*log(tan(%pi/4+(a*x)/2))-1/(a*sin(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 33
+--S 34
 cc:=aa-bb
 --R
 --R   (3)
@@ -408,7 +415,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 34
+--S 35
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -417,7 +424,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 35
+--S 36
 dd:=tanrule cc
 --R
 --R   (5)
@@ -437,7 +444,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 36
+--S 37
 ee:=expandLog dd
 --R
 --R   (6)
@@ -451,7 +458,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 37     14:405 Schaums and Axiom differ by a constant
+--S 38     14:405 Schaums and Axiom differ by a constant
 ff:=complexNormalize %
 --R
 --R        log(- 1)
@@ -469,7 +476,7 @@ $$
 <<*>>=
 )clear all
 
---S 38
+--S 39
 aa:=integrate(1/(sin(a*x)*cos(a*x)^2),x)
 --R 
 --R
@@ -481,7 +488,7 @@ aa:=integrate(1/(sin(a*x)*cos(a*x)^2),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 39
+--S 40
 bb:=1/a*log(tan((a*x)/2))+1/(a*cos(a*x))
 --R
 --R                        a x
@@ -492,7 +499,7 @@ bb:=1/a*log(tan((a*x)/2))+1/(a*cos(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 40
+--S 41
 cc:=aa-bb
 --R
 --R                  a x           sin(a x)
@@ -503,7 +510,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 41
+--S 42
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -512,7 +519,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 42
+--S 43
 dd:=tanrule cc
 --R
 --R                                    a x
@@ -527,7 +534,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 43
+--S 44
 ee:=expandLog dd
 --R
 --R                                a x                                 a x
@@ -538,7 +545,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 44     14:406 Schaums and Axiom differ by a constant
+--S 45     14:406 Schaums and Axiom differ by a constant
 ff:=complexNormalize ee
 --R
 --R        1
@@ -556,7 +563,7 @@ $$
 <<*>>=
 )clear all
 
---S 45
+--S 46
 aa:=integrate(1/(sin(a*x)^2*cos(a*x)^2),x)
 --R 
 --R
@@ -567,7 +574,7 @@ aa:=integrate(1/(sin(a*x)^2*cos(a*x)^2),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 46
+--S 47
 bb:=-(2*cot(2*a*x))/a
 --R
 --R          2cot(2a x)
@@ -576,7 +583,7 @@ bb:=-(2*cot(2*a*x))/a
 --R                                                     Type: Expression Integer
 --E
 
---S 47
+--S 48
 cc:=aa-bb
 --R
 --R                                              2
@@ -586,7 +593,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 48
+--S 49
 cotrule:=rule(cot(a) == cos(a)/sin(a))
 --R
 --R                  cos(a)
@@ -595,7 +602,7 @@ cotrule:=rule(cot(a) == cos(a)/sin(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 49
+--S 50
 dd:=cotrule cc
 --R
 --R                    2
@@ -605,7 +612,7 @@ dd:=cotrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 50     14:407 Schaums and Axiom agree
+--S 51     14:407 Schaums and Axiom agree
 ee:=complexNormalize dd
 --R
 --R   (6)  0
@@ -621,7 +628,7 @@ $$
 <<*>>=
 )clear all
 
---S 51
+--S 52
 aa:=integrate(sin(a*x)^2/cos(a*x),x)
 --R 
 --R
@@ -633,7 +640,7 @@ aa:=integrate(sin(a*x)^2/cos(a*x),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 52
+--S 53
 bb:=-sin(a*x)/a+1/a*log(tan((a*x)/2+%pi/4))
 --R
 --R                2a x + %pi
@@ -644,7 +651,7 @@ bb:=-sin(a*x)/a+1/a*log(tan((a*x)/2+%pi/4))
 --R                                                     Type: Expression Integer
 --E
 
---S 53
+--S 54
 cc:=aa-bb
 --R
 --R   (3)
@@ -660,7 +667,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 54
+--S 55
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -669,7 +676,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 55
+--S 56
 dd:=tanrule cc
 --R
 --R   (5)
@@ -689,7 +696,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 56
+--S 57
 ee:=expandLog dd
 --R
 --R   (6)
@@ -703,7 +710,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 57     14:408 Schaums and Axiom differ by a constant
+--S 58     14:408 Schaums and Axiom differ by a constant
 ff:=complexNormalize ee
 --R
 --R        log(- 1)
@@ -721,7 +728,7 @@ $$
 <<*>>=
 )clear all
 
---S 58
+--S 59
 aa:=integrate(cos(a*x)^2/sin(a*x),x)
 --R 
 --R
@@ -733,7 +740,7 @@ aa:=integrate(cos(a*x)^2/sin(a*x),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 59
+--S 60
 bb:=cos(a*x)/a+1/a*log(tan((a*x)/2))
 --R
 --R                a x
@@ -744,7 +751,7 @@ bb:=cos(a*x)/a+1/a*log(tan((a*x)/2))
 --R                                                     Type: Expression Integer
 --E
 
---S 60
+--S 61
 cc:=aa-bb
 --R
 --R                  a x           sin(a x)
@@ -755,7 +762,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 61
+--S 62
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -764,7 +771,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 62
+--S 63
 dd:=tanrule cc
 --R
 --R                                    a x
@@ -779,7 +786,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 63
+--S 64
 ee:=expandLog dd
 --R
 --R                                a x                                 a x
@@ -790,7 +797,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 64     14:409 Schaums and Axiom agree
+--S 65     14:409 Schaums and Axiom agree
 ff:=complexNormalize ee
 --R
 --R   (7)  0
@@ -807,7 +814,7 @@ $$
 <<*>>=
 )clear all
 
---S 65
+--S 66
 aa:=integrate(1/(cos(a*x)*(1+sin(a*x))),x)
 --R 
 --R
@@ -824,7 +831,7 @@ aa:=integrate(1/(cos(a*x)*(1+sin(a*x))),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 66
+--S 67
 bb:=-1/(2*a*(1+sin(a*x)))+1/(2*a)*log(tan((a*x)/2+%pi/4))
 --R
 --R                              2a x + %pi
@@ -835,7 +842,7 @@ bb:=-1/(2*a*(1+sin(a*x)))+1/(2*a)*log(tan((a*x)/2+%pi/4))
 --R                                                     Type: Expression Integer
 --E
 
---S 67
+--S 68
 cc:=aa-bb
 --R
 --R   (3)
@@ -851,7 +858,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 68
+--S 69
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -860,7 +867,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 69
+--S 70
 dd:=tanrule cc
 --R
 --R   (5)
@@ -880,7 +887,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 70
+--S 71
 ee:=expandLog dd
 --R
 --R   (6)
@@ -894,7 +901,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 71
+--S 72
 ff:=complexNormalize ee
 --R
 --R        log(- 1) + 1
@@ -905,7 +912,7 @@ ff:=complexNormalize ee
 
 )clear all 
 
---S 72
+--S 73
 aa:=integrate(1/(cos(a*x)*(1-sin(a*x))),x)
 --R 
 --R
@@ -922,7 +929,7 @@ aa:=integrate(1/(cos(a*x)*(1-sin(a*x))),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 73
+--S 74
 bb:=1/(2*a*(1-sin(a*x)))+1/(2*a)*log(tan((a*x)/2+%pi/4))
 --R
 --R                              2a x + %pi
@@ -933,7 +940,7 @@ bb:=1/(2*a*(1-sin(a*x)))+1/(2*a)*log(tan((a*x)/2+%pi/4))
 --R                                                     Type: Expression Integer
 --E
 
---S 74
+--S 75
 cc:=aa-bb
 --R
 --R   (3)
@@ -949,7 +956,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 75
+--S 76
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -958,7 +965,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 76
+--S 77
 dd:=tanrule cc
 --R
 --R   (5)
@@ -978,7 +985,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 77
+--S 78
 ee:=expandLog dd
 --R
 --R   (6)
@@ -992,7 +999,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 78     14:410 Schaums and Axiom differ by a constant
+--S 79     14:410 Schaums and Axiom differ by a constant
 ff:=complexNormalize ee
 --R
 --R        log(- 1) - 1
@@ -1011,7 +1018,7 @@ $$
 <<*>>=
 )clear all
 
---S 79
+--S 80
 aa:=integrate(1/(sin(a*x)*(1+cos(a*x))),x)
 --R 
 --R
@@ -1023,7 +1030,7 @@ aa:=integrate(1/(sin(a*x)*(1+cos(a*x))),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 80
+--S 81
 bb:=1/(2*a*(1+cos(a*x)))+1/(2*a)*log(tan((a*x)/2))
 --R
 --R                              a x
@@ -1034,7 +1041,7 @@ bb:=1/(2*a*(1+cos(a*x)))+1/(2*a)*log(tan((a*x)/2))
 --R                                                     Type: Expression Integer
 --E
 
---S 81
+--S 82
 cc:=aa-bb
 --R
 --R                   a x            sin(a x)
@@ -1045,7 +1052,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 82
+--S 83
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -1054,7 +1061,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 83
+--S 84
 dd:=tanrule cc
 --R
 --R                                      a x
@@ -1069,7 +1076,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 84
+--S 85
 ee:=expandLog dd
 --R
 --R   (6)
@@ -1081,7 +1088,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 85
+--S 86
 ff:=complexNormalize ee
 --R
 --R           1
@@ -1092,7 +1099,7 @@ ff:=complexNormalize ee
 
 )clear all
 
---S 86
+--S 87
 aa:=integrate(1/(sin(a*x)*(1-cos(a*x))),x)
 --R 
 --R
@@ -1104,7 +1111,7 @@ aa:=integrate(1/(sin(a*x)*(1-cos(a*x))),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 87
+--S 88
 bb:=-1/(2*a*(1-cos(a*x)))+1/(2*a)*log(tan((a*x)/2))
 --R
 --R                              a x
@@ -1115,7 +1122,7 @@ bb:=-1/(2*a*(1-cos(a*x)))+1/(2*a)*log(tan((a*x)/2))
 --R                                                     Type: Expression Integer
 --E
 
---S 88
+--S 89
 cc:=aa-bb
 --R
 --R                   a x            sin(a x)
@@ -1126,7 +1133,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 89
+--S 90
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -1135,7 +1142,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 90
+--S 91
 dd:=tanrule cc
 --R
 --R                                      a x
@@ -1150,7 +1157,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 91
+--S 92
 ee:=expandLog dd
 --R
 --R   (6)
@@ -1162,7 +1169,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 92     14:411 Schaums and Axiom differ by a constant
+--S 93     14:411 Schaums and Axiom differ by a constant
 ff:=complexNormalize ee
 --R
 --R         1
@@ -1180,7 +1187,7 @@ $$
 <<*>>=
 )clear all
 
---S 93
+--S 94
 aa:=integrate(1/(sin(a*x)+cos(a*x)),x)
 --R 
 --R
@@ -1193,7 +1200,7 @@ aa:=integrate(1/(sin(a*x)+cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 94
+--S 95
 bb:=1/(a*sqrt(2))*log(tan((a*x)/2+%pi/8))
 --R
 --R         +-+        4a x + %pi
@@ -1204,7 +1211,7 @@ bb:=1/(a*sqrt(2))*log(tan((a*x)/2+%pi/8))
 --R                                                     Type: Expression Integer
 --E
 
---S 95
+--S 96
 cc:=aa-bb
 --R
 --R   (3)
@@ -1221,9 +1228,22 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
+--S 97
+complexNormalize cc
+--R
+--R                 +-+
+--R         +-+    \|2  - 2
+--R        \|2 log(--------)
+--R                   +-+
+--R                  \|2
+--R   (4)  -----------------
+--R                2a
+--R                                                     Type: Expression Integer
+--E
+
 )clear all
 
---S 96
+--S 98
 aa:=integrate(1/(sin(a*x)-cos(a*x)),x)
 --R 
 --R
@@ -1236,7 +1256,7 @@ aa:=integrate(1/(sin(a*x)-cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 97
+--S 99
 bb:=1/(a*sqrt(2))*log(tan((a*x)/2-%pi/8))
 --R
 --R         +-+        4a x - %pi
@@ -1247,7 +1267,7 @@ bb:=1/(a*sqrt(2))*log(tan((a*x)/2-%pi/8))
 --R                                                     Type: Expression Integer
 --E
 
---S 98     14:412 Axiom cannot simplify this expression
+--S 100
 cc:=aa-bb
 --R
 --R   (3)
@@ -1264,6 +1284,15 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
+--S 101    14:412 Schaums and Axiom differ by a constant
+complexNormalize cc
+--R
+--R         +-+     +-+
+--R        \|2 log(\|2  - 1)
+--R   (4)  -----------------
+--R                2a
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.413~~~~~$\displaystyle
@@ -1274,7 +1303,7 @@ $$
 <<*>>=
 )clear all
 
---S 99
+--S 102
 aa:=integrate(sin(a*x)/(sin(a*x)+cos(a*x)),x)
 --R 
 --R
@@ -1286,7 +1315,7 @@ aa:=integrate(sin(a*x)/(sin(a*x)+cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 100
+--S 103
 bb:=x/2-1/(2*a)*log(sin(a*x)+cos(a*x))
 --R
 --R        - log(sin(a x) + cos(a x)) + a x
@@ -1295,7 +1324,7 @@ bb:=x/2-1/(2*a)*log(sin(a*x)+cos(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 101
+--S 104
 cc:=aa-bb
 --R
 --R   (3)
@@ -1307,7 +1336,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 102
+--S 105
 dd:=expandLog cc
 --R
 --R        log(sin(a x) + cos(a x)) - log(- sin(a x) - cos(a x))
@@ -1316,7 +1345,7 @@ dd:=expandLog cc
 --R                                                     Type: Expression Integer
 --E
 
---S 103
+--S 106
 ee:=complexNormalize dd
 --R
 --R        log(- 1)
@@ -1327,7 +1356,7 @@ ee:=complexNormalize dd
 
 )clear all 
 
---S 104
+--S 107
 aa:=integrate(sin(a*x)/(sin(a*x)-cos(a*x)),x)
 --R 
 --R
@@ -1339,7 +1368,7 @@ aa:=integrate(sin(a*x)/(sin(a*x)-cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 105
+--S 108
 bb:=x/2+1/(2*a)*log(sin(a*x)-cos(a*x))
 --R
 --R        log(sin(a x) - cos(a x)) + a x
@@ -1348,7 +1377,7 @@ bb:=x/2+1/(2*a)*log(sin(a*x)-cos(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 106
+--S 109
 cc:=aa-bb
 --R
 --R   (3)
@@ -1360,7 +1389,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 107    14:413 Schaums and Axiom agree
+--S 110    14:413 Schaums and Axiom agree
 dd:=expandLog cc
 --R
 --R   (4)  0
@@ -1376,7 +1405,7 @@ $$
 <<*>>=
 )clear all
 
---S 108
+--S 111
 aa:=integrate(cos(a*x)/(sin(a*x)+cos(a*x)),x)
 --R 
 --R
@@ -1388,7 +1417,7 @@ aa:=integrate(cos(a*x)/(sin(a*x)+cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 109
+--S 112
 bb:=x/2+1/(2*a)*log(sin(a*x)+cos(a*x))
 --R
 --R        log(sin(a x) + cos(a x)) + a x
@@ -1397,7 +1426,7 @@ bb:=x/2+1/(2*a)*log(sin(a*x)+cos(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 110
+--S 113
 cc:=aa-bb
 --R
 --R   (3)
@@ -1409,7 +1438,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 111
+--S 114
 dd:=expandLog cc
 --R
 --R        - log(sin(a x) + cos(a x)) + log(- sin(a x) - cos(a x))
@@ -1418,7 +1447,7 @@ dd:=expandLog cc
 --R                                                     Type: Expression Integer
 --E
 
---S 112
+--S 115
 ee:=complexNormalize dd
 --R
 --R          log(- 1)
@@ -1429,7 +1458,7 @@ ee:=complexNormalize dd
 
 )clear all
 
---S 113
+--S 116
 aa:=integrate(cos(a*x)/(sin(a*x)-cos(a*x)),x)
 --R 
 --R
@@ -1441,7 +1470,7 @@ aa:=integrate(cos(a*x)/(sin(a*x)-cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 114
+--S 117
 bb:=-x/2+1/(2*a)*log(sin(a*x)-cos(a*x))
 --R
 --R        log(sin(a x) - cos(a x)) - a x
@@ -1450,7 +1479,7 @@ bb:=-x/2+1/(2*a)*log(sin(a*x)-cos(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 115
+--S 118
 cc:=aa-bb
 --R
 --R   (3)
@@ -1462,7 +1491,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 116    14:414 Schaums and Axiom agree
+--S 119    14:414 Schaums and Axiom agree
 dd:=expandLog cc
 --R
 --R   (4)  0
@@ -1478,7 +1507,7 @@ $$
 <<*>>=
 )clear all
 
---S 117
+--S 120
 aa:=integrate(sin(a*x)/(p+q*cos(a*x)),x)
 --R 
 --R
@@ -1490,7 +1519,7 @@ aa:=integrate(sin(a*x)/(p+q*cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 118
+--S 121
 bb:=-1/(a*q)*log(p+q*cos(a*x))
 --R
 --R          log(q cos(a x) + p)
@@ -1499,7 +1528,7 @@ bb:=-1/(a*q)*log(p+q*cos(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 119
+--S 122
 cc:=aa-bb
 --R
 --R                                        2             - 2q cos(a x) - 2p
@@ -1510,7 +1539,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 120
+--S 123
 dd:=expandLog cc
 --R
 --R        log(q cos(a x) + p) - log(- q cos(a x) - p)
@@ -1519,7 +1548,7 @@ dd:=expandLog cc
 --R                                                     Type: Expression Integer
 --E
 
---S 121    14:415 Schaums and Axiom differ by a constant
+--S 124    14:415 Schaums and Axiom differ by a constant
 ee:=complexNormalize dd
 --R
 --R        log(- 1)
@@ -1537,7 +1566,7 @@ $$
 <<*>>=
 )clear all
 
---S 122
+--S 125
 aa:=integrate(cos(a*x)/(p+q*sin(a*x)),x)
 --R 
 --R
@@ -1549,7 +1578,7 @@ aa:=integrate(cos(a*x)/(p+q*sin(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 123
+--S 126
 bb:=1/(a*q)*log(p+q*sin(a*x))
 --R
 --R        log(q sin(a x) + p)
@@ -1558,7 +1587,7 @@ bb:=1/(a*q)*log(p+q*sin(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 124
+--S 127
 cc:=aa-bb
 --R
 --R                                    2q sin(a x) + 2p              2
@@ -1569,7 +1598,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 125    14:416 Schaums and Axiom agree
+--S 128    14:416 Schaums and Axiom agree
 dd:=expandLog cc
 --R
 --R   (4)  0
@@ -1585,7 +1614,7 @@ $$
 <<*>>=
 )clear all
 
---S 126
+--S 129
 aa:=integrate(sin(a*x)/(p+q*cos(a*x))^n,x)
 --R 
 --R
@@ -1596,7 +1625,7 @@ aa:=integrate(sin(a*x)/(p+q*cos(a*x))^n,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 127
+--S 130
 bb:=1/(a*q*(n-1)*(p+q*cos(a*x))^(n-1))
 --R
 --R                        1
@@ -1606,7 +1635,7 @@ bb:=1/(a*q*(n-1)*(p+q*cos(a*x))^(n-1))
 --R                                                     Type: Expression Integer
 --E
 
---S 128
+--S 131
 cc:=aa-bb
 --R
 --R            n log(q cos(a x) + p)                                   n - 1
@@ -1617,7 +1646,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 129
+--S 132
 explog:=rule(%e^(n*log(x)) == x^n)
 --R
 --R          n log(x)     n
@@ -1625,7 +1654,7 @@ explog:=rule(%e^(n*log(x)) == x^n)
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 130
+--S 133
 dd:=explog cc
 --R
 --R                          n                                   n - 1
@@ -1636,7 +1665,7 @@ dd:=explog cc
 --R                                                     Type: Expression Integer
 --E
 
---S 131    14:417 Schaums and Axiom agree
+--S 134    14:417 Schaums and Axiom agree
 ee:=complexNormalize dd
 --R
 --R   (6)  0
@@ -1652,7 +1681,7 @@ $$
 <<*>>=
 )clear all
 
---S 132
+--S 135
 aa:=integrate(cos(a*x)/(p+q*sin(a*x))^n,x)
 --R 
 --R
@@ -1663,7 +1692,7 @@ aa:=integrate(cos(a*x)/(p+q*sin(a*x))^n,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 133
+--S 136
 bb:=-1/(a*q*(n-1)*(p+q*sin(a*x))^(n-1))
 --R
 --R                          1
@@ -1673,7 +1702,7 @@ bb:=-1/(a*q*(n-1)*(p+q*sin(a*x))^(n-1))
 --R                                                     Type: Expression Integer
 --E
 
---S 134
+--S 137
 cc:=aa-bb
 --R
 --R          n log(q sin(a x) + p)                                     n - 1
@@ -1684,7 +1713,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 135
+--S 138
 explog:=rule(%e^(n*log(x)) == x^n)
 --R
 --R          n log(x)     n
@@ -1692,7 +1721,7 @@ explog:=rule(%e^(n*log(x)) == x^n)
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 136
+--S 139
 dd:=explog cc
 --R
 --R                        n                                     n - 1
@@ -1703,7 +1732,7 @@ dd:=explog cc
 --R                                                     Type: Expression Integer
 --E
 
---S 137    14:418 Schaums and Axiom agree
+--S 140    14:418 Schaums and Axiom agree
 ee:=complexNormalize dd
 --R
 --R   (6)  0
@@ -1719,7 +1748,7 @@ $$
 <<*>>=
 )clear all
 
---S 138
+--S 141
 aa:=integrate(1/(p*sin(a*x)+q*cos(a*x)),x)
 --R 
 --R
@@ -1740,7 +1769,7 @@ aa:=integrate(1/(p*sin(a*x)+q*cos(a*x)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 139
+--S 142
 bb:=1/(a*sqrt(p^2+q^2))*log(tan((a*x+atan(q/p))/2))
 --R
 --R                     q
@@ -1755,7 +1784,7 @@ bb:=1/(a*sqrt(p^2+q^2))*log(tan((a*x+atan(q/p))/2))
 --R                                                     Type: Expression Integer
 --E
 
---S 140    14:419 Axiom cannot simplify this expression
+--S 143
 cc:=aa-bb
 --R
 --R   (3)
@@ -1780,6 +1809,38 @@ cc:=aa-bb
 --R     a\|q  + p
 --R                                                     Type: Expression Integer
 --E
+
+--S 144
+dd:=normalize cc
+--R
+--R                            +-------+
+--R                            | 2    2     2     2
+--R                       - 2p\|q  + p   + q  + 2p
+--R          log(------------------------------------------)
+--R                            +-------+
+--R                   2     3  | 2    2     4     2 2     4
+--R              (3p q  + 4p )\|q  + p   - q  - 5p q  - 4p
+--R   (4)  - -----------------------------------------------
+--R                              +-------+
+--R                              | 2    2
+--R                            a\|q  + p
+--R                                                     Type: Expression Integer
+--E
+
+--S 145    14:419 Schaums and Axiom differ by a constant
+ee:=ratDenom dd
+--R
+--R                            +-------+
+--R           +-------+        | 2    2     2    2
+--R           | 2    2     - p\|q  + p   - q  - p
+--R          \|q  + p  log(-----------------------)
+--R                                4    2 2
+--R                               q  + p q
+--R   (5)  - --------------------------------------
+--R                           2      2
+--R                        a q  + a p
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.420~~~~~$\displaystyle
@@ -1801,7 +1862,7 @@ $$
 <<*>>=
 )clear all
 
---S 141
+--S 146
 aa:=integrate(1/(p*sin(a*x)+q*cos(a*x)+r),x)
 --R 
 --R
@@ -1843,7 +1904,7 @@ aa:=integrate(1/(p*sin(a*x)+q*cos(a*x)+r),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 142
+--S 147
 bb1:=2/(a*sqrt(r^2-p^2-q^2))*atan((p+(r-q)*tan((a*x)/2))/sqrt(r^2-p^2-q^2))
 --R
 --R                         a x
@@ -1860,7 +1921,7 @@ bb1:=2/(a*sqrt(r^2-p^2-q^2))*atan((p+(r-q)*tan((a*x)/2))/sqrt(r^2-p^2-q^2))
 --R                                                     Type: Expression Integer
 --E
 
---S 143
+--S 148
 bb2:=1/(a*sqrt(p^2+q^2-r^2))*log((p-sqrt(p^2+q^2-r^2)+(r-q)*tan((a*x)/2))/(p+sqrt(p^2+q^2-r^2)+(r-q)*tan((a*x)/2)))
 --R
 --R               +--------------+
@@ -1879,7 +1940,7 @@ bb2:=1/(a*sqrt(p^2+q^2-r^2))*log((p-sqrt(p^2+q^2-r^2)+(r-q)*tan((a*x)/2))/(p+sqr
 --R                                                     Type: Expression Integer
 --E
 
---S 144
+--S 149
 cc1:=aa.1-bb1
 --R
 --R   (4)
@@ -1920,7 +1981,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 145
+--S 150
 cc2:=aa.2-bb1
 --R
 --R   (5)
@@ -1945,7 +2006,7 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 146
+--S 151
 cc3:=aa.1-bb2
 --R
 --R   (6)
@@ -1984,7 +2045,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 147    14:420 Axiom cannot simplify these expressions
+--S 152
 cc4:=aa.2-bb2
 --R
 --R   (7)
@@ -2010,6 +2071,13 @@ cc4:=aa.2-bb2
 --R     a\|- r  + q  + p  \|r  - q  - p
 --R                                                     Type: Expression Integer
 --E
+
+--S 153    14:420 Schaums and Axiom agree
+dd2:=normalize cc2
+--R
+--R   (8)  0
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.421~~~~~$\displaystyle
@@ -2020,7 +2088,7 @@ $$
 <<*>>=
 )clear all
 
---S 148
+--S 154
 aa:=integrate(1/(p*sin(a*x)+q*(1+cos(a*x))),x)
 --R 
 --R
@@ -2032,7 +2100,7 @@ aa:=integrate(1/(p*sin(a*x)+q*(1+cos(a*x))),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 149
+--S 155
 bb:=1/(a*p)*log(q+p*tan((a*x)/2))
 --R
 --R                  a x
@@ -2043,7 +2111,7 @@ bb:=1/(a*p)*log(q+p*tan((a*x)/2))
 --R                                                     Type: Expression Integer
 --E 
 
---S 150
+--S 156
 cc:=aa-bb
 --R
 --R                    a x             p sin(a x) + q cos(a x) + q
@@ -2054,7 +2122,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 151
+--S 157
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -2063,7 +2131,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 152
+--S 158
 dd:=tanrule cc
 --R
 --R                                                     a x          a x
@@ -2078,7 +2146,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 153
+--S 159
 ee:=expandLog dd
 --R
 --R   (6)
@@ -2094,7 +2162,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 154    14:421 Schaums and Axiom agree
+--S 160    14:421 Schaums and Axiom agree
 ff:=complexNormalize ee
 --R
 --R   (7)  0
@@ -2111,7 +2179,7 @@ $$
 <<*>>=
 )clear all
 
---S 155
+--S 161
 aa:=integrate(1/(p*sin(a*x)+q*cos(a*x)+sqrt(p^2+q^2)),x)
 --R 
 --R
@@ -2144,7 +2212,7 @@ aa:=integrate(1/(p*sin(a*x)+q*cos(a*x)+sqrt(p^2+q^2)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 156
+--S 162
 bb:=-1/(a*sqrt(p^2+q^2))*tan(%pi/4-(a*x+atan(q/p))/2)
 --R
 --R                  q
@@ -2159,7 +2227,7 @@ bb:=-1/(a*sqrt(p^2+q^2))*tan(%pi/4-(a*x+atan(q/p))/2)
 --R                                                     Type: Expression Integer
 --E
 
---S 157
+--S 163
 cc:=aa-bb
 --R
 --R   (3)
@@ -2222,10 +2290,50 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
+--S 164
+dd:=normalize cc
+--R
+--R   (4)
+--R                                                                  +-------+
+--R               6      2 5      3 4      4 3      5 2     6     7  | 2    2
+--R       (- 32p q  - 16p q  - 48p q  - 20p q  - 18p q  - 5p q - p )\|q  + p
+--R     + 
+--R            7      2 6      3 5      4 4      5 3      6 2     7     8
+--R       32p q  + 16p q  + 64p q  + 28p q  + 38p q  + 13p q  + 6p q + p
+--R  /
+--R                8          7         2 6        3 5         4 4        5 3
+--R           64a q  + 32a p q  + 144a p q  + 64a p q  + 104a p q  + 38a p q
+--R         + 
+--R                6 2       7       8
+--R           25a p q  + 6a p q + a p
+--R      *
+--R          +-------+
+--R          | 2    2
+--R         \|q  + p
+--R     + 
+--R              9          8         2 7        3 6         4 5        5 4
+--R       - 64a q  - 32a p q  - 176a p q  - 80a p q  - 168a p q  - 66a p q
+--R     + 
+--R              6 3        7 2       8       9
+--R       - 63a p q  - 19a p q  - 7a p q - a p
+--R                                                     Type: Expression Integer
+--E
+
+--S 165
+ee:=ratDenom dd
+--R
+--R            +-------+
+--R            | 2    2     2    2
+--R        - q\|q  + p   - q  - p
+--R   (5)  -----------------------
+--R                  2      3
+--R             a p q  + a p
+--R                                                     Type: Expression Integer
+--E
 
 )clear all
 
---S 158
+--S 166
 aa:=integrate(1/(p*sin(a*x)+q*cos(a*x)-sqrt(p^2+q^2)),x)
 --R 
 --R
@@ -2258,7 +2366,7 @@ aa:=integrate(1/(p*sin(a*x)+q*cos(a*x)-sqrt(p^2+q^2)),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 159
+--S 167
 bb:=-1/(a*sqrt(p^2+q^2))*tan(%pi/4+(a*x+atan(q/p))/2)
 --R
 --R                    q
@@ -2273,7 +2381,7 @@ bb:=-1/(a*sqrt(p^2+q^2))*tan(%pi/4+(a*x+atan(q/p))/2)
 --R                                                     Type: Expression Integer
 --E
 
---S 160    14:422 Axiom cannot simplify this expression
+--S 168
 cc:=aa-bb
 --R
 --R   (3)
@@ -2335,6 +2443,47 @@ cc:=aa-bb
 --R       - 38a p q  - 6a p q
 --R                                                     Type: Expression Integer
 --E
+
+--S 169
+dd:=normalize cc
+--R
+--R   (4)
+--R                                                                  +-------+
+--R               6      2 5      3 4      4 3      5 2     6     7  | 2    2
+--R       (- 32p q  + 16p q  - 48p q  + 20p q  - 18p q  + 5p q - p )\|q  + p
+--R     + 
+--R              7      2 6      3 5      4 4      5 3      6 2     7     8
+--R       - 32p q  + 16p q  - 64p q  + 28p q  - 38p q  + 13p q  - 6p q + p
+--R  /
+--R                8          7         2 6        3 5         4 4        5 3
+--R           64a q  - 32a p q  + 144a p q  - 64a p q  + 104a p q  - 38a p q
+--R         + 
+--R                6 2       7       8
+--R           25a p q  - 6a p q + a p
+--R      *
+--R          +-------+
+--R          | 2    2
+--R         \|q  + p
+--R     + 
+--R            9          8         2 7        3 6         4 5        5 4
+--R       64a q  - 32a p q  + 176a p q  - 80a p q  + 168a p q  - 66a p q
+--R     + 
+--R            6 3        7 2       8       9
+--R       63a p q  - 19a p q  + 7a p q - a p
+--R                                                     Type: Expression Integer
+--E
+
+--S 170    14:422 Schaums and Axiom differ by a constant
+ee:=ratDenom dd
+--R
+--R          +-------+
+--R          | 2    2     2    2
+--R        q\|q  + p   - q  - p
+--R   (5)  ---------------------
+--R                 2      3
+--R            a p q  + a p
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.423~~~~~$\displaystyle
@@ -2345,7 +2494,7 @@ $$
 <<*>>=
 )clear all
 
---S 161
+--S 171
 aa:=integrate(1/(p^2*sin(a*x)^2+q^2*cos(a*x)^2),x)
 --R 
 --R
@@ -2359,7 +2508,7 @@ aa:=integrate(1/(p^2*sin(a*x)^2+q^2*cos(a*x)^2),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 162
+--S 172
 bb:=1/(a*p*q)*atan((p*tan(a*x))/q)
 --R
 --R             p tan(a x)
@@ -2370,7 +2519,7 @@ bb:=1/(a*p*q)*atan((p*tan(a*x))/q)
 --R                                                     Type: Expression Integer
 --E
 
---S 163    14:423 Axiom cannot simplify this expressions
+--S 173
 cc:=aa-bb
 --R
 --R   (3)
@@ -2388,6 +2537,13 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
+--S 174    14:423 Schaums and Axiom agree
+dd:=normalize cc
+--R
+--R   (4)  0
+--R                                                     Type: Expression Integer
+--E
+
 
 @
 
@@ -2399,7 +2555,7 @@ $$
 <<*>>=
 )clear all
 
---S 164
+--S 175
 aa:=integrate(1/(p^2*sin(a*x)^2-q^2*cos(a*x)^2),x)
 --R 
 --R
@@ -2411,7 +2567,7 @@ aa:=integrate(1/(p^2*sin(a*x)^2-q^2*cos(a*x)^2),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 165
+--S 176
 bb:=1/(2*a*p*q)*log((p*tan(a*x)-q)/(p*tan(a*x)+q))
 --R
 --R            p tan(a x) - q
@@ -2422,7 +2578,7 @@ bb:=1/(2*a*p*q)*log((p*tan(a*x)-q)/(p*tan(a*x)+q))
 --R                                                     Type: Expression Integer
 --E 
 
---S 166
+--S 177
 cc:=aa-bb
 --R
 --R   (3)
@@ -2438,7 +2594,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 167
+--S 178
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -2447,7 +2603,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 168
+--S 179
 dd:=tanrule cc
 --R
 --R   (5)
@@ -2463,7 +2619,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 169
+--S 180
 ee:=expandLog dd
 --R
 --R        log(p sin(a x) + q cos(a x)) - log(- p sin(a x) - q cos(a x))
@@ -2472,7 +2628,7 @@ ee:=expandLog dd
 --R                                                     Type: Expression Integer
 --E
 
---S 170    14:424 Schaums and Axiom differ by a constant
+--S 181    14:424 Schaums and Axiom differ by a constant
 ff:=complexNormalize ee
 --R
 --R        log(- 1)
@@ -2500,7 +2656,7 @@ $$
 <<*>>=
 )clear all
 
---S 171    14:425 Axiom cannot compute this integral
+--S 182    14:425 Axiom cannot compute this integral
 aa:=integrate(sin(a*x)^m*cos(a*x)^n,x)
 --R 
 --R
@@ -2534,7 +2690,7 @@ $$
 <<*>>=
 )clear all
 
---S 172    14:426 Axiom cannot compute this integral
+--S 183    14:426 Axiom cannot compute this integral
 aa:=integrate(sin(a*x)^m/cos(a*x)^n,x)
 --R 
 --R
@@ -2569,7 +2725,7 @@ $$
 <<*>>=
 )clear all
 
---S 173    14:427 Axiom cannot compute this integral
+--S 184    14:427 Axiom cannot compute this integral
 aa:=integrate(cos(a*x)^m/sin(a*x)^n,x)
 --R 
 --R
@@ -2600,7 +2756,7 @@ $$
 <<*>>=
 )clear all
 
---S 174    14:428 Axiom cannot compute this integral
+--S 185    14:428 Axiom cannot compute this integral
 aa:=integrate(1/(sin(a*x)^m*cos(a*x)^n),x)
 --R 
 --R

\start
Date: Mon, 05 May 2008 09:43:39 +0200
From: Ralf Hemmecke
To: Bill Page
Subject: Re: Am I posing this solve problem wrong?

On 05/05/2008 05:46 AM, Bill Page wrote:
> On Sun, May 4, 2008 at 10:23 PM, C Y wrote:
>> --- Bill Page wrote:
>>
>>> I guess you need to be a little more explicit about the variables:
>> Ah.  Thanks Bill.  I wonder if this is the desired default behavior?

Cliff, I guess, you asked for the result you got. Bill has just shown 
you how to get what you actually had in mind.

> Well, Axiom is a strongly typed system so specifying the main
> variables of a multivariate polynomial with coefficients from some
> other ring is not entirely unexpected.

Right. Now look at Cliff's original expression.

(1) -> E1 := x2*D12+(y-y1)2*C12 - C12*D12
(1) ->
          2  2      2         2 2     2 2     2  2
   (1)  C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1
                          Type: Polynomial Integer

Without further information, Axiom puts it into the domain 
Polynomial(Integer). *Don't* think that this type represents a 
polynomial in x and y with C1 and D1 being in the coefficient domain.
None of these variables is a distinguised one. If you now say

solve(E1=0,y)

then before looking at the result, think of what would *you* return.
Maybe you are asking for an expression for y. But, hey, that is of 
course not the only thing that you could have asked for. Suppose, I 
consider the above input expression as an element in R[y]] where the 
coefficient domain R is Z[C1,D1,y1,x]. And I would like

   solve(E1=0,y)

to stand for "find a (or several) z \in R such that E1[y<--z]=0" where 
E1[y<--z] is my (fancy) notation for substitution of y by z in E1.

Now, if Axiom had given you

                +----------+                 +----------+
                |   2     2                  |   2     2
             D1\|- x  + C1   + C1 y1    - D1\|- x  + C1   + C1 y1
    (2)  [y= -----------------------,y= -------------------------]
                        C1                          C1
                                 Type: List Equation Expression Integer

that would even be wrong, since your intention was to get elements of R.
Having types, Axiom should actually allow you to specify what you want.

   R:=MPOLY([C1,D1,y1,x],Integer)
   P:=MPOLY([y],R)
   E1: P := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2
   solve(E1=0,y)@List(R))

Unfortunately, that doesn't work (yet), but I would expect it to work in 
an ideal AXIOM.

\start
Date: 05 May 2008 13:37:33 +0200
From: Martin Rubey
To: Bill Page
Subject: MathAction book links

Dear Bill,

I was having some problems getting a copy of the axiom book for a colleague.

On Frontpage:

"Axiom Book" directs me to http://www.lulu.com/content/190827, which says that
the book costs 12$ to download and says that Tim Daly is its author.  I guess
it's not the axiom book.  And asking for money for a tutorial is, in my
opinion, not encouraging.

Download get's me to

http://axiom-wiki.newsynthesis.org/Mirrors?go=/public/book2.pdf&it=Axiom+Book

but here none of the two links (Europe and US) works for me and Konqueror
3.5.5.

I do not know how to correct this, unfortunately.

\start
Date: Mon, 5 May 2008 13:51:58 +0200
From: Bertfried Fauser
To: Martin Rubey
Subject: Re: MathAction book links

Hi Martin,

AFAIK the AXIOM book ships with the code? So when you have a working
AXIOM, you should just have the book in ../src/doc as bookvol1.pdf

Is that what you wanted?
Ciao
BF.

On Mon, May 5, 2008 at 1:37 PM, Martin Rubey wrote:
> Dear Bill,
>
>  I was having some problems getting a copy of the axiom book for a colleague.
>
>  On Frontpage:
>
>  "Axiom Book" directs me to http://www.lulu.com/content/190827, which says that
>  the book costs 12$ to download and says that Tim Daly is its author.  I guess
>  it's not the axiom book.  And asking for money for a tutorial is, in my
>  opinion, not encouraging.
>
>  Download get's me to
>
>  http://axiom-wiki.newsynthesis.org/Mirrors?go=/public/book2.pdf&it=Axiom+Book
>
>  but here none of the two links (Europe and US) works for me and Konqueror
>  3.5.5.
>
>  I do not know how to correct this, unfortunately.
>

\start
Date: 05 May 2008 13:59:21 +0200
From: Martin Rubey
To: Bertfried Fauser
Subject: Re: MathAction book links

Bertfried Fauser writes:

> Hi Martin,
> 
> AFAIK the AXIOM book ships with the code? So when you have a working
> AXIOM, you should just have the book in ../src/doc as bookvol1.pdf

well, FriCAS in fact doesn't, although in my opinion it should.

> Is that what you wanted?

Apart from that, no: personally I know where to get the book from, but the
newbie clicking on "book" on the FrontPage will give up immediately, I believe.

So, what I want is that the links on FrontPage link to the right places and
work :-)

\start
Date: Mon, 5 May 2008 10:03:05 -0400
From: Bill Page
To: Ralf Hemmecke
Subject: Re: Am I posing this solve problem wrong?

On Mon, May 5, 2008 at 3:43 AM, Ralf Hemmecke wrote:
> ...
> Having types, Axiom should actually allow you to specify what you want.
>
>  R:=MPOLY([C1,D1,y1,x],Integer)
>  P:=MPOLY([y],R)
>  E1: P := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2
>  solve(E1=0,y)@List(R))
>
> Unfortunately, that doesn't work (yet), but I would expect it to work in an
> ideal AXIOM.
>

I do not think this can work exactly like this since the solution
cannot be expressed in R. You need Expression in order to include
kernels involving 'sqrt'. Or did you have something else in mind?

Inspite of that, could you explain a little more about how you think
the ideal AXIOM should work? It seems to me that the way it works now
is rather complex and is a consequence of several interacting factors
such a coercion rules that heuristically start with the most specify
type (i.e. a polynomial type) using coercion to expand the range of
possibilities.  This is affected in a non-trivial and not so easily
predicted manner by the exports exports from the underlying types.
This is built into the Axiom interpreter in a rather deep way. Is
there a different way this could work that might produce less surprise
(and frustration) on the part of the user?

\start
Date: Mon, 5 May 2008 10:11:02 -0400
From: Bill Page
To: Martin Rubey
Subject: Re: MathAction book links

On Mon, May 5, 2008 at 7:37 AM, Martin Rubey wrote:
> Dear Bill,
>
> I was having some problems getting a copy of the axiom book for a colleague.
>
> On Frontpage:
>
> "Axiom Book" directs me to http://www.lulu.com/content/190827, which says
>  that the book costs 12$ to download and says that Tim Daly is its author.
>  I guess it's not the axiom book.  And asking for money for a tutorial is, in
>  my opinion, not encouraging.
>

I agree that it seems inconsistent. Please feel free to change this.

> Download get's me to
>
> http://axiom-wiki.newsynthesis.org/Mirrors?go=/public/book2.pdf&it=Axiom+Book
>
> but here none of the two links (Europe and US) works for me and Konqueror
> 3.5.5.
>
> I do not know how to correct this, unfortunately.
>

This link works for me in both Microsoft Explorer and in Firefox on
Windows and Linux. Perhaps this a problem with Konqueror? Do you see
any problem with the HTML code that is generated for the download
page?

\start
Date: Mon, 05 May 2008 16:59:08 +0200
From: Ralf Hemmecke
To: Bill Page
Subject: re: MathAction book links

Works for me too (also in Konqueror 3.5.5).

http://axiom-wiki.newsynthesis.org/public/book2.pdf

The link
http://axiom.risc.uni-linz.ac.at/public/book2.pdf
cannot currently work since Bill and me are in the process of setting up 
axiom.risc again with newer software. Maybe we should temporarily remove 
the "Continue Download (Europe)" link until the setup is finished?

(Bill, try to edit the page. Click on "edit", then "Preview". In the 
preview window the buttons come with

?" class="hover-red">

in front. Any idea, why? I don't dare to save anything.

Ralf

On 05/05/2008 04:11 PM, Bill Page wrote:
> On Mon, May 5, 2008 at 7:37 AM, Martin Rubey wrote:
>> Dear Bill,
>>
>> I was having some problems getting a copy of the axiom book for a colleague.
>>
>> On Frontpage:
>>
>> "Axiom Book" directs me to http://www.lulu.com/content/190827, which says
>>  that the book costs 12$ to download and says that Tim Daly is its author.
>>  I guess it's not the axiom book.  And asking for money for a tutorial is, in
>>  my opinion, not encouraging.
>>
> 
> I agree that it seems inconsistent. Please feel free to change this.
> 
>> Download get's me to
>>
>> http://axiom-wiki.newsynthesis.org/Mirrors?go=/public/book2.pdf&it=Axiom+Book
>>
>> but here none of the two links (Europe and US) works for me and Konqueror
>> 3.5.5.
>>
>> I do not know how to correct this, unfortunately.
>>
> 
> This link works for me in both Microsoft Explorer and in Firefox on
> Windows and Linux. Perhaps this a problem with Konqueror? Do you see
> any problem with the HTML code that is generated for the download
> page?

\start
Date: Mon, 5 May 2008 12:20:08 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: MathAction book links

>I was having some problems getting a copy of the axiom book for a colleague.
>
>On Frontpage:
>
>"Axiom Book" directs me to http://www.lulu.com/content/190827, which says that
>the book costs 12$ to download and says that Tim Daly is its author.  I guess
>it's not the axiom book.  And asking for money for a tutorial is, in my
>opinion, not encouraging.
>
>Download get's me to
>
>http://axiom-wiki.newsynthesis.org/Mirrors?go=/public/book2.pdf&it=Axiom+Book
>
>but here none of the two links (Europe and US) works for me and Konqueror
>3.5.5.
>
>I do not know how to correct this, unfortunately.

Jenks book: http://axiom.axiom-developer.org/axiom-website/book.pdf
Daly book:  http://axiom.axiom-developer.org/axiom-website/bookvol1.pdf

The tutorial book is available from lulu.com because course instructors
will not teach a course without (a) a paper copy of the book and 
(b) an ISBN number. However, the sources for the book are part of
every Axiom distribution and the pdfs are available online.

\start
Date: 05 May 2008 17:12:00 +0200
From: Martin Rubey
To: Bill Page
Subject: Re: MathAction book links

Bill Page writes:

> On Mon, May 5, 2008 at 7:37 AM, Martin Rubey wrote:
> > Dear Bill,
> >
> > I was having some problems getting a copy of the axiom book for a colleague.
> >
> > On Frontpage:
> >
> > "Axiom Book" directs me to http://www.lulu.com/content/190827, which says
> >  that the book costs 12$ to download and says that Tim Daly is its author.
> >  I guess it's not the axiom book.  And asking for money for a tutorial is, in
> >  my opinion, not encouraging.
> >
> 
> I agree that it seems inconsistent. Please feel free to change this.

I removed the link.  But the question is: what does
http://www.lulu.com/content/190827 really contain?

> > Download get's me to
> >
> > http://axiom-wiki.newsynthesis.org/Mirrors?go=/public/book2.pdf&it=Axiom+Book
> >
> > but here none of the two links (Europe and US) works for me and Konqueror
> > 3.5.5.
> >
> > I do not know how to correct this, unfortunately.

> This link works for me in both Microsoft Explorer and in Firefox on Windows
> and Linux. Perhaps this a problem with Konqueror? Do you see any problem with
> the HTML code that is generated for the download page?

I guess the code in question is the following:

<form action="mirrors">
<a href="http://axiom-wiki.newsynthesis.org/public/book2.pdf" class="hover-red">
<input type="button" name="Continue" value="Continue Download (USA)" class="hover-red"
onclick='window.location.href ="<a href="http://axiom-wiki.newsynthesis.org/public/book2.pdf">http://axiom-wiki.newsynthesis.org/public/book2.pdf</a>";' /></a>
<a href="http://axiom.risc.uni-linz.ac.at/public/book2.pdf" class="hover-red">
<input type="button" name="Continue" value="Continue Download (Europe)" class="hover-blue"
onclick='window.location.href ="<a href="http://axiom.risc.uni-linz.ac.at/public/book2.pdf">http://axiom.risc.uni-linz.ac.at/public/book2.pdf</a>";' /></a>
<a href="/public/donate.html" class="hover-red">
<input type="button" name="Donate" value="Donate Funds" class="hover-red"
onclick='window.location.href ="/public/book2.pdf";'/></a>
</form>

Interestingly, when I click "Donate", download begins immediately (even in
Konqueror).

\start
Date: Mon, 5 May 2008 12:32:35 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: MathAction book links
Cc: Bertfried Fauser

>Apart from that, no: personally I know where to get the book from, but the
>newbie clicking on "book" on the FrontPage will give up immediately, I believe.
>
>So, what I want is that the links on FrontPage link to the right places and
>work :-)

Done. See <http://axiom.axiom-developer.org>

\start
Date: 05 May 2008 17:19:43 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: MathAction book links
Cc: Bertfried Fauser

Tim Daly writes:

> >Apart from that, no: personally I know where to get the book from,
> >but the newbie clicking on "book" on the FrontPage will give up
> >immediately, I believe.  So, what I want is that the links on
> >FrontPage link to the right places and work :-)
 
> Done. See <http://axiom.axiom-developer.org>

You are being extremely helpful.  Many thanks.

\start
Date: Mon, 05 May 2008 17:48:26 +0200
From: Ralf Hemmecke
To: Bill Page
Subject: Re: Am I posing this solve problem wrong?

On 05/05/2008 04:03 PM, Bill Page wrote:
> On Mon, May 5, 2008 at 3:43 AM, Ralf Hemmecke wrote:
>> ...
>> Having types, Axiom should actually allow you to specify what you want.
>>
>>  R:=MPOLY([C1,D1,y1,x],Integer)
>>  P:=MPOLY([y],R)
>>  E1: P := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2
>>  solve(E1=0,y)@List(R))
>>
>> Unfortunately, that doesn't work (yet), but I would expect it to work in an
>> ideal AXIOM.
>>
> 
> I do not think this can work exactly like this since the solution
> cannot be expressed in R.

I refer again to what I wrote in
http://lists.gnu.org/archive/html/axiom-developer/2008-05/msg00022.html

--BEGIN quote
Suppose, I consider the above input expression as an element in R[y]] 
where the coefficient domain R is Z[C1,D1,y1,x]. And I would like

   solve(E1=0,y)

to stand for "find a (or several) z \in R such that E1[y<--z]=0" where 
E1[y<--z] is my (fancy) notation for substitution of y by z in E1.
--END quote

I have a polynomial E1 in R[y] and I am looking for those z \in R which 
make this (univariate) Polynomial vanish. If there are no such z \in R 
then Axiom should return an empty list (or empty set).

> You need Expression in order to include
> kernels involving 'sqrt'.

I am not looking for the most general expression.

> Or did you have something else in mind?

Yep. I was looking for solutions that live in R.

> Inspite of that, could you explain a little more about how you think
> the ideal AXIOM should work? It seems to me that the way it works now
> is rather complex and is a consequence of several interacting factors
> such a coercion rules that heuristically start with the most specify
> type (i.e. a polynomial type) using coercion to expand the range of
> possibilities.  This is affected in a non-trivial and not so easily
> predicted manner by the exports exports from the underlying types.
> This is built into the Axiom interpreter in a rather deep way. Is
> there a different way this could work that might produce less surprise
> (and frustration) on the part of the user?

Ideally, I would like to tell "solve" where it should look for 
solutions. Consider the simple equation.

   x + 1 = 0

What does "solve for x" actually mean? It is ambiguous.
I would like to say

   solve(x+1=0, x)$Set(PositiveInteger)
   solve(x+1=0, x)$Set(Integer)

(or similar) and get different results.

Of course, now one could say, that one first computes the most general 
expression for the result. And then filters out results that one is not 
interested in.

So solve polynomials over the complex numbers and filter out all real 
solutions, if you are only interested in real solutions.
That's a simple case.

But I guess, there are cases where one would simply switch to another 
(maybe faster) algorithm if it were known at input time that some of the 
results are not needed anyway. Why should one bother to waste 
computation time if the result of that computation is thrown away 
immediately afterwards? Imagine one has given a polynomial (of high 
degree) with integer coefficients and looks only for integer solutions?
Root isolation can stop if the interval is less than 1 since either 
there is exactly one solution or none in this interval. (Maybe not the 
best example to demonstrate what I mean.)

\start
Date: Mon, 5 May 2008 11:53:34 -0400
From: Bill Page
To: Martin Rubey
Subject: Re: MathAction book links

On Mon, May 5, 2008 at 11:12 AM, Martin Rubey wrote:
> ...
> Bill Page wrote:
>> This link works for me in both Microsoft Explorer and in Firefox on
>> Windows and Linux. Perhaps this a problem with Konqueror? Do
>> you see any problem with the HTML code that is generated for the
>> download page?
>
> I guess the code in question is the following:
>
> <form action="mirrors">
> <a href="http://axiom-wiki.newsynthesis.org/public/book2.pdf" class="hover-red">
> <input type="button" name="Continue" value="Continue Download (USA)" class="hover-red"
> onclick='window.location.href ="<a href="http://axiom-wiki.newsynthesis.org/public/book2.pdf">http://axiom-wiki.newsynthesis.org/public/book2.pdf</a>";' /></a>
> <a href="http://axiom.risc.uni-linz.ac.at/public/book2.pdf" class="hover-red">
> <input type="button" name="Continue" value="Continue Download (Europe)" class="hover-blue"
> onclick='window.location.href ="<a href="http://axiom.risc.uni-linz.ac.at/public/book2.pdf">http://axiom.risc.uni-linz.ac.at/public/book2.pdf</a>";' /></a>
> <a href="/public/donate.html" class="hover-red">
> <input type="button" name="Donate" value="Donate Funds" class="hover-red"
> onclick='window.location.href ="/public/book2.pdf";'/></a>
> </form>
>
> Interestingly, when I click "Donate", download begins immediately (even in
> Konqueror).
>

This HTML code is definitely screwed up. It also appears this way when
I view the source in FireFox. Inspite of that it does appear to do the
"right thing" in FireFox.

This javascript is wrong:

  onclick='window.location.href ="<a
href="http://axiom.risc.uni-linz.ac.at/public/book2.pdf">http://axiom.risc.uni-linz.ac.at/public/book2.pdf</a>";'

It should be:

  onclick='window.location.href
="http://axiom.risc.uni-linz.ac.at/public/book2.pdf";'

Similarly, there should be no "onclick" in the donate button. It
should not download the book. When you click on
Donate you are supposed to end up on this page:

http://axiom-wiki.newsynthesis.org/public/donate.html

Something is going wrong in the generation of the HTML code from the
Zope DTML template. I will investigate and let you know when I have
corrected the problem.

\start
Date: Mon, 5 May 2008 12:57:03 -0400
From: Bill Page
To: Ralf Hemmecke
Subject: Re: Am I posing this solve problem wrong?

On Mon, May 5, 2008 at 11:48 AM, Ralf Hemmecke wrote:
> On 05/05/2008 04:03 PM, Bill Page wrote:
>>
>> On Mon, May 5, 2008 at 3:43 AM, Ralf Hemmecke wrote:
>>>
>>> ...
>>> Having types, Axiom should actually allow you to specify what you want.
>>>
>>>  R:=MPOLY([C1,D1,y1,x],Integer)
>>>  P:=MPOLY([y],R)
>>>  E1: P := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2
>>>  solve(E1=0,y)@List(R))
>>>
>>> Unfortunately, that doesn't work (yet), but I would expect it to work in
>>> an ideal AXIOM.
>>>
>>
>> I do not think this can work exactly like this since the solution
>> cannot be expressed in R.
>
> I refer again to what I wrote in
> http://lists.gnu.org/archive/html/axiom-developer/2008-05/msg00022.html
>
> --BEGIN quote
> Suppose, I consider the above input expression as an element in R[y]]
> where the coefficient domain R is Z[C1,D1,y1,x]. And I would like
>
>  solve(E1=0,y)
>
> to stand for "find a (or several) z \in R such that E1[y<--z]=0" where
> E1[y<--z] is my (fancy) notation for substitution of y by z in E1.
> --END quote
>
> I have a polynomial E1 in R[y] and I am looking for those z \in R which
> make this (univariate) Polynomial vanish. If there are no such z \in R
> then Axiom should return an empty list (or empty set).
>

Ok, so this is some other form of 'solve' not like those already
available in Axiom? Maybe it is something like
'solveLinearPolynomialEquation' in SUP?

>> You need Expression in order to include
>> kernels involving 'sqrt'.
>
> I am not looking for the most general expression.

Ok. But I thought that was the intention of this thread.

>
>> Or did you have something else in mind?
>
> Yep. I was looking for solutions that live in R.
>

Ok. A different problem, I think.

>> Inspite of that, could you explain a little more about how you
>> think the ideal AXIOM should work? It seems to me that the way
>> it works now is rather complex and is a consequence of several
>> interacting factors such a coercion rules that heuristically start
>> with the most specify type (i.e. a polynomial type) using coercion
>> to expand the range of possibilities.  This is affected in a non-trivial
>> and not so easily predicted manner by the exports exports from
>> the underlying types. This is built into the Axiom interpreter in a
>> rather deep way. Is there a different way this could work that might
>> produce less surprise (and frustration) on the part of the user?
>
> Ideally, I would like to tell "solve" where it should look for solutions.

Remember that there is not just one "solve" but rather many different
such operations and one job of the interpreter is to decide which one.

> Consider the simple equation.
>
>  x + 1 = 0
>
> What does "solve for x" actually mean? It is ambiguous.
> I would like to say
>
>  solve(x+1=0, x)$Set(PositiveInteger)
>  solve(x+1=0, x)$Set(Integer)
>
> (or similar) and get different results.
>

Well as I said above, by design of the interpreter what actually
happens is a consequence of the algorithm that is used to select the
appropriate "solve" operation. If I say nothing else, then the
interpreter says:

(1) -> x+1 = 0

   (1)  x + 1= 0
                                            Type: Equation Polynomial Integer

So this is what is uses to begin the process of finding an appropriate
version of "solve".

(2) -> solve(x+1=0,x)

   (2)  [x= - 1]
                              Type: List Equation Fraction Polynomial Integer


> Of course, now one could say, that one first computes the most
> general expression for the result. And then filters out results that
> one is not interested in.
>

No, I don't think that is the algorithm that is acutally used.

> So solve polynomials over the complex numbers and filter out all
> real solutions, if you are only interested in real solutions.
> That's a simple case.
>
> But I guess, there are cases where one would simply switch to another
> (maybe faster) algorithm if it were known at input time that some of the
> results are not needed anyway. Why should one bother to waste
> computation time if the result of that computation is thrown away
> immediately afterwards? Imagine one has given a polynomial (of high
> degree) with integer coefficients and looks only for integer solutions?
> Root isolation can stop if the interval is less than 1 since either there
> is exactly one solution or none in this interval. (Maybe not the best
> example to demonstrate what I mean.)
>

I think that in Axiom somehow this must be specified by specifying the
appropriate types.

\start
Date: Mon, 05 May 2008 12:44:36 -0700
From: Arthur Ralfs
To: Bill Page
Subject: Axiom book xhtml+mathml version

With the recent concern about book links I checked the xhtml+mathml version
on your wiki and noticed that you have an old version.  The most recent 
version
is broken down into sections rather than chapters, has better 
navigation, and includes
some fixes.  Did you prefer the chapter version?  If so I need to 
reconstruct it
from the section version.  I posted the section version at one time, 
probably on the
old wiki.

\start
Date: Mon, 05 May 2008 23:31:16 +0200
From: Ralf Hemmecke
To: Bill Page
Subject: Re: Am I posing this solve problem wrong?

On 05/05/2008 06:57 PM, Bill Page wrote:
> On Mon, May 5, 2008 at 11:48 AM, Ralf Hemmecke wrote:
>> On 05/05/2008 04:03 PM, Bill Page wrote:
>>> On Mon, May 5, 2008 at 3:43 AM, Ralf Hemmecke wrote:
>>>> ...
>>>> Having types, Axiom should actually allow you to specify what you want.
>>>>
>>>>  R:=MPOLY([C1,D1,y1,x],Integer)
>>>>  P:=MPOLY([y],R)
>>>>  E1: P := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2
>>>>  solve(E1=0,y)@List(R))
>>>>
>>>> Unfortunately, that doesn't work (yet), but I would expect it to work in
>>>> an ideal AXIOM.
>>>>
>>> I do not think this can work exactly like this since the solution
>>> cannot be expressed in R.
>> I refer again to what I wrote in
>> http://lists.gnu.org/archive/html/axiom-developer/2008-05/msg00022.html
>>
>> --BEGIN quote
>> Suppose, I consider the above input expression as an element in R[y]]
>> where the coefficient domain R is Z[C1,D1,y1,x]. And I would like
>>
>>  solve(E1=0,y)
>>
>> to stand for "find a (or several) z \in R such that E1[y<--z]=0" where
>> E1[y<--z] is my (fancy) notation for substitution of y by z in E1.
>> --END quote
>>
>> I have a polynomial E1 in R[y] and I am looking for those z \in R which
>> make this (univariate) Polynomial vanish. If there are no such z \in R
>> then Axiom should return an empty list (or empty set).
>>
> 
> Ok, so this is some other form of 'solve' not like those already
> available in Axiom? Maybe it is something like
> 'solveLinearPolynomialEquation' in SUP?

I don't think that I meant that. But anyway, I am sure that nobody 
remembers that name when he wants to find a y such that E1=0.

>>> You need Expression in order to include
>>> kernels involving 'sqrt'.
>> I am not looking for the most general expression.
> 
> Ok. But I thought that was the intention of this thread.

Hmm, the "Subject" does not say anything that "solve" should always 
return the most general solution. If it is the general opinion that a 
function with name "solve" should always return the most general 
solution, I should rather be quiet.

>>> Or did you have something else in mind?
>> Yep. I was looking for solutions that live in R.

> Ok. A different problem, I think.

It depends. Cliff did not say where he expects the result to live.

>>> Inspite of that, could you explain a little more about how you
>>> think the ideal AXIOM should work? It seems to me that the way
>>> it works now is rather complex and is a consequence of several
>>> interacting factors such a coercion rules that heuristically start
>>> with the most specify type (i.e. a polynomial type) using coercion
>>> to expand the range of possibilities.  This is affected in a non-trivial
>>> and not so easily predicted manner by the exports exports from
>>> the underlying types. This is built into the Axiom interpreter in a
>>> rather deep way. Is there a different way this could work that might
>>> produce less surprise (and frustration) on the part of the user?
>> Ideally, I would like to tell "solve" where it should look for solutions.
> 
> Remember that there is not just one "solve" but rather many different
> such operations and one job of the interpreter is to decide which one.
> 
>> Consider the simple equation.
>>
>>  x + 1 = 0
>>
>> What does "solve for x" actually mean? It is ambiguous.
>> I would like to say
>>
>>  solve(x+1=0, x)$Set(PositiveInteger)
>>  solve(x+1=0, x)$Set(Integer)
>>
>> (or similar) and get different results.

Ooops, I should have written "@Set(...)" above, because I wanted to 
specify the result type. But maybe, it would even be better to give it 
as an argument like

   solve(x+1=0, x, PositiveInteger)

or so.

> Well as I said above, by design of the interpreter what actually
> happens is a consequence of the algorithm that is used to select the
> appropriate "solve" operation. If I say nothing else, then the
> interpreter says:
> 
> (1) -> x+1 = 0
> 
>    (1)  x + 1= 0
>                                             Type: Equation Polynomial Integer

> So this is what is uses to begin the process of finding an appropriate
> version of "solve".

> (2) -> solve(x+1=0,x)
> 
>    (2)  [x= - 1]
>                               Type: List Equation Fraction Polynomial Integer

I know that it is not the most simple task for the interpreter to find 
out what the user actually wanted, but you asked my for an ideal AXIOM.

\start
Date: Mon, 5 May 2008 21:46:11 -0500
From: Tim Daly
To: list
Subject: 20080505.01.tpd.patch (CATS Schaums-Axiom post-mortem fixes)

More agreement between Schaums and Axiom
======================================================================
diff --git a/changelog b/changelog
index 0a7317c..366d13f 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,6 @@
+20080505 tpd src/input/schaum23.input post-mortem fixes
+20080505 tpd src/input/schaum22.input post-mortem fixes
+20080505 tpd src/input/schaum21.input post-mortem fixes
 20080504 tpd src/input/schaum19.input post-mortem fixes
 20080504 tpd src/input/schaum18.input post-mortem fixes
 20080502 tpd src/input/schaum17.input post-mortem fixes
diff --git a/src/input/schaum21.input.pamphlet b/src/input/schaum21.input.pamphlet
index 4d6a8be..2c24de5 100644
--- a/src/input/schaum21.input.pamphlet
+++ b/src/input/schaum21.input.pamphlet
@@ -614,7 +614,7 @@ bb:=(p*x)/(p^2+q^2)-q/(a*(p^2+q^2))*log(p*sin(a*x)+q*cos(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 47     14:449 Axiom cannot simplify this expression
+--S 47
 cc:=aa-bb
 --R
 --R   (3)
@@ -631,6 +631,61 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
+--S 48
+sindblrule:=rule(sin(2*a) == 2*sin(a)*cos(a))
+--R
+--R   (4)  sin(2a) == 2cos(a)sin(a)
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E
+
+--S 49
+dd:=sindblrule cc
+--R
+--R   (5)
+--R       2q log(p sin(a x) + q cos(a x))
+--R     + 
+--R                2p cos(a x)sin(a x) + q cos(2a x) + q                2
+--R       - 2q log(-------------------------------------) + q log(-------------)
+--R                            cos(2a x) + 1                      cos(2a x) + 1
+--R  /
+--R         2       2
+--R     2a q  + 2a p
+--R                                                     Type: Expression Integer
+--E
+
+--S 50
+cosdblrule:=rule(cos(2*a) == 2*cos(a)^2-1)
+--R
+--R                          2
+--R   (6)  cos(2a) == 2cos(a)  - 1
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E
+
+--S 51
+ee:=cosdblrule dd
+--R
+--R   (7)
+--R                                                p sin(a x) + q cos(a x)
+--R       2q log(p sin(a x) + q cos(a x)) - 2q log(-----------------------)
+--R                                                        cos(a x)
+--R     + 
+--R                 1
+--R       q log(---------)
+--R                     2
+--R             cos(a x)
+--R  /
+--R         2       2
+--R     2a q  + 2a p
+--R                                                     Type: Expression Integer
+--E
+
+--S 52     14:449 Schaums and Axiom agree
+ff:=expandLog %
+--R
+--R   (8)  0
+--R                                                     Type: Expression Integer
+--E
+
 @
 
 \section{\cite{1}:14.450~~~~~$\displaystyle
@@ -641,7 +696,7 @@ $$
 <<*>>=
 )clear all
 
---S 48     14:450 Axiom cannot compute this integral
+--S 53     14:450 Axiom cannot compute this integral
 aa:=integrate(cot(a*x)^n,x)
 --R 
 --R
diff --git a/src/input/schaum22.input.pamphlet b/src/input/schaum22.input.pamphlet
index 173338a..42fad96 100644
--- a/src/input/schaum22.input.pamphlet
+++ b/src/input/schaum22.input.pamphlet
@@ -418,7 +418,7 @@ bb:=sec(a*x)^n/(n*a)
 --R                                                     Type: Expression Integer
 --E
 
---S 31     14:454 Axiom cannot simplify this expression
+--S 31
 cc:=aa-bb
 --R
 --R                    1
@@ -432,6 +432,13 @@ cc:=aa-bb
 --R                      a n
 --R                                                     Type: Expression Integer
 --E
+
+--S 32     14:454 Schaums and Axiom agree
+normalize cc
+--R
+--R   (4)  0
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.455~~~~~$\displaystyle
@@ -442,7 +449,7 @@ $$
 <<*>>=
 )clear all
 
---S 32
+--S 33
 aa:=integrate(1/sec(a*x),x)
 --R 
 --R
@@ -452,7 +459,7 @@ aa:=integrate(1/sec(a*x),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 33
+--S 34
 bb:=sin(a*x)/a
 --R
 --R        sin(a x)
@@ -461,7 +468,7 @@ bb:=sin(a*x)/a
 --R                                                     Type: Expression Integer
 --E 
 
---S 34     14:455 Schaums and Axiom agree
+--S 35     14:455 Schaums and Axiom agree
 cc:=aa-bb
 --R
 --R   (3)  0
@@ -478,7 +485,7 @@ $$
 <<*>>=
 )clear all
 
---S 35     14:456 Axiom cannot compute this integral
+--S 36     14:456 Axiom cannot compute this integral
 aa:=integrate(x*sec(a*x),x)
 --R 
 --R
@@ -499,7 +506,7 @@ $$
 <<*>>=
 )clear all
 
---S 36     14:457 Axiom cannot compute this integral
+--S 37     14:457 Axiom cannot compute this integral
 aa:=integrate(sec(a*x)/x,x)
 --R 
 --R
@@ -519,7 +526,7 @@ $$
 <<*>>=
 )clear all
 
---S 37
+--S 38
 aa:=integrate(x*sec(a*x)^2,x)
 --R 
 --R
@@ -533,7 +540,7 @@ aa:=integrate(x*sec(a*x)^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 38
+--S 39
 bb:=x/a*tan(a*x)+1/a^2*log(cos(a*x))
 --R
 --R        log(cos(a x)) + a x tan(a x)
@@ -543,7 +550,7 @@ bb:=x/a*tan(a*x)+1/a^2*log(cos(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 39
+--S 40
 cc:=aa-bb
 --R
 --R   (3)
@@ -560,7 +567,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 40
+--S 41
 tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R
 --R                  sin(a)
@@ -569,7 +576,7 @@ tanrule:=rule(tan(a) == sin(a)/cos(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 41
+--S 42
 dd:=tanrule cc
 --R
 --R                                    2                 2cos(a x)
@@ -581,7 +588,7 @@ dd:=tanrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 42     14:458 Schaums and Axiom differ by a constant
+--S 43     14:458 Schaums and Axiom differ by a constant
 ee:=expandLog dd
 --R
 --R        - log(2) + log(- 2)
@@ -600,7 +607,7 @@ $$
 <<*>>=
 )clear all
 
---S 43
+--S 44
 aa:=integrate(1/(q+p*sec(a*x)),x)
 --R 
 --R
@@ -626,7 +633,7 @@ aa:=integrate(1/(q+p*sec(a*x)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 44
+--S 45
 t1:=integrate(1/(p+q*cos(a*x)),x)
 --R
 --R   (2)
@@ -651,7 +658,7 @@ t1:=integrate(1/(p+q*cos(a*x)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 45
+--S 46
 bb1:=x/q-p/q*t1.1
 --R
 --R   (3)
@@ -667,7 +674,7 @@ bb1:=x/q-p/q*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 46
+--S 47
 bb2:=x/q-p/q*t1.2
 --R
 --R                             +---------+
@@ -682,7 +689,7 @@ bb2:=x/q-p/q*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 47
+--S 48
 cc1:=aa.1-bb1
 --R
 --R   (5)
@@ -704,7 +711,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 48
+--S 49
 cc2:=aa.1-bb2
 --R
 --R   (6)
@@ -726,7 +733,7 @@ cc2:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 49
+--S 50
 cc3:=aa.2-bb1
 --R
 --R   (7)
@@ -748,7 +755,7 @@ cc3:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 50     14:459 Schaums and Axiom agree
+--S 51     14:459 Schaums and Axiom agree
 cc4:=aa.2-bb2
 --R
 --R   (8)  0
@@ -765,7 +772,7 @@ $$
 <<*>>=
 )clear all
 
---S 51     14:460 Axiom cannot compute this integral
+--S 52     14:460 Axiom cannot compute this integral
 aa:=integrate(sec(a*x)^n,x)
 --R 
 --R
diff --git a/src/input/schaum23.input.pamphlet b/src/input/schaum23.input.pamphlet
index d285a80..96485e2 100644
--- a/src/input/schaum23.input.pamphlet
+++ b/src/input/schaum23.input.pamphlet
@@ -436,7 +436,7 @@ bb:=-csc(a*x)^n/(n*a)
 --R                                                     Type: Expression Integer
 --E
 
---S 34     14:464 Axiom cannot simplify this expression
+--S 34
 cc:=aa-bb
 --R
 --R                          1
@@ -450,6 +450,13 @@ cc:=aa-bb
 --R                          a n
 --R                                                     Type: Expression Integer
 --E
+
+--S 35     14:464 Schaums and Axiom agree
+normalize cc
+--R
+--R   (4)  0
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.465~~~~~$\displaystyle
@@ -460,7 +467,7 @@ $$
 <<*>>=
 )clear all
 
---S 35
+--S 36
 aa:=integrate(1/csc(a*x),x)
 --R 
 --R
@@ -470,7 +477,7 @@ aa:=integrate(1/csc(a*x),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 36
+--S 37
 bb:=-cos(a*x)/a
 --R
 --R          cos(a x)
@@ -479,7 +486,7 @@ bb:=-cos(a*x)/a
 --R                                                     Type: Expression Integer
 --E 
 
---S 37     14:465 Schaums and Axiom agree
+--S 38     14:465 Schaums and Axiom agree
 cc:=aa-bb
 --R
 --R   (3)  0
@@ -496,7 +503,7 @@ $$
 <<*>>=
 )clear all
 
---S 38     14:466 Axiom cannot compute this integral
+--S 39     14:466 Axiom cannot compute this integral
 aa:=integrate(x*csc(a*x),x)
 --R 
 --R
@@ -517,7 +524,7 @@ $$
 <<*>>=
 )clear all
 
---S 39     14:467 Axiom cannot compute this integral
+--S 40     14:467 Axiom cannot compute this integral
 aa:=integrate(csc(a*x)/x,x)
 --R 
 --R
@@ -537,7 +544,7 @@ $$
 <<*>>=
 )clear all
 
---S 40
+--S 41
 aa:=integrate(x*csc(a*x)^2,x)
 --R 
 --R
@@ -550,7 +557,7 @@ aa:=integrate(x*csc(a*x)^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 41
+--S 42
 bb:=-(x*cot(a*x))/a+1/a^2*log(sin(a*x))
 --R
 --R        log(sin(a x)) - a x cot(a x)
@@ -560,7 +567,7 @@ bb:=-(x*cot(a*x))/a+1/a^2*log(sin(a*x))
 --R                                                     Type: Expression Integer
 --E
 
---S 42
+--S 43
 cc:=aa-bb
 --R
 --R   (3)
@@ -577,7 +584,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 43
+--S 44
 cotrule:=rule(cot(a) == cos(a)/sin(a))
 --R
 --R                  cos(a)
@@ -586,7 +593,7 @@ cotrule:=rule(cot(a) == cos(a)/sin(a))
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 44
+--S 45
 dd:=cotrule cc
 --R
 --R                                sin(a x)                2
@@ -598,7 +605,7 @@ dd:=cotrule cc
 --R                                                     Type: Expression Integer
 --E
 
---S 45     14:468 Schaums and Axiom differ by a constant
+--S 46     14:468 Schaums and Axiom differ by a constant
 ee:=expandLog dd
 --R
 --R          log(2)
@@ -617,7 +624,7 @@ $$
 <<*>>=
 )clear all
 
---S 46
+--S 47
 aa:=integrate(1/(q+p*csc(a*x)),x)
 --R 
 --R
@@ -656,7 +663,7 @@ aa:=integrate(1/(q+p*csc(a*x)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E 
 
---S 47
+--S 48
 t1:=integrate(1/(p+q*sin(a*x)),x)
 --R
 --R   (2)
@@ -688,7 +695,7 @@ t1:=integrate(1/(p+q*sin(a*x)),x)
 --R                                     Type: Union(List Expression Integer,...)
 --E
 
---S 48
+--S 49
 bb1:=x/q-p/q*t1.1
 --R
 --R   (3)
@@ -715,7 +722,7 @@ bb1:=x/q-p/q*t1.1
 --R                                                     Type: Expression Integer
 --E
 
---S 49
+--S 50
 bb2:=x/q-p/q*t1.2
 --R
 --R                                              +---------+
@@ -731,7 +738,7 @@ bb2:=x/q-p/q*t1.2
 --R                                                     Type: Expression Integer
 --E
 
---S 50
+--S 51
 cc1:=aa.1-bb1
 --R
 --R   (5)
@@ -765,7 +772,7 @@ cc1:=aa.1-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 51
+--S 52
 cc2:=aa.2-bb1
 --R
 --R   (6)
@@ -796,7 +803,7 @@ cc2:=aa.2-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 52
+--S 53
 cc3:=aa.1-bb2
 --R
 --R   (7)
@@ -827,7 +834,7 @@ cc3:=aa.1-bb2
 --R                                                     Type: Expression Integer
 --E
 
---S 53     14:469 Schaums and Axiom agree
+--S 54     14:469 Schaums and Axiom agree
 cc4:=aa.2-bb2
 --R
 --R   (8)  0
@@ -844,7 +851,7 @@ $$
 <<*>>=
 )clear all
 
---S 54     14:470 Axiom cannot compute this integral
+--S 55     14:470 Axiom cannot compute this integral
 aa:=integrate(csc(a*x)^n,x)
 --R 
 --R

\start
Date: Mon, 5 May 2008 22:29:57 -0500
From: Tim Daly
To: list
Subject: 20080505.02.tpd.patch (CATS Schams-Axiom branch cut analysis)

Here we try to understand why we cannot find a simplification
that makes these two expressions equal. If the expressions were
equal then we could use them as functions, substitute floating
point values and expect the same numeric results. So we try that here.

The result is that for some of the inverse trigonometric functions,
the branch cut chosen by Schaums and the branch cut chosen by Axiom
differ outside the range of the chosen branch cut. Thus they are not
the same function and cannot be simplified to a constant difference.
Within the range of the cut, Schaums and Axiom agree.

This is not a bug, but a choice that needs to be made, since the
inverse functions are multi-valued.

Tim


========================================================================
diff --git a/changelog b/changelog
index 366d13f..fcc6814 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080505 tpd src/input/schaum24.input branch-cut analysis
 20080505 tpd src/input/schaum23.input post-mortem fixes
 20080505 tpd src/input/schaum22.input post-mortem fixes
 20080505 tpd src/input/schaum21.input post-mortem fixes
diff --git a/src/input/schaum24.input.pamphlet b/src/input/schaum24.input.pamphlet
index 24b4527..71f28d5 100644
--- a/src/input/schaum24.input.pamphlet
+++ b/src/input/schaum24.input.pamphlet
@@ -95,7 +95,7 @@ bb:=(x^2/2-a^2/4)*asin(x/a)+(x*sqrt(a^2-x^2))/4
 --R                                                     Type: Expression Integer
 --E
 
---S 6      14:472 Axiom cannot simplify this expression
+--S 6
 cc:=aa-bb
 --R
 --R                            +---------+
@@ -108,6 +108,145 @@ cc:=aa-bb
 --R                                   8
 --R                                                     Type: Expression Integer
 --E
+
+@
+Here we try to understand why we cannot find a simplification
+that makes these two expressions equal. If the expressions were
+equal then we could use them as functions, substitute floating
+point values and expect the same numeric results. So we try that here.
+<<*>>=
+)clear all
+@
+This is the initial integrand.
+<<*>>=
+--S 7
+t1:=x*asin(x/a)
+--R
+--R               x
+--R   (1)  x asin(-)
+--R               a
+--R                                                     Type: Expression Integer
+--E
+@
+This is the integral result provided by Axiom.
+<<*>>=
+--S 8
+t2:=integrate(t1,x)
+--R
+--R                            +---------+
+--R                            |   2    2        +---------+
+--R             2    2      2x\|- x  + a         |   2    2
+--R        (- 2x  + a )atan(--------------) + 2x\|- x  + a
+--R                              2    2
+--R                            2x  - a
+--R   (2)  -------------------------------------------------
+--R                                8
+--R                                          Type: Union(Expression Integer,...)
+--E
+@
+This is the derivative of the integral computed by Axiom
+<<*>>=
+--S 9
+t3:=D(t2,x)
+--R
+--R                    +---------+
+--R                    |   2    2
+--R                 2x\|- x  + a
+--R          x atan(--------------)
+--R                      2    2
+--R                    2x  - a
+--R   (3)  - ----------------------
+--R                     2
+--R                                                     Type: Expression Integer
+--E
+@
+This is the integral result provided by Schaums
+<<*>>=
+--S 10
+t4:=(x^2/2-a^2/4)*asin(x/a)+(x*sqrt(a^2-x^2))/4
+--R
+--R          +---------+
+--R          |   2    2       2    2      x
+--R        x\|- x  + a   + (2x  - a )asin(-)
+--R                                       a
+--R   (4)  ---------------------------------
+--R                        4
+--R                                                     Type: Expression Integer
+--E
+@
+This is the derivative of the integral of the original function
+according to Schaums.
+<<*>>=
+--S 11
+t5:=D(t4,x)
+--R
+--R   (5)
+--R                                           +---------+
+--R                 +---------+               |   2    2               +---------+
+--R              x  |   2    2        2    3  |- x  + a        2    2  |   2    2
+--R   (4a x asin(-)\|- x  + a   - 2a x  + a ) |---------  + (2x  - a )\|- x  + a
+--R              a                            |     2
+--R                                          \|    a
+--R   ----------------------------------------------------------------------------
+--R                                           +---------+
+--R                               +---------+ |   2    2
+--R                               |   2    2  |- x  + a
+--R                            4a\|- x  + a   |---------
+--R                                           |     2
+--R                                          \|    a
+--R                                                     Type: Expression Integer
+--E
+@
+Now we create a function for computing the integrand's values.
+<<*>>=
+--S 12
+f:=makeFloatFunction(t1,x,a)
+--I   Compiling function %BF with type (DoubleFloat,DoubleFloat) -> 
+--R      DoubleFloat 
+--R
+--I   (6)  theMap(MKBCFUNC;binaryFunction;SM;2!0,120)
+--R                             Type: ((DoubleFloat,DoubleFloat) -> DoubleFloat)
+--E
+@
+Now we create a function for computing Axiom's values for its integrand.
+<<*>>=
+--S 13
+axiom:=makeFloatFunction(t3,x,a)
+--I   Compiling function %BJ with type (DoubleFloat,DoubleFloat) -> 
+--R      DoubleFloat 
+--R
+--I   (7)  theMap(MKBCFUNC;binaryFunction;SM;2!0,996)
+--R                             Type: ((DoubleFloat,DoubleFloat) -> DoubleFloat)
+--E
+@
+Now we create a function for computing Schams values for its integrand.
+<<*>>=
+--S 14
+schaums:=makeFloatFunction(t5,x,a)
+--I   Compiling function %BK with type (DoubleFloat,DoubleFloat) -> 
+--R      DoubleFloat 
+--R
+--I   (8)  theMap(MKBCFUNC;binaryFunction;SM;2!0,62)
+--R                             Type: ((DoubleFloat,DoubleFloat) -> DoubleFloat)
+--E
+@
+And now we compute the floating point values for each function
+and compare the results. As can be clearly seen, the Axiom result
+lies on a different branch cut from the Schaums result and the
+functions are only equal within the branch cut range. This is a
+generic problem with all of the inverse functions that are
+multi-valued.
+<<*>>=
+--S 15     14:472 Schaums and Axiom agree (modulo branch cuts)
+[ [f(i::Float,i::Float+1.0::Float)::Float,axiom(i::Float,i::Float+1.0::Float)::Float,schaums(i::Float,i::Float+1.0::Float)::Float] for i in 1..4]
+--R
+--R   (9)
+--R   [[0.5235987755 9829892668,0.5235987755 9829892668,0.5235987755 9829881566],
+--R    [1.4594553124 539326738,1.4594553124 539326738,1.4594553124 539324518],
+--R    [2.5441862369 444430136,- 2.1682027434 402466604,2.5441862369 444430136],
+--R    [3.7091808720 064496363,- 2.5740044351 731374839,3.7091808720 064500804]]
+--R                                                        Type: List List Float
+--E
 @
 
 \section{\cite{1}:14.473~~~~~$\displaystyle
@@ -118,7 +257,7 @@ $$
 <<*>>=
 )clear all
 
---S 7
+--S 16
 aa:=integrate(x^2*asin(x/a),x)
 --R 
 --R
@@ -133,7 +272,7 @@ aa:=integrate(x^2*asin(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 8
+--S 17
 bb:=x^3/3*asin(x/a)+((x^2+2*a^2)*sqrt(a^2-x^2))/9
 --R
 --R                   +---------+
@@ -145,7 +284,7 @@ bb:=x^3/3*asin(x/a)+((x^2+2*a^2)*sqrt(a^2-x^2))/9
 --R                                                     Type: Expression Integer
 --E
 
---S 9      14:473 Axiom cannot simplify this expression
+--S 18     14:473 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R                    +---------+
@@ -170,7 +309,7 @@ $$
 <<*>>=
 )clear all
 
---S 10     14:474 Axiom cannot compute this integral
+--S 19     14:474 Axiom cannot compute this integral
 aa:=integrate(asin(x/a)/x,x)
 --R 
 --R
@@ -192,7 +331,7 @@ $$
 <<*>>=
 )clear all
 
---S 11
+--S 20
 aa:=integrate(asin(x/a)/x^2,x)
 --R 
 --R
@@ -208,7 +347,7 @@ aa:=integrate(asin(x/a)/x^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 12
+--S 21
 bb:=-asin(x/a)/x-1/a*log((a+sqrt(a^2-x^2))/x)
 --R
 --R                 +---------+
@@ -221,7 +360,7 @@ bb:=-asin(x/a)/x-1/a*log((a+sqrt(a^2-x^2))/x)
 --R                                                     Type: Expression Integer
 --E
 
---S 13     14:475 Axiom cannot simplify this expression
+--S 22     14:475 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R   (3)
@@ -249,7 +388,7 @@ $$
 <<*>>=
 )clear all
 
---S 14
+--S 23
 aa:=integrate(asin(x/a)^2,x)
 --R 
 --R
@@ -264,7 +403,7 @@ aa:=integrate(asin(x/a)^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 15
+--S 24
 bb:=x*asin(x/a)^2-2*x+2*sqrt(a^2-x^2)*asin(x/a)
 --R
 --R                 +---------+
@@ -274,7 +413,7 @@ bb:=x*asin(x/a)^2-2*x+2*sqrt(a^2-x^2)*asin(x/a)
 --R                                                     Type: Expression Integer
 --E
 
---S 16     14:476 Axiom cannot simplify this expression
+--S 25     14:476 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R   (3)
@@ -303,7 +442,7 @@ $$
 <<*>>=
 )clear all
 
---S 17
+--S 26
 aa:=integrate(acos(x/a),x)
 --R 
 --R
@@ -318,7 +457,7 @@ aa:=integrate(acos(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 18
+--S 27
 bb:=x*acos(x/a)-sqrt(a^2-x^2)
 --R
 --R           +---------+
@@ -328,7 +467,7 @@ bb:=x*acos(x/a)-sqrt(a^2-x^2)
 --R                                                     Type: Expression Integer
 --E
 
---S 19     14:477 Axiom cannot simplify this expression
+--S 28     14:477 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R                  +---------+
@@ -352,7 +491,7 @@ $$
 <<*>>=
 )clear all
 
---S 20
+--S 29
 aa:=integrate(x*acos(x/a),x)
 --R 
 --R
@@ -367,7 +506,7 @@ aa:=integrate(x*acos(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 21
+--S 30
 bb:=(x^2/2-a^2/4)*acos(x/a)-(x*sqrt(a^2-x^2))/4
 --R
 --R            +---------+
@@ -379,7 +518,7 @@ bb:=(x^2/2-a^2/4)*acos(x/a)-(x*sqrt(a^2-x^2))/4
 --R                                                     Type: Expression Integer
 --E
 
---S 22     14:478 Axiom cannot simplify this expression
+--S 31     14:478 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R                          +---------+
@@ -402,7 +541,7 @@ $$
 <<*>>=
 )clear all
 
---S 23
+--S 32
 aa:=integrate(x^2*acos(x/a),x)
 --R 
 --R
@@ -417,7 +556,7 @@ aa:=integrate(x^2*acos(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 24
+--S 33
 bb:=x^3/3*acos(x/a)-((x^2+2*a^2)*sqrt(a^2-x^2))/9
 --R
 --R                     +---------+
@@ -429,7 +568,7 @@ bb:=x^3/3*acos(x/a)-((x^2+2*a^2)*sqrt(a^2-x^2))/9
 --R                                                     Type: Expression Integer
 --E
 
---S 25     14:479 Axiom cannot simplify this expression
+--S 34     14:479 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R                  +---------+
@@ -452,7 +591,7 @@ $$
 <<*>>=
 )clear all
 
---S 26     14:480 Axiom cannot compute this integral
+--S 35     14:480 Axiom cannot compute this integral
 aa:=integrate(acos(x/a)/x,x)
 --R 
 --R
@@ -473,7 +612,7 @@ $$
 <<*>>=
 )clear all
 
---S 27
+--S 36
 aa:=integrate(acos(x/a)/x^2,x)
 --R 
 --R
@@ -489,7 +628,7 @@ aa:=integrate(acos(x/a)/x^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 28
+--S 37
 bb:=-acos(x/a)/x+1/a*log((a+sqrt(a^2-x^2))/x)
 --R
 --R               +---------+
@@ -502,7 +641,7 @@ bb:=-acos(x/a)/x+1/a*log((a+sqrt(a^2-x^2))/x)
 --R                                                     Type: Expression Integer
 --E
 
---S 29     14:481 Axiom cannot simplify this expression
+--S 38     14:481 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R   (3)
@@ -530,7 +669,7 @@ $$
 <<*>>=
 )clear all
 
---S 30
+--S 39
 aa:=integrate(acos(x/a)^2,x)
 --R 
 --R
@@ -545,7 +684,7 @@ aa:=integrate(acos(x/a)^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 31
+--S 40
 bb:=x*acos(x/a)^2-2*x-2*sqrt(a^2-x^2)*acos(x/a)
 --R
 --R                   +---------+
@@ -555,7 +694,7 @@ bb:=x*acos(x/a)^2-2*x-2*sqrt(a^2-x^2)*acos(x/a)
 --R                                                     Type: Expression Integer
 --E
 
---S 32     14:482 Axiom cannot simplify this expression
+--S 41     14:482 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R   (3)
@@ -584,7 +723,7 @@ $$
 <<*>>=
 )clear all
 
---S 33
+--S 42
 aa:=integrate(atan(x/a),x)
 --R 
 --R
@@ -597,7 +736,7 @@ aa:=integrate(atan(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 34
+--S 43
 bb:=x*atan(x/a)-a/2*log(x^2+a^2)
 --R
 --R                 2    2            x
@@ -608,7 +747,7 @@ bb:=x*atan(x/a)-a/2*log(x^2+a^2)
 --R                                                     Type: Expression Integer
 --E
 
---S 35
+--S 44
 cc:=aa-bb
 --R
 --R                  x             2a x
@@ -620,7 +759,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 36
+--S 45
 atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R
 --R                            - x + %i
@@ -631,7 +770,7 @@ atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
 --E
 
---S 37
+--S 46
 dd:=atanrule cc
 --R
 --R                  2              2
@@ -644,7 +783,7 @@ dd:=atanrule cc
 --R                                             Type: Expression Complex Integer
 --E
 
---S 38     14:483 SCHAUMS AND AXIOM DIFFER? (BRANCH CUTS?)
+--S 47     14:483 SCHAUMS AND AXIOM DIFFER? (BRANCH CUTS?)
 ee:=expandLog dd
 --R
 --R        %i x log(- 1)
@@ -662,7 +801,7 @@ $$
 <<*>>=
 )clear all
 
---S 39     14:484 Axiom cannot compute this integral
+--S 48     14:484 Axiom cannot compute this integral
 aa:=integrate(x*tan(x/a),x)
 --R 
 --R
@@ -682,7 +821,7 @@ $$
 <<*>>=
 )clear all
 
---S 40
+--S 49
 aa:=integrate(x^2*atan(x/a),x)
 --R 
 --R
@@ -695,7 +834,7 @@ aa:=integrate(x^2*atan(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 41
+--S 50
 bb:=x^3/2*atan(x/a)-(a*x^2)/6+a^3/6*log(x^2+a^2)
 --R
 --R         3     2    2      3     x       2
@@ -706,7 +845,7 @@ bb:=x^3/2*atan(x/a)-(a*x^2)/6+a^3/6*log(x^2+a^2)
 --R                                                     Type: Expression Integer
 --E
 
---S 42     14:485 Axiom cannot simplify this expression
+--S 51     14:485 Axiom cannot simplify this expression
 cc:=aa-bb
 --R
 --R            3     x     3       2a x
@@ -727,7 +866,7 @@ $$
 <<*>>=
 )clear all
 
---S 43     14:486 Axiom cannot compute this integral
+--S 52     14:486 Axiom cannot compute this integral
 aa:=integrate(atan(x/a)/x,x)
 --R 
 --R
@@ -749,7 +888,7 @@ $$
 <<*>>=
 )clear all
 
---S 44
+--S 53
 aa:=integrate(atan(x/a)/x^2,x)
 --R 
 --R
@@ -762,7 +901,7 @@ aa:=integrate(atan(x/a)/x^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 45
+--S 54
 bb:=-1/x*atan(x/a)-1/(2*a)*log((x^2+a^2)/x^2)
 --R
 --R                 2    2
@@ -775,7 +914,7 @@ bb:=-1/x*atan(x/a)-1/(2*a)*log((x^2+a^2)/x^2)
 --R                                                     Type: Expression Integer
 --E
 
---S 46
+--S 55
 cc:=aa-bb
 --R
 --R   (3)
@@ -789,7 +928,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 47
+--S 56
 atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R
 --R                            - x + %i
@@ -800,7 +939,7 @@ atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
 --E
 
---S 48
+--S 57
 dd:=atanrule cc
 --R
 --R   (5)
@@ -820,7 +959,7 @@ dd:=atanrule cc
 --R                                             Type: Expression Complex Integer
 --E
 
---S 49     14:487 SCHAUMS AND AXIOM DIFFER? (branch cuts?)
+--S 58     14:487 SCHAUMS AND AXIOM DIFFER? (branch cuts?)
 ee:=expandLog dd
 --R
 --R          %i log(- 1)
@@ -838,7 +977,7 @@ $$
 <<*>>=
 )clear all
 
---S 50
+--S 59
 aa:=integrate(acot(x/a),x)
 --R 
 --R
@@ -851,7 +990,7 @@ aa:=integrate(acot(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 51
+--S 60
 bb:=x*acot(x/a)+a/2*log(x^2+a^2)
 --R
 --R               2    2            x
@@ -862,7 +1001,7 @@ bb:=x*acot(x/a)+a/2*log(x^2+a^2)
 --R                                                     Type: Expression Integer
 --E 
 
---S 52
+--S 61
 cc:=aa-bb
 --R
 --R                 2a x             x
@@ -874,7 +1013,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 53
+--S 62
 atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R
 --R                            - x + %i
@@ -885,7 +1024,7 @@ atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
 --E
 
---S 54
+--S 63
 dd:=atanrule cc
 --R
 --R                    2              2
@@ -898,7 +1037,7 @@ dd:=atanrule cc
 --R                                             Type: Expression Complex Integer
 --E
 
---S 55
+--S 64
 acotrule:=rule(acot(x) == -%i/2*log((%i*x-1)/(%i*x+1)))
 --R
 --R                            x + %i
@@ -909,7 +1048,7 @@ acotrule:=rule(acot(x) == -%i/2*log((%i*x-1)/(%i*x+1)))
 --R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
 --E
 
---S 56
+--S 65
 ee:=acotrule dd
 --R
 --R                    2              2
@@ -922,7 +1061,7 @@ ee:=acotrule dd
 --R                                             Type: Expression Complex Integer
 --E
 
---S 57     14:488 Axiom and Schaums agree
+--S 66     14:488 Axiom and Schaums agree
 ff:=expandLog %
 --R
 --R   (8)  0
@@ -938,7 +1077,7 @@ $$
 <<*>>=
 )clear all
 
---S 58
+--S 67
 aa:=integrate(x*acot(x/a),x)
 --R 
 --R
@@ -951,7 +1090,7 @@ aa:=integrate(x*acot(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 59
+--S 68
 bb:=1/2*(x^2+a^2)*acot(x/a)+(a*x)/2
 --R
 --R          2    2      x
@@ -962,7 +1101,7 @@ bb:=1/2*(x^2+a^2)*acot(x/a)+(a*x)/2
 --R                                                     Type: Expression Integer
 --E
 
---S 60
+--S 69
 cc:=aa-bb
 --R
 --R          2    2        2a x          2     2      x
@@ -974,7 +1113,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 61
+--S 70
 acotrule:=rule(acot(x) == -%i/2*log((%i*x-1)/(%i*x+1)))
 --R
 --R                            x + %i
@@ -985,7 +1124,7 @@ acotrule:=rule(acot(x) == -%i/2*log((%i*x-1)/(%i*x+1)))
 --R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
 --E
 
---S 62
+--S 71
 dd:=acotrule cc
 --R
 --R             2       2     x + %i a      2    2        2a x
@@ -997,7 +1136,7 @@ dd:=acotrule cc
 --R                                             Type: Expression Complex Integer
 --E
 
---S 63
+--S 72
 atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R
 --R                            - x + %i
@@ -1008,7 +1147,7 @@ atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
 --E
 
---S 64
+--S 73
 ee:=atanrule dd
 --R
 --R   (7)
@@ -1022,7 +1161,7 @@ ee:=atanrule dd
 --R                                             Type: Expression Complex Integer
 --E
 
---S 65     14:489 Axiom and Schaums agree
+--S 74     14:489 Axiom and Schaums agree
 ff:=expandLog ee
 --R
 --R   (8)  0
@@ -1038,7 +1177,7 @@ $$
 <<*>>=
 )clear all
 
---S 66
+--S 75
 aa:=integrate(x^2*acot(x/a),x)
 --R 
 --R
@@ -1051,7 +1190,7 @@ aa:=integrate(x^2*acot(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 67
+--S 76
 bb:=x^3/3*acot(x/a)+(a*x^2)/6-a^3/6*log(x^2+a^2)
 --R
 --R           3     2    2      3     x       2
@@ -1062,7 +1201,7 @@ bb:=x^3/3*acot(x/a)+(a*x^2)/6-a^3/6*log(x^2+a^2)
 --R                                                     Type: Expression Integer
 --E 
 
---S 68
+--S 77
 cc:=aa-bb
 --R
 --R         3       2a x       3     x
@@ -1074,7 +1213,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 69
+--S 78
 atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R
 --R                            - x + %i
@@ -1085,7 +1224,7 @@ atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
 --E
 
---S 70
+--S 79
 dd:=atanrule cc
 --R
 --R                    2              2
@@ -1098,7 +1237,7 @@ dd:=atanrule cc
 --R                                             Type: Expression Complex Integer
 --E
 
---S 71
+--S 80
 acotrule:=rule(acot(x) == -%i/2*log((%i*x-1)/(%i*x+1)))
 --R
 --R                            x + %i
@@ -1109,7 +1248,7 @@ acotrule:=rule(acot(x) == -%i/2*log((%i*x-1)/(%i*x+1)))
 --R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
 --E
 
---S 72
+--S 81
 ee:=acotrule dd
 --R
 --R                    2              2
@@ -1122,7 +1261,7 @@ ee:=acotrule dd
 --R                                             Type: Expression Complex Integer
 --E
 
---S 73     14:490 Axiom and Schaums agree
+--S 82     14:490 Axiom and Schaums agree
 ff:=expandLog ee
 --R
 --R   (8)  0
@@ -1138,7 +1277,7 @@ $$
 <<*>>=
 )clear all
 
---S 74     14:491 Axiom cannot compute this integral
+--S 83     14:491 Axiom cannot compute this integral
 aa:=integrate(acot(x/a)/x,x)
 --R 
 --R
@@ -1159,7 +1298,7 @@ $$
 <<*>>=
 )clear all
 
---S 75
+--S 84
 aa:=integrate(acot(x/a)/x^2,x)
 --R 
 --R
@@ -1172,7 +1311,7 @@ aa:=integrate(acot(x/a)/x^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 76
+--S 85
 bb:=-acot(x/a)/x+1/(2*a)*log((x^2+a^2)/x^2)
 --R
 --R               2    2
@@ -1185,7 +1324,7 @@ bb:=-acot(x/a)/x+1/(2*a)*log((x^2+a^2)/x^2)
 --R                                                     Type: Expression Integer
 --E
 
---S 77
+--S 86
 cc:=aa-bb
 --R
 --R   (3)
@@ -1199,7 +1338,7 @@ cc:=aa-bb
 --R                                                     Type: Expression Integer
 --E
 
---S 78
+--S 87
 acotrule:=rule(acot(x) == -%i/2*log((%i*x-1)/(%i*x+1)))
 --R
 --R                            x + %i
@@ -1210,7 +1349,7 @@ acotrule:=rule(acot(x) == -%i/2*log((%i*x-1)/(%i*x+1)))
 --R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
 --E
 
---S 79
+--S 88
 dd:=acotrule cc
 --R
 --R   (5)
@@ -1229,7 +1368,7 @@ dd:=acotrule cc
 --R                                             Type: Expression Complex Integer
 --E
 
---S 80
+--S 89
 atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R
 --R                            - x + %i
@@ -1240,7 +1379,7 @@ atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R        Type: RewriteRule(Integer,Complex Integer,Expression Complex Integer)
 --E
 
---S 81
+--S 90
 ee:=atanrule dd
 --R
 --R   (7)
@@ -1260,7 +1399,7 @@ ee:=atanrule dd
 --R                                             Type: Expression Complex Integer
 --E
 
---S 82     14:492 Schaums and Axiom agree
+--S 91     14:492 Schaums and Axiom agree
 ff:=expandLog ee
 --R
 --R   (8)  0
@@ -1286,7 +1425,7 @@ $$
 <<*>>=
 )clear all
 
---S 83
+--S 92
 aa:=integrate(asec(x/a),x)
 --R 
 --R
@@ -1308,7 +1447,7 @@ aa:=integrate(asec(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 84
+--S 93
 bb1:=x*asec(x/a)-a*log(x+sqrt(x^2-a^2))
 --R
 --R                 +-------+
@@ -1318,7 +1457,7 @@ bb1:=x*asec(x/a)-a*log(x+sqrt(x^2-a^2))
 --R                                                     Type: Expression Integer
 --E
 
---S 85
+--S 94
 bb2:=x*asec(x/a)+a*log(x+sqrt(x^2-a^2))
 --R
 --R               +-------+
@@ -1328,7 +1467,7 @@ bb2:=x*asec(x/a)+a*log(x+sqrt(x^2-a^2))
 --R                                                     Type: Expression Integer
 --E
 
---S 86
+--S 95
 cc1:=aa-bb1
 --R
 --R   (4)
@@ -1351,7 +1490,7 @@ cc1:=aa-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 87     14:493 Axiom cannot simplify these expressions
+--S 96     14:493 Axiom cannot simplify these expressions
 cc2:=aa-bb2
 --R
 --R   (5)
@@ -1393,7 +1532,7 @@ $$
 <<*>>=
 )clear all
 
---S 88
+--S 97
 aa:=integrate(x*asec(x/a),x)
 --R 
 --R
@@ -1408,7 +1547,7 @@ aa:=integrate(x*asec(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 89
+--S 98
 bb1:=x^2/2*asec(x/a)-(a*sqrt(x^2-a^2))/2
 --R
 --R            +-------+
@@ -1420,7 +1559,7 @@ bb1:=x^2/2*asec(x/a)-(a*sqrt(x^2-a^2))/2
 --R                                                     Type: Expression Integer
 --E
 
---S 90
+--S 99
 bb2:=x^2/2*asec(x/a)+(a*sqrt(x^2-a^2))/2
 --R
 --R          +-------+
@@ -1432,7 +1571,7 @@ bb2:=x^2/2*asec(x/a)+(a*sqrt(x^2-a^2))/2
 --R                                                     Type: Expression Integer
 --E
 
---S 91
+--S 100
 cc1:=aa-bb1
 --R
 --R   (4)
@@ -1447,7 +1586,7 @@ cc1:=aa-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 92     14:494 Axiom cannot simplify these expressions
+--S 101    14:494 Axiom cannot simplify these expressions
 cc2:=aa-bb2
 --R
 --R   (5)
@@ -1488,7 +1627,7 @@ $$
 <<*>>=
 )clear all
 
---S 93
+--S 102
 aa:=integrate(x^2*asec(x/a),x)
 --R 
 --R
@@ -1511,7 +1650,7 @@ aa:=integrate(x^2*asec(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 94
+--S 103
 bb1:=x^3/3*asec(x/a)-(a*x*sqrt(x^2-a^2))/6-a^3/6*log(x+sqrt(x^2-a^2))
 --R
 --R                 +-------+            +-------+
@@ -1523,7 +1662,7 @@ bb1:=x^3/3*asec(x/a)-(a*x*sqrt(x^2-a^2))/6-a^3/6*log(x+sqrt(x^2-a^2))
 --R                                                     Type: Expression Integer
 --E
 
---S 95
+--S 104
 bb2:=x^3/3*asec(x/a)+(a*x*sqrt(x^2-a^2))/6+a^3/6*log(x+sqrt(x^2-a^2))
 --R
 --R               +-------+            +-------+
@@ -1535,7 +1674,7 @@ bb2:=x^3/3*asec(x/a)+(a*x*sqrt(x^2-a^2))/6+a^3/6*log(x+sqrt(x^2-a^2))
 --R                                                     Type: Expression Integer
 --E
 
---S 96
+--S 105
 cc1:=aa-bb1
 --R
 --R   (4)
@@ -1563,7 +1702,7 @@ cc1:=aa-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 97     14:495 Axiom cannot simplify these expressions
+--S 106     14:495 Axiom cannot simplify these expressions
 cc2:=aa-bb2
 --R
 --R   (5)
@@ -1603,7 +1742,7 @@ $$
 <<*>>=
 )clear all
 
---S 98     14:496 Axiom cannot compute this integral
+--S 107    14:496 Axiom cannot compute this integral
 aa:=integrate(asec(x/a)/x,x)
 --R 
 --R
@@ -1634,7 +1773,7 @@ $$
 <<*>>=
 )clear all
 
---S 99
+--S 108
 aa:=integrate(asec(x/a)/x^2,x)
 --R 
 --R
@@ -1650,7 +1789,7 @@ aa:=integrate(asec(x/a)/x^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 100
+--S 109
 bb1:=-asec(x/a)/x+sqrt(x^2-a^2)/(a*x)
 --R
 --R         +-------+
@@ -1662,7 +1801,7 @@ bb1:=-asec(x/a)/x+sqrt(x^2-a^2)/(a*x)
 --R                                                     Type: Expression Integer
 --E
 
---S 101
+--S 110
 bb2:=-asec(x/a)/x-sqrt(x^2-a^2)/(a*x)
 --R
 --R           +-------+
@@ -1674,7 +1813,7 @@ bb2:=-asec(x/a)/x-sqrt(x^2-a^2)/(a*x)
 --R                                                     Type: Expression Integer
 --E
 
---S 102
+--S 111
 cc1:=aa-bb1
 --R
 --R   (4)
@@ -1694,7 +1833,7 @@ cc1:=aa-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 103    14:497 Axiom cannot simplify these expressions
+--S 112    14:497 Axiom cannot simplify these expressions
 cc2:=aa-bb2
 --R
 --R   (5)
@@ -1733,7 +1872,7 @@ $$
 <<*>>=
 )clear all
 
---S 104
+--S 113
 aa:=integrate(acsc(x/a),x)
 --R 
 --R
@@ -1755,7 +1894,7 @@ aa:=integrate(acsc(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 105
+--S 114
 bb1:=x*acsc(x/a)+a*log(x+sqrt(x^2-a^2))
 --R
 --R               +-------+
@@ -1765,7 +1904,7 @@ bb1:=x*acsc(x/a)+a*log(x+sqrt(x^2-a^2))
 --R                                                     Type: Expression Integer
 --E
 
---S 106
+--S 115
 bb2:=x*acsc(x/a)-a*log(x+sqrt(x^2-a^2))
 --R
 --R                 +-------+
@@ -1775,7 +1914,7 @@ bb2:=x*acsc(x/a)-a*log(x+sqrt(x^2-a^2))
 --R                                                     Type: Expression Integer
 --E
 
---S 107
+--S 116
 cc1:=aa-bb1
 --R
 --R   (4)
@@ -1798,7 +1937,7 @@ cc1:=aa-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 108    14:498 Axiom cannot simplify these expressions
+--S 117    14:498 Axiom cannot simplify these expressions
 cc2:=aa-bb2
 --R
 --R   (5)
@@ -1841,7 +1980,7 @@ $$
 <<*>>=
 )clear all
 
---S 109
+--S 118
 aa:=integrate(x*acsc(x/a),x)
 --R 
 --R
@@ -1856,7 +1995,7 @@ aa:=integrate(x*acsc(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 110
+--S 119
 bb1:=x^2/2*acsc(x/a)+(a*sqrt(x^2-a^2))/2
 --R
 --R          +-------+
@@ -1868,7 +2007,7 @@ bb1:=x^2/2*acsc(x/a)+(a*sqrt(x^2-a^2))/2
 --R                                                     Type: Expression Integer
 --E
 
---S 111
+--S 120
 bb2:=x^2/2*acsc(x/a)-(a*sqrt(x^2-a^2))/2
 --R
 --R            +-------+
@@ -1880,7 +2019,7 @@ bb2:=x^2/2*acsc(x/a)-(a*sqrt(x^2-a^2))/2
 --R                                                     Type: Expression Integer
 --E
 
---S 112
+--S 121
 cc1:=aa-bb1
 --R
 --R   (4)
@@ -1895,7 +2034,7 @@ cc1:=aa-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 113    14:499 Axiom cannot simplify these expressions
+--S 122    14:499 Axiom cannot simplify these expressions
 cc2:=aa-bb2
 --R
 --R   (5)
@@ -1936,7 +2075,7 @@ $$
 <<*>>=
 )clear all
 
---S 114
+--S 123
 aa:=integrate(x^2*acsc(x/a),x)
 --R 
 --R
@@ -1959,7 +2098,7 @@ aa:=integrate(x^2*acsc(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 115
+--S 124
 bb1:=x^3/3*acsc(x/a)+(a*x*sqrt(x^2-a^2))/6+a^3/6*log(x+sqrt(x^2-a^2))
 --R
 --R               +-------+            +-------+
@@ -1971,7 +2110,7 @@ bb1:=x^3/3*acsc(x/a)+(a*x*sqrt(x^2-a^2))/6+a^3/6*log(x+sqrt(x^2-a^2))
 --R                                                     Type: Expression Integer
 --E
 
---S 116
+--S 125
 bb2:=x^3/3*acsc(x/a)-(a*x*sqrt(x^2-a^2))/6-a^3/6*log(x+sqrt(x^2-a^2))
 --R
 --R                 +-------+            +-------+
@@ -1983,7 +2122,7 @@ bb2:=x^3/3*acsc(x/a)-(a*x*sqrt(x^2-a^2))/6-a^3/6*log(x+sqrt(x^2-a^2))
 --R                                                     Type: Expression Integer
 --E
 
---S 117
+--S 126
 cc1:=aa-bb1
 --R
 --R   (4)
@@ -2011,7 +2150,7 @@ cc1:=aa-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 118    14:500 Axiom cannot simplify this expression
+--S 127    14:500 Axiom cannot simplify this expression
 cc2:=aa-bb2
 --R
 --R   (5)
@@ -2050,7 +2189,7 @@ $$
 <<*>>=
 )clear all
 
---S 119    14:501 Axiom cannot compute this integral
+--S 128    14:501 Axiom cannot compute this integral
 aa:=integrate(acsc(x/a)/x,x)
 --R 
 --R
@@ -2081,7 +2220,7 @@ $$
 <<*>>=
 )clear all
 
---S 120
+--S 129
 aa:=integrate(acsc(x/a)/x^2,x)
 --R 
 --R
@@ -2097,7 +2236,7 @@ aa:=integrate(acsc(x/a)/x^2,x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 121
+--S 130
 bb1:=-acsc(x/a)/x-sqrt(x^2-a^2)/(a*x)
 --R
 --R           +-------+
@@ -2109,7 +2248,7 @@ bb1:=-acsc(x/a)/x-sqrt(x^2-a^2)/(a*x)
 --R                                                     Type: Expression Integer
 --E
 
---S 122
+--S 131
 bb2:=-acsc(x/a)/x+sqrt(x^2-a^2)/(a*x)
 --R
 --R         +-------+
@@ -2121,7 +2260,7 @@ bb2:=-acsc(x/a)/x+sqrt(x^2-a^2)/(a*x)
 --R                                                     Type: Expression Integer
 --E
 
---S 123
+--S 132
 cc1:=aa-bb1
 --R
 --R   (4)
@@ -2142,7 +2281,7 @@ cc1:=aa-bb1
 --R                                                     Type: Expression Integer
 --E
 
---S 124    14:502 Axiom cannot simplify this expression
+--S 133    14:502 Axiom cannot simplify this expression
 cc2:=aa-bb2
 --R
 --R   (5)
@@ -2172,7 +2311,7 @@ $$
 <<*>>=
 )clear all
 
---S 125    14:503 Axiom cannot compute this integral
+--S 134    14:503 Axiom cannot compute this integral
 aa:=integrate(x^m*asin(x/a),x)
 --R 
 --R
@@ -2192,7 +2331,7 @@ $$
 <<*>>=
 )clear all
 
---S 126    14:504 Axiom cannot compute this integral
+--S 135    14:504 Axiom cannot compute this integral
 aa:=integrate(x^m*acos(x/a),x)
 --R 
 --R
@@ -2218,7 +2357,7 @@ have the same form but are expressed in terms of asin, acos, and acot.
 <<*>>=
 )clear all
 
---S 127
+--S 136
 aa:=integrate(x*m*atan(x/a),x)
 --R 
 --R
@@ -2231,7 +2370,7 @@ aa:=integrate(x*m*atan(x/a),x)
 --R                                          Type: Union(Expression Integer,...)
 --E 
 
---S 128
+--S 137
 t1:=integrate(x^(m+1)/(x^2+a^2),x)
 --E
 @
@@ -2243,7 +2382,7 @@ difference from the original formula.
 So first we generate the derivative:
 <<*>>=
 
---S 129
+--S 138
 bb:=D(aa,x)
 --R
 --R                     2a x
@@ -2257,7 +2396,7 @@ bb:=D(aa,x)
 @
 Then we input the original expression
 <<*>>=
---S 130
+--S 139
 aa1:=x*m*atan(x/a)
 --R
 --R                 x
@@ -2268,7 +2407,7 @@ aa1:=x*m*atan(x/a)
 @
 Now we take their difference
 <<*>>=
---S 131
+--S 140
 dd:=aa1-bb
 --R
 --R                  x               2a x
@@ -2282,7 +2421,7 @@ dd:=aa1-bb
 @
 Now we input the atan transformation
 <<*>>=
---S 132
+--S 141
 atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 --R
 --R                            - x + %i
@@ -2295,7 +2434,7 @@ atanrule:=rule(atan(x) == -%i/2*log((1+%i*x)/(1-%i*x)))
 @
 And apply the transformation to the difference
 <<*>>=
---S 133
+--S 142
 ee:=atanrule dd
 --R
 --R                      2              2
@@ -2310,7 +2449,7 @@ ee:=atanrule dd
 @
 And now we simplify
 <<*>>=
---S 134    14:505 SCHAUMS AND AXIOM DISAGREE? (branch cuts?)
+--S 143    14:505 SCHAUMS AND AXIOM DISAGREE? (branch cuts?)
 ff:=expandLog ee
 --R
 --R          %i m x log(- 1)
@@ -2332,7 +2471,7 @@ $$
 <<*>>=
 )clear all
 
---S 135    14:506 Axiom cannot compute this integral
+--S 144    14:506 Axiom cannot compute this integral
 aa:=integrate(x^m*acot(x/a),x)
 --R 
 --R
@@ -2362,7 +2501,7 @@ $$
 <<*>>=
 )clear all
 
---S 136    14:507 Axiom cannot compute this integral
+--S 145    14:507 Axiom cannot compute this integral
 aa:=integrate(x^m*asec(x/a),x)
 --R 
 --R
@@ -2392,7 +2531,7 @@ $$
 <<*>>=
 )clear all
 
---S 137    14:508 Axiom cannot compute this integral
+--S 146    14:508 Axiom cannot compute this integral
 aa:=integrate(x^m*acsc(x/a),x)
 --R 
 --R

\start
Date: Tue, 06 May 2008 07:42:04 -0400
From: Raymond Rogers
To: list
Subject: Re: 20080505.02.tpd.patch (CATS Schams-Axiom branch cut analysis)

Tim Daly wrote:
> Here we try to understand why we cannot find a simplification
> that makes these two expressions equal. If the expressions were
> equal then we could use them as functions, substitute floating
> point values and expect the same numeric results. So we try that here.
>
> The result is that for some of the inverse trigonometric functions,
> the branch cut chosen by Schaums and the branch cut chosen by Axiom
> differ outside the range of the chosen branch cut. Thus they are not
> the same function and cannot be simplified to a constant difference.
> Within the range of the cut, Schaums and Axiom agree.
>
> This is not a bug, but a choice that needs to be made, since the
> inverse functions are multi-valued.
>
> Tim
>
>   
Yes and no, if Axiom is really to support the future (versus present 
expediency) then the "problem" should be addressed explicitly.  
Providing an array covering the branch cuts together with descriptions 
of the branches?  Asking about the deciding choices (which I find 
annoying but possible)?   Requiring the choices to be made before 
invoking?   But certainly not a hidden irrevocable choice made for the user.
In addition these things need to explicitly documented; something that I 
am sure the Axiom community will do. 
In general I guess the invoking of an multivalued function could 
specialize acos->acos_1,acos_2, etc... to only refer to one inverse 
image region.  For instance acos could, upon some relevant evaluation, 
return
[[domain, [range]],[domain,[range]] as true results and then the user 
could pick and choose the element wanted.  Only a passing thought; 
cumbersome but ......

\start
Date: Tue, 6 May 2008 11:35:24 -0400
From: Bill Page
To: Ralf Hemmecke
Subject: Re: Am I posing this solve problem wrong?

On Mon, May 5, 2008 at 5:31 PM, Ralf Hemmecke wrote:
> ...
>>>
>>> I refer again to what I wrote in
>>> http://lists.gnu.org/archive/html/axiom-developer/2008-05/msg00022.html
>>>
>>> --BEGIN quote
>>> Suppose, I consider the above input expression as an element in R[y]]
>>> where the coefficient domain R is Z[C1,D1,y1,x]. And I would like
>>>
>>>  solve(E1=0,y)
>>>
>>> to stand for "find a (or several) z \in R such that E1[y<--z]=0" where
>>> E1[y<--z] is my (fancy) notation for substitution of y by z in E1.
>>> --END quote
>>>
>>> I have a polynomial E1 in R[y] and I am looking for those z \in R
>>> which make this (univariate) Polynomial vanish. If there are no
>>> such z \in R then Axiom should return an empty list (or empty
>>> set).
>>>
>>
>> Ok, so this is some other form of 'solve' not like those already
>> available in Axiom? Maybe it is something like
>> 'solveLinearPolynomialEquation' in SUP?
>
> I don't think that I meant that. But anyway, I am sure that nobody
> remembers that name when he wants to find a y such that E1=0.
>
>>>> You need Expression in order to include
>>>> kernels involving 'sqrt'.
>>>
>>> I am not looking for the most general expression.
>>
>> Ok. But I thought that was the intention of this thread.
>
> Hmm, the "Subject" does not say anything that "solve" should always
> return the most general solution. If it is the general opinion that a
> function with name "solve" should always return the most general
> solution, I should rather be quiet.
>

I do not know what is the general opinion, but in my opinion all
operations like 'solve' should have a well-defined and fairly simple
relationship to other operations in the same domain.  For example
something like the following should always be true:

    eval(E,solve(E,...))

We should be able to specify the behavior of 'solve' in terms of such
axioms. For example,

(1) -> EQ1:=x+1=0

   (1)  x + 1= 0
                                            Type: Equation Polynomial Integer
(2) -> reduce(_and,[eval(EQ1,s) for s in solve(EQ1)],true)

   (2)  true
                                                                Type: Boolean
(3) -> EQ2:=[x+1=0,y+1=x]

   (3)  [x + 1= 0,y + 1= x]
                                       Type: List Equation Polynomial Integer
(4) -> reduce(_and,concat [map(x+->eval(x,s),EQ2) for s in solve(EQ2)],true)

   (4)  true
                                                                Type: Boolean

And in the case given by Cliff at the start of this thread:

(5) -> E1:EXPR INT := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2

          2  2      2         2 2     2 2     2  2
   (5)  C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1
                                                     Type: Expression Integer
(6) -> reduce(_and,[eval(E1=0,s) for s in solve(E1=0,y)],true)

   (6)  true
                                                                Type: Boolean

>>>> Or did you have something else in mind?
>>>
>>> Yep. I was looking for solutions that live in R.
>
>> Ok. A different problem, I think.
>
> It depends. Cliff did not say where he expects the result to live.
>

Yes, therein lies the problem that the Axiom interpreter attempts to solve.

Without additional information Axiom fails:

(1) -> E3 := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2

          2  2      2         2 2     2 2     2  2
   (1)  C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1
                                                     Type: Polynomial Integer
(2) -> reduce(_and,[eval(E3=0,s) for s in solve(E3=0,y)],true)

   >> Error detected within library code:
   left hand side must be a single kernel

So I would say that Cliff's initial question was appropriate. Axiom
did something that was unexpected to him. 'solve' returned something
that is not consistent with 'eval'.

>>
>>> Consider the simple equation.
>>>
>>>  x + 1 = 0
>>>
>>> What does "solve for x" actually mean? It is ambiguous.
>>> I would like to say
>>>
>>>  solve(x+1=0, x)$Set(PositiveInteger)
>>>  solve(x+1=0, x)$Set(Integer)
>>>
>>> (or similar) and get different results.
>
> Ooops, I should have written "@Set(...)" above, because I wanted to specify
> the result type. But maybe, it would even be better to give it as an
> argument like
>
>  solve(x+1=0, x, PositiveInteger)
>
> or so.
>

No I think your first idea was correct. It should be possible to
specify the desired output in order to aid the function selection
process. Unfortunately the Axiom interpreter still fails to find the
solution in this case:

(1) -> E3 := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2

          2  2      2         2 2     2 2     2  2
   (1)  C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1
                                                     Type: Polynomial Integer
(2) -> solve(E3,y)@List Equation Expression Integer
   There are 20 exposed and 3 unexposed library operations named solve
      having 2 argument(s) but none was determined to be applicable.
      Use HyperDoc Browse, or issue
                              )display op solve
      to learn more about the available operations. Perhaps
      package-calling the operation or using coercions on the arguments
      will allow you to apply the operation.

   Cannot find a definition or applicable library operation named solve
      with argument type(s)
                             Polynomial Integer
                                 Variable y

      Perhaps you should use "@" to indicate the required return type,
      or "$" to specify which version of the function you need.

But of course this works if we give the interpreter enough help...

(2) -> solve(E3::Expression Integer, y)@List Equation Expression Integer

               +----------+                 +----------+
               |   2     2                  |   2     2
            D1\|- x  + C1   + C1 y1    - D1\|- x  + C1   + C1 y1
   (2)  [y= -----------------------,y= -------------------------]
                       C1                          C1
                                       Type: List Equation Expression Integer


>> Well as I said above, by design of the interpreter what actually
>> happens is a consequence of the algorithm that is used to select
>> the appropriate "solve" operation. If I say nothing else, then the
>> interpreter says:
>>
>> (1) -> x+1 = 0
>>
>>   (1)  x + 1= 0
>>                                            Type: Equation Polynomial
>> Integer
>
>> So this is what is uses to begin the process of finding an appropriate
>> version of "solve".
>
>> (2) -> solve(x+1=0,x)
>>
>>   (2)  [x= - 1]
>>                              Type: List Equation Fraction Polynomial
>> Integer
>
> I know that it is not the most simple task for the interpreter to find out
> what the user actually wanted, but you asked my for an ideal AXIOM.
>

Yes, I think this is a worthwhile subject and your comments are quite
appropriate.

It seems to me that like most of Axiom, the Axiom interpreter is built
in a manner which attempts to solve the most general problem rather
than catering to specific requirements or user "whims". The whole
system should be specified by "axiomatically". This applies both to
the underlying system, SPAD compiler, and interpreter as well as the
Axiom library.  I think the idea is to build a tool in which solutions
to specific problems should seem to arise in a natural or even
intuitive manner (once the general design is understood).

I have been thinking specifically about the algorithms that the Axiom
interpreter uses to do type inference and function selection. Some
part of the behaviour is "hard coded" into the interpreter and not
easy to change, but a large part of it depends on interaction with the
design of the Axiom library, i.e. the coercions and other operations
that are exported by exposed domains. It seems to me that in many
cases not enough attention has been paid to "tuning" the Axiom library
so that the Axiom interpreter produces fewer surprises for the new
user.

\start
Date: 06 May 2008 17:43:58 +0200
From: Martin Rubey
To: Bill Page
Subject: Re: Am I posing this solve problem wrong?

Bill Page writes:

> I have been thinking specifically about the algorithms that the Axiom
> interpreter uses to do type inference and function selection. Some part of
> the behaviour is "hard coded" into the interpreter and not easy to change,
> but a large part of it depends on interaction with the design of the Axiom
> library, i.e. the coercions and other operations that are exported by exposed
> domains. It seems to me that in many cases not enough attention has been paid
> to "tuning" the Axiom library so that the Axiom interpreter produces fewer
> surprises for the new user.

Some time ago I posted a question in exactly this direction (something like
"why doesn't HOAGG R export coerce: % -> List R and coerce: List R -> %).

I can only guess that one answer (which I didn't get, but I give myself) is
optimization: coercion done by the library *might* be relatively slow.

However, I'm quite sure it would make a lot of sense to replace the contents of
i-coerce by appropriate definitions in the algebra.

Exploration here is very very welcome -- and in FriCAS also relatively
painless, one only has to keep in mind that changes at this level usually make
complete recompilation of the algebra necessary.

Of course, the insights will be valuable for all three projects.

\start
Date: Tue, 6 May 2008 12:08:23 -0400
From: Bill Page
To: list
Subject: Re: [fricas-devel] Re: Am I posing this solve problem wrong?

On Tue, May 6, 2008 at 11:43 AM, Martin Rubey wrote:
>
> Bill Page writes:
>
>> I have been thinking specifically about the algorithms that the Axiom
>> interpreter uses to do type inference and function selection. Some part of
>> the behavior is "hard coded" into the interpreter and not easy to change,
>> but a large part of it depends on interaction with the design of the Axiom
>> library, i.e. the coercions and other operations that are exported by exposed
>> domains. It seems to me that in many cases not enough attention has been
>> paid to "tuning" the Axiom library so that the Axiom interpreter produces
>> fewer surprises for the new user.
>
> Some time ago I posted a question in exactly this direction (something
> like "why doesn't HOAGG R export
> coerce: % -> List R and coerce: List R -> %).
>
> I can only guess that one answer (which I didn't get, but I give myself)
> is optimization: coercion done by the library *might* be relatively slow.
>

As I said in the previous thread, I think your idea is a good one.

I think you are probably being too generous to the developers. I doubt
that any such consideration of optimization was ever applied. I expect
that the detailed coding in the Axiom interpreter and the coercions
supplied (or not) by the Axiom library are merely artifacts of the
constraints to the original Axiom development process.

> However, I'm quite sure it would make a lot of sense to replace the contents
> of i-coerce by appropriate definitions in the algebra.
>

+1 Yes!

> Exploration here is very very welcome -- and in FriCAS also relatively
> painless, one only has to keep in mind that changes at this level usually
> make complete recompilation of the algebra necessary.
>
> Of course, the insights will be valuable for all three projects.
>

Agreed.

\start
Date: Tue, 06 May 2008 22:33:24 +0200
From: Ralf Hemmecke
To: Bill Page
Subject: Re: Am I posing this solve problem wrong?

> I do not know what is the general opinion, but in my opinion all
> operations like 'solve' should have a well-defined and fairly simple
> relationship to other operations in the same domain.  For example
> something like the following should always be true:
> 
>     eval(E,solve(E,...))                                    (*)

> We should be able to specify the behavior of 'solve' in terms of such
> axioms.

You know that this is a *very* weak condition. Take E to be x^2+1=0 and 
solve returning only the imaginary i (no not -i). Than your condition 
(*) above is true, but solve gave only part of the answer. Now, if I 
want to find all real solutions and E has none, how is that covered in (*)?

> For example,
> 
> (1) -> EQ1:=x+1=0
> 
>    (1)  x + 1= 0
>                                             Type: Equation Polynomial Integer
> (2) -> reduce(_and,[eval(EQ1,s) for s in solve(EQ1)],true)
> 
>    (2)  true

If you use that command for testing, the most bugfree implementation of 
solve would be to *always* return the empty list.

> (3) -> EQ2:=[x+1=0,y+1=x]
> 
>    (3)  [x + 1= 0,y + 1= x]
>                                        Type: List Equation Polynomial Integer
> (4) -> reduce(_and,concat [map(x+->eval(x,s),EQ2) for s in solve(EQ2)],true)
> 
>    (4)  true
>                                                                 Type: Boolean

The axiom from above is getting more and more complicated and still only 
tests half of the properties that one could wish for solve.

>>>>> Or did you have something else in mind?
>>>> Yep. I was looking for solutions that live in R.
>>> Ok. A different problem, I think.
>> It depends. Cliff did not say where he expects the result to live.

> Yes, therein lies the problem that the Axiom interpreter attempts to solve.

You know my attitude. The Axiom interpreter is quite smart, but I would 
rather like to see the information in the library and remove some more 
the burden of guessing from the interpreter. Things that could be made 
precise should live in the library.

>>>> Consider the simple equation.
>>>>
>>>>  x + 1 = 0
>>>>
>>>> What does "solve for x" actually mean? It is ambiguous.
>>>> I would like to say
>>>>
>>>>  solve(x+1=0, x)$Set(PositiveInteger)
>>>>  solve(x+1=0, x)$Set(Integer)
>>>>
>>>> (or similar) and get different results.
>> Ooops, I should have written "@Set(...)" above, because I wanted to specify
>> the result type. But maybe, it would even be better to give it as an
>> argument like
>>
>>  solve(x+1=0, x, PositiveInteger)
>>
>> or so.

> No I think your first idea was correct. It should be possible to
> specify the desired output in order to aid the function selection
> process.

Whether to give more information as an argument or via specifying the 
result type doesn't matter too much now. More important is that a user 
should be able to specify the solution space (ehm, search space).

> Unfortunately the Axiom interpreter still fails to find the
> solution in this case:

I don't think that should be the task of finding the right function.
If there is none appropriate in the library, the interpreter should 
issue some warning and only then start guessing and coercing and 
whatever. But it should be pretty transparent what is actually computed 
until the result appears on screen.

> (1) -> E3 := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2
> 
>           2  2      2         2 2     2 2     2  2
>    (1)  C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1
>                                                      Type: Polynomial Integer
> (2) -> solve(E3,y)@List Equation Expression Integer
>    There are 20 exposed and 3 unexposed library operations named solve
>       having 2 argument(s) but none was determined to be applicable.
>       Use HyperDoc Browse, or issue
>                               )display op solve
>       to learn more about the available operations. Perhaps
>       package-calling the operation or using coercions on the arguments
>       will allow you to apply the operation.
> 
>    Cannot find a definition or applicable library operation named solve
>       with argument type(s)
>                              Polynomial Integer
>                                  Variable y
> 
>       Perhaps you should use "@" to indicate the required return type,
>       or "$" to specify which version of the function you need.
> 
> But of course this works if we give the interpreter enough help...
> 
> (2) -> solve(E3::Expression Integer, y)@List Equation Expression Integer
> 
>                +----------+                 +----------+
>                |   2     2                  |   2     2
>             D1\|- x  + C1   + C1 y1    - D1\|- x  + C1   + C1 y1
>    (2)  [y= -----------------------,y= -------------------------]
>                        C1                          C1
>                                        Type: List Equation Expression Integer

Uhhhh... Expression Integer again... That sounds so typeless. ;-)

\start
Date: Wed, 7 May 2008 05:11:04 +0200 (CEST)
From: Waldek Hebisch
To: list
Subject: re: About Schaums.

Martin Rubey wrote:
> Tim Daly writes:
> >   Axiom has a closed form for 2 integrals where Schaums has series.
> 
> But at least one of them seems to be wrong. Since it seems that my message was
> overlooked, I repeat it here:
> 
> Tim Daly writes:
> 
> >   14:668 SCHAUMS AND AXIOM DIFFER (Axiom has closed form)
> 
> But I'm not so sure that it is correct, at least not for a=1 and x in 0..1.
> 
> draw(D(integrate(asech(x)/x,x),x)-asech(x)/x, x=0..1)
> 

Integral of 'asech(x)/x' is definitely wrong.  I belive that the
error is in 'lfextendedint':

    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)))
      ...

AFAICS we need stronger condition than 'case SE' (and extra code
to handle remaining cases).
 
\start
Date: Tue, 6 May 2008 22:21:59 -0500
From: Tim Daly
To: list
Subject: 20080506.01.tpd.patch (CATS Schaums-Axiom post-mortem fixups)

More agreement between Schaums and Axiom
=====================================================================
diff --git a/changelog b/changelog
index fcc6814..61271b9 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+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
 20080505 tpd src/input/schaum22.input post-mortem fixes
diff --git a/src/input/schaum2.input.pamphlet b/src/input/schaum2.input.pamphlet
index dfbaf88..7a4ef98 100644
--- a/src/input/schaum2.input.pamphlet
+++ b/src/input/schaum2.input.pamphlet
@@ -928,7 +928,7 @@ cc21:=bb2-aa.1
 --R                                                     Type: Expression Integer
 --E
 
---S 64     14:92 Axiom cannot simplify this expression
+--S 64
 cc22:=bb2-aa.2
 --R 
 --R
@@ -942,6 +942,13 @@ cc22:=bb2-aa.2
 --R                              \|- b
 --R                                                     Type: Expression Integer
 --E
+
+--S 65     14:92 Schaums and Axiom agree
+dd22:=ratDenom cc22
+--R
+--R   (9)  0
+--R                                                     Type: Expression Integer
+--E
 @
 
 \section{\cite{1}:14.93~~~~~$\displaystyle

\start
Date: Wed, 7 May 2008 03:17:21 -0400
From: Tim Daly
To: list
Subject: Schaums-Axiom difference

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)

\start
Date: 07 May 2008 10:19:29 +0200
From: Martin Rubey
To: list
Subject: Re: Schaums-Axiom difference

> I see a lot of non-reduced exponents of the form:
> 
>                      a log(z)
>                    %e        

This is "by definition" equal to z^a.  I'd think it is rather a question of
output aesthetics whether we want to write z^a instead -- I'd say yes, we
should output z^a if a does not have a log factor.  For computation I'd believe
that %e^(a*log z) is better, especially because of

%e^(log x*log z) = x^log z = z^log x

\start
Date: 07 May 2008 14:11:27 +0200
From: Martin Rubey
To: list
Subject: Re: Schaums-Axiom difference

Tim Daly writes:

> My best guess is that the problem lies in the code that fails to
> simplify %e^(n log(x)) to x^n.

As I said before, I'm not sure whether this is really a simplification.  After
all, the *definition* of a^b is %e^(a*log b)

> Since it does not simplify, the call to varselect(kernels ....
> continue to loop since %e^(n log(x)) is a kernel. 

but a^b is a kernel, too!  I do not understand.

\start
Date: Wed, 07 May 2008 08:18:34 -0400
From: Doug Stewart
To: Martin Rubey
Subject: Re: Schaums-Axiom difference

Martin Rubey wrote:
> Tim Daly writes:
>
>   
>> My best guess is that the problem lies in the code that fails to
>> simplify %e^(n log(x)) to x^n.
>>     
>
> As I said before, I'm not sure whether this is really a simplification.  After
> all, the *definition* of a^b is %e^(a*log b)
>
>   
I think you have a small typo there
it should be

the *definition* of a^b is %e^(b*log a)


>> Since it does not simplify, the call to varselect(kernels ....
>> continue to loop since %e^(n log(x)) is a kernel. 
>>     
>
> but a^b is a kernel, too!  I do not understand.

\start
Date: Wed, 7 May 2008 12:37:42 -0400
From: Tim Daly
To: list
Subject: Sage on Scientific Linux?
Cc: William Stein, Michael Abshoff

Colleagues,

There is a cross-fertilization that might be very useful for both
the Scientific Linux world and the Sage world.

For those who don't know, Scientific Linux is a linux distribution
that is a "common platform" for scientific users. It was recently
described as:

Sage is an open source effort to create a free and open alternative
to Mathematica, Maple, Magma, and Matlab.

It seems to me that the development of a standardized open source
platform for science and scientific computation have quite common
goals. Indeed, it could be argued quite strongly that this kind of
a platform effort is a strong target for NSF, INRIA, or other major
government funding.

I can answer some trivial questions about both projects but I am
not a "contact person" for either project. 

\start
Date: Wed, 7 May 2008 12:41:41 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: Schaums-Axiom difference

>> I see a lot of non-reduced exponents of the form:
>> 
>>                      a log(z)
>>                    %e        
>
>This is "by definition" equal to z^a.  I'd think it is rather a question of
>output aesthetics whether we want to write z^a instead -- I'd say yes, we
>should output z^a if a does not have a log factor.  For computation I'd believe
>that %e^(a*log z) is better, especially because of
>
>%e^(log x*log z) = x^log z = z^log x

Barry Trager has pointed out to me that the integrator always wants
expressions like x^n to be represented as exp(n*log(x)) since the
integration algorithm recurses on the tower of generators involving
exps and logs. The infinite recursion bug is some kind of a bug in
the implementation but not related to simplification.

So, obviously, I don't have a clue. Ah, if only the sources were
literate. We could read what it was intended to do.... sigh.

\start
Date: Thu, 8 May 2008 03:54:56 +0200 (CEST)
From: Waldek Hebisch
To: list
Subject: re: About Schaums.

I wrote:
> Martin Rubey wrote:
> > Tim Daly writes:
> > >   Axiom has a closed form for 2 integrals where Schaums has series.
> > 
> > But at least one of them seems to be wrong. Since it seems that my message was
> > overlooked, I repeat it here:
> > 
> > Tim Daly writes:
> > 
> > >   14:668 SCHAUMS AND AXIOM DIFFER (Axiom has closed form)
> > 
> > But I'm not so sure that it is correct, at least not for a=1 and x in 0..1.
> > 
> > draw(D(integrate(asech(x)/x,x),x)-asech(x)/x, x=0..1)
> > 
> 
> Integral of 'asech(x)/x' is definitely wrong.  I belive that the
> error is in 'lfextendedint':
> 
>     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)))
>       ...
> 
> AFAICS we need stronger condition than 'case SE' (and extra code
> to handle remaining cases).
>  

For FriCAS I applied the following fix:

Index: src/algebra/intef.spad.pamphlet
===================================================================
--- src/algebra/intef.spad.pamphlet	(wersja 274)
+++ src/algebra/intef.spad.pamphlet	(kopia robocza)
@@ -232,8 +232,12 @@
       empty?(l := varselect(kernels f, x)) => [x::F * f, 0]
       symbolIfCan(k := kmax(l))
         case SE =>
+          g1 :=
+               empty?(l1 := varselect(kernels g, x)) => 0::F
+               kmax(l1) = k => g
+               0::F
           map(multivariate(#1, k), extendedint(univariate(f, k),
-                                               univariate(g, 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)
Index: src/input/bugs2008.input.pamphlet
===================================================================
--- src/input/bugs2008.input.pamphlet	(wersja 274)
+++ src/input/bugs2008.input.pamphlet	(kopia robocza)
@@ -71,6 +71,15 @@
 testEquals("gcd([67108859*67108859*x^2-1, 67108859*67108859*x^2+2*67108859*x +1])", "67108859*x+1")
 testEquals("gcd([0, 0, x^2-1, x^2+2*x+1])$HeuGcd(SparseUnivariatePolynomial Integer)", "(x+1)::(SparseUnivariatePolynomial Integer)")
 
+testcase "Integral of asech(x)/x"
+i1 := integrate(asech(x)/x, x)
+isym := "integral"::Symbol
+testTrue "is?(operator(kernels(i1).1), isym)"
+i2 := integrate(log((sqrt(1-x^2)+1)/x)/x, x)
+testTrue "is?(operator(kernels(i2).1), isym)"
+
+testEquals("integrate(log(sqrt(1-x^2)/x)/(x^2), x)", "(-log(sqrt(1-x^2)/x) -x*log(x+1)/2 +  x*log(x-1)/2 + 1)/x")
+
 )set output algebra on
 statistics()
 @
Index: ChangeLog.wh
===================================================================
--- ChangeLog.wh	(wersja 278)
+++ ChangeLog.wh	(kopia robocza)
@@ -1,3 +1,9 @@
+2008-05-08  Waldek Hebisch  Waldek Hebisch
+
+	* src/algebra/intef.spad.pamphlet: lfextendedint(): 
+	when integrating rational functions use only logarithms
+	of rational functions.
+
 2008-05-07  Waldek Hebisch  Waldek Hebisch
 
 	* src/etc/Makefile.in: stamp-databases: Avoid error

\start
Date: Wed, 07 May 2008 19:30:43 -0700
From: Ed Borasky
To: Tim Daly
Subject: Re: Sage on Scientific Linux?
Cc: William Stein

root wrote:
> Colleagues,
> 
> There is a cross-fertilization that might be very useful for both
> the Scientific Linux world and the Sage world.
> 
> For those who don't know, Scientific Linux is a linux distribution
> that is a "common platform" for scientific users. It was recently
> described as:
> 
> Sage is an open source effort to create a free and open alternative
> to Mathematica, Maple, Magma, and Matlab.
> 
> It seems to me that the development of a standardized open source
> platform for science and scientific computation have quite common
> goals. Indeed, it could be argued quite strongly that this kind of
> a platform effort is a strong target for NSF, INRIA, or other major
> government funding.
> 
> I can answer some trivial questions about both projects but I am
> not a "contact person" for either project. 

IIRC Scientific Linux is funded/supported by Fermilab, and is 
essentially a rebuild from source of Red Hat Enterprise Linux. There are 
other such rebuilds, the most popular of which is CentOS. IIRC 
Scientific Linux has a few more scientific packages, such as Linpack and 
R, than RHEL or CentOS, but for all practical purposes Scientific Linux 
is RHEL.

I personally think that RHEL and its rebuilds are great *server* 
distributions, but that there are *much* better distros out there for a 
scientific workstation. I personally run Gentoo, but if Gentoo 
disappeared off the face of the Earth, I'd switch to Debian (testing or 
even unstable) or Fedora before I'd go to Scientific Linux.

The main issue for me is having the latest kernels and compilers. I'm 
running the 2.6.25 kernel and GCC 4.2.3 on my workstations. I haven't 
checked the compiler on Fedora yet, but I know the upcoming Fedora 9 
release is carrying the 2.6.25 kernel. By comparison, the Ubuntu that 
just came out and the Gentoo that will be released in the near future 
are both at 2.6.24, and RHEL/CentOS/Scientific Linux are at 2.6.18, IIRC.

A server is about stability, but I think a scientific workstation is 
about raw speed on large problems.

\start
Date: Thu, 8 May 2008 04:43:47 -0400
From: Tim Daly
To: Troy Dawson
Subject: Re: Sage on Scientific Linux?
Cc: Michael Abshoff, William Stein

Troy,

I recommend you talk to William Stein. He's the project lead.
I follow both Scientific Linux and Sage but am not a contributor to either.
But I think that FNAL and other labs would be the ideal target
audience for a Sage system.

Tim
>> Colleagues,
>> 
>> There is a cross-fertilization that might be very useful for both
>> the Scientific Linux world and the Sage world.
>> 
>> For those who don't know, Scientific Linux is a linux distribution
>> that is a "common platform" for scientific users. It was recently
>> described as:
>> 
>> Sage is an open source effort to create a free and open alternative
>> to Mathematica, Maple, Magma, and Matlab.
>> 
>> It seems to me that the development of a standardized open source
>> platform for science and scientific computation have quite common
>> goals. Indeed, it could be argued quite strongly that this kind of
>> a platform effort is a strong target for NSF, INRIA, or other major
>> government funding.
>> 
>> I can answer some trivial questions about both projects but I am
>> not a "contact person" for either project.
>> 
>> Tim Daly
>> Axiom
>
>Hi Tim,
>That does look like an interesting program.  It's possible that many 
>scientists would be interested in it.
>Has someone already packaged it in an rpm that you know of?
>Troy Dawson

\start
Date: Thu, 8 May 2008 13:37:57 -0500
From: Tim Daly
To: list
Subject: 20080508.01.wxh.patch (intef.spad integrate(asech(x)/x, x) bug)

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 

\start
Date: Thu, 8 May 2008 13:43:05 -0500
From: Tim Daly
To: list
Subject: 20080508.02.tpd.patch (ignore gensyms in schaums regression tests)

This is a minor patch to ignore gensyms that occur in rules
in the schaums regression test files.
========================================================================
diff --git a/changelog b/changelog
index 7fa956e..0b08224 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20080508 tpd src/input/schaum18.input ignore gensyms
+20080508 tpd src/input/schaum17.input ignore gensyms
 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
diff --git a/src/input/schaum17.input.pamphlet b/src/input/schaum17.input.pamphlet
index 6092400..6939c30 100644
--- a/src/input/schaum17.input.pamphlet
+++ b/src/input/schaum17.input.pamphlet
@@ -1221,9 +1221,9 @@ dd:=tanrule cc
 sindiffrule2:=rule(sin((a-b)/4) == sin(a/4)*cos(b/4)-cos(a/4)*sin(b/4))
 --R 
 --R
---R                 b - a              a     b           b     a
+--I                 b - a              a     b           b     a
 --I   (6)  - %U sin(-----) == - %U cos(-)sin(-) + %U cos(-)sin(-)
---R                   4                4     4           4     4
+--I                   4                4     4           4     4
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
diff --git a/src/input/schaum18.input.pamphlet b/src/input/schaum18.input.pamphlet
index f01b63d..62de8d7 100644
--- a/src/input/schaum18.input.pamphlet
+++ b/src/input/schaum18.input.pamphlet
@@ -428,9 +428,9 @@ dd:=cossinrule cc
 coscosrule:=rule(cos(a)*cos(b) == 1/2*(cos(a-b)+cos(a+b)))
 --R 
 --R
---R                           %O cos(b + a) + %O cos(b - a)
---R   (6)  %O cos(a)cos(b) == -----------------------------
---R                                         2
+--I                           %O cos(b + a) + %O cos(b - a)
+--I   (6)  %O cos(a)cos(b) == -----------------------------
+--I                                         2
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
\start
Date: Thu, 08 May 2008 02:15:28 -0500
From: Troy Dawson
To: Tim Daly
Subject: Re: Sage on Scientific Linux?
Cc: William Stein, Michael Abshoff

root wrote:
> Colleagues,
> 
> There is a cross-fertilization that might be very useful for both
> the Scientific Linux world and the Sage world.
> 
> For those who don't know, Scientific Linux is a linux distribution
> that is a "common platform" for scientific users. It was recently
> described as:
> 
> Sage is an open source effort to create a free and open alternative
> to Mathematica, Maple, Magma, and Matlab.
> 
> It seems to me that the development of a standardized open source
> platform for science and scientific computation have quite common
> goals. Indeed, it could be argued quite strongly that this kind of
> a platform effort is a strong target for NSF, INRIA, or other major
> government funding.
> 
> I can answer some trivial questions about both projects but I am
> not a "contact person" for either project.
> 
> Tim Daly
> Axiom

Hi Tim,
That does look like an interesting program.  It's possible that many 
scientists would be interested in it.
Has someone already packaged it in an rpm that you know of?

\start
Date: Thu, 8 May 2008 11:52:06 +0200
From: Michael Abshoff
To: Tim Daly
Subject: Re: Sage on Scientific Linux?
Cc: William Stein, Troy Dawson

On Thu, May 8, 2008 at 10:43 AM, Tim Daly wrote:

> >Hi Tim,
> >That does look like an interesting program.  It's possible that many
> >scientists would be interested in it.
> >Has someone already packaged it in an rpm that you know of?
>


Hi Troy,

Sage has a fairly advanced packaging for Debian/Ubuntu [thanks to all the
hard work by Tim Abbott], but we are not 100% done yet. For details see

http://wiki.sagemath.org/DebianSAGE

Some work had been done for PCLinuxOS [which is rpm based and a FC
derivative IIRC], but that work has mostly consisted of not building the
already available packages in their repo. For Debian about 25 new packages
had to be created, so I expect a little more work for a RHEL derived distro.
Some people using Fedora have expressed interest - see

http://fedoraproject.org/wiki/SIGs/SciTech/SAGE

but not much seems to have happened there so far. We would certainly welcome
rpm base packaging of Sage and its components, but so far few people from
the Sage community itself have gone down that way. But since there are
several rpm based distros interested it certainly looks like their efforts
can be combined to lessen the burden on each individual camp.

Building a monolothic Sage rpm is possible with little effort [I have done
so], so you would need to tell us how you would like to proceed from here.
Besides Sage itself there are many interesting components that people using
Scientific Linux might be interested in.

\start
Date: Sun, 11 May 2008 18:58:55 -0500
From: Tim Daly
To: list
Subject: 20080511.01.tpd.patch (CATS Schaums-Axiom post-mortem fixup)

Fix the final comment on the regression lines
========================================================================
diff --git a/changelog b/changelog
index 0b08224..8f37ad8 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080511 tpd src/input/schaum34.input post-mortem fixes
 20080508 tpd src/input/schaum18.input ignore gensyms
 20080508 tpd src/input/schaum17.input ignore gensyms
 20080508 tpd src/input/schaum34.input fix int(asech(x)/x,x)
diff --git a/src/input/schaum34.input.pamphlet b/src/input/schaum34.input.pamphlet
index f8314e2..d61b757 100644
--- a/src/input/schaum34.input.pamphlet
+++ b/src/input/schaum34.input.pamphlet
@@ -2128,7 +2128,7 @@ solution to the problem but Schaums gives a series solution.
 <<*>>=
 )clear all
 
---S 139    14:668 SCHAUMS AND AXIOM DIFFER (Axiom has closed form)
+--S 139    14:668 Axiom cannot compute this integral
 aa:=integrate(asech(x/a)/x,x)
 --R 
 --R
@@ -2316,7 +2316,7 @@ but Axiom has computed a closed form.
 <<*>>=
 )clear all
 
---S 150    14:671 SCHAUMS AND AXIOM DIFFER (Axiom has closed form)
+--S 150    14:671 Axiom cannot compute this integral
 aa:=integrate(acsch(x/a)/x,x)
 --R 
 --R

\start
Date: Sun, 11 May 2008 21:16:42 -0400
From: Tim Daly
To: list
Subject: [Tim Daly: Denavit-Hartenberg Matrices, Solid Modeling and CAS]

Journaling some comments made at ECCAD 2008:

Re: our post-panel discussion on "killer apps"....

<http://axiom.axiom-developer.org/axiom-website/dhmatrix.spad.pdf>
This is an axiom literate program from the Axiom algebra library
that implements DH-matrices.

The basic idea is described in terms of robots. You attach a matrix to
the base of the robot (called the world frame) and then attach a
matrix at each joint that describes the kind of motion the joint can
make (such as a sliding joint which might update the length along a
single axis). This is computed by multiplying the two matrices.

Instead of using a robot you use a steel beam. Attach the identity
matrix to the fixed end of a steel beam projecting out from a wall.
Attach another matrix at the other end of the beam.  Then a twist
applied to the beam is just a rotation around the long axis which
would be shown by multiplying the two matrices.

By applying these DH matrices in sequence you can compute the final
position of any sequence of beams, for instance. Not shown in the
literate pamphlet, but described in Richard Paul's book, are things
like the Jacobian DH matrix which will allow you to model static
and dynamic loads such as gravity and wind.

Combining the DHMatrices and a CAS one could symbolically model the
wing of a aircraft, for example, and then supply numeric values for
the variables in the resulting equations looking for where the values
exceed limits like the tensile strength of beam members. Thus, you
could symbolically predict failures.

So far I have not seen anyone apply a computer algebra system
to generate models of solid geometric structures. The usual method
of analysis is to use finite element analysis, a numeric technique.

\start
Date: Sun, 11 May 2008 21:18:38 -0400
From: Tim Daly
To: list
Subject: Provisos

Journaling some comments made at ECCAD 2008:

Re: the symbolic-numeric panel

The question of interval computations arose during the panel discussion.

The panel discussion of intervals revolved around their numeric use.

However, it is perfectly reasonable to consider intervals symbolically.

Consider that most textbooks (assuming they bother) will write:

      1
      -	             (provided x \ne 0)
      x

Notice that this can be translated into interval notation as:

      1
      -              [x \ne 0]
      x

Now if this division were to arise in the course of computation
we could "decorate" the whole computation with this proviso.

What is notable about this, however, is that we can continue the
computation in 3 distinct branches:

   branch 1    (1/x [x < 0])
   branch 2    (1/x [x = 0])
   branch 3    (1/x [x > 0])

Similarly, if we later add another proviso to the computation that
restricts x, or another variable y, or a constant, etc we can continue
to add these proviso decorations. Each newly decorated computation is
a "standalone branch". Thus, we might see:

   branch 1.1    (f(x,y) [[x < 0] & [x < y]])
   branch 1.2    (f(x,y) [[x < 0] & [x = y]])
   branch 1.3    (f(x,y) [[x < 0] & [x > y]])

   branch 2.1    (f(x,y) [[x = 0] & [x < y]])
   branch 2.2    (f(x,y) [[x = 0] & [x = y]])
   branch 2.3    (f(x,y) [[x = 0] & [x > y]])

   branch 3.1    (f(x,y) [[x > 0] & [x < y]])
   branch 3.2    (f(x,y) [[x > 0] & [x = y]])
   branch 3.3    (f(x,y) [[x > 0] & [x > y]])

Notice that we can run these branches in parallel because they are
naturally disjoint. Further sub-branches can also run in parallel.
As each branch completes we can combine the branches by doing
logical operations on the provisos themselves.

Thus we may find that only the condition [x > y] has "survived"
and we end up with only the branch x.3 cases. We can reason about
the proviso conditions:

   branch 1.3 & branch 2.3 & branch 3.3 ==>

     (f(x,y) [[x < 0] & [x > y]]) 
   & (f(x,y) [[x = 0] & [x > y]])
   & (f(x,y) [[x > 0] & [x > y]]) ==>

     (f(x,y) [x > y])

So there are computations "with provisos" (e.g. adding decorations)
and computations "of provisos" (e.g. logical operations on decorations).

I did a survey of all of the math books I could reach in several
libraries. About 80% of the conditions on equations can be rewritten
into proviso format, e.g. holonomic ==> [\forall x]

I believe that provisos will provide:

  correct reasoning within computation 
    for instance, it is valid to simplify 
       sqrt(x^2) -> x iff [[x >= 0] & [x \in R]])
    or for handling branch cut assumptions in trignometric cases.

  parallel computations
    since each branch carries the logically independent conditions
    the computation "unfolds dynamically" into "naturally parallel"
    subcomputations. (Stanford just opened a parallel lab and it
    would be worthwhile proposing a "symbolic parallel research"
    area to take advantage of the multicore work with CAS)

  a natural "assume" facility
    the user can decorate any equation with their own conditions
    and these are naturally available (e.g (f(x,y) [x > y])).
    These conditions may only be known from external problem constraints.



Anyway, I wanted to make the point that Provisos are a symbolic form
of interval computation. There is a whole area of research involving
symbolic, logical, and parallel computation (probably with grant money).

\start
Date: Sun, 11 May 2008 19:21:15 -0500
From: Gabriel Dos Reis
To: Tim Daly
Subject: Re: Provisos

On Sun, May 11, 2008 at 8:18 PM, Tim Daly wrote:
> Journaling some comments made at ECCAD 2008:
>
>  Re: the symbolic-numeric panel
>
>  The question of interval computations arose during the panel discussion.
>
>  The panel discussion of intervals revolved around their numeric use.
>
>  However, it is perfectly reasonable to consider intervals symbolically.
>
>  Consider that most textbooks (assuming they bother) will write:
>
>       1
>       -              (provided x \ne 0)
>       x
>
>  Notice that this can be translated into interval notation as:
>
>       1
>       -              [x \ne 0]
>       x

Do you know how this is different from the GUARDIAN package (Reduce)
described in this ISSAC'97 paper?

     "Guarded Expressions in Practice"
      Andreas Dolzmann  and Thomas Sturm

    http://portal.acm.org/citation.cfm?id=258851

\start
Date: Sun, 11 May 2008 23:06:57 -0400
From: Tim Daly
To: Gabriel Dos Reis
Subject: Re: Provisos

>Do you know how this is different from the GUARDIAN package (Reduce)
>described in this ISSAC'97 paper?
>
>     "Guarded Expressions in Practice"
>      Andreas Dolzmann  and Thomas Sturm
>
>    http://portal.acm.org/citation.cfm?id=258851

I don't know. The comments I made were from my thesis work done prior
to this publication. I don't have access to that paper at the moment.
If you have a copy perhaps you could summarize the differences.

\start
Date: Mon, 12 May 2008 09:20:05 -0400
From: Tim Daly
To: list
Subject: Re: Provisos

>>Do you know how this is different from the GUARDIAN package (Reduce)
>>described in this ISSAC'97 paper?
>>
>>     "Guarded Expressions in Practice"
>>      Andreas Dolzmann  and Thomas Sturm
>>
>>    http://portal.acm.org/citation.cfm?id=258851
>
>I don't know. The comments I made were from my thesis work done prior
>to this publication. I don't have access to that paper at the moment.
>If you have a copy perhaps you could summarize the differences.
>

Certainly the general case of combining provisos suffers from
several problems, not the least of which is the zero-equivalence
problem. Thus while it is not difficult to add constraints that
split a computation, it is in general undecided if they can combine.

That said, there is one likely difference. In the Axiom implementation,
the provisos consisted of "constraint" objects which were over particular
domains. Thus, [x > 0] is a strongly typed constraint from POLY(INT)
(assuming x came from POLY(INT)). The logical operations were typed
also, so given [x > 0] as a constraint from POLY(INT) and [x < 0]
as a constraint from POLY(INT) then 
  [x > 0] & [x < 0] 
uses a typed '&' operation from POLY(INT). Since the domain added
the constraints, presumably the domain knows how to combine them.

Any other paper or implementation I've seen uses untyped operations
based on pure symbols. Thus given
  [x > 0] & [x < 0] 
the operation is some order-sorted algebra over naked symbols.
The reasoning over these symbols knows nothing about the domains.
This loses a lot of information that is carried in the types
about how to combine the constraints. Thus they tend to fall 
back on either matching operations or unification operations.

\start
Date: Mon, 12 May 2008 08:51:48 -0500
From: Gabriel Dos Reis
To: Tim Daly
Subject: Re: Provisos

On Sun, May 11, 2008 at 10:06 PM, Tim Daly wrote:
> >Do you know how this is different from the GUARDIAN package (Reduce)
>  >described in this ISSAC'97 paper?
>  >
>  >     "Guarded Expressions in Practice"
>  >      Andreas Dolzmann  and Thomas Sturm
>  >
>  >    http://portal.acm.org/citation.cfm?id=258851
>
>  I don't know. The comments I made were from my thesis work done prior
>  to this publication. I don't have access to that paper at the moment.

I've found a freely available `technical report' version of it here

  http://citeseer.ist.psu.edu/dolzmann97guarded.html

\start
Date: Tue, 13 May 2008 05:18:22 -0500
From: Tim Daly
To: Gabriel Dos Reis
Subject: Provisos
Cc: Andreas Dolzmann, Thomas Sturm

Thanks for the reference to the Guarded Expression in Practice paper.

That's a really pretty piece of work they've done. I like it a lot.
I'll have to get a copy of REDLOG/GUARDIAN and try it. This is a very
readable paper and they make a lot of good points.

Instead of wandering off into the sorted-order logic wilderness
they did manage to stay algebraic in their approach. They did ask
the question:
   When designing a new CAS based on guarded expressions, how
   should the knowledge be distributed between the algebraic
   side and the logic side?

Their problems are similar to the ones I encountered and their
solutions are similar. 




The one glaring difference is that I spent a lot of time reducing
the expressions into interval notation. The interval notation for
   x <> 0 
becomes
   [x <> 0]
which can be expanded (by POLY(INT), since it is domain specific) to
   [x < 0]
   [x = 0]
   [x > 0]
Other domains, say one that has OnePointCompletion (that is, infinity),
might put further cases into play:
   [x = %minusInfinity]
   [x < 0]
   [x = 0]
   [x > 0]
   [x = %plusInfinity]





Another difference is that rather than using a global simplifier
and global quantifier eliminator, the process is distributed
across the category/domain hierarchy. The intervals are called
Constraints, which are collected into SuchThat clauses, and you 
would have signatures like:

   and(a:Constraint(POLY(INT)),b:Constraint(POLY(INT)) -> Constraint(POLY(INT))

so that POLY(INT) would get involved in simplifying expressions and
constraints which are over that domain. Expressions over other domains, e.g
   Constraint(POLY(COMPLEX(INT))))
would simplify based on knowledge from that domain instead. Thus each
domain would know special information that could be brought forward to
help the simplification.

But you would expect that kind of architecture decision in Axiom.

Major kudos to Dolzmann and Sturm.

\start
Date: Wed, 14 May 2008 12:45:39 -0400
From: Bill Page
To: Zach Smith
Subject: Re: [Axiom-math] Solving symbolic vector equations: How do I do this in Axiom?

On Tue, May 13, 2008 at 6:32 PM, Zach wrote:
>>
>> > so what I would like is for axiom to solve this by
>> >
>> > a * v1 . v1 =3D v2 . v1
>> > a =3D (v2 . v1) / (v1 . v1)
>> >
>>
> Bill Page wrote:
>> ??? This is not a solution to the original equation!
>
> Hmm, the problem is that this equation is in danger of having no solution=
.
> I guess there is an implicit assumption that this has a solution for some
> nonzero v2, meaning the vectors must be parallel.  My boss gave me a
> problem something like this and I am walking on shaky legs at the
> moment as I haven't tried to solve problems like these before.

Ok, I like this problem. Of course I agree that *if* this equation has
a solution then what you wrote is the solution. The situation is not
so different in a lot of other cases of symbolic "solutions".

>
> I guess the correct thing to do is notice that v1 and v2 must be parallel=
,
> and then deal with the magnitudes, a=3D|v2|/|v1|.  Once you accept this
> my solution works too, as with unit vector u in the direction of v1 and
> v2, v1 =3D |v1| u and v2 =3D |v2| u, v1 . v2 =3D |v1| |v2| u . u =3D |v1|=
 |v2| and
> v1 . v1 =3D |v1|^2.  Right?

Right. Thanks for explaining your point of view.

> Please feel free to point out any misconceptions I am fostering.

Something similar has been discussed by Tim Daly and Gabriel Dos Reis
in the thread "Provisos":

http://lists.gnu.org/archive/html/axiom-developer/2008-05/msg00067.html

>
> Anyway, I guess I chose too simple of an example.

No, it is a good example. I think your example is interesting because
it illustrates a kind of proviso that is not naturally represented as
an interval on some domain.

> But never mind that. (The original problem was to find tuples of reals
> (n1, n2, m1, m2) such that n1*a1 + n2*a2 =3D m1*b1 + m2*b2
> (where a1, a2, b1, and b2 are 2D vectors).)
>
>> Well no, not really. Currently Axiom has no domain for symbolic
>> computations with vectors.
>
> I was afraid of that.  Over at Maxima they had no facility either.
>

The only work of this kind that I know about is:

Component-Free Vector Algebra in Aldor
Songxin Liang, David J. Jeffrey and Stephen M. Watt
Proc. Transgressive Computing 2006:

An implementation of a component-free symbolic vector algebra in Aldor
is presented. This package provides two powerful functions:
simplification of vector expressions and the proof of vector
identities. The implementation bene=AFts greatly from Aldor's strong
typing, which allows several simplification problems that have
defeated previous implementations to be solved.

http://www.csd.uwo.ca/~watt/pub/reprints/2006-tc-vectalg.pdf

>>
>> > What is the best way of tackling these types of problems?
>> >
>>
>> It would be possible (and quite interesting) to create a new domain in
>> Axiom for symbolic vector calculations.
>

Aldor can be used as a library compiler for Axiom. I received a copy
of the source code for this package from Songxin Liang. It is written
for "stand alone" use, i.e. without Axiom. I have been intended to
convert it for use within Axiom but have not had sufficient time.
Perhaps you are interested? If so, please let me know.

> Hmm, okay.  So, it would be a good idea to understand how this is done
> in polynomial symbolic manipulation before approaching such a task?
>

Yes. Axiom has a fairly high learning curve but (of course!) I think
it is worth the effort. If you continue with some activity in Axiom
along these lines please feel free to discuss it here.

\start
Date: Fri, 16 May 2008 00:05:29 -0400
From: Tim Daly
To: Alasdair McAndrew
Subject: Re: [Axiom-mail] Axiom v. Maxima

Alasdair, 

Thanks for the feedback.

>I've been using Maxima a bit recently, and I've been thinking about Axiom in
>comparison.  I think Axiom's mathematical strengths are undeniable, but...

Maxima is an excellent program. I know several of the developers
and they do great work. I have used it most recently to check Axiom's
answers. I compared Axiom against Schaums and then did a doublecheck
using Maxima. Maxima has one really annoying feature in that it asks
me if -some-random-expression is positive.




>   1. The Axiom community seems to be worried about the wrong things.
>   Abstruse mathematical problems, matters relating to Aldor... and yet the
>   interface languishes.  In fact, for Windows users (who make up the bulk of
>   computer users) there is no decent interface.

I've been concentrating on making Axiom more useful in general. 
Some of the features are 

  * )show domain correctly identifies the source file

  * )d op foo shows an example of how to use that function
      Given that there are approximate 10k functions in Axiom it
      will take a while before all of them have examples but the
      machinery exists and some cases are covered. More will follow.

  * )help pages have been updated. 
      There are now about 100 help pages and more are in the pipeline.
      The help pages are flat text pages so you can write your own.
      If you put your text file in the proper directory it is automatically
      available.

  * There is a tutorial book available.
      The sources are distributed with the system (see
      src/doc/bookvol1.pamphlet, an ordinary latex file), the .dvi
      file is created automatically during build, a pdf copy is
      available for free from <http://axiom.axiom-developer.org>, and
      paper copies are available from amazon.com or lulu.com (search
      on amazon for "daly axiom")

  * The Jenks textbook is available
      The sources are distributed with the system (see
      src/doc/book.pamphlet, an ordinary latex file), the .dvi
      file is created automatically during build, a pdf copy is
      available for free from <http://axiom.axiom-developer.org>, and
      an html version is available at
      <http://axiom.axiom-developer.org/axiom-website/hyperdoc/jenks.html>

  * Some domains are already literate. 
      Look at <http://axiom.axiom-developer.org> for the list, which
      contains only one at the moment but will be expanded at the 
      next release cycle point later this month.

  * Regression test files have more documentation
      The student can look at the latest input files for examples.
      In particular, there are 34 new src/input/schaumNN.input.pamphlet 
      files which show how to compute 619 indefinite integrals from a 
      standard reference work (Schaums Mathematical Handbook). They
      also illustrate methods of simplification. I've also collected
      all of the rule forms used and these will appear in a new help
      page and the next version of the tutorial.

  * System commands are beginning to know about pamphlet files
      Soon you'll be able to work directly in the literate format
      and the compiler and interpreter will "do the right thing".
      Pamphlet files are the native Axiom file format. Hopefully
      this will encourage more literate programming.


>   2. Help - Hyperdoc was all very well in its day, but now looks regressive
>   and old-fashioned.  Surely help based on HTML, or even a Windows Help
>   interface, should be provided?

I really liked wxMaxima and developed a wxAxiom version but decided
to trash it. Instead of creating more code to maintain I decided to
base the user interface on the Firefox browser. Hyperdoc and graphics
will go away in their present form and become standard web pages.

In the latest release of Axiom, the hyperdoc system is based on Firefox.
All you need to do is start Axiom and then type:
   )browse
and visit the rootpage.xhtml file in your distribution.
If you don't have it available yet, you can see the static pages at:
<http://axiom.axiom-developer.org/axiom-website/hyperdoc/rootpage.xhtml>
These pages are live only if you use the )browse function locally.

Many hyperdoc pages have been translated but there are still more to
be done.  The richest subtree is under "Topics". The Axiom textbook is
available under the "Axiom Textbook" link. In addition, there is new
material in the Firefox version that does not exist in the hyperdoc
version. See
    Topics -> Cryptography
    Topics -> Mathematical Models (under construction)
    Topics -> CATS (under construction)

Note that this uses MathML so you may have to upgrade your browser fonts.
The fonts are available in the zips directory of the Axiom distribution.

This is standard html so you can write your own pages. See the book
src/hyper/bookvol11.pamphlet which describes the tools available if
you want to interact with Axiom on your own pages.

If you do develop coursework I'm willing to work with you to include
those pages into Axiom's Firefox browser. See
<http://axiom.axiom-developer.org/axiom-website/hyperdoc/cryptopage.xhtml>

Future releases will have a primitive Firefox front end to Axiom,
similar in spirit (but not design) to the MMA, Maple, and Sage notebooks.
I'm working on various tools in javascript but they are not ready for
release yet. I'm also in design discussions with a graphics designer
to try to maximize the user viewpoint. This will take a few release
cycles to fully emerge.






>   3. Maxima seems streets ahead in its involvement with the mathematical
>   community.  Currently there are at least two major book writing projects
>   using Maxima: "Maxima by Example" on http://www.csulb.edu/~woollett/ and
>   another on http://www.neng.usu.edu/cee/faculty/gurro/Maxima.html  There
>   are lots of other tutorials and documents (including one by me!) on the
>   Maxima page.  But where are the user-written Axiom books and introduction
>   documents?  The biggest one - in fact the only one available from the Axiom
>   page - seems to be Martin Dunstan's tutorial from 1996!

There are currently 12 volumes in development for Axiom, of which only
one has reached publication. Each release of Axiom contains updated
material in each volume. I'll post the current state of the volumes
on the website at the next release of the system. They already exist
and can be found by searching the source tree with
   find . -name "book*"

Writing readable source material takes an astonishing amount of time.




>   4. A new user, scouting around for a freeware CAS, would be led to the
>   undeniable conclusion that Axiom is simply a hobby for a few dedicated
>   users, whereas Maxima is being developed to be useful for everybody.

Sage is certainly taking the lead in the "freeware CAS" market and
I'm actively helping that to occur. I'm on their program committee
for the Sage Day and I build the MAC OSX 10.4 binary for them.

That said, I believe that Sage is badly designed (well, accretion is
more the philosophy) and is not the way to teach students to think
about computational mathematics. The litany of problems they have
left unsolved would have to be embedded in <rant> tags.

Axiom has the philosophy that it needs to be done as a literate
program so that future people can read, understand, maintain, and
modify the system. Axiom's approach to computational mathematics
strongly emphasizes the algebraic knowledge necessary to do correct
mathematics. The symbolic approach (everything is a token that can
be manipulated regardless of mathematical meaning) is sure to cause
grief to beginning students, if not professionals.






>   5. The various forks: Axiom, FriCAS, OpenAxiom, also must make it hard
>   for the new user - which one to choose, and why?  The many many
>   distributions of Linux make choosing one awfully hard for the beginner -
>   even I, who've been using Linux exclusively for over 15 years, get confused
>   on the rare occasions I have to install a new system.  Axiom has the same
>   problem.

Sigh. <joke> To misquote Neo and the Spoon Boy from the Matrix:
              SB:  "There is no fork"
              Neo: "There is no fork?"
              SB:  "It is not the code that forks, only yourself"
      </joke>

What you choose to teach is a strong influence on your system choice.




>Now don't get me wrong - I like Axiom very much indeed, and I will keep
>using it, and encouraging my students to do likewise.  But I think it needs
>to reach more users if it is to really succeed, and for this it needs more
>help and tutorials, and better interfaces.

I believe we are on the same page with this. Unfortunately, most of
the pages are blank. I'm writing as fast as I can. I'm hiring a
student out of my personal funds to do some Axiom work for me for the
summer. Making a fully documented, easy (well, easier) to use system
out of an undocumented research project of this size is a glacial
undertaking. 

\start
Date: 16 May 2008 14:56:22 +0200
From: Martin Rubey
To: Martin Rubey, Ralf Hemmecke
Subject: [ANN] Aldor & Axiom / OpenAxiom / FriCAS Workshop 2008

The following message is a courtesy copy of an article
that has been posted to sci.math.symbolic as well.


                          Aldor & Axiom Workshop 2008

                                    part of
                                       
                               RISC Summer 2008

 
                              Hagenberg, Austria
                                24-26 July 2008

 
The workshop aims at a cooperation of Aldor, Axiom, OpenAxiom, and FriCAS
developers with developers of packages written for other Computer Algebra
Systems, and mathematicians that would like to use a computer algebra system to
perform experiments.

Conference Website
------------------
  http://axiom-wiki.newsynthesis.org/WorkShopRISC2008

Topics
------
  Similar to 2006 and 2007, the workshop will be organized as a mixture of
  talks and discussions. We will begin with an introduction to Axiom /
  OpenAxiom / FriCAS and the Aldor language, including a comparison with the
  approach employed by Sage and Python.

  We then plan to cover the following topics:

  Aldor, SPAD, and the interpreter

      - work on SPAD (eg., allow arbitrary conditional exports),

      - work on the interpreter (eg., it's signature selection algorithm), and

      - improve the Axiom / OpenAxiom / FriCAS - Aldor interaction (eg., make
        Axiom / OpenAxiom / FriCAS understand Aldor's extend or dependent
        signatures generated in Aldor code).

  interaction of Axiom / OpenAxiom / FriCAS with other systems

     We would like to explore the possibility and the usefulness of reusing
     third party code like PARI, GAP, Polymake, etc., but also interfacing with
     Sage.

  problems implementing mathematics in Aldor and SPAD

     We would like to tackle some particularly challenging implementation
     problems, including

       - combinatorial species - the multisort case,

       - how to organize domains and categories for recurrences and functions,

       - how to organize aggregates and matrices, in particular how to ensure
         efficient looping over aggregate elements, etc.

Contributions
-------------
  If you would like to contribute a presentation to one of these topics or a
  related one, please send a message to the organisers.


Suggested reading
-----------------
  Aldor User Guide (http://www.aldor.org/docs/aldorug.pdf)

  Axiom Book (http://wiki.axiom-developer.org/axiom-website/book.pdf)
  
  Multisort species (svn cat svn://svn.risc.uni-linz.ac.at/hemmecke/combinat/branches/multisort-experiment/combinat/src/mspecies.as.nw)


Registration
------------
  Registration is handled via the general RISC Summer 2008 Registration at

  http://www.risc.uni-linz.ac.at/about/conferences/summer2008/registration/

  Please note that the fee (30 EUR) does not cover hotel, lunch, dinner, and
  transportation to Hagenberg.  You may reserve a hotel room in Hagenberg
  through the registration page.


Organisers
----------
  Ralf Hemmecke and Martin Rubey

\start
Date: Fri, 16 May 2008 11:58:44 -0600
From: Zach Smith
To: Tim Daly
Subject: Re: [Axiom-mail] Axiom v. Maxima

None of this is meant in a negative way, I just want to add my experiences
as a Maxima user coming to Axiom.

So, I am extremely new to Axiom, in fact I pretty much don't know how to do
anything I want with the system, even after reading the introductory
materials.  But I just want to say that Alasdair has some good points from
my point of view.

When I was searching for a free CAS I found Maxima first (around 6 years
ago?) and stuck to it.  I was not aware of the existence of Sage and Axiom
until 6ish months ago.  This is odd considering as far as I can tell,
Axiom's plan for the future might be the best among the options.  Granted, I
am from an engineering background, not mathematics.

>   3. Maxima seems streets ahead in its involvement with the mathematical
>   community.  Currently there are at least two major book writing projects
>   using Maxima: "Maxima by Example" on http://www.csulb.edu/~woollett/<http://www.csulb.edu/%7Ewoollett/>and
>   another on http://www.neng.usu.edu/cee/faculty/gurro/Maxima.html  There
>   are lots of other tutorials and documents (including one by me!) on the
>   Maxima page.  But where are the user-written Axiom books and
introduction
>   documents?  The biggest one - in fact the only one available from the
Axiom
>   page - seems to be Martin Dunstan's tutorial from 1996!

This is really big, but perhaps not for the reasons one might think.  I have
read some of Prof. Woollett's chapters and they leave something to be
desired for anyone not brand spanking new to the system.  In fact, for any
advanced usage information, nothing seems to replace the mailing list which
is perhaps 10 times as active as axiom-developer and axiom-math put
together.  What this does show is that Maxima has a user base that cares
about it.  Archaic languages such as C survive because they have a large
user base, which creates more development/ease of
use/portability/efficiency, which draws more people to the language.  The
fact that more people seem (are?) interested in Maxima makes it seem that
the project is healthier than Axiom.

Perhaps some public relations work would help?

>   5. The various forks: Axiom, FriCAS, OpenAxiom, also must make it hard
>   for the new user - which one to choose, and why?  The many many
>   distributions of Linux make choosing one awfully hard for the beginner -
>   even I, who've been using Linux exclusively for over 15 years, get
confused
>   on the rare occasions I have to install a new system.  Axiom has the
same
>   problem.

Once again, this seems to point to an overall relative unhealthiness in
Axiom as compared to Maxima.  When projects fork, it necessarily applies
stress to the users (and I assume developers).  But more importantly, it
makes the choice more complicated for new users.  As a newcomer, it looks
like rats leaving a sinking ship, but should you trust a rats assessment of
the ships status?  As sad as it may be, people, in my experience, do not
like choices.  Tell me, is there any bad blood behind the forks?

> Future releases will have a primitive Firefox front end to Axiom,
similar in spirit (but not design) to the MMA, Maple, and Sage  notebooks.
> I'm working on various tools in javascript but they are not ready for
> release yet. I'm also in design discussions with a graphics designer
> to try to maximize the user viewpoint. This will take a few release
> cycles to fully emerge.

Tim, please tell me that Firefox will not be the only way to interface with
Axiom.  It will still be possible to write an Emacs mode for it, something
like IMaxima?  Also, why only Firefox, why not any browser?

\start
Date: 16 May 2008 20:02:13 +0200
From: Martin Rubey
To: Zach Smith
Subject: re: [Axiom-mail] Axiom v. Maxima

Zach Smith writes:

> Tim, please tell me that Firefox will not be the only way to interface with
> Axiom.  It will still be possible to write an Emacs mode for it, something
> like IMaxima?  Also, why only Firefox, why not any browser?

There is an emacs mode.  PLEASE try it and give feedback.

You'll find it on mathaction.

\start
Date: Fri, 16 May 2008 20:16:05 +0200
From: Ralf Hemmecke
To: Martin Rubey
Subject: re: [Axiom-mail] Axiom v. Maxima

please learn to make the life easier for others. You know the link. So 
why not put it in the posting?

http://axiom-wiki.newsynthesis.org/AxiomEmacsMode

Ralf

On 05/16/2008 08:02 PM, Martin Rubey wrote:
> Zach Smith writes:
> 
>> Tim, please tell me that Firefox will not be the only way to interface with
>> Axiom.  It will still be possible to write an Emacs mode for it, something
>> like IMaxima?  Also, why only Firefox, why not any browser?
> 
> There is an emacs mode.  PLEASE try it and give feedback.
> 
> You'll find it on mathaction.
> 
> Martin

\start
Date: Fri, 16 May 2008 16:21:54 -0400
From: Tim Daly
To: Zach Smith
Subject: Re: [Axiom-mail] Axiom v. Maxima


>So, I am extremely new to Axiom, in fact I pretty much don't know how to do
>anything I want with the system, even after reading the introductory
>materials.  But I just want to say that Alasdair has some good points from
>my point of view.

Please look at my reply to Alasdair. There are links to other free
material.





>When I was searching for a free CAS I found Maxima first (around 6 years

...[snip]...
>This is really big, but perhaps not for the reasons one might think.  I have
>read some of Prof. Woollett's chapters and they leave something to be
>desired for anyone not brand spanking new to the system.  In fact, for any
>advanced usage information, nothing seems to replace the mailing list which
>is perhaps 10 times as active as axiom-developer and axiom-math put
>together.  What this does show is that Maxima has a user base that cares
>about it.  Archaic languages such as C survive because they have a large
>user base, which creates more development/ease of
>use/portability/efficiency, which draws more people to the language.  The
>fact that more people seem (are?) interested in Maxima makes it seem that
>the project is healthier than Axiom.
...[snip]...
>Perhaps some public relations work would help?
>

<humor>Perhaps we could offer pay-per-post?</humor>

Seriously, though, I have no idea how to increase mailing list posts.






>>   5. The various forks: Axiom, FriCAS, OpenAxiom, also must make it hard
>>   for the new user - which one to choose, and why?  The many many
>>   distributions of Linux make choosing one awfully hard for the beginner -
>>   even I, who've been using Linux exclusively for over 15 years, get
>confused
>>   on the rare occasions I have to install a new system.  Axiom has the
>same
>>   problem.
>
>Once again, this seems to point to an overall relative unhealthiness in
>Axiom as compared to Maxima.  When projects fork, it necessarily applies
>stress to the users (and I assume developers).  But more importantly, it
>makes the choice more complicated for new users.  As a newcomer, it looks
>like rats leaving a sinking ship, but should you trust a rats assessment of
>the ships status?  As sad as it may be, people, in my experience, do not
>like choices.  Tell me, is there any bad blood behind the forks?

There was a disagreement about the vision and long term goals of the
Axiom project. I cannot speak for any other project but Axiom has the
goal of making a sustainable system that can form the basis for the
science of computational mathematics.

To be sustainable means that users must be able to understand,
maintain, and modify the system. Understanding the system implies that
people can know the "why and what", that is, why a piece of code is
written the way it is and what the code actually does.  The "why" is
generally not available in most systems, even though this is
fundamentally important (e.g. writing the code in a special way was
done to optimize cache-load times). The "what" is generally only
available from published algorithms cached in pay-per-view databases
(e.g. ACM) or other expensive sources (I just paid $350 for a copy of
Luke's special function books). Worse yet, the actual algorithm is
both an original algorithm from a paper plus later, possibly never
published, improvements. Even worse yet, even if you understand the
algorithm and read the code you'll find it a challenge.

It is vitally important to understand the details before changing
the system. Axiom has grown beyond the complexity bound where local
fixes can be safely applied without understanding. (Witness the two
incidents in the past related to algebra fixes). Unless these are
caught by comprehensive, system-independent mathematical test cases
(e.g. the Computer Algebra Test Suite (CATS)) they pass quietly into
incorrect results.

Axiom has been recast into literate documents. The point of this
exercise is to draw together the source materials, the "why" 
explanations, the "what" explanations, the test cases, and all
other related pieces of information. This is intended to be written
in a "literate" style so one can just sit down and read the system
like a book, with the important information being introduce when
the discussion motivates it.

In the long term you should be able to read Axiom from cover to 
cover (unlikely given the volume of material) and get an education
in both Axiom and the underlying computational mathematics. When
you decide to improve the system you can enter into a "conversation"
with the prior developers by updating the surrounding discussion as
well as the code, giving your motivations and insights. People should
be able to publish literate documents at a conference which you just
drag-and-drop onto your system (perhaps during their talk) and it
"just works".

Since this is a long term effort, as indicated by the phrase
"The 30 Year Horizon", it will take a while to approach these goals.

Not everyone cares about this. Some would rather continue building
systems "the old fashioned way", or make it different without caring
why it is the way it is. Documenting code is hard and much more time
consuming than just writing code. And few people are willing to
sacrifice their own time now to benefit other people later. So Axiom's
goals are quite controversial. Thus, the forks.

Its not bad blood. It's a difference of goals. Everyone involved
has excellent and admirable motives for what they do. 







>> Future releases will have a primitive Firefox front end to Axiom,
>similar in spirit (but not design) to the MMA, Maple, and Sage  notebooks.
>> I'm working on various tools in javascript but they are not ready for
>> release yet. I'm also in design discussions with a graphics designer
>> to try to maximize the user viewpoint. This will take a few release
>> cycles to fully emerge.
>
>Tim, please tell me that Firefox will not be the only way to interface with
>Axiom.  It will still be possible to write an Emacs mode for it, something
>like IMaxima?  Also, why only Firefox, why not any browser?

Well, any browser is fine. But all I have available is Firefox.
I'm not a browser-agile developer so I have no idea what is required
to get new fonts into Opera, or canvas tag support in IE, or graphics
in graphics in Lynx :-)

Hyperdoc was the original help system in Axiom and was way ahead of
its time in the functions it presented. It was designed to allow users
to create new pages, for instance. But over the lifetime of the system
only NAG developed a few new pages. Hyperdoc is difficult to port and
requires an X11 system, special socket handling, etc. Hyperdoc is
special purpose C code I need to maintain.

The new browser front end is designed to allow users to develop new
material in html and javascript, while interacting with Axiom. It
should be completely portable without any special requirements. 
There will be no C code to maintain, although there is new, minimal
javascript/css code.

I did write a wxAxiom (using a fork of the wxMaxima code) but decided
it was yet-another-pile of code to maintain. I like wxMaxima. I just
don't see the advantage of special purpose code when I can leverage
the browser functionality better. I did have to figure out how to
create CSS-based drop-down menus but that's my learning curve issue.

The new browser front end is forming the basis for the Crystal
interface (see the mailing list archives), although this won't
be readily apparent for quite a while.

I believe Martin Rubey (copied on this) has an Emacs mode.
You might consider trying that.

You'll still have all the old interfaces to Axiom, although once
the Firefox front end works I plan to remove all the old hyperdoc
and graphics code. This will significantly improve the ability to
port Axiom to other platforms since most of the issues of porting
have to do with the "portable" C code. 

\start
Date: Fri, 16 May 2008 12:24:06 -0700
From: Arthur Ralfs
To: list
Subject: re: [Axiom-mail] Axiom v. Maxima

Zach wrote:
>
>
> Tim, please tell me that Firefox will not be the only way to interface 
> with Axiom.  It will still be possible to write an Emacs mode for it, 
> something like IMaxima?  Also, why only Firefox, why not any browser?
>
> Zach
>
>
Zach,

In the work I've done my goal has been to make a browser interface
based on completely free and open source software and standards, which
I realized was a possibility when I noticed Firefox supported MathML
and SVG.  If another browser supports these standards then anything I
do should be easily transferable.  I understand that there is a plugin
(Mathplayer I think) that enables MathML in IE.  However IE is not
free and open source software so I don't code specifically for IE on
my volunteer time.  I also have heard that Opera has implemented some
sort of MathML support but I haven't looked into it.

\start
Date: Sat, 17 May 2008 20:00:17 -0400
From: Tim Daly
To: list
Subject: floating point changes

The floating point results returned running fedora8 and fedora9 differ
in the low order bits (same hardware). Does anyone know what might
have changed? Is this a library or C compiler change?

\start
Date: Sat, 17 May 2008 17:56:19 -0500
From: Gabriel Dos Reis
To: Tim Daly
Subject: Re: floating point changes

On Sat, May 17, 2008 at 7:00 PM, Tim Daly wrote:
> The floating point results returned running fedora8 and fedora9 differ
> in the low order bits (same hardware). Does anyone know what might
> have changed? Is this a library or C compiler change?

If you're running on x86, then your floating point calculations are at
the mercy of how aggressive the compiler is at keeping numbers in
registers or other constants folding.  Unless, you use certifying
libraries such as MPFR.

This is to a large extent a hardware problem

\start
Date: Sun, 18 May 2008 15:37:31 -0400
From: Tim Daly
To: Aleksej Saushev
Subject: pkg-src

>I'd really like to push Axiom into the world, but I don't
>believe in tarballs or binary packages, other ways for Axiom
>to get into major distribution is pkgsrc (http://pkgsrc.org).

I'm looking at pkgsrc now.

Axiom is currently available as tarballs and binaries.
It is also available thru git, arch, cvs, and svn.
Master copies of releases are updated every other month on
sourceforge, savannah, github, and axiom-developer.org




>I've seen your mail with the statement, that Axiom should just
>build. Unfortunatly, the way to incorporate all tools needed
>is dead one. 

Yes, this has been debated in the past on the mailing list.
FriCAS builds with a previously installed lisp.




>I had experience with several similar attempts
>in past, they all presented miserable picture. As for now,
>I see only one practical way. It is pkgsrc. The points are:
>1. It is really cross-platform. I use it on NetBSD, FreeBSD,
>have used it successfully on RedHat Fedora, Gentoo, SuSE,
>Debian, Windows XP. I know personally those, who use it on
>Solaris, IRIX, HP-UX, Mac OS X.

I tried to port Axiom to FreeBSD without success.

I did succeed getting it running on Mac OSX.

There is an old Debian version of Axiom but Debian requires a
complete restructuring of the source tree to do things like split
the documentation from the source code. Given that Axiom merges
documentation and source this isn't a reasonable split for Axiom.

I have a copy of the latest OpenSolaris but the build attempt is
stalled because Latex requires a module from Sun which is not
available except to people who pay for support. I can find no way
around this restriction so OpenSolaris support is unlikely.

Windows support will come after the browser and ASDF changes.





>2. There's technically qualified community around that supports
>it, providing regular bulk builds for major platforms.

A community that supports pkgsrc? Or a community that supports
the packages? I doubt I'll find a community that supports the 
packages.





>3. You can ship reduced infrastructure just to deploy Axiom,
>thus you don't need to maintain tools yourself.

Axiom requires very little "infrastructure", basically just
make, some X11 libraries, latex, awk, and gcc.

There has been no need to "maintain" any tools. Tools are not
the key problem facing Axiom. Axiom needs more documentation
and more user-related information. The build system Makefile
chain has been working for 5 years and is rarely changed.




>The only problem is... Axiom needs to get cross-platform too.
>This means, that Lisp in the base has to be changed,
>GCL is dead beyond resurrection, choices are CLISP and SBCL.
>Sad, but true. Other lisps are less portable and less
>actively supported.

Hmmm, methinks you fall into the philosophy supporting FriCAS.
Waldek seems to have your goals already achieved.

Axiom's approach to becoming cross-platform is to use the browser for
the help system and graphics. Once that is complete we can delete all
of the non-portable C code.

Next we move to a lisp-only ASDF build system on an ANSI common lisp
platform which gets rid of make and all the related tools. The
lisp-only system will have native support for noweb style source files
since these are the standard Axiom file format. Thus there will be no
need for noweb.

So, in the longer term the only "tools" needed will be lisp and latex.
Everything else, such as make, gcc, awk, noweb, and other tools will
just fade away.





At the present time all anyone needs to do to build Axiom is to set
the AXIOM shell variable properly and type 'make'. I only claim that
Axiom "just works" on systems that I've personally built. You can see
the list on <http://axiom.axiom-developer.org/axiom-website/download.html>

I don't see that this is an area where there is much to improve. Not
everyone agrees.  If you would like to hear other opinions they are
journaled in the mailing list archives.

Given your suggestion, though, I'll review pkgsrc sometime this week.

\start
Date: Sun, 18 May 2008 21:41:08 -0400
From: Tim Daly
To: Aleksej Saushev
Subject: Re: pkg-src

>> Axiom is currently available as tarballs and binaries.
>> It is also available thru git, arch, cvs, and svn.
>> Master copies of releases are updated every other month on
>> sourceforge, savannah, github, and axiom-developer.org
>
>This scheme actually is problematic. We need tarballs or other
>reliable forms of distribution (like ZIP archives), so that we
>could have reliable cryptographic sums. VCS access is problematic.
>
>In WIP (http://pkgsrc-wip.sf.net/) there's support for VCS-based
>packages, but those are really unreliable. I maintain several of
>them, and have to admit it myself. To support you need to be able
>to reproduce bugs. With VCS-based package it is problematic.

Git maintains a cryptographic hash that gives exact information
about the source tree in use.

\start
Date: Sun, 18 May 2008 21:42:17 -0400
From: Tim Daly
To: Aleksej Saushev
Subject: Re: pkg-src

>> I have a copy of the latest OpenSolaris but the build attempt is
>> stalled because Latex requires a module from Sun which is not
>> available except to people who pay for support. I can find no way
>> around this restriction so OpenSolaris support is unlikely.
>
>I haven't heard of any problems with teTeX on Solaris.
>
>You might want to try the version from pkgsrc. If you fail
>occasionally, you should definitly contact package team at
><pkgsrc-users@netbsd.org> or file bug report at
>http://netbsd.org/support/send-pr.html
>Solaris is one of the best supported platforms.

I don't have access to a standard solaris box. 
I tried to use the OpenSolaris distro but I failed trying
to install tetex. 

\start
Date: Sun, 18 May 2008 23:43:34 +0400
From: Aleksej Saushev
To: Tim Daly
Subject: Re: pkg-src

Tim Daly writes:

>>I'd really like to push Axiom into the world, but I don't
>>believe in tarballs or binary packages, other ways for Axiom
>>to get into major distribution is pkgsrc (http://pkgsrc.org).
>
> I'm looking at pkgsrc now.
>
> Axiom is currently available as tarballs and binaries.
> It is also available thru git, arch, cvs, and svn.
> Master copies of releases are updated every other month on
> sourceforge, savannah, github, and axiom-developer.org

This scheme actually is problematic. We need tarballs or other
reliable forms of distribution (like ZIP archives), so that we
could have reliable cryptographic sums. VCS access is problematic.

In WIP (http://pkgsrc-wip.sf.net/) there's support for VCS-based
packages, but those are really unreliable. I maintain several of
them, and have to admit it myself. To support you need to be able
to reproduce bugs. With VCS-based package it is problematic.

>>I had experience with several similar attempts
>>in past, they all presented miserable picture. As for now,
>>I see only one practical way. It is pkgsrc. The points are:
>>1. It is really cross-platform. I use it on NetBSD, FreeBSD,
>>have used it successfully on RedHat Fedora, Gentoo, SuSE,
>>Debian, Windows XP. I know personally those, who use it on
>>Solaris, IRIX, HP-UX, Mac OS X.
>
> I tried to port Axiom to FreeBSD without success.
>
> I did succeed getting it running on Mac OSX.
>
> There is an old Debian version of Axiom but Debian requires a
> complete restructuring of the source tree to do things like split
> the documentation from the source code. Given that Axiom merges
> documentation and source this isn't a reasonable split for Axiom.
>
> I have a copy of the latest OpenSolaris but the build attempt is
> stalled because Latex requires a module from Sun which is not
> available except to people who pay for support. I can find no way
> around this restriction so OpenSolaris support is unlikely.

I haven't heard of any problems with teTeX on Solaris.

You might want to try the version from pkgsrc. If you fail
occasionally, you should definitly contact package team at
<pkgsrc-users@netbsd.org> or file bug report at
http://netbsd.org/support/send-pr.html
Solaris is one of the best supported platforms.

>>2. There's technically qualified community around that supports
>>it, providing regular bulk builds for major platforms.
>
> A community that supports pkgsrc? Or a community that supports
> the packages? I doubt I'll find a community that supports the 
> packages.

We do support packages. And since Axiom belongs to the class of
rather rare open-source programs, you may find more supporters,
than you expect.

>>3. You can ship reduced infrastructure just to deploy Axiom,
>>thus you don't need to maintain tools yourself.
>
> Axiom requires very little "infrastructure", basically just
> make, some X11 libraries, latex, awk, and gcc.
>
> There has been no need to "maintain" any tools. Tools are not
> the key problem facing Axiom. Axiom needs more documentation
> and more user-related information. The build system Makefile
> chain has been working for 5 years and is rarely changed.

It doesn't work for me, and many others will consider it unacceptible
to maintain in their system. Probably I come from quite a different
world, and in my world there're rather strict rules to what a package
may and what it may not. Of course, some can let it go any way,
if it doesn't interfere with others, but this is considered
messy nevertheless.

Indifferent to my world, people usually prefer native system packages,
when there's no one, they tend not to install anything at all,
because eventually things change, and you have to update.
What package management system (e.g. pkgsrc) provides, is clean
update path. Once you installed, you don't need to pass through
it, when updating. Installation from tarballs proved to be risky.

>>The only problem is... Axiom needs to get cross-platform too.
>>This means, that Lisp in the base has to be changed,
>>GCL is dead beyond resurrection, choices are CLISP and SBCL.
>>Sad, but true. Other lisps are less portable and less
>>actively supported.
>
> Hmmm, methinks you fall into the philosophy supporting FriCAS.
> Waldek seems to have your goals already achieved.

Except for literate programming, if I understand it correct,
and tarball, which I'm waiting for.

> Axiom's approach to becoming cross-platform is to use the browser for
> the help system and graphics. Once that is complete we can delete all
> of the non-portable C code.

Hm. This means the usage of CGI or similar interfaces.
This may be more problematic, than X toolkits.

> Next we move to a lisp-only ASDF build system on an ANSI common lisp
> platform which gets rid of make and all the related tools. The
> lisp-only system will have native support for noweb style source files
> since these are the standard Axiom file format. Thus there will be no
> need for noweb.
>
> So, in the longer term the only "tools" needed will be lisp and latex.
> Everything else, such as make, gcc, awk, noweb, and other tools will
> just fade away.

The direction is rather clear here. The only problem with this way is,
that ASDF doesn't support parallel builds (make does). When the source
grows, this may become an issue.

> At the present time all anyone needs to do to build Axiom is to set
> the AXIOM shell variable properly and type 'make'. I only claim that
> Axiom "just works" on systems that I've personally built. You can see
> the list on <http://axiom.axiom-developer.org/axiom-website/download.html>

Right, I've seen this list, it doesn't contain any system, which I use.

> I don't see that this is an area where there is much to improve. Not
> everyone agrees.  If you would like to hear other opinions they are
> journaled in the mailing list archives.

> Given your suggestion, though, I'll review pkgsrc sometime this week.

Good luck! If you have any questions, you can ask them on mailing list
<pkgsrc-users@netbsd.org>, or on the IRC #pkgsrc at irc.freenode.net.

\start
Date: Fri, 23 May 2008 05:11:55 -0500
From: Tim Daly
To: list
Subject: 20080523.01.tpd.patch (MIT integration tests)

These are the test cases from the MIT Integration Bee.
==========================================================================
diff --git a/changelog b/changelog
index 8f37ad8..83cda96 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080523 tpd src/input/danzwill2.input MIT integration tests
 20080511 tpd src/input/schaum34.input post-mortem fixes
 20080508 tpd src/input/schaum18.input ignore gensyms
 20080508 tpd src/input/schaum17.input ignore gensyms
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index fdf2fff..9bd57b6 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -300,7 +300,8 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     constant.regress  contfrac.regress contfrc.regress \
     curl.regress      cwmmt.regress \
     cycles1.regress   cycles.regress   cyfactor.regress \
-    danzwill.regress  decimal.regress  defintef.regress defintrf.regress \
+    danzwill.regress  danzwill2.regress  \
+    decimal.regress   defintef.regress defintrf.regress \
     derham.regress    dfloat.regress   dhtri.regress    divisor.regress \
     dmp.regress       dpol.regress     e1.regress       ei.regress \
     easter.regress    efi.regress \
@@ -542,7 +543,8 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/cycles.input   ${OUT}/cycles1.input    ${OUT}/cycloid.input  \
        ${OUT}/cycloid2.input \
        ${OUT}/cycloid3.input ${OUT}/cyfactor.input   ${OUT}/damped.input \
-       ${OUT}/danzwill.input ${OUT}/decimal.input    ${OUT}/defs.input \
+       ${OUT}/danzwill.input ${OUT}/danzwill2.input \
+       ${OUT}/decimal.input    ${OUT}/defs.input \
        ${OUT}/defintef.input ${OUT}/defintrf.input   ${OUT}/derham.input \
        ${OUT}/de2re.input \
        ${OUT}/dfloat.input   ${OUT}/dhtri.input      ${OUT}/divisor.input \
@@ -768,6 +770,7 @@ DOCFILES= \
   ${DOC}/d02raf.input.dvi      ${DOC}/d03edf.input.dvi     \
   ${DOC}/d03eef.input.dvi      ${DOC}/d03faf.input.dvi     \
   ${DOC}/damped.input.dvi      ${DOC}/danzwill.input.dvi   \
+  ${DOC}/danzwill2.input.dvi   \
   ${DOC}/de2re.input.dvi       ${DOC}/decimal.input.dvi    \
   ${DOC}/defintef.input.dvi    ${DOC}/defintrf.input.dvi   \
   ${DOC}/defs.input.dvi        ${DOC}/derham.input.dvi     \
diff --git a/src/input/danzwill2.input.pamphlet b/src/input/danzwill2.input.pamphlet
new file mode 100644
index 0000000..d17eddb
--- /dev/null
+++ b/src/input/danzwill2.input.pamphlet
@@ -0,0 +1,605 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input danzwill2.input}
+\author{Timothy Daly}
+\maketitle
+\begin{abstract}
+Problems from the MIT Integration Bee
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+<<*>>=
+)spool danzwill2.output
+)set message test on
+)set message auto off
+)clear all
+)set break resume
+
+--S 1 of 17
+i1:= integrate(e^(1991*x),x)
+--R 
+--R
+--R          1991x log(e)
+--R        %e
+--R   (1)  --------------
+--R          1991log(e)
+--R                                          Type: Union(Expression Integer,...)
+--E 1
+
+--S 2 of 17
+i2:= integrate((sin(x)-cos(x))^2,x)
+--R 
+--R
+--R              2
+--R   (2)  cos(x)  + x
+--R                                          Type: Union(Expression Integer,...)
+--E 2
+
+--S 3 of 17
+i3:= integrate(log(x),x)
+--R 
+--R
+--R   (3)  x log(x) - x
+--R                                          Type: Union(Expression Integer,...)
+--E 3
+
+--S 4 of 17
+i4:= integrate(1/(%pi*x),x)
+--R 
+--R
+--R        log(x)
+--R   (4)  ------
+--R          %pi
+--R                                          Type: Union(Expression Integer,...)
+--E 4
+
+--S 5 of 17
+i5:= integrate(%e^(sin(x)^2)*%e^(cos(x)^2),x)
+--R 
+--R
+--R   (5)  x %e
+--R                                          Type: Union(Expression Integer,...)
+--E 5
+
+--S 6 of 17
+i6:= integrate(1/(x*log(x)),x)
+--R 
+--R
+--R   (6)  log(log(x))
+--R                                          Type: Union(Expression Integer,...)
+--E 6
+
+--S 7 of 17
+i7:= integrate(x/(x^4+1),x)
+--R 
+--R
+--R              2
+--R        atan(x )
+--R   (7)  --------
+--R            2
+--R                                          Type: Union(Expression Integer,...)
+--E 7
+
+--S 8 of 17
+i8:= integrate((x+1)/(x^2+2*x+2)^(1/3),x)
+--R 
+--R
+--R          +-----------+2
+--R         3| 2
+--R        3\|x  + 2x + 2
+--R   (8)  ----------------
+--R                4
+--R                                          Type: Union(Expression Integer,...)
+--E 8
+
+--S 9 of 17
+i9:= integrate(x*%e^x*sin(x),x)
+--R 
+--R
+--R            x                          x
+--R        x %e sin(x) + (- x + 1)cos(x)%e
+--R   (9)  --------------------------------
+--R                        2
+--R                                          Type: Union(Expression Integer,...)
+--E 9
+
+--S 10 of 17
+i10:= integrate(%e^(%e^x+x),x)
+--R 
+--R
+--R             x
+--R           %e  + x
+--R         %e
+--R   (10)  ---------
+--R              x
+--R            %e
+--R                                          Type: Union(Expression Integer,...)
+--E 10
+
+--S 11 of 17
+i11:= integrate(1/(sec(x)+tan(x)*sin(x)),x)
+--R 
+--R
+--R               (2cos(x) + 3)sin(x)             sin(x)
+--R   (11)  atan(---------------------) - atan(-----------)
+--R                    2                       2cos(x) + 2
+--R              cos(x)  + 2cos(x) + 1
+--R                                          Type: Union(Expression Integer,...)
+--E 11
+
+--S 12 of 17
+i12:= integrate((%e^(5*x)+%e^(7*x))/(%e^x+%e^(-x)),x)
+--R 
+--R
+--R            x 6
+--R         (%e )
+--R   (12)  ------
+--R            6
+--R                                          Type: Union(Expression Integer,...)
+--E 12
+
+--S 13 of 17
+i13:= integrate(sqrt(-1+2/(1+3*x)),x)
+--R 
+--R
+--R                  +--------+             +--------+
+--R                  |- 3x + 1              |- 3x + 1
+--R         - 2atan( |-------- ) + (3x + 1) |--------
+--R                 \| 3x + 1              \| 3x + 1
+--R   (13)  ------------------------------------------
+--R                              3
+--R                                          Type: Union(Expression Integer,...)
+--E 13
+
+--S 14 of 17
+i14:= integrate(sinh(x)-cosh(x),x)
+--R 
+--R
+--R                 1
+--R   (14)  -----------------
+--R         sinh(x) + cosh(x)
+--R                                          Type: Union(Expression Integer,...)
+--E 14
+
+--S 15 of 17
+i15:= integrate((sin(x)*%e^sec(x))/cos(x)^2,x)
+--R 
+--R
+--R              1
+--R           ------
+--R           cos(x)
+--R   (15)  %e
+--R                                          Type: Union(Expression Integer,...)
+--E 15
+
+--S 16 of 17
+i16:= integrate((x^2+1)/(x^4-x^2+1),x)
+--R 
+--R
+--R               3
+--R   (16)  atan(x ) + atan(x)
+--R                                          Type: Union(Expression Integer,...)
+--E 16
+
+--S 17 of 17
+i17:= integrate(1/(%pi*x^2+atan(x)+x^2*atan(x)+%pi),x)
+--R 
+--R
+--R                    2x   2               2x          2
+--R         log(atan(------)  - 4%pi atan(------) + 4%pi )
+--R                   2                    2
+--R                  x  - 1               x  - 1
+--R   (17)  ----------------------------------------------
+--R                                2
+--R                                          Type: Union(Expression Integer,...)
+--E 17
+
+--S 18 of 18
+i18:= integrate(sec(x)^3,x)
+--R 
+--R
+--R   (18)
+--R         2    sin(x) + cos(x) + 1          2    sin(x) - cos(x) - 1
+--R   cos(x) log(-------------------) - cos(x) log(-------------------) + sin(x)
+--R                   cos(x) + 1                        cos(x) + 1
+--R   --------------------------------------------------------------------------
+--R                                           2
+--R                                    2cos(x)
+--R                                          Type: Union(Expression Integer,...)
+--E 18
+ 
+--S 19 of 19 
+i19:= integrate(1/(x^2-10*x+26),x)
+--R 
+--R
+--R   (19)  atan(x - 5)
+--R                                          Type: Union(Expression Integer,...)
+--E 19 
+
+--S 20 of 20 
+i20:= integrate(1/(x^2-11*x-26),x)
+--R 
+--R
+--R         - log(x + 2) + log(x - 13)
+--R   (20)  --------------------------
+--R                     15
+--R                                          Type: Union(Expression Integer,...)
+--E 20 
+
+--S 21 of 21 
+i21:= integrate(1/(12+13*cos(x)),x)
+--R 
+--R
+--R             sin(x) + 5cos(x) + 5        sin(x) - 5cos(x) - 5
+--R         log(--------------------) - log(--------------------)
+--R                  cos(x) + 1                  cos(x) + 1
+--R   (21)  -----------------------------------------------------
+--R                                   5
+--R                                          Type: Union(Expression Integer,...)
+--E 21 
+
+--S 22 of 22 
+i22:= integrate((x^3+1)/(x+1),x)
+--R 
+--R
+--R           3     2
+--R         2x  - 3x  + 6x
+--R   (22)  --------------
+--R                6
+--R                                          Type: Union(Expression Integer,...)
+--E 22 
+
+--S 23 of 23 
+i23:= integrate((1-4*x^4)^(-1/2)/(4*x)^(-1),x)
+--R 
+--R
+--R                  +---------+
+--R                  |    4
+--R                 \|- 4x  + 1  - 1
+--R   (23)  - 2atan(----------------)
+--R                          2
+--R                        2x
+--R                                          Type: Union(Expression Integer,...)
+--E 23 
+
+--S 24 of 24 
+i24:= integrate(%e^(1991),x)
+--R 
+--R
+--R             1991
+--R   (24)  x %e
+--R                                          Type: Union(Expression Integer,...)
+--E 24 
+
+--S 25 of 25 
+i25:= integrate((log(x)+1)*x^x,x)
+--R 
+--R
+--R           x log(x)
+--R   (25)  %e
+--R                                          Type: Union(Expression Integer,...)
+--E 25 
+
+--S 26 of 26 
+i26:= integrate(cos(2*x)*sin(6*x),x)
+--R 
+--R
+--R                   4          2
+--R         - 2cos(2x)  + cos(2x)
+--R   (26)  ----------------------
+--R                    4
+--R                                          Type: Union(Expression Integer,...)
+--E 26 
+
+--S 27 of 27 
+i27:= integrate(1/(sqrt(x)*(1+sqrt(x))),x)
+--R 
+--R
+--R               +-+
+--R   (27)  2log(\|x  + 1)
+--R                                          Type: Union(Expression Integer,...)
+--E 27 
+
+--S 28 of 28 
+i28:= integrate(e^(1/x)*x^(-3),x)
+--R 
+--R
+--R                         log(e)
+--R                         ------
+--R                            x
+--R         (- log(e) + x)%e
+--R   (28)  ----------------------
+--R                        2
+--R                x log(e)
+--R                                          Type: Union(Expression Integer,...)
+--E 28 
+
+--S 29 of 29 
+i29:= integrate(sqrt(csc(x)-sin(x)),x)
+--R 
+--R
+--R                         +--------------------------------+
+--R                         |         - 16cos(x) + 16
+--R   (29)  (- cos(x) - 1)  |--------------------------------
+--R                        4|      3          2
+--R                        \|cos(x)  + 3cos(x)  + 3cos(x) + 1
+--R                                          Type: Union(Expression Integer,...)
+--E 29 
+
+--S 30 of 30 
+i30:= integrate((x^2+1)/(x^3-x),x)
+--R 
+--R
+--R              2
+--R   (30)  log(x  - 1) - log(x)
+--R                                          Type: Union(Expression Integer,...)
+--E 30 
+
+--S 31 of 31 
+i31:= integrate(42^x,x)
+--R 
+--R
+--R           x log(42)
+--R         %e
+--R   (31)  -----------
+--R           log(42)
+--R                                          Type: Union(Expression Integer,...)
+--E 31 
+
+--S 32 of 32 
+i32:= integrate(x^5*%e^x,x)
+--R 
+--R
+--R           5     4      3      2                x
+--R   (32)  (x  - 5x  + 20x  - 60x  + 120x - 120)%e
+--R                                          Type: Union(Expression Integer,...)
+--E 32 
+
+--S 33 of 33 
+i33:= integrate(x*%e^(x^2),x)
+--R 
+--R
+--R            2
+--R           x
+--R         %e
+--R   (33)  ----
+--R           2
+--R                                          Type: Union(Expression Integer,...)
+--E 33 
+
+--S 34 of 34 
+i34:= integrate(1/(x^2+1)^2,x)
+--R 
+--R
+--R           2
+--R         (x  + 1)atan(x) + x
+--R   (34)  -------------------
+--R                 2
+--R               2x  + 2
+--R                                          Type: Union(Expression Integer,...)
+--E 34 
+
+--S 35 of 35 
+i35:= integrate(1/(%e^x+%e^(-x)),x)
+--R 
+--R
+--R                x
+--R   (35)  atan(%e )
+--R                                          Type: Union(Expression Integer,...)
+--E 35 
+
+--S 36 of 36 
+i36:= integrate(tan(x)*log(abs(sec(x))),x)
+--R 
+--R
+--R              +-------+ 2
+--R              |   1
+--R         log( |------- )
+--R              |      2
+--R             \|cos(x)
+--R   (36)  ----------------
+--R                 2
+--R                                          Type: Union(Expression Integer,...)
+--E 36 
+
+--S 37 of 37 
+i37:= integrate(cos(sin(x))*cos(x),x)
+--R 
+--R
+--R   (37)  sin(sin(x))
+--R                                          Type: Union(Expression Integer,...)
+--E 37 
+
+--S 38 of 38 
+i38:= integrate(1/(x^2-9),x)
+--R 
+--R
+--R         - log(x + 3) + log(x - 3)
+--R   (38)  -------------------------
+--R                     6
+--R                                          Type: Union(Expression Integer,...)
+--E 38 
+
+--S 39 of 39 
+i39:= integrate(%pi/sqrt(16-%e^2),x)
+--R 
+--R
+--R             %pi x
+--R   (39)  -------------
+--R          +----------+
+--R          |    2
+--R         \|- %e  + 16
+--R                                          Type: Union(Expression Integer,...)
+--E 39 
+
+--S 40 of 40 
+i40:= integrate(sqrt(tan(x)),x)
+--R 
+--R
+--R   (40)
+--R          +-+
+--R         \|2
+--R      *
+--R                                                  +------+
+--R                  +-+                 +-+      2  |sin(x)
+--R         log((- 2\|2 cos(x)sin(x) - 2\|2 cos(x) ) |------  + 4cos(x)sin(x) + 1)
+--R                                                 \|cos(x)
+--R     + 
+--R                              +------+
+--R                              |sin(x)     +-+                +-+      2    +-+
+--R                2cos(x)sin(x) |------  - \|2 cos(x)sin(x) + \|2 cos(x)  - \|2
+--R        +-+                  \|cos(x)
+--R       \|2 atan(--------------------------------------------------------------)
+--R                               +------+
+--R                             2 |sin(x)     +-+                +-+      2
+--R                      2cos(x)  |------  - \|2 cos(x)sin(x) - \|2 cos(x)
+--R                              \|cos(x)
+--R     + 
+--R       -
+--R             +-+
+--R            \|2
+--R         *
+--R                             +------+
+--R                             |sin(x)      +-+                 +-+      2    +-+
+--R               4cos(x)sin(x) |------  - 2\|2 cos(x)sin(x) + 2\|2 cos(x)  - \|2
+--R                            \|cos(x)
+--R          atan(----------------------------------------------------------------)
+--R                           +------+
+--R                         2 |sin(x)      +-+                 +-+      2    +-+
+--R                  4cos(x)  |------  - 2\|2 cos(x)sin(x) - 2\|2 cos(x)  + \|2
+--R                          \|cos(x)
+--R     + 
+--R                                 +------+
+--R                                 |sin(x)     +-+                +-+      2
+--R                   2cos(x)sin(x) |------  - \|2 cos(x)sin(x) + \|2 cos(x)
+--R          +-+                   \|cos(x)
+--R       - \|2 atan(---------------------------------------------------------)
+--R                           +------+
+--R                         2 |sin(x)     +-+                +-+      2    +-+
+--R                  2cos(x)  |------  - \|2 cos(x)sin(x) - \|2 cos(x)  + \|2
+--R                          \|cos(x)
+--R  /
+--R     4
+--R                                          Type: Union(Expression Integer,...)
+--E 40 
+
+--S 41 of 41 
+i41:= integrate(sin(x)^(-1),x)
+--R 
+--R
+--R               sin(x)
+--R   (41)  log(----------)
+--R             cos(x) + 1
+--R                                          Type: Union(Expression Integer,...)
+--E 41 
+
+--S 42 of 42 
+i42:= integrate((x^2-2*x+2)/(x^2+1),x)
+--R 
+--R
+--R                2
+--R   (42)  - log(x  + 1) + atan(x) + x
+--R                                          Type: Union(Expression Integer,...)
+--E 42 
+
+--S 43 of 43 
+i43:= integrate((sin(x)^2*cos(x)^2)/(1+cos(2*x)),x)
+--R 
+--R
+--R         - cos(x)sin(x) + x
+--R   (43)  ------------------
+--R                  4
+--R                                          Type: Union(Expression Integer,...)
+--E 43 
+
+--S 44 of 44 
+i44:= integrate(sqrt(x+x^2*sqrt(x)),x)
+--R 
+--R
+--R                       +----------+
+--R            +-+     2  | 2 +-+
+--R         (4\|x  + 4x )\|x \|x  + x
+--R   (44)  --------------------------
+--R                     9x
+--R                                          Type: Union(Expression Integer,...)
+--E 44 
+
+--S 45 of 45 
+i45:= integrate(cos(4*x)*cos(2*x),x)
+--R 
+--R
+--R                  2
+--R         (2cos(2x)  + 1)sin(2x)
+--R   (45)  ----------------------
+--R                    6
+--R                                          Type: Union(Expression Integer,...)
+--E 45 
+
+--S 46 of 46 
+i46:= integrate(sqrt(x^3-1)/x,x)
+--R 
+--R
+--R                  +------+      +------+
+--R                  | 3           | 3
+--R         - 2atan(\|x  - 1 ) + 2\|x  - 1
+--R   (46)  -------------------------------
+--R                        3
+--R                                          Type: Union(Expression Integer,...)
+--E 46 
+
+--S 47 of 47 
+i47:= integrate((%e^x*(x-2))/x^3,x)
+--R 
+--R
+--R           x
+--R         %e
+--R   (47)  ---
+--R           2
+--R          x
+--R                                          Type: Union(Expression Integer,...)
+--E 47 
+
+--S 48 of 48 
+i48:= integrate(cot(x)/log(sin(x)),x)
+--R 
+--R
+--R   (48)  log(log(sin(x)))
+--R                                          Type: Union(Expression Integer,...)
+--E 48 
+
+--S 49 of 49 
+i49:= integrate(x*sec(x)^2,x)
+--R 
+--R
+--R                          2                      2cos(x)
+--R         - cos(x)log(----------) + cos(x)log(- ----------) + x sin(x)
+--R                     cos(x) + 1                cos(x) + 1
+--R   (49)  ------------------------------------------------------------
+--R                                    cos(x)
+--R                                          Type: Union(Expression Integer,...)
+--E 49 
+
+--S 50 of 50 
+i50:= integrate(x*sec(x)*(x*tan(x)+2),x)
+--R 
+--R
+--R            2
+--R           x
+--R   (50)  ------
+--R         cos(x)
+--R                                          Type: Union(Expression Integer,...)
+--E 50 
+)spool
+)lisp (bye)
+ 
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} Zwillinger, Daniel, ``Handbook of Integration'', 
+Jones and Bartlett, Boston 1992 ISBN 0-86720-293-9 pp28-29
+\end{thebibliography}
+\end{document}
+
+ 

\start
Date: Fri, 23 May 2008 05:33:46 -0500
From: Tim Daly
To: list
Subject: Lisp Macros

I'd encourage you to look at 
 "Let Over Lambda -- 50 Years of Lisp"
which is a new book devoted entirely to the subject of macros in lisp.

  "This book is about macros, that is programs that write programs.
   Macros are what make lisp the greatest programming language in
   the world. When used properly, macros enable amazing feats of
   abstraction, programmer productivity, and code efficiency and
   security that are unheard of elsewhere. Macros let you do things
   you simply cannot do in other languages."

Domain-specific languages (DSLs) are trivially easy to create with
macros and vastly simplify programming. The end user can develop
their own notation which can be "processed as written". This enables
the end user to verify that the system is working from their specs.

In my regular work, I have two embedded DSLs within my program which
allows expressing concepts "in the language used by the customer". 
Because they are macros they do not require separate parsers. The 
original Java version had 2 embedded parsers with BNF specifications
as well as a heavyweight XML backend.

In addition, the single macro statements, depending on context, expand
into source program text for an external compiler, a conditional
concurrent assignment statement for logic programming, and an XML
stream for further downstream processes.

Internally within Axiom there are many uses of macros, the most common
one is probably the spadcall macro. If you really want to understand
the internals of Axiom's implementation, you need to understand macros.

If you haven't tried using macros, I'd encourage you to look at this
technology in common lisp.

\start
Date: 24 May 2008 11:11:29 +0200
From: Martin Rubey
To: Aleksej Saushev
Subject: re: pkg-src

Aleksej Saushev writes:

> > Hmmm, methinks you fall into the philosophy supporting FriCAS.
> > Waldek seems to have your goals already achieved.
> 
> Except for literate programming, if I understand it correct,

This is not quite correct.  Our approach (well, at least mine) is to use
literate programming with LaTeX for everything written in SPAD or Aldor, i.e.,
everything below the compiler and interpreter level.

For the rest (i.e., Makefiles, code written in Lisp and code written in Boot),
we do not use LaTeX.  I think that this is ok since you rarely need math for
Makefile documentation.  It is *not* my intention to separate code from
documentation.  (Very recently, some rather old and partially outdated
documentation of Makefiles has been put into separate files.  I do not have the
energy to maintain this documentation, and it seems to me that it is relatively
short living, in comparison to the algorithms in the algebra.)

> and tarball, which I'm waiting for.

You can find tarballs here:

http://sourceforge.net/project/showfiles.php?group_id=200168

Is that what you are looking for?

\start
Date: Mon, 26 May 2008 19:27:45 -0500
From: Tim Daly
To: list
Subject: May 2008 Release

The process of releasing Axiom for May has started. 
The various sources websites should be up to date within a few days.
I will post a notice when the release is complete.
Binaries will also be available at that time.

This version concentrated mostly on deeper test suites and documentation.


COMPUTER ALGEBRA TEST SUITE

A large part of the effort for these two months has involved detailed
test cases of Axiom's integration routines against Schaum's Handbook
of Mathematical Formulas. Of the 619 integrals, the detailed results are:

419 Schaums and Axiom agree
137 No closed form solution
 60 Cannot simplify

  2 Typos found in Schaums
  1 Axiom bug

The Axiom bug was in src/algebra/intef.spad.pamphlet. There was a
fix applied to this code for a previously identified bug but the
previous fix was incorrect.

In addition, there were
 src/input/danzwill2.input.pamphlet added for the MIT Integration tests
 src/inputmapleok.input.pamphlet to fix typos
 src/input/kamke1.input.pamphlet had ode97 removed due to running time
 src/input/kamke2.input.pamphlet ode104, ode105 removed for running time

DOCUMENTATION
	Max Tegmark's 'toe' diagram, src/doc/toe.gif

PORTING
        GCLOPTS-CUSTRELOC disable-locbfd for MACOSXPPC
	
\start
Date: Mon, 26 May 2008 20:22:30 -0500
From: Tim Daly
To: list
Subject: 20080526.01.tpd.patch (add fedora8-64 to Makefile)

Handle the fedora8-64 platform.
====================================================================
diff --git a/Makefile.pamphlet b/Makefile.pamphlet
index df24e48..95dbce8 100644
--- a/Makefile.pamphlet
+++ b/Makefile.pamphlet
@@ -1835,6 +1835,55 @@ all: rootdirs noweb srcsetup lspdir srcdir
 <<clean>>
 
 @
+\subsection{Makefile.fedora8-64}
+Fedora 8 on a 64 bit machine requires gcl-2.6.8pre2
+<<Makefile.fedora8-64>>=
+GCLVERSION=gcl-2.6.8pre2
+GCLDIR=${LSP}/${GCLVERSION}
+# System dependent Makefile for the Intel/Linux platform
+# Platform variable
+PLF=LINUXplatform
+# C compiler flags
+CCF="-O2 -fno-strength-reduce -Wall -D_GNU_SOURCE -D${PLF} -I/usr/X11/include"
+# Loader flags
+LDF=" -L/usr/X11R6/lib -l Xpm "
+# C compiler to use
+CC=gcc 
+AWK=gawk
+RANLIB=ranlib
+TOUCH=touch
+TAR=tar
+AXIOMXLROOT=${AXIOM}/compiler
+O=o
+BYE=bye
+LISP=lsp
+DAASE=${SRC}/share
+# where the libXpm.a library lives
+XLIB=/usr/X11R6/lib
+<<GCLOPTS-LOCBFD>>
+<<SRCDIRS>>
+PATCH=patch
+
+ENV=PLF=${PLF} CCF=${CCF} LDF=${LDF} CC=${CC} AWK=${AWK} RANLIB=${RANLIB} \
+    TOUCH=${TOUCH} TAR=${TAR} AXIOMXLROOT=${AXIOMXLROOT} O=${O} BYE=${BYE} \
+    LISP=${LISP} DAASE=${DAASE} XLIB=${XLIB} GCLOPTS=${GCLOPTS} \
+    SRCDIRS=${SRCDIRS} PATCH=${PATCH}
+
+all: rootdirs noweb srcsetup lspdir srcdir
+	@echo 45 Makefile.linux called
+	@echo 46 Environment : ${ENV} 
+	@echo 47 finished system build on `date` | tee >lastBuildDate
+
+<<rootdirs>>
+<<noweb>>
+<<literate commands>>
+<<srcsetup>>
+<<src>>
+<<lsp>>
+<<document>>
+<<clean>>
+
+@
 \subsection{Makefile.gentoo}
 Annoyingly enough it seems that GCL uses a default extension of .lsp
 rather than .lisp so we add the [[LISP]] variable here. We need to
diff --git a/changelog b/changelog
index 673579c..d4404a9 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080526 tpd Makefile add fedora8-64 stanza
 20080526 tpd Makefile VERSION="Axiom (May 2008)"
 20080524 tpd Makefile opensuse use GCLVERSION=gcl-2.6.8pre2
 20080524 tpd Makefile GCLOPTS-CUSTRELOC disable-locbfd for MACOSXPPC

\start
Date: Tue, 27 May 2008 18:03:23 -0500
From: Tim Daly
To: list
Subject: 20080527.01.tpd.patch (Fedora 9 updates)

Changes to build Axiom on the Fedora 9 platform.

======================================================================
diff --git a/Makefile.pamphlet b/Makefile.pamphlet
index 95dbce8..ba4541c 100644
--- a/Makefile.pamphlet
+++ b/Makefile.pamphlet
@@ -1884,6 +1884,81 @@ all: rootdirs noweb srcsetup lspdir srcdir
 <<clean>>
 
 @
+\subsection{Makefile.fedora9}
+On Fedora Core 9 we cannot use the line
+\begin{verbatim}
+  ${XLIB}/libXpm.a
+\end{verbatim}
+to link to the Xpm libraries. Instead We need to use
+\begin{verbatim}
+  -l Xpm
+\end{verbatim}
+These are added onto the end of the LDF variable.
+
+Annoyingly enough it seems that GCL uses a default extension of .lsp
+rather than .lisp so we add the [[LISP]] variable here. We need to
+depend on the default extension behavior because the system build
+will load either the interpreted or compiled form of a file depending
+on which is available. This varies at different stages of the build.
+
+It turns out that the standard GCL OPTS does not compile with the
+GCL 2.6.8pre version. We changed it from 
+\begin{verbatim}
+@<<GCLOPTS>>
+\end{verbatim}
+to read
+\begin{verbatim}
+@<<GCLOPTS-LOCBFD>>
+\end{verbatim}
+
+GCL-2.6.8pre2 will not build successfully on fedora core 9
+so we need to downgrade the GCLVERSION.
+<<Makefile.fedora9>>=
+#GCLVERSION=gcl-2.6.8pre
+# System dependent Makefile for the Intel/Linux platform
+# Platform variable
+PLF=LINUXplatform
+# C compiler flags
+CCF="-O2 -fno-strength-reduce -Wall -D_GNU_SOURCE -D${PLF} -I/usr/X11/include"
+# Loader flags
+LDF=" -L/usr/X11R6/lib -l Xpm "
+# C compiler to use
+CC=gcc 
+AWK=gawk
+RANLIB=ranlib
+TOUCH=touch
+TAR=tar
+AXIOMXLROOT=${AXIOM}/compiler
+O=o
+BYE=bye
+LISP=lsp
+DAASE=${SRC}/share
+# where the libXpm.a library lives
+XLIB=/usr/X11R6/lib
+<<GCLOPTS-LOCBFD>>
+<<SRCDIRS>>
+PATCH=patch
+
+ENV=PLF=${PLF} CCF=${CCF} LDF=${LDF} CC=${CC} AWK=${AWK} RANLIB=${RANLIB} \
+    TOUCH=${TOUCH} TAR=${TAR} AXIOMXLROOT=${AXIOMXLROOT} O=${O} BYE=${BYE} \
+    LISP=${LISP} DAASE=${DAASE} XLIB=${XLIB} GCLOPTS=${GCLOPTS} \
+    SRCDIRS=${SRCDIRS} PATCH=${PATCH}
+
+all: rootdirs noweb srcsetup lspdir srcdir
+	@echo 45 Makefile.linux called
+	@echo 46 Environment : ${ENV} 
+	@echo 47 finished system build on `date` | tee >lastBuildDate
+
+<<rootdirs>>
+<<noweb>>
+<<literate commands>>
+<<srcsetup>>
+<<src>>
+<<lsp>>
+<<document>>
+<<clean>>
+
+@
 \subsection{Makefile.gentoo}
 Annoyingly enough it seems that GCL uses a default extension of .lsp
 rather than .lisp so we add the [[LISP]] variable here. We need to
diff --git a/changelog b/changelog
index d4404a9..360115d 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20080527 tpd Makefile add fedora9 stanza
+20080527 tpd faq 47: Axiom won't build on Fedora 9 (SELinux)
 20080526 tpd Makefile add fedora8-64 stanza
 20080526 tpd Makefile VERSION="Axiom (May 2008)"
 20080524 tpd Makefile opensuse use GCLVERSION=gcl-2.6.8pre2
diff --git a/faq b/faq
index ac41077..d9ba9a3 100644
--- a/faq
+++ b/faq
@@ -45,6 +45,7 @@ FAQ 43: Is Axiom's License compatible with the GPL?
 FAQ 44: I don't have the math fonts
 FAQ 45: Axiom copyright information
 FAQ 46: Axiom trademark information
+FAQ 47: Axiom won't build on Fedora 9 (SELinux)
 
 ===================================================================
 FAQ 0: How do I use Axiom?
@@ -669,8 +670,7 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
 6) Did axiom 'make' to compile the revised floats domain and
    (hopefully) run the negfloats.input test file.
 
-   ./configure
-   (set AXIOM and PATH manually ... yuck :)
+   (set AXIOM and PATH manually ...)
    make
 
 ===================================================================
@@ -1655,3 +1655,81 @@ Axiom websites at
   sourceforge.net/projects/axiom
   github.com/daly/axiom
 
+
+===================================================================
+FAQ 47: Axiom won't build on Fedora 9 (SELinux)
+===================================================================
+You need to turn off dynamic library load point randomization.
+As root do:
+
+echo 0 >/proc/sys/kernel/randomize_va_space
+
+or do
+
+setarch i386 -R make 
+
+Also, Fedora now appears to install SELinux without giving the
+user an option at system install time. The symptom seems to be:
+
+...[snip]...
+ invoking make in ~/axiom/src/boot
+ Permission Denied
+...[snip]...
+
+Problem:
+
+SELinux is preventing lisp from changing the access protection of
+memory on the heap
+
+Explanation:
+
+The lisp application attempted to change the access protection of
+memory on the heap (e.g. allocated using malloc). This is a potential
+security problem. Applications should not be doing this. Applications
+are sometimes coded incorrectly and request this permission. The
+SELinux Memory Protections Tests web page explains how to remove this
+requirement. If lisp does not work and you need it to work, you can
+configure SELinux temporarily to allow this access until the
+application is fixed.
+
+If you want lisp to continue, you must turn on the allow_execheap boolean.
+
+setsebool -P allow_execheap=1
+
+Rant: Not "applications should not be doing this...applications are
+sometimes coded incorrectly"... but "security software should not be
+doing this...security software is sometimes coded incorrectly".
+Claiming valid code is incorrect is a bug in SELinux. Programs change
+protection to allow efficiencies like copy-on-write, garbage collection
+optimizations, dynamically compiled functions executed out of the
+heap, dynamic stack boundary checking, etc.. This is common computer
+science knowledge. The hubris of the "explanation" is beyond remark.
+
+Another alternative is to use the commands:
+
+/sbin/sysctl -w kernel.randomize_va_space=0
+/sbin/sysctl -w kernel.exec-shield=0
+
+A third alternative is to edit /etc/sysctl.conf and add the lines:
+
+kernel.randomize_va_space=0
+kernel.exec-shield=0
+
+If the above fails then it is possible that you may have to take
+more drastic measures. This will disable the SELinux:
+
+/usr/sbin/setenforce 0
+
+although it may be possible to tweak the policy directly. 
+
+Change
+/etc/selinux/strict/src/policy/domains/user.te:bool allow_execmem false;
+to
+/etc/selinux/strict/src/policy/domains/user.te:bool allow_execmem true;
+
+then do:
+
+cd /etc/selinux/strict/src/policy
+make load
+
+

\start
Date: Tue, 27 May 2008 23:13:34 -0400
From: Bill Page
To: list
Subject: axiom-wiki enhancements

Dear Axiom Wiki Users and Contributors:

Due to popular request ;-) and because I decided that I also miss
them, I have re-implemented the comment preview and the edit assistant
enhancement from the old wiki to the new axiom-wiki at:

  http://axiom-wiki.newsynthesis.org

Try this on the SandBox page:

  http://axiom-wiki.newsynthesis.org/SandBox

You can use 'Preview' before adding a comment to a wiki page to check
the page formatting. Cancel it if you decide not to comment.

On the 'edit' page you will also see a short table of commonly used
codes and constructs. (Don't forget to click 'login' and identify
yourself before using 'edit'.)

Clicking on the tools displayed at the bottom of the page will insert
commonly used text into the edit page. For example, you can enter the
Axiom command:

   (1) -> integrate(exp x,x)

using about 8 mouse clicks or key strokes as follows:

Under the column labeled Axiom click the following widgets:

1)  \begin{axiom}

2)  sqrt symbol (expands list of functions)

3)  exp

Press key:

4) x

Use mouse or cursor to select the expression:

5) exp x

Click

6) integration symbol (expands list of operators)

7) integrate(sin x, x)

Press key:

8) x

You have now entered a complete Axiom command that will be executed
when you click 'Preview' or 'Save'.

Please try it. If you have any questions about these wiki features
just ask or comment on the Axiom Wiki.

Regards,
Bill Page.

On Mon, Apr 28, 2008 at 2:35 PM, Bill Page  wrote:
> On Mon, Apr 28, 2008 at 1:37 PM, Ralf Hemmecke wrote:
> ...
>>  And what I also miss... in the previous version of axiom-wiki there was
>> a short table at the bottom of the editing window that explained in short
>> what syntax one should use to edit a page. Where has this gone.
>>
>
> I still have the code for that somewhere. This was a rather complex
> customization of the ZWiki page layout that I did not have time to
> re-implement during the move. I used to think it was "pretty neat" for
> new users but a little "too bulky" for more experienced users. No one
> commented on it's absence after the move so I decided to wait. If you
> really think we should implement it again, I can look after doing
> that. Also missing is the the preview function on the comment box. It
> is a similar complex customization to the standard wiki page layout.
> ...


\start
Date: Wed, 28 May 2008 02:54:07 -0500
From: Tim Daly
To: list, axiom-math@axiom-developer.org
Subject: May 2008 release

Axiom is released every two months.
Axiom May 2008 release is now available.

The release notes are at
<http://axiom.axiom-developer.org/axiom-website/releasenotes.html>

The available binaries are at:
<http://axiom.axiom-developer.org/axiom-website/download.html>

The sources are available either as a tar-gzipped file at:
<http://axiom.axiom-developer.org/axiom-website/download.html>

or you can download the sources from the repositories:

The git  gold repository at github.com 
The CVS  gold repository at savannah.nongnu.org 
The CVS  gold repository at sourceforge.net 
The SVN  gold repository at sourceforge.net 
The Arch gold repository at axiom-developer.org 

The SVN silver repository at sourceforge.net 
The git silver repository at axiom-developer.org 

The Doyen binary image needs to be rebuilt.
The opensuse, macosxppc, and debian binary images are being built.

\start
Date: Wed, 28 May 2008 14:45:04 +0200
From: Ralf Hemmecke
To: list
Subject: Building axiom on debian etch failed

Hello Tim,

I tried to compile axiom SVN trunk -r 884 on a debian etch system.

The end of my compilation goes ...

6 making /home/hemmecke/software/axiom/obj/linux/graph/viewman/sselect.o 
from /home/hemmecke/software/axiom/int/graph/viewman/sselect.c
1 linking /home/hemmecke/software/axiom/mnt/linux/lib/viewman
gcc: /usr/X11R6/lib/libXpm.a: No such file or directory
make[4]: *** [/home/hemmecke/software/axiom/mnt/linux/lib/viewman] Error 1
make[4]: Leaving directory `/home/hemmecke/software/axiom/src/graph/viewman'
make[3]: *** [viewmandir] Error 2
make[3]: Leaving directory `/home/hemmecke/software/axiom/src/graph'
make[2]: *** [graphdir] Error 2
make[2]: Leaving directory `/home/hemmecke/software/axiom/src'
make[1]: *** [srcdir] Error 2
make[1]: Leaving directory `/home/hemmecke/software/axiom'
make: *** [all] Error 2

Unfortunately, "make" doesn't find

woodpecker:/usr/lib>ll libXpm*
-rw-r--r-- 1 root root 86648 2006-08-30 23:15 libXpm.a
lrwxrwxrwx 1 root root    16 2008-01-19 12:43 libXpm.so -> libXpm.so.4.11.0
lrwxrwxrwx 1 root root    16 2008-01-14 12:38 libXpm.so.4 -> 
libXpm.so.4.11.0
-rw-r--r-- 1 root root 60956 2006-08-30 23:15 libXpm.so.4.11.0

Wouldn't it be better if "configure" can figure out that automatically?

What should I do here? I know that has been discussed before, but I 
wonder why Axiom still asks a user to manually adapt the building process.

(disappointed)

\start
Date: Wed, 28 May 2008 14:54:29 +0200
From: Ralf Hemmecke
To: list
Subject: cannot build axiom

Is my problem related to

http://axiom-wiki.newsynthesis.org/306LibXpmAIsInUsrLibUnderUbuntu

?

Tim, is Axiom still using Mathaction as its issuetracker?

\start
Date: Wed, 28 May 2008 14:56:37 -0400
From: Tim Daly
To: Ralf Hemmecke
Subject: Re: cannot build axiom

> Tim, is Axiom still using Mathaction as its issuetracker?

no.

\start
Date: Wed, 28 May 2008 14:58:42 -0400
From: Tim Daly
To: Ralf Hemmecke
Subject: Re: cannot build axiom

> Is my problem related to
> 
> http://axiom-wiki.newsynthesis.org/306LibXpmAIsInUsrLibUnderUbuntu

Almost certainly. Where does libXpm.a appear in your system?

\start
Date: Wed, 28 May 2008 20:01:24 +0200
From: Ralf Hemmecke
To: Tim Daly
Subject: Re: cannot build axiom

On 05/28/2008 08:58 PM, root wrote:
>> Is my problem related to
>>
>> http://axiom-wiki.newsynthesis.org/306LibXpmAIsInUsrLibUnderUbuntu
> 
> Almost certainly. Where does libXpm.a appear in your system?

See
http://lists.gnu.org/archive/html/axiom-developer/2008-05/msg00090.html

Unfortunately, issue #306 is irrelevant, since the code is not different 
and I cannot apply that patch.

Could you tell me what variable I should set to compile up to the end?

\start
Date: Wed, 28 May 2008 15:34:56 -0400
From: Tim Daly
To: Ralf Hemmecke
Subject: Re: cannot build axiom

Did you set your AXIOM variable as:
  export AXIOM=(place)/axiom/mnt/debian
                                 ^^^^^^

If so, look in Makefile.pamphlet for the stanza:
  Makefile.debian
           ^^^^^^

and look at the setting of the LDF variable, which currently reads:

LDF=" -L/usr/X11R6/lib -L/usr/lib ${XLIB}/libXpm.a "

and make sure that this corresponds to the location of libXpm.a

\start
Date: Wed, 28 May 2008 21:15:27 +0200
From: Ralf Hemmecke
To: Tim Daly
Subject: Re: cannot build axiom

On 05/28/2008 09:34 PM, root wrote:
> Did you set your AXIOM variable as:
>   export AXIOM=(place)/axiom/mnt/debian
>                                  ^^^^^^

No? Why should I?

I followed the "readme". And I must admit that the line

export AXIOM=/spad/mnt/linux       << which axiom to build

puzzled me. I did not and do not understand what it says.

I simply said:

./configure

That gave me

export AXIOM=/home/hemmecke/software/axiom/mnt/linux
export PATH=$AXIOM/bin:$PATH
make

which I simply executed. If you now tell me that I have to replace 
"linux" by "debian", then thank you for the hint. But you understand 
that I am a bit frustrated that "configure" does not tell me exactly 
what I have to do.

I don't want to wait another 2 hours to recompile the library. Can I do 
this somehow? Simply saying

export AXIOM=/home/hemmecke/software/axiom/mnt/debian
mv $AXIOM/../linux $AXIOM/../debian
export PATH=$AXIOM/bin:$PATH
make

does not work. It aborts with

15 making /home/hemmecke/software/axiom/src
make[2]: Entering directory `/home/hemmecke/software/axiom/src'
21 making /home/hemmecke/software/axiom/src/boot
make[3]: Entering directory `/home/hemmecke/software/axiom/src/boot'
1 making /home/hemmecke/software/axiom/obj/debian/boot/boothdr.o from 
/home/hemmecke/software/axiom/int/boot/boothdr.lisp
/bin/sh: line 8: /home/hemmecke/software/axiom/obj/debian/bin/lisp: No 
such file or directory
make[3]: *** [/home/hemmecke/software/axiom/obj/debian/boot/boothdr.o] 
Error 127
make[3]: Leaving directory `/home/hemmecke/software/axiom/src/boot'
make[2]: *** [bootdir] Error 2
make[2]: Leaving directory `/home/hemmecke/software/axiom/src'
make[1]: *** [srcdir] Error 2
make[1]: Leaving directory `/home/hemmecke/software/axiom'
make: *** [all] Error 2

Ralf

PS: What is actually missing, if I stop here? Currently, I don't need 
hyperdoc. If that is all that is missing then maybe I don't need to 
torture myself. (Unfortunately, the axiom script has not yet been built.)

\start
Date: Wed, 28 May 2008 16:46:03 -0400
From: Tim Daly
To: Ralf Hemmecke
Subject: Re: cannot build axiom

>PS: What is actually missing, if I stop here? Currently, I don't need 
>hyperdoc. If that is all that is missing then maybe I don't need to 
>torture myself. (Unfortunately, the axiom script has not yet been built.)

Well, in your original build all that was missing was the hyperdoc.
I'm nearly finished the debian build. If you wait a few hours I'll
have it uploaded.

\start
Date: Wed, 28 May 2008 16:57:56 -0400
From: Tim Daly
To: Ralf Hemmecke
Subject: Re: cannot build axiom

>> Did you set your AXIOM variable as:
>>   export AXIOM=(place)/axiom/mnt/debian
>>                                  ^^^^^^
>
>No? Why should I?

Axiom gets all the information it needs from the string "debian".

* It gets this string from the basename of the AXIOM variable.
* This "debian" string is used to fetch and build the proper makefile.
* It does this by using notangle to extract the stanza
     Makefile.debian
  from the Makefile.pamphlet file.
* The selected stanza knows everything necessary to build a debian system.
* The final AXIOM system gets built in the $AXIOM subdirectory, e.g.
     (place)/axiom/mnt/debian
  and that can be copied anywhere. Everything else can be erased.


"linux" is a generic name that tends to work everywhere.



>I followed the "readme". And I must admit that the line
>
>export AXIOM=/spad/mnt/linux       << which axiom to build
>
>puzzled me. I did not and do not understand what it says.
>
>I simply said:
>
>./configure
>
>That gave me
>
>export AXIOM=/home/hemmecke/software/axiom/mnt/linux
>export PATH=$AXIOM/bin:$PATH
>make

The configure script is broken. I have to remove it.
It is unnecessary anyway.




>which I simply executed. If you now tell me that I have to replace 
>"linux" by "debian", then thank you for the hint. But you understand 
>that I am a bit frustrated that "configure" does not tell me exactly 
>what I have to do.

I built the configure script because people insisted that "everybody"
types "configure". It just needs to go away.

\start
Date: Wed, 28 May 2008 21:54:08 +0200
From: Ralf Hemmecke
To: Tim Daly
Subject: Re: cannot build axiom

> I built the configure script because people insisted that "everybody"
> types "configure".

And that is somehow true.

Anyway, the readme should better explain what exactly I have to do for 
my system. I am not a native english speaker. That line

export AXIOM=/spad/mnt/linux       << which axiom to build

in the Makefile is just not clear. And further, I guess, some not so 
experienced users might not even know that they run debian, fedora or 
whatever. They just know that it is linux. So what will you tell them 
that you cannot figure out by a proper configure script automatically?

> It just needs to go away.

OK. It's your way of dealing with it.

\start
Date: Wed, 28 May 2008 17:15:07 -0400
From: Tim Daly
To: Aleksej Saushev
Subject: pkgsrc

>>I'd really like to push Axiom into the world, but I don't
>>believe in tarballs or binary packages, other ways for Axiom
>>to get into major distribution is pkgsrc (http://pkgsrc.org).
>
>I'm looking at pkgsrc now.

I've looked around and there are several new interesting delivery
options. In particular, look at:

Zero Install <http://0install.net>
Autopackage  <http://www.autopackage.org>

Why do you prefer pkgsrc?

\start
Date: Wed, 28 May 2008 17:39:22 -0400
From: Tim Daly
To: Ralf Hemmecke
Subject: Re: cannot build axiom

>Anyway, the readme should better explain what exactly I have to do for 
>my system. I am not a native english speaker. That line
>
>export AXIOM=/spad/mnt/linux       << which axiom to build
>
>in the Makefile is just not clear. And further, I guess, some not so 
>experienced users might not even know that they run debian, fedora or 
>whatever. They just know that it is linux. So what will you tell them 
>that you cannot figure out by a proper configure script automatically?

The website has a better explanation but I will fix the readme.
Thanks for pointing that out.

The debian binary is available at:
<http://axiom.axiom-developer.org/axiom-website/download.html>

\start
Date: Wed, 28 May 2008 17:06:31 -0500
From: Tim Daly
To: list
Subject: 20080528.01.tpd.patch (configure/readme rewrite)

Rewrite the readme and configure files.
The configure script now just gives instructions for setting the 
AXIOM and PATH shell script variables.

========================================================================
diff --git a/changelog b/changelog
index 360115d..b3a1125 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20080528 tpd configure rewrite
+20080528 tpd readme rewrite
 20080527 tpd Makefile add fedora9 stanza
 20080527 tpd faq 47: Axiom won't build on Fedora 9 (SELinux)
 20080526 tpd Makefile add fedora8-64 stanza
diff --git a/configure b/configure
index e2633f0..042b446 100755
--- a/configure
+++ b/configure
@@ -1,167 +1,43 @@
-# The sysname function uses uname -s to try to decode what kind of
-# system to build. Currently the return value of uname is mapped as
-#       Linux          --> linux
-#       MINGW32_NT-5.1 --> windows
-#       SunOS          --> Solaris9
-#       Fedora Core 3  --> fedora3
-#       freebsd        --> freebsd
-#
-# The solaris platform needs patch->gpatch, awk->gawk, tar->gtar
-
-sysname () {
-if [ -f /etc/redhat-release ] ;
- then 
-  SYSNAME=`cat /etc/redhat-release` 
-  if [ "$SYSNAME" = "Fedora Core release 3 (Heidelberg)" ] ; 
-   then SYSNAME=fedora3
-  else if [ "$SYSNAME" = "Fedora Core release 5 (Bordeaux)" ] ; 
-   then SYSNAME=fedora5
-   fi
-  fi
-  echo SYSNAME=$SYSNAME
-fi
-if [ ! "$SYSNAME" = "fedora3" ] ;
- then 
-  if [ ! "$SYSNAME" = "fedora5" ] ;
-   then
-    SYSNAME=`uname -s`
-    echo $SYSNAME 
-    if [ "$SYSNAME" = "Linux" ] ; then SYSNAME=linux
-    elif  [ "$SYSNAME" = "MINGW32_NT-5.1" ] ; then SYSNAME=windows
-    elif  [ "$SYSNAME" = "SunOS" ] ; then SYSNAME=solaris9
-    elif  [ "$SYSNAME" = "freebsd" ] ; then SYSNAME=freebsd
-    else
-      echo Your system name is $SYSNAME
-      echo We do not know how to build for this kind of system
-      echo Send a note to list about it
-      echo
-      exit 0
-    fi
-  fi
-fi
-
-}
-
-# This function checks for the gawk command. 
-# If it exists then AWKNAME is the complete pathname
-
-checkgawk() {
-AWKNAME=`which gawk 2>>trace`
-if [ -n "$AWKNAME" ] ; then
- if [ -x $AWKNAME ] ; then 
-  echo 
- fi
-fi
-}
-
-# This function checks for the nawk command. 
-# If it exists then AWKNAME is the complete pathname
-
-checknawk() {
-AWKNAME=`which nawk 2>>trace`
-if [ -n "$AWKNAME" ] ; then
- if [ -x $AWKNAME ] ; then 
-  echo 
- fi
-fi
-}
-
-# This function checks for the awk command. 
-# If it exists then AWKNAME is the complete pathname
-
-checkawk() {
-AWKNAME=`which awk 2>>trace`
-if [ -n "$AWKNAME" ] ; then
- if [ -x $AWKNAME ] ; then 
-  echo 
- fi
-fi
-}
-
-# This function uses the check*awk functions to decide 
-# whether the system can build noweb. If one of gawk, nawk or awk
-# are not found we fail.
-needAwk ()
-{
-checkgawk
-if [ -z "$AWKNAME" ] ; then
-  checknawk
-  if [ -z "$AWKNAME" ] ; then
-    checkawk
-    if [ -z "$AWKNAME" ] ; then
-      echo We need the commands gawk, nawk, or awk
-      exit 0
-    fi
-  fi
-fi
-}
-
-# The mustSet function tells the user what needs to be typed on the 
-# command line. If any extra variables need to be set we add them here.
-# Currently the only thing we check if for the presence of gawk, which
-# is the default in the Makefile. If gawk does not exist we can use 
-# either nawk or awk but the user has to specify that on the command line.
-
-# We check the system we are using with the uname command and try to
-# generate the appropriate value. We fail otherwise.
-
-# We generate the appropriate command line that the user should use.
-
-mustSet() {
+echo Axiom is known to build on the following systems:
 echo
-echo ===================================================
-echo You must set your AXIOM and PATH variables. Type:
+echo SYSNAME ---- SYSTEM
+echo =========================================================
+echo redhat72 --- RedHat 7.2 linux
+echo redhat9 ---- RedHat 9 linux
+echo debian ----- Debian linux
+echo opensuse --- OpenSuse linux
+echo ubuntu ----- Ubuntu linux
+echo fedora3 ---- Fedora Core 3 linux
+echo fedora5 ---- Fedora 5 linux
+echo fedora6 ---- Fedora 6 linux
+echo fedora7 ---- Fedora 7 linux
+echo fedora8 ---- Fedora 8 linux
+echo fedora9 ---- Fedora 9 linux
+echo fedora8-64 - Fedora 8 linux on 64 bit platform
+echo fedora64 --- Fedora generic 64 bit build
+echo gentoo ----- Gentoo generic build
+echo linux ------ generic linux
+echo macosxppc -- Mac OSX 10.4 with XCode installed
+echo 
+echo To use this information to build Axiom, decide which system is
+echo closest to your configuration and look under the SYSNAME column.
+echo 
+echo Assuming you put Axiom in /home/me/axiom you would type:
+echo 
+echo export AXIOM=/home/me/axiom/mnt/SYSNAME
+echo export PATH=\$AXIOM/bin:\$PATH
+echo make
+echo 
+echo Note: On macosxppc type \"make AWK=awk\" instead
+echo 
+echo If the system fails to build the likely cause is SELinux.
+echo See the faq.
 echo
-echo To build the rest of the system type:
-echo
-echo export AXIOM=`pwd`/mnt/$SYSNAME
-echo 'export PATH=$AXIOM/bin:$PATH'
-if [ "$SYSNAME" = "freebsd" ] ; then
-  echo Note that freebsd usually has noweb available
-  echo If you wish to use the standard version you must type
-  echo touch noweb 
-  echo If you wish to use a pre-installed GCL you must type
-  echo make GCLVERSION=gcl-system
-fi
-if [ "$SYSNAME" = "solaris9" ] ; 
- then echo make AWK=gawk TAR=gtar PATCH=gpatch
-elif [ "`basename $AWKNAME`" = "gawk"  ] ; 
- then echo make
- else echo make AWK=$AWKNAME
-fi
-echo
-echo configure finished.
-}
-
-#########################################################################
-# This is the main line of configure logic.
-# (1) We test to see if we understand this system name. So far
-#     the recognized strings from uname -s are translated as:
-#       Linux          --> linux
-#       MINGW32_NT-5.1 --> windows
-#       SunOS          --> Solaris9
-#       Fedora Core 3  --> fedora3
-#       freebsd        --> freebsd
-# (1) We test for the AWK variable. We need one of gawk, nawk, or awk
-#     in order to build the noweb software.
-# (2) Then we output the final message for the user.
-#
-# The solaris platform needs patch->gpatch, awk->gawk, tar->gtar
-#########################################################################
-
-sysname
-needAwk
+echo For new information and details see
+echo http://axiom.axiom-developer.org
+echo 
+echo For binary downloads see
+echo http://axiom.axiom-developer.org/axiom-website/download.html
+echo 
+echo Mail bug reports to list
 
-if [ "x$AXIOM" = "x" ] ;
- then mustSet
- else 
-  if [ ! "`dirname $AXIOM`" = "`pwd`/mnt" ]
-    then mustSet
-    else 
-     echo Configure complete. Now type
-     echo
-     echo make
-     echo
-  fi
-fi
-  
diff --git a/readme b/readme
index 27bb2cf..c4da06b 100644
--- a/readme
+++ b/readme
@@ -1,23 +1,31 @@
-You've unpacked the Axiom source code to some directory. In this document
-we'll call that directory /spad. Note that the path cannot contain uppercase
-characters. This is a porting limitation as not all systems can handle
-dual case characters.
+You've unpacked the Axiom source code to some directory. In this
+document we'll call that directory /home/me/axiom. Note that the path
+cannot contain uppercase characters or spaces. This is a porting
+limitation as not all systems can handle dual case characters.
 
 =======================================================================
-================= CONFIGURING AXIOM ===================================
+================= MAKING AXIOM ========================================
 =======================================================================
 
-Type:
-./configure
+Axiom builds a system-specific version based on a string we'll call
+the SYSNAME. Currently recognized SYSNAME strings can be found on the
+Axiom website at:
+<http://axiom.axiom-developer.org/axiom-website/download.html>
 
-=======================================================================
-================= MAKING AXIOM ========================================
-=======================================================================
+Replace SYSNAME below with the likely name of your system.
+
+We also assume that you downloaded AXIOM to someplace. Suppose
+that place is /home/me/axiom, then:
 
-cd /spad                           << where you unpacked the sources
-export AXIOM=/spad/mnt/linux       << which axiom to build
-make                               << build the system
-                                   << a system build takes 2+ hours at 2Ghz
+cd /home/me/axiom                         << where you unpacked the sources
+export AXIOM=/home/me/axiom/mnt/SYSNAME   << which axiom to build
+export PATH=$AXIOM/bin:$PATH
+make                                      << build the system
+
+A system build takes 2+ hours at 2Ghz machine.
+
+A recent cause of likely build failures is SELinux.
+See the faq file for possible solutions.
 
 When the make completes you'll have an executable called $AXIOM/bin/axiom
 
@@ -39,9 +47,8 @@ make INSTALL=/home/me/myaxiom COMMAND=/home/me/bin/myaxiom install
 
 =====================================================================
 
-Documentation can be found at various places in the system.
-At the moment most of the documentation is for developers.
-There is a users guide being developed. It will be online when complete.
+Documentation can be found at various places in the system or on the
+Axiom website: <http://axiom.axiom-developer.org>
 
 There is a book (available on Amazon.com):
 Jenks, Richard D. and Sutor, Robert S. "Axiom, The Scientific Computation
@@ -66,7 +73,9 @@ Questions and comments should be sent to:
 list
 
 Tim Daly
-axiom@tenkan.org
+Tim Daly
+
+=====================================================================
 
 Philosophy
 
@@ -529,7 +538,7 @@ Steps in the build process
 
 The sequence of steps necessary to build a clean Axiom is simply:
 
-  export AXIOM=(path-including-this-directory)/mnt/linux
+  export AXIOM=(path-including-this-directory)/mnt/SYSNAME
   make
 
 If this fails check the FAQ for possible problems and their fixes.

\start
Date: Thu, 29 May 2008 00:26:12 +0200
From: Ralf Hemmecke
To: list
Subject: Re: [Axiom-commit] SF.net SVN: axiom: [885] trunk/axiom

> +echo SYSNAME ---- SYSTEM
> +echo =========================================================
> +echo redhat72 --- RedHat 7.2 linux
> +echo redhat9 ---- RedHat 9 linux
> +echo debian ----- Debian linux
> +echo opensuse --- OpenSuse linux
> +echo ubuntu ----- Ubuntu linux
> +echo fedora3 ---- Fedora Core 3 linux
> +echo fedora5 ---- Fedora 5 linux
> +echo fedora6 ---- Fedora 6 linux
> +echo fedora7 ---- Fedora 7 linux
> +echo fedora8 ---- Fedora 8 linux
> +echo fedora9 ---- Fedora 9 linux
> +echo fedora8-64 - Fedora 8 linux on 64 bit platform
> +echo fedora64 --- Fedora generic 64 bit build
> +echo gentoo ----- Gentoo generic build
> +echo linux ------ generic linux
> +echo macosxppc -- Mac OSX 10.4 with XCode installed
> +echo 
> +echo To use this information to build Axiom, decide which system is
> +echo closest to your configuration and look under the SYSNAME column.

Tim, is there really no way to figure out that SYSNAME variable by a 
script? I have no idea myself, but I still don't think that it is a good 
idea to put some burden on the user to set any variable.

Anyhow, the readme seems now a bit clearer.

\start
Date: Wed, 28 May 2008 19:57:58 -0400
From: Tim Daly
To: Tim Daly
Subject: Re: cannot build axiom

>So what will you tell them that you cannot figure out by a proper
>configure script automatically?

I do not know how to automatically and generically figure out the
correct string, e.g. "debian", "macosxppc", "fedora9" ,etc. It seems
that this would take an expert in each system to write system-specific
code to probe the configuration for each system.

The original goal of using autoconf was to figure out this string.
It ended up with a completely restructured system build process.
There is no point in re-opening that discussion here, since Axiom
does not and will not use autoconf. Check with Fricas.

The existing configure script was intended to construct the string. 
However, it turns out that simply choosing a compatible string
is easy for a human.

Axiom is only known to run on a limited number of systems.
Other systems might work, and I have a few of them "in process"
but until they are tested and "just work", nothing is claimed.
Getting Axiom to compile is only the first step.

Once the lisp-only rewrite completes there won't be a need for
system-specific labels anyway.

\start
Date: Thu, 29 May 2008 00:52:28 -0400
From: William Sit
To: Tim Daly
Subject: Re: cannot build axiom
Cc: list

On Wed, 28 May 2008 19:57:58 -0400
  Tim Daly wrote:

>>So what will you tell them that you cannot figure out by a proper
>>configure script automatically?

>I do not know how to automatically and generically figure out the
>correct string, e.g. "debian", "macosxppc", "fedora9" ,etc. It seems
>that this would take an expert in each system to write
>system-specific code to probe the configuration for each system.

I certainly don't know anything about OSes. But it seems to me that
there is a dumb way. If each supported OS stanza includes the expert
system-specific code to verify (not probing to find what the OS is,
but assuming the OS is the one in the stanza, verify it -- only a yes
or no answer) that the OS is the right one, then by a process of
elimination, a loop going through all the OSes stanzas until a match
is found(or not found) should solve the problem.

\start
Date: Thu, 29 May 2008 02:15:06 -0500
From: Tim Daly
To: list
Subject: 20080529.01.dxh.patch (fix hyperdoc on	interrupted rebuilds)
Cc: Dan Hatton

Dan Hatton submitted a fix for the hyperdoc failure on rebuilds.
Dan has been added to the credits list.

Tim
=====================================================================
diff --git a/changelog b/changelog
index b3a1125..42a023c 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+20080529 tpd setq.lisp add Dan Hatton to credits
+20080529 tpd readme add Dan Hatton to credits
+20080529 dxh src/hyper/pages/rootpage.ht remove \localinfo
+20080529 dxh Dan Hatton
 20080528 tpd configure rewrite
 20080528 tpd readme rewrite
 20080527 tpd Makefile add fedora9 stanza
diff --git a/readme b/readme
index c4da06b..204ebd4 100644
--- a/readme
+++ b/readme
@@ -207,8 +207,9 @@ at the axiom command prompt will prettyprint the list.
 "Vladimir Grinberg      Oswald Gschnitzer      Jocelyn Guidry"
 "Steve Hague            Satoshi Hamaguchi      Mike Hansen"
 "Richard Harke          Vilya Harvey           Martin Hassner"
-"Arthur S. Hathaway     Waldek Hebisch         Ralf Hemmecke"
-"Henderson              Antoine Hersen         Gernot Hueber"
+"Arthur S. Hathaway     Dan Hatton             Waldek Hebisch"
+"Ralf Hemmecke          Henderson              Antoine Hersen"
+"Gernot Hueber"
 "Pietro Iglio"
 "Richard Jenks"
 "Kai Kaminski           Grant Keady            Tony Kennedy"
diff --git a/src/hyper/pages/rootpage.ht b/src/hyper/pages/rootpage.ht
index 3556aed..752dc80 100644
--- a/src/hyper/pages/rootpage.ht
+++ b/src/hyper/pages/rootpage.ht
@@ -77,7 +77,7 @@ What would you like to do?
 %\tab{16}Review user variables and \lispwindowlink{history}{(|htHistory|)}
 
 
-\localinfo
+%\localinfo
 \endmenu
 \endscroll
 \autobutt{ugHyperPage}
diff --git a/src/interp/setq.lisp.pamphlet b/src/interp/setq.lisp.pamphlet
index 6d35e34..d451fdf 100644
--- a/src/interp/setq.lisp.pamphlet
+++ b/src/interp/setq.lisp.pamphlet
@@ -618,8 +618,9 @@
 "Vladimir Grinberg      Oswald Gschnitzer      Jocelyn Guidry"
 "Steve Hague            Satoshi Hamaguchi      Mike Hansen"
 "Richard Harke          Vilya Harvey           Martin Hassner"
-"Arthur S. Hathaway     Waldek Hebisch         Ralf Hemmecke"
-"Henderson              Antoine Hersen         Gernot Hueber"
+"Arthur S. Hathaway     Dan Hatton             Waldek Hebisch"
+"Ralf Hemmecke          Henderson              Antoine Hersen"
+"Gernot Hueber"
 "Pietro Iglio"
 "Richard Jenks"
 "Kai Kaminski           Grant Keady            Tony Kennedy"

\start
Date: Thu, 29 May 2008 04:03:20 -0400
From: Tim Daly
To: William Sit
Subject: Re: cannot build axiom

>>>So what will you tell them that you cannot figure out by a proper
>>>configure script automatically?

>>I do not know how to automatically and generically figure out the
>>correct string, e.g. "debian", "macosxppc", "fedora9" ,etc. It seems
>>that this would take an expert in each system to write
>>system-specific code to probe the configuration for each system.

>I certainly don't know anything about OSes. But it seems to me that
>there is a dumb way. If each supported OS stanza includes the expert
>system-specific code to verify (not probing to find what the OS is,
>but assuming the OS is the one in the stanza, verify it -- only a yes
>or no answer) that the OS is the right one, then by a process of
>elimination, a loop going through all the OSes stanzas until a match
>is found(or not found) should solve the problem.

It takes approximately 15 seconds to read the output and type the
required export lines.

To learn enough about all the systems to solve the problem, to
automate this, test it on all the systems, and maintain it in the
future will probably consume about a week of my time now, with untold
further commitment in the future.  I have no doubt it could be make to
work.

Axiom has lived on a dozen different lisps and a dozen different
hardware and operating system combinations, for most of which I was
the primary person responsible. It probably will face a few dozen more
in the next 30 years.  I'm quite confident I can make it run anywhere
and make the build system do whatever is needed.

Given a choice between spending a week on that task and spending a
week on the thousand other tasks in the queue, I think I'll wait until
someone who considers it important enough to fix, posts a patch. You
can program. Give it a try. You know as much as I do about the subject
and everything else is available on Google. Better yet, assign the
task to an undergraduate as a class project.

It is time to stop playing with porting and language issues.

I'd rather that you choose a domain and document it so the
undergraduate can pick it up, read it, and learn how and why it works
and can learn enough to maintain it. That's something we can do that
an undergraduate cannot.

I think it is more important to document, validate, verify, prove, and
extend the system. All of those tasks have very steep learning curves
and require our expertise.

We seem to spend a lot of time focusing on the non-essential but
immediate, which is easy. We seem to be ignoring the essential and
long term, which is hard. The time has come to focus on the long term,
hard tasks.

\start
Date: Thu, 29 May 2008 20:11:59 +0400
From: Aleksej Saushev
To: Martin Rubey
Subject: re: pkg-src

Martin Rubey writes:

> Aleksej Saushev writes:
>
>> and tarball, which I'm waiting for.
>
> You can find tarballs here:
>
> http://sourceforge.net/project/showfiles.php?group_id=200168
>
> Is that what you are looking for?

No, it is broken version, I sent report and some patches to
Waldek earlier.  I have built from repository sources several
times, but supporting that is nearly impossible.
I'm waiting for next release, be it minor or major, where
reported problems are fixed.

\start
Date: Thu, 29 May 2008 20:15:03 +0400
From: Aleksej Saushev
To: Tim Daly
Subject: Re: pkgsrc

Tim Daly writes:

>>>I'd really like to push Axiom into the world, but I don't
>>>believe in tarballs or binary packages, other ways for Axiom
>>>to get into major distribution is pkgsrc (http://pkgsrc.org).
>>
>>I'm looking at pkgsrc now.
>
> I've looked around and there are several new interesting delivery
> options. In particular, look at:
>
> Zero Install <http://0install.net>
> Autopackage  <http://www.autopackage.org>
>
> Why do you prefer pkgsrc?

Because it is standard (comes with operating system), crossplatform
(I used it on FreeBSD, several GNU/Linux systems, Windows XP)
and, first of all, well-supported.

\start
Date: Thu, 29 May 2008 21:22:15 +0400
From: Aleksej Saushev
To: list
Subject: Re: cannot build axiom

Tim Daly writes:

>>So what will you tell them that you cannot figure out by a proper
>>configure script automatically?
>
> I do not know how to automatically and generically figure out the
> correct string, e.g. "debian", "macosxppc", "fedora9" ,etc. It seems
> that this would take an expert in each system to write system-specific
> code to probe the configuration for each system.

The correct way is not to use system names and to leave that on
the user or packager, ask the latter about path(es) to their libraries.

> Axiom is only known to run on a limited number of systems.
> Other systems might work, and I have a few of them "in process"
> but until they are tested and "just work", nothing is claimed.
> Getting Axiom to compile is only the first step.
>
> Once the lisp-only rewrite completes there won't be a need for
> system-specific labels anyway.

There is no need either.
CFLAGS and LDFLAGS is (generally) enough.

\start
Date: Fri, 30 May 2008 00:09:36 -0500
From: Tim Daly
To: list
Subject: 20080530.01.tpd.patch (books creation)

Begin literate restructuring of Axiom.
=====================================================================
+20080530 tpd books/Makefile
+20080530 tpd books/axiom.sty
+20080530 tpd books/bookvol0.pamphlet
+20080530 tpd books/bookvol1.pamphlet
+20080530 tpd books/bookvol10.pamphlet
+20080530 tpd books/bookvol11.pamphlet
+20080530 tpd books/bookvol12.pamphlet
+20080530 tpd books/bookvol2.pamphlet
+20080530 tpd books/bookvol3.pamphlet
+20080530 tpd books/bookvol4.pamphlet
+20080530 tpd books/bookvol5.pamphlet
+20080530 tpd books/bookvol6.pamphlet
+20080530 tpd books/bookvol7.pamphlet
+20080530 tpd books/bookvol8.pamphlet
+20080530 tpd books/bookvol9.pamphlet
+20080530 tpd books/ps/23dcola.ps
+20080530 tpd books/ps/23dcolb.ps
+20080530 tpd books/ps/23dpal.ps
+20080530 tpd books/ps/2d1vara.ps
+20080530 tpd books/ps/2d1varb.ps
+20080530 tpd books/ps/2d1vard.ps
+20080530 tpd books/ps/2dctrl.ps
+20080530 tpd books/ps/2doptad.ps
+20080530 tpd books/ps/2doptcp.ps
+20080530 tpd books/ps/2doptcpr.ps
+20080530 tpd books/ps/2doptcvc.ps
+20080530 tpd books/ps/2doptplr.ps
+20080530 tpd books/ps/2doptptc.ps
+20080530 tpd books/ps/2doptrga.ps
+20080530 tpd books/ps/2doptrgb.ps
+20080530 tpd books/ps/2doptsc.ps
+20080530 tpd books/ps/2doptut.ps
+20080530 tpd books/ps/2dpaca.ps
+20080530 tpd books/ps/2dppca.ps
+20080530 tpd books/ps/2dppcb.ps
+20080530 tpd books/ps/2dppcc.ps
+20080530 tpd books/ps/2dppce.ps
+20080530 tpd books/ps/3d2vara.ps
+20080530 tpd books/ps/3d2varb.ps
+20080530 tpd books/ps/3dbuilda.ps
+20080530 tpd books/ps/3dbuildb.ps
+20080530 tpd books/ps/3dctrl.ps
+20080530 tpd books/ps/3dgamma11.ps
+20080530 tpd books/ps/3dlight.ps
+20080530 tpd books/ps/3dmult1a.ps
+20080530 tpd books/ps/3dmult1b.ps
+20080530 tpd books/ps/3doptcf1.ps
+20080530 tpd books/ps/3doptcf2.ps
+20080530 tpd books/ps/3doptcf3.ps
+20080530 tpd books/ps/3doptcrd.ps
+20080530 tpd books/ps/3doptpts.ps
+20080530 tpd books/ps/3doptrad.ps
+20080530 tpd books/ps/3doptsty.ps
+20080530 tpd books/ps/3doptttl.ps
+20080530 tpd books/ps/3doptvb.ps
+20080530 tpd books/ps/3dpsa.ps
+20080530 tpd books/ps/3dpsb.ps
+20080530 tpd books/ps/3dpsca.ps
+20080530 tpd books/ps/3dpscb.ps
+20080530 tpd books/ps/3dvolume.ps
+20080530 tpd books/ps/arrow.ps
+20080530 tpd books/ps/arrowr.ps
+20080530 tpd books/ps/atan-1.epsi
+20080530 tpd books/ps/atan-1.ps
+20080530 tpd books/ps/axiomfront.ps
+20080530 tpd books/ps/basic2d.ps
+20080530 tpd books/ps/bessel.ps
+20080530 tpd books/ps/bessintr.eps
+20080530 tpd books/ps/bessintr.epsi
+20080530 tpd books/ps/bessintr.ps
+20080530 tpd books/ps/bluebayou.ps
+20080530 tpd books/ps/bookvol1a.ps
+20080530 tpd books/ps/bookvol1b.ps
+20080530 tpd books/ps/bookvol1c.ps
+20080530 tpd books/ps/bookvol1d.ps
+20080530 tpd books/ps/bookvol1e.ps
+20080530 tpd books/ps/bookvol1f.ps
+20080530 tpd books/ps/bookvol1g.ps
+20080530 tpd books/ps/bookvol1h.ps
+20080530 tpd books/ps/bookvol1i.ps
+20080530 tpd books/ps/bookvol1j.ps
+20080530 tpd books/ps/bookvol1k.ps
+20080530 tpd books/ps/bookvol1l.ps
+20080530 tpd books/ps/bookvol1m.ps
+20080530 tpd books/ps/bookvol1n.ps
+20080530 tpd books/ps/bookvol1o.ps
+20080530 tpd books/ps/bookvol1p.ps
+20080530 tpd books/ps/bookvol1q.ps
+20080530 tpd books/ps/bouquet.ps
+20080530 tpd books/ps/cartcoord.ps
+20080530 tpd books/ps/clipgamma.ps
+20080530 tpd books/ps/compatan.ps
+20080530 tpd books/ps/compexp.ps
+20080530 tpd books/ps/compgamm.ps
+20080530 tpd books/ps/complexexp.ps
+20080530 tpd books/ps/complexroot.ps
+20080530 tpd books/ps/cylcoord.ps
+20080530 tpd books/ps/defcoord.ps
+20080530 tpd books/ps/exit.ps
+20080530 tpd books/ps/h-alldoms.ps
+20080530 tpd books/ps/h-allrank.ps
+20080530 tpd books/ps/h-atsearch.ps
+20080530 tpd books/ps/h-brfront.ps
+20080530 tpd books/ps/h-browse.ps
+20080530 tpd books/ps/h-comsearch.ps
+20080530 tpd books/ps/h-condition.ps
+20080530 tpd books/ps/h-consearch.ps
+20080530 tpd books/ps/h-consearch2.ps
+20080530 tpd books/ps/h-crossref.ps
+20080530 tpd books/ps/h-docsearch.ps
+20080530 tpd books/ps/h-gensearch.ps
+20080530 tpd books/ps/h-inverse.ps
+20080530 tpd books/ps/h-matargs.ps
+20080530 tpd books/ps/h-matats.ps
+20080530 tpd books/ps/h-matdesc.ps
+20080530 tpd books/ps/h-matexamp.ps
+20080530 tpd books/ps/h-matexports.ps
+20080530 tpd books/ps/h-matimp.ps
+20080530 tpd books/ps/h-matinv.ps
+20080530 tpd books/ps/h-matmap.ps
+20080530 tpd books/ps/h-matops.ps
+20080530 tpd books/ps/h-matpage.ps
+20080530 tpd books/ps/h-matrelops.ps
+20080530 tpd books/ps/h-matrix.ps
+20080530 tpd books/ps/h-matrixops.ps
+20080530 tpd books/ps/h-matrixops1.ps
+20080530 tpd books/ps/h-matrixops2.ps
+20080530 tpd books/ps/h-matsource.ps
+20080530 tpd books/ps/h-matusers.ps
+20080530 tpd books/ps/h-matxref.ps
+20080530 tpd books/ps/h-opsearch.ps
+20080530 tpd books/ps/h-origins.ps
+20080530 tpd books/ps/h-parameter.ps
+20080530 tpd books/ps/h-root.ps
+20080530 tpd books/ps/h-signature.ps
+20080530 tpd books/ps/help.ps
+20080530 tpd books/ps/home.ps
+20080530 tpd books/ps/knot3.ps
+20080530 tpd books/ps/modbess.ps
+20080530 tpd books/ps/modbessc.ps
+20080530 tpd books/ps/newmap.ps
+20080530 tpd books/ps/p28a.eps
+20080530 tpd books/ps/p28b.eps
+20080530 tpd books/ps/quat1.ps
+20080530 tpd books/ps/quat10.ps
+20080530 tpd books/ps/quat11.ps
+20080530 tpd books/ps/quat12.ps
+20080530 tpd books/ps/quat13.ps
+20080530 tpd books/ps/quat14.ps
+20080530 tpd books/ps/quat15.ps
+20080530 tpd books/ps/quat16.ps
+20080530 tpd books/ps/quat17.ps
+20080530 tpd books/ps/quat18.ps
+20080530 tpd books/ps/quat19.ps
+20080530 tpd books/ps/quat2.ps
+20080530 tpd books/ps/quat3.ps
+20080530 tpd books/ps/quat4.ps
+20080530 tpd books/ps/quat5.ps
+20080530 tpd books/ps/quat6.ps
+20080530 tpd books/ps/quat7.ps
+20080530 tpd books/ps/quat8.ps
+20080530 tpd books/ps/quat9.ps
+20080530 tpd books/ps/realbeta.ps
+20080530 tpd books/ps/ribbon1.ps
+20080530 tpd books/ps/ribbon2.ps
+20080530 tpd books/ps/ribbon2r.ps
+20080530 tpd books/ps/ribbons.ps
+20080530 tpd books/ps/ribbons2.ps
+20080530 tpd books/ps/ribbons2b.ps
+20080530 tpd books/ps/ribbons5.ps
+20080530 tpd books/ps/rose-1.ps
+20080530 tpd books/ps/torusknot.ps
+20080530 tpd books/ps/up.ps
+20080530 tpd books/ps/vectorroot.ps
+20080530 tpd books/ps/vectorsin.ps
+20080530 tpd books/ps/wd-atanz.ps
+20080530 tpd books/ps/wd-bessi.ps
+20080530 tpd books/ps/wd-bessi3.ps
+20080530 tpd books/ps/wd-bessi3s.ps
+20080530 tpd books/ps/wd-bessj.ps
+20080530 tpd books/ps/wd-beta.ps
+20080530 tpd books/ps/wd-expz.ps
+20080530 tpd books/ps/wd-gammaz.ps
 20080529 tpd setq.lisp add Dan Hatton to credits
 20080529 tpd readme add Dan Hatton to credits
 20080529 dxh src/hyper/pages/rootpage.ht remove \localinfo

\start
Date: Fri, 30 May 2008 07:46:43 -0500
From: Tim Daly
To: list
Subject: 20080531.01.tpd.patch (construct book PDFs)

Automatically construct the book PDFs in the final doc directory.
=========================================================================
diff --git a/books/Makefile b/books/Makefile
deleted file mode 100644
index d91e0ea..0000000
--- a/books/Makefile
+++ /dev/null
@@ -1,205 +0,0 @@
-AXIOM=/usr/local/axiom/mnt/fedora5
-TANGLE=${AXIOM}/bin/lib/notangle
-WEAVE=${AXIOM}/bin/lib/noweave 
-LATEX=latex
-MAKEINDEX=makeindex
-DVIPS=dvips -Ppdf
-PS2PDF=ps2pdf
-RM=rm -f
-
-all: 
-
-remake: bookvol0 bookvol1 bookvol2 bookvol3 bookvol4 bookvol5 bookvol6 \
-        bookvol7 bookvol8 bookvol9 bookvol10 bookvol11 bookvol12 toc
-
-toc:
-	@echo "\\documentclass{book}" >toc.tex
-	@echo "\\begin{document}" >>toc.tex
-	@echo "{\\bf Volume ~ 0}: Axiom {\\sl Jenks and Sutor}\\\\" >toc.toc
-	@echo "{\\bf Volume ~ 1}: Axiom {\\sl Tutorial}\\\\" >>toc.toc
-	@echo "{\\bf Volume ~ 2}: Axiom {\\sl Users Guide}\\\\" >>toc.toc
-	@echo "{\\bf Volume ~ 3}: Axiom {\\sl Programmers Guide}\\\\" >>toc.toc
-	@echo "{\\bf Volume ~ 4}: Axiom {\\sl Developers Guide}\\\\" >>toc.toc
-	@echo "{\\bf Volume ~ 5}: Axiom {\\sl Interpreter}\\\\" >>toc.toc
-	@echo "{\\bf Volume ~ 6}: Axiom {\\sl Command}\\\\" >>toc.toc
-	@echo "{\\bf Volume ~ 7}: Axiom {\\sl Hyperdoc}\\\\" >>toc.toc
-	@echo "{\\bf Volume ~ 8}: Axiom {\\sl Graphics}\\\\" >>toc.toc
-	@echo "{\\bf Volume ~ 9}: Axiom {\\sl Compiler}\\\\" >>toc.toc
-	@echo "{\\bf Volume 10}: Axiom {\\sl Algebra}\\\\" >>toc.toc
-	@echo "{\\bf Volume 11}: Axiom {\\sl Browser}\\\\" >>toc.toc
-	@echo "{\\bf Volume 12}: Axiom {\\sl Crystal}\\\\" >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\tableofcontents" >>toc.tex
-	@echo "\\end{document}" >>toc.tex
-	@echo "\\section*{Volume 0: Axiom Jenks and Sutor}" >>toc.toc
-	@cat bookvol0.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 1: Axiom Tutorial}" >>toc.toc
-	@cat bookvol1.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 2: Axiom Users Guide}" >>toc.toc
-	@cat bookvol2.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 3: Axiom Programmers Guide}" >>toc.toc
-	@cat bookvol3.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 4: Axiom Developers Guide}" >>toc.toc
-	@cat bookvol4.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 5: Axiom Interpreter}" >>toc.toc
-	@cat bookvol5.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 6: Axiom Command}" >>toc.toc
-	@cat bookvol6.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 7: Axiom Hyperdoc}" >>toc.toc
-	@cat bookvol7.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 8: Axiom Graphics}" >>toc.toc
-	@cat bookvol8.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 9: Axiom Compiler}" >>toc.toc
-	@cat bookvol9.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 10: Axiom Algebra}" >>toc.toc
-	@cat bookvol10.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 11: Axiom Browser}" >>toc.toc
-	@cat bookvol11.toc >>toc.toc
-	@echo "\\newpage" >>toc.toc
-	@echo "\\section*{Volume 12: Axiom Crystal}" >>toc.toc
-	@cat bookvol12.toc >>toc.toc
-	@${LATEX} toc.tex
-	@${DVIPS} toc.dvi 2>/dev/null
-	@${PS2PDF} toc.ps >/dev/null
-	@${RM} -f *.toc toc.aux toc.dvi toc.log toc.ps toc.tex toc.toc
-
-bookvol0: 
-	@${LATEX} bookvol0.pamphlet
-	@${LATEX} bookvol0.pamphlet >/dev/null
-	@${DVIPS} bookvol0.dvi 2>/dev/null
-	@${PS2PDF} bookvol0.ps >/dev/null
-	@${RM} bookvol0.aux bookvol0.dvi bookvol0.log bookvol0.ps \
-               bookvol0.idx bookvol0.tex
-
-bookvol1:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol1.pamphlet >bookvol1.tex)
-	@${LATEX} bookvol1.tex
-	@${LATEX} bookvol1.tex >/dev/null
-	@${DVIPS} bookvol1.dvi 2>/dev/null
-	@${PS2PDF} bookvol1.ps >/dev/null
-	@${RM} bookvol1.aux bookvol1.dvi bookvol1.log bookvol1.ps \
-               bookvol1.idx bookvol1.tex
-
-bookvol2:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol2.pamphlet >bookvol2.tex)
-	@${LATEX} bookvol2.tex
-	@${LATEX} bookvol2.tex >/dev/null
-	@${DVIPS} bookvol2.dvi 2>/dev/null
-	@${PS2PDF} bookvol2.ps >/dev/null
-	@${RM} bookvol2.aux bookvol2.dvi bookvol2.log bookvol2.ps \
-               bookvol2.idx bookvol2.tex
-
-bookvol3:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol3.pamphlet >bookvol3.tex)
-	@${LATEX} bookvol3.tex
-	@${LATEX} bookvol3.tex >/dev/null
-	@${DVIPS} bookvol3.dvi 2>/dev/null
-	@${PS2PDF} bookvol3.ps >/dev/null
-	@${RM} bookvol3.aux bookvol3.dvi bookvol3.log bookvol3.ps \
-               bookvol3.idx bookvol3.tex
-
-bookvol4:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol4.pamphlet >bookvol4.tex)
-	@${LATEX} bookvol4.tex
-	@${LATEX} bookvol4.tex >/dev/null
-	@${DVIPS} bookvol4.dvi 2>/dev/null
-	@${PS2PDF} bookvol4.ps >/dev/null
-	@${RM} bookvol4.aux bookvol4.dvi bookvol4.log bookvol4.ps \
-               bookvol4.idx bookvol4.tex
-
-bookvol5:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol5.pamphlet >bookvol5.tex)
-	@${LATEX} bookvol5.tex
-	@${LATEX} bookvol5.tex >/dev/null
-	@${DVIPS} bookvol5.dvi 2>/dev/null
-	@${PS2PDF} bookvol5.ps >/dev/null
-	@${RM} bookvol5.aux bookvol5.dvi bookvol5.log bookvol5.ps \
-               bookvol5.idx bookvol5.tex
-
-bookvol6:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol6.pamphlet >bookvol6.tex)
-	@${LATEX} bookvol6.tex
-	@${LATEX} bookvol6.tex >/dev/null
-	@${DVIPS} bookvol6.dvi 2>/dev/null
-	@${PS2PDF} bookvol6.ps >/dev/null
-	@${RM} bookvol6.aux bookvol6.dvi bookvol6.log bookvol6.ps \
-               bookvol6.idx bookvol6.tex
-
-bookvol7:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol7.pamphlet >bookvol7.tex)
-	@${LATEX} bookvol7.tex
-	@${LATEX} bookvol7.tex >/dev/null
-	@${DVIPS} bookvol7.dvi 2>/dev/null
-	@${PS2PDF} bookvol7.ps >/dev/null
-	@${RM} bookvol7.aux bookvol7.dvi bookvol7.log bookvol7.ps \
-               bookvol7.idx bookvol7.tex
-
-bookvol8:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol8.pamphlet >bookvol8.tex)
-	@${LATEX} bookvol8.tex
-	@${LATEX} bookvol8.tex >/dev/null
-	@${DVIPS} bookvol8.dvi 2>/dev/null
-	@${PS2PDF} bookvol8.ps >/dev/null
-	@${RM} bookvol8.aux bookvol8.dvi bookvol8.log bookvol8.ps \
-               bookvol8.idx bookvol8.tex
-
-bookvol9:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol9.pamphlet >bookvol9.tex)
-	@${LATEX} bookvol9.tex
-	@${LATEX} bookvol9.tex >/dev/null
-	@${DVIPS} bookvol9.dvi 2>/dev/null
-	@${PS2PDF} bookvol9.ps >/dev/null
-	@${RM} bookvol9.aux bookvol9.dvi bookvol9.log bookvol9.ps \
-               bookvol9.idx bookvol9.tex
-
-bookvol10:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol10.pamphlet >bookvol10.tex)
-	@${LATEX} bookvol10.tex
-	@${LATEX} bookvol10.tex >/dev/null
-	@${DVIPS} bookvol10.dvi 2>/dev/null
-	@${PS2PDF} bookvol10.ps >/dev/null
-	@${RM} bookvol10.aux bookvol10.dvi bookvol10.log bookvol10.ps \
-	       bookvol10.idx bookvol10.tex
-
-bookvol11:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol11.pamphlet >bookvol11.tex)
-	@${LATEX} bookvol11.tex
-	@${LATEX} bookvol11.tex >/dev/null
-	@${DVIPS} bookvol11.dvi 2>/dev/null
-	@${PS2PDF} bookvol11.ps >/dev/null
-	@${RM} bookvol11.aux bookvol11.dvi bookvol11.log bookvol11.ps \
-	       bookvol11.idx bookvol11.tex
-
-bookvol12:
-	@(export AXIOM=${AXIOM} && \
-	  ${WEAVE} -delay bookvol12.pamphlet >bookvol12.tex)
-	@${LATEX} bookvol12.tex
-	@${LATEX} bookvol12.tex >/dev/null
-	@${DVIPS} bookvol12.dvi 2>/dev/null
-	@${PS2PDF} bookvol12.ps >/dev/null
-	@${RM} bookvol12.aux bookvol12.dvi bookvol12.log bookvol12.ps \
-	       bookvol12.idx bookvol12.tex
-
-
diff --git a/books/Makefile.pamphlet b/books/Makefile.pamphlet
new file mode 100644
index 0000000..27843db
--- /dev/null
+++ b/books/Makefile.pamphlet
@@ -0,0 +1,469 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{books/Makefile}
+\author{Timothy Daly}
+\maketitle
+\begin{abstract}
+This Makefile creates all the primary documentation for Axiom
+as pdf files in the final output tree.
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+\section{The Makefile}
+<<*>>=
+PDF=${AXIOM}/doc
+IN=${SPD}/books
+LATEX=latex
+MAKEINDEX=makeindex
+DVIPS=dvips -Ppdf
+PS2PDF=ps2pdf
+RM=rm -f
+
+BOOKS=${PDF}/bookvol0.pdf ${PDF}/bookvol1.pdf ${PDF}/bookvol2.pdf \
+      ${PDF}/bookvol3.pdf ${PDF}/bookvol4.pdf ${PDF}/bookvol5.pdf \
+      ${PDF}/bookvol6.pdf ${PDF}/bookvol7.pdf ${PDF}/bookvol8.pdf \
+      ${PDF}/bookvol9.pdf ${PDF}/bookvol10.pdf ${PDF}/bookvol11.pdf \
+      ${PDF}/bookvol12.pdf 
+
+all: ${BOOKS} ${PDF}/toc.pdf
+
+@
+\section{Volume 0: Axiom Jenks and Sutor}
+This is the reconstructed Jenks and Sutor volume.
+<<*>>=
+${PDF}/bookvol0.pdf: ${IN}/bookvol0.pamphlet ${PDF}/axiom.sty
+	@echo 0 making ${PDF}/bookvol0.pdf from ${IN}/bookvol0.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol0.pamphlet ${PDF} ; \
+	  cp -pr ${IN}/ps ${PDF} ; \
+	  ${WEAVE} -delay bookvol0.pamphlet >bookvol0.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol0.tex ; \
+	    ${LATEX} bookvol0.tex >/dev/null ; \
+	    ${DVIPS} bookvol0.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol0.ps >/dev/null ; \
+	    ${RM} bookvol0.aux bookvol0.dvi bookvol0.log bookvol0.ps \
+                  bookvol0.idx bookvol0.tex bookvol0.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol0.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol0.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol0.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol0.ps >${TMP}/trace  ; \
+	    ${RM} bookvol0.aux bookvol0.dvi bookvol0.log bookvol0.ps \
+                  bookvol0.idx bookvol0.tex bookvol0.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 1: Axiom Tutorial}
+This is the tutorial volume. ISBN 1-411-66587-X. 
+Hardcopy is available from Amazon.com or Lulu.com.
+<<*>>=
+${PDF}/bookvol1.pdf: ${IN}/bookvol1.pamphlet ${PDF}/axiom.sty
+	@echo 1 making ${PDF}/bookvol1.pdf from ${IN}/bookvol1.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol1.pamphlet ${PDF} ; \
+	  cp -pr ${IN}/ps ${PDF} ; \
+	  ${WEAVE} -delay bookvol1.pamphlet >bookvol1.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol1.tex ; \
+	    ${LATEX} bookvol1.tex >/dev/null ; \
+	    ${DVIPS} bookvol1.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol1.ps >/dev/null ; \
+	    ${RM} bookvol1.aux bookvol1.dvi bookvol1.log bookvol1.ps \
+                  bookvol1.idx bookvol1.tex bookvol1.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol1.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol1.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol1.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol1.ps >${TMP}/trace  ; \
+	    ${RM} bookvol1.aux bookvol1.dvi bookvol1.log bookvol1.ps \
+                  bookvol1.idx bookvol1.tex bookvol1.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 2: Axiom Users Guide}
+This is a more detailed explanation with current information
+for Axiom users.
+<<*>>=
+${PDF}/bookvol2.pdf: ${IN}/bookvol2.pamphlet ${PDF}/axiom.sty
+	@echo 2 making ${PDF}/bookvol2.pdf from ${IN}/bookvol2.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol2.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol2.pamphlet >bookvol2.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol2.tex ; \
+	    ${LATEX} bookvol2.tex >/dev/null ; \
+	    ${DVIPS} bookvol2.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol2.ps >/dev/null ; \
+	    ${RM} bookvol2.aux bookvol2.dvi bookvol2.log bookvol2.ps \
+                  bookvol2.idx bookvol2.tex bookvol2.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol2.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol2.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol2.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol2.ps >${TMP}/trace  ; \
+	    ${RM} bookvol2.aux bookvol2.dvi bookvol2.log bookvol2.ps \
+                  bookvol2.idx bookvol2.tex bookvol2.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 3: Axiom Programmers Guide}
+This is information about the language and algebra hierarchy
+for Spad language programmers.
+<<*>>=
+${PDF}/bookvol3.pdf: ${IN}/bookvol3.pamphlet ${PDF}/axiom.sty
+	@echo making ${PDF}/bookvol3.pdf from ${IN}/bookvol3.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol3.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol3.pamphlet >bookvol3.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol3.tex ; \
+	    ${LATEX} bookvol3.tex >/dev/null ; \
+	    ${DVIPS} bookvol3.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol3.ps >/dev/null ; \
+	    ${RM} bookvol3.aux bookvol3.dvi bookvol3.log bookvol3.ps \
+                  bookvol3.idx bookvol3.tex bookvol3.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol3.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol3.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol3.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol3.ps >${TMP}/trace  ; \
+	    ${RM} bookvol3.aux bookvol3.dvi bookvol3.log bookvol3.ps \
+                  bookvol3.idx bookvol3.tex bookvol3.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 4: Axiom Developers Guide}
+This is a collection of userful information for developers.
+<<*>>=
+${PDF}/bookvol4.pdf: ${IN}/bookvol4.pamphlet ${PDF}/axiom.sty
+	@echo making ${PDF}/bookvol4.pdf from ${IN}/bookvol4.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol4.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol4.pamphlet >bookvol4.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol4.tex ; \
+	    ${LATEX} bookvol4.tex >/dev/null ; \
+	    ${DVIPS} bookvol4.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol4.ps >/dev/null ; \
+	    ${RM} bookvol4.aux bookvol4.dvi bookvol4.log bookvol4.ps \
+                  bookvol4.idx bookvol4.tex bookvol4.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol4.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol4.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol4.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol4.ps >${TMP}/trace  ; \
+	    ${RM} bookvol4.aux bookvol4.dvi bookvol4.log bookvol4.ps \
+                  bookvol4.idx bookvol4.tex bookvol4.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 5: Axiom Interpreter}
+This is the source code and explanation for the interpreter.
+<<*>>=
+${PDF}/bookvol5.pdf: ${IN}/bookvol5.pamphlet ${PDF}/axiom.sty
+	@echo making ${PDF}/bookvol5.pdf from ${IN}/bookvol5.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol5.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol5.pamphlet >bookvol5.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol5.tex ; \
+	    ${LATEX} bookvol5.tex >/dev/null ; \
+	    ${DVIPS} bookvol5.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol5.ps >/dev/null ; \
+	    ${RM} bookvol5.aux bookvol5.dvi bookvol5.log bookvol5.ps \
+                  bookvol5.idx bookvol5.tex bookvol5.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol5.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol5.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol5.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol5.ps >${TMP}/trace  ; \
+	    ${RM} bookvol5.aux bookvol5.dvi bookvol5.log bookvol5.ps \
+                  bookvol5.idx bookvol5.tex bookvol5.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 6: Axiom Command}
+This covers the axiom commands, sman, and some other system related issues.
+<<*>>=
+${PDF}/bookvol6.pdf: ${IN}/bookvol6.pamphlet ${PDF}/axiom.sty
+	@echo making ${PDF}/bookvol6.pdf from ${IN}/bookvol6.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol6.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol6.pamphlet >bookvol6.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol6.tex ; \
+	    ${LATEX} bookvol6.tex >/dev/null ; \
+	    ${DVIPS} bookvol6.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol6.ps >/dev/null ; \
+	    ${RM} bookvol6.aux bookvol6.dvi bookvol6.log bookvol6.ps \
+                  bookvol6.idx bookvol6.tex bookvol6.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol6.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol6.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol6.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol6.ps >${TMP}/trace  ; \
+	    ${RM} bookvol6.aux bookvol6.dvi bookvol6.log bookvol6.ps \
+                  bookvol6.idx bookvol6.tex bookvol6.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 7: Axiom Hyperdoc}
+This is the source and explanation for the X11 hyperdoc subsystem
+<<*>>=
+${PDF}/bookvol7.pdf: ${IN}/bookvol7.pamphlet ${PDF}/axiom.sty
+	@echo making ${PDF}/bookvol7.pdf from ${IN}/bookvol7.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol7.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol7.pamphlet >bookvol7.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol7.tex ; \
+	    ${LATEX} bookvol7.tex >/dev/null ; \
+	    ${DVIPS} bookvol7.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol7.ps >/dev/null ; \
+	    ${RM} bookvol7.aux bookvol7.dvi bookvol7.log bookvol7.ps \
+                  bookvol7.idx bookvol7.tex bookvol7.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol7.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol7.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol7.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol7.ps >${TMP}/trace  ; \
+	    ${RM} bookvol7.aux bookvol7.dvi bookvol7.log bookvol7.ps \
+                  bookvol7.idx bookvol7.tex bookvol7.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 8: Axiom Graphics}
+This is the source and explanation for the X11 graphics subsystem
+<<*>>=
+${PDF}/bookvol8.pdf: ${IN}/bookvol8.pamphlet ${PDF}/axiom.sty
+	@echo making ${PDF}/bookvol8.pdf from ${IN}/bookvol8.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol8.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol8.pamphlet >bookvol8.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol8.tex ; \
+	    ${LATEX} bookvol8.tex >/dev/null ; \
+	    ${DVIPS} bookvol8.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol8.ps >/dev/null ; \
+	    ${RM} bookvol8.aux bookvol8.dvi bookvol8.log bookvol8.ps \
+                  bookvol8.idx bookvol8.tex bookvol8.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol8.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol8.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol8.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol8.ps >${TMP}/trace  ; \
+	    ${RM} bookvol8.aux bookvol8.dvi bookvol8.log bookvol8.ps \
+                  bookvol8.idx bookvol8.tex bookvol8.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 9: Axiom Compiler}
+This is the source and explanation for the spad compiler.
+<<*>>=
+${PDF}/bookvol9.pdf: ${IN}/bookvol9.pamphlet ${PDF}/axiom.sty
+	@echo making ${PDF}/bookvol9.pdf from ${IN}/bookvol9.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol9.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol9.pamphlet >bookvol9.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol9.tex ; \
+	    ${LATEX} bookvol9.tex >/dev/null ; \
+	    ${DVIPS} bookvol9.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol9.ps >/dev/null ; \
+	    ${RM} bookvol9.aux bookvol9.dvi bookvol9.log bookvol9.ps \
+                  bookvol9.idx bookvol9.tex bookvol9.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol9.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol9.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol9.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol9.ps >${TMP}/trace  ; \
+	    ${RM} bookvol9.aux bookvol9.dvi bookvol9.log bookvol9.ps \
+                  bookvol9.idx bookvol9.tex bookvol9.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 10: Axiom Algebra}
+This ia multi-volumne set covering the algebra.
+<<*>>=
+${PDF}/bookvol10.pdf: ${IN}/bookvol10.pamphlet ${PDF}/axiom.sty
+	@echo 10 making ${PDF}/bookvol10.pdf from ${IN}/bookvol10.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol10.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol10.pamphlet >bookvol10.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol10.tex ; \
+	    ${LATEX} bookvol10.tex >/dev/null ; \
+	    ${DVIPS} bookvol10.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol10.ps >/dev/null ; \
+	    ${RM} bookvol10.aux bookvol10.dvi bookvol10.log bookvol10.ps \
+                  bookvol10.idx bookvol10.tex bookvol10.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol10.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol10.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol10.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol10.ps >${TMP}/trace  ; \
+	    ${RM} bookvol10.aux bookvol10.dvi bookvol10.log bookvol10.ps \
+                  bookvol10.idx bookvol10.tex bookvol10.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 11: Axiom Browser}
+This is the source and explanation of the new Firefox browser front end.
+<<*>>=
+${PDF}/bookvol11.pdf: ${IN}/bookvol11.pamphlet ${PDF}/axiom.sty
+	@echo 11 making ${PDF}/bookvol11.pdf from ${IN}/bookvol11.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol11.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol11.pamphlet >bookvol11.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol11.tex ; \
+	    ${LATEX} bookvol11.tex >/dev/null ; \
+	    ${DVIPS} bookvol11.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol11.ps >/dev/null ; \
+	    ${RM} bookvol11.aux bookvol11.dvi bookvol11.log bookvol11.ps \
+                  bookvol11.idx bookvol11.tex bookvol11.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol11.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol11.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol11.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol11.ps >${TMP}/trace  ; \
+	    ${RM} bookvol11.aux bookvol11.dvi bookvol11.log bookvol11.ps \
+                  bookvol11.idx bookvol11.tex bookvol11.pamphlet ; \
+	  fi )
+
+@
+\section{Volume 12: Axiom Crystal}
+This is the design documents for the crystal interface.
+<<*>>=
+${PDF}/bookvol12.pdf: ${IN}/bookvol12.pamphlet ${PDF}/axiom.sty
+	@echo 12 making ${PDF}/bookvol12.pdf from ${IN}/bookvol12.pamphlet
+	@(cd ${PDF} ; \
+	  cp ${IN}/bookvol12.pamphlet ${PDF} ; \
+	  ${WEAVE} -delay bookvol12.pamphlet >bookvol12.tex ; \
+	  if [ -z "${NOISE}" ] ; then \
+	    ${LATEX} bookvol12.tex ; \
+	    ${LATEX} bookvol12.tex >/dev/null ; \
+	    ${DVIPS} bookvol12.dvi 2>/dev/null ; \
+	    ${PS2PDF} bookvol12.ps >/dev/null ; \
+	    ${RM} bookvol12.aux bookvol12.dvi bookvol12.log bookvol12.ps \
+                  bookvol12.idx bookvol12.tex bookvol12.pamphlet ; \
+	  else \
+	    ${LATEX} bookvol12.tex >${TMP}/trace ; \
+	    echo ...first latex complete ; \
+	    ${LATEX} bookvol12.tex >${TMP}/trace ; \
+	    ${DVIPS} bookvol12.dvi 2>${TMP}/trace  ; \
+	    ${PS2PDF} bookvol12.ps >${TMP}/trace  ; \
+	    ${RM} bookvol12.aux bookvol12.dvi bookvol12.log bookvol12.ps \
+                  bookvol12.idx bookvol12.tex bookvol12.pamphlet ; \
+	  fi )
+
+@
+\section{Combined Table of Contents}
+This is the table of contents from the existing volumes combined into
+one document for easy reference.
+<<*>>=
+${PDF}/toc.pdf: ${BOOKS}
+	@echo 13 making ${PDF}/toc.pdf
+	@(cd ${PDF} ; \
+	echo "\\documentclass{book}" >toc.tex ; \
+	echo "\\begin{document}" >>toc.tex ; \
+	echo "{\\bf Volume ~ 0}: Axiom {\\sl Jenks and Sutor}\\\\" >toc.toc ; \
+	echo "{\\bf Volume ~ 1}: Axiom {\\sl Tutorial}\\\\" >>toc.toc ; \
+	echo "{\\bf Volume ~ 2}: Axiom {\\sl Users Guide}\\\\" >>toc.toc ; \
+	echo \
+         "{\\bf Volume ~ 3}: Axiom {\\sl Programmers Guide}\\\\" >>toc.toc ; \
+	echo \
+         "{\\bf Volume ~ 4}: Axiom {\\sl Developers Guide}\\\\" >>toc.toc ; \
+	echo "{\\bf Volume ~ 5}: Axiom {\\sl Interpreter}\\\\" >>toc.toc ; \
+	echo "{\\bf Volume ~ 6}: Axiom {\\sl Command}\\\\" >>toc.toc ; \
+	echo "{\\bf Volume ~ 7}: Axiom {\\sl Hyperdoc}\\\\" >>toc.toc ; \
+	echo "{\\bf Volume ~ 8}: Axiom {\\sl Graphics}\\\\" >>toc.toc ; \
+	echo "{\\bf Volume ~ 9}: Axiom {\\sl Compiler}\\\\" >>toc.toc ; \
+	echo "{\\bf Volume 10}: Axiom {\\sl Algebra}\\\\" >>toc.toc ; \
+	echo "{\\bf Volume 11}: Axiom {\\sl Browser}\\\\" >>toc.toc ; \
+	echo "{\\bf Volume 12}: Axiom {\\sl Crystal}\\\\" >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\tableofcontents" >>toc.tex ; \
+	echo "\\end{document}" >>toc.tex ; \
+	echo "\\section*{Volume 0: Axiom Jenks and Sutor}" >>toc.toc ; \
+	cat bookvol0.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 1: Axiom Tutorial}" >>toc.toc ; \
+	cat bookvol1.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 2: Axiom Users Guide}" >>toc.toc ; \
+	cat bookvol2.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 3: Axiom Programmers Guide}" >>toc.toc ; \
+	cat bookvol3.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 4: Axiom Developers Guide}" >>toc.toc ; \
+	cat bookvol4.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 5: Axiom Interpreter}" >>toc.toc ; \
+	cat bookvol5.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 6: Axiom Command}" >>toc.toc ; \
+	cat bookvol6.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 7: Axiom Hyperdoc}" >>toc.toc ; \
+	cat bookvol7.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 8: Axiom Graphics}" >>toc.toc ; \
+	cat bookvol8.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 9: Axiom Compiler}" >>toc.toc ; \
+	cat bookvol9.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 10: Axiom Algebra}" >>toc.toc ; \
+	cat bookvol10.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 11: Axiom Browser}" >>toc.toc ; \
+	cat bookvol11.toc >>toc.toc ; \
+	echo "\\newpage" >>toc.toc ; \
+	echo "\\section*{Volume 12: Axiom Crystal}" >>toc.toc ; \
+	cat bookvol12.toc >>toc.toc ; \
+	if [ -z "${NOISE}" ] ; then \
+	  ${LATEX} toc.tex ; \
+	  ${DVIPS} toc.dvi 2>/dev/null ; \
+	  ${PS2PDF} toc.ps >/dev/null ; \
+	  ${RM} -f *.toc toc.aux toc.dvi toc.log toc.ps toc.tex toc.toc ; \
+	else \
+	  ${LATEX} toc.tex >${TMP}/trace ; \
+	  ${DVIPS} toc.dvi 2>${TMP}/trace ; \
+	  ${PS2PDF} toc.ps >${TMP}/trace ; \
+	  ${RM} -f *.toc toc.aux toc.dvi toc.log toc.ps toc.tex toc.toc ; \
+	fi )
+
+${PDF}/axiom.sty: ${SRC}/scripts/tex/axiom.sty
+	@echo 14 making ${PDF}/axiom.sty from ${SRC}/scripts/tex/axiom.sty
+	@cp ${SRC}/scripts/tex/axiom.sty ${PDF}/axiom.sty
+
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} CMUCL {\bf http://www.cons.org/cmucl}
+\bibitem{2} GCL {\bf http://savannah.gnu.org/projects/gcl}
+\bibitem{3} Codemist Ltd, ``Alta'', Horsecombe Vale Combs Down
+Bath BA2 5QR UK Tel. +44-1225-837430 
+{\bf http://www.codemist.co.uk}
+\bibitem{4} \$SPAD/zips/noweb-2.10a.tgz, the noweb source tree
+\bibitem{5} \$SPAD/zips/advi-1.2.0.tar.gz, the advi source tree
+\end{thebibliography}
+\end{document}
+
diff --git a/books/axiom.sty b/books/axiom.sty
deleted file mode 100755
index 3581b97..0000000
--- a/books/axiom.sty
+++ /dev/null
@@ -1,1026 +0,0 @@
-% axiom.sty -- LaTeX support for Axiom
-% DON'T edit this file!  Use src/doc/axiom.sty.pamphlet instead.
-
-\usepackage{alltt}
-
-\newenvironment{chunk}[1]{%   we need the chunkname as an argument
-\noindent%                    make sure we are in column 1
-{\small $<<${#1}$>>=$}%       <<some random string>>=
-\begin{alltt}%                use the verbatim
-\small}%                      with a small font
-{\end{alltt}%                 the end{chunk} ends the verbatim
-\par{}%                       we add a newline
-\noindent{}%                  start in column 1
-@%                            put an @
-\par%                         and a newline
-\normalsize}%                 and return to the rest of the document
-
-{\obeyspaces\AtBeginDocument{\global\let =\ }} % from texbook, p 381
-\def\nwopt@nomargintag{\let\nwmargintag=\@gobble}
-\def\nwopt@margintag{%
-  \def\nwmargintag##1{\leavevmode\llap{##1\kern\nwmarginglue\kern\codemargin}}}
-\def\nwopt@margintag{%
-  \def\nwmargintag##1{\leavevmode\kern-\codemargin\nwthemargintag{##1}\kern\codemargin}}
-\def\nwthemargintag#1{\llap{#1\kern\nwmarginglue}}
-\nwopt@margintag
-\newdimen\nwmarginglue
-\nwmarginglue=0.3in
-\def\nwtagstyle{\footnotesize\Rm}
-% make \hsize in code sufficient for 88 columns
-\setbox0=\hbox{\tt m}
-\newdimen\codehsize
-\codehsize=91\wd0 % 88 columns wasn't enough; I don't know why
-\newdimen\codemargin
-\codemargin=0pt
-\newdimen\nwdefspace
-\nwdefspace=\codehsize
-% need to use \textwidth in {\LaTeX} to handle styles with
-% non-standard margins (David Bruce).  Don't know why we sometimes
-% wanted \hsize.  27 August 1997.
-%% \advance\nwdefspace by -\hsize\relax
-\ifx\textwidth\undefined
-  \advance\nwdefspace by -\hsize\relax
-\else
-  \advance\nwdefspace by -\textwidth\relax
-\fi
-\chardef\other=12
-\def\setupcode{%
-  \chardef\\=`\\
-  \chardef\{=`\{
-  \chardef\}=`\}
-  \catcode`\$=\other
-  \catcode`\&=\other
-  \catcode`\#=\other
-  \catcode`\%=\other
-  \catcode`\~=\other
-  \catcode`\_=\other
-  \catcode`\^=\other
-  \catcode`\"=\other    % fixes problem with german.sty
-  \obeyspaces\Tt
-}
-\let\nwlbrace=\{
-\let\nwrbrace=\}
-\def\nwendquote{\relax\ifhmode\spacefactor=1000 \fi}
-{\catcode`\^^M=\active % make CR an active character
-  \gdef\newlines{\catcode`\^^M=\active % make CR an active character
-  \gdef\eatline#1^^M{\relax}%
-}
-\def\nwnewline{\ifvmode\else\hfil\break\leavevmode\hbox{}\fi}
-\def\setupmodname{%
-  \catcode`\$=3
-  \catcode`\&=4
-  \catcode`\#=6
-  \catcode`\%=14
-  \catcode`\~=13
-  \catcode`\_=8
-  \catcode`\^=7
-  \catcode`\ =10
-  \catcode`\^^M=5
-  \let\{\nwlbrace
-  \let\}\nwrbrace
-  % bad news --- don't know what catcode to give "
-  \Rm}
-\def\LA{\begingroup\maybehbox\bgroup\setupmodname\It$\langle$}
-\def\RA{\/$\rangle$\egroup\endgroup}
-\def\code{\leavevmode\begingroup\setupcode\newlines}
-\def\edoc{\endgroup}
-\let\maybehbox\relax
-\newbox\equivbox
-\setbox\equivbox=\hbox{$\equiv$}
-\newbox\plusequivbox
-\setbox\plusequivbox=\hbox{$\mathord{+}\mathord{\equiv}$}
-% \moddef can't have an argument because there might be \code...\edoc
-\def\moddef{\leavevmode\kern-\codemargin\LA}
-\def\endmoddef{\RA\ifmmode\equiv\else\unhcopy\equivbox\fi
-               \nobreak\hfill\nobreak}
-\def\plusendmoddef{\RA\ifmmode\mathord{+}\mathord{\equiv}\else\unhcopy\plusequivbox\fi
-               \nobreak\hfill\nobreak}
-\def\chunklist{%
-\errhelp{I changed \chunklist to \nowebchunks.  
-I'll try to avoid such incompatible changes in the future.}%
-\errmessage{Use \string\nowebchunks\space instead of \string\chunklist}}
-\def\nowebchunks{\message{<Warning: You need noweave -x to use \string\nowebchunks>}}
-\def\nowebindex{\message{<Warning: You need noweave -index to use \string\nowebindex>}}
-% here is support for the new-style (capitalized) font-changing commands
-% thanks to Dave Love
-\ifx\documentstyle\undefined
-  \let\Rm=\rm \let\It=\it \let\Tt=\tt       % plain
-\else\ifx\selectfont\undefined
-  \let\Rm=\rm \let\It=\it \let\Tt=\tt       % LaTeX OFSS
-\else                                       % LaTeX NFSS
-  \def\Rm{\reset@font\rm}
-  \def\It{\reset@font\it}
-  \def\Tt{\reset@font\tt}
-  \def\Bf{\reset@font\bf}
-\fi\fi
-\ifx\reset@font\undefined \let\reset@font=\relax \fi
-\def\noweboptions#1{%
-  \def\@nwoptionlist{#1}%
-  \@for\@nwoption:=\@nwoptionlist\do{%
-    \@ifundefined{nwopt@\@nwoption}{%
-        \@latexerr{There is no such noweb option as '\@nwoption'}\@eha}{%
-        \csname nwopt@\@nwoption\endcsname}}}
-\codemargin=10pt
-\advance\codehsize by \codemargin       % make room for indentation of code
-\advance\nwdefspace by \codemargin      % and fix adjustment for def/use
-\def\setcodemargin#1{%
-  \advance\codehsize by -\codemargin       % make room for indentation of code
-  \advance\nwdefspace by -\codemargin   % and fix adjustment for def/use
-  \codemargin=#1
-  \advance\codehsize by \codemargin       % make room for indentation of code
-  \advance\nwdefspace by \codemargin    % and fix adjustment for
-                                        % def/use
-}
-\def\nwopt@shift{%
-  \dimen@=-0.8in
-  \if@twoside                 % Values for two-sided printing:
-     \advance\evensidemargin by \dimen@
-  \else                       % Values for one-sided printing:
-     \advance\evensidemargin by \dimen@
-     \advance\oddsidemargin by \dimen@
-  \fi
-%  \advance \marginparwidth -\dimen@
-}
-\let\nwopt@noshift\@empty
-\def\nwbegincode#1{%
-  \begingroup
-    \topsep \nwcodetopsep
-    \@beginparpenalty \@highpenalty
-    \@endparpenalty -\@highpenalty
-  \@begincode }
-\def\nwendcode{\endtrivlist \endgroup \filbreak} % keeps code on 1 page
-
-\newenvironment{webcode}{%
-  \@begincode
-}{%
-  \endtrivlist}
-\def\@begincode{%
-    \trivlist \item[]%
-    \leftskip\@totalleftmargin \advance\leftskip\codemargin
-    \rightskip\hsize \advance\rightskip -\codehsize
-    \parskip\z@ \parindent\z@ \parfillskip\@flushglue
-  \linewidth\codehsize
-    \@@par
-    \def\par{\leavevmode\null \@@par \penalty\nwcodepenalty}%
-    \obeylines
-    \@noligs   \ifx\verbatim@nolig@list\undefined\else
-                 \let\do=\nw@makeother \verbatim@nolig@list \do@noligs\`
-               \fi
-    \setupcode \frenchspacing \@vobeyspaces
-  \nowebsize \setupcode
-  \let\maybehbox\mbox }
-  \newskip\nwcodetopsep \nwcodetopsep = 3pt plus 1.2pt minus 1pt
-  \let\nowebsize=\normalsize
-  \def\nwopt@tinycode{\let\nowebsize=\tiny}
-  \def\nwopt@footnotesizecode{\let\nowebsize=\footnotesize}
-  \def\nwopt@scriptsizecode{\let\nowebsize=\scriptsize}
-  \def\nwopt@smallcode{\let\nowebsize=\small}
-  \def\nwopt@normalsizecode{\let\nowebsize=\normalsize}
-  \def\nwopt@largecode{\let\nowebsize=\large}
-  \def\nwopt@Largecode{\let\nowebsize=\Large}
-  \def\nwopt@LARGEcode{\let\nowebsize=\LARGE}
-  \def\nwopt@hugecode{\let\nowebsize=\huge}
-  \def\nwopt@Hugecode{\let\nowebsize=\Huge}
-\newcount\nwcodepenalty  \nwcodepenalty=\@highpenalty
-\def\nw@makeother#1{\catcode`#1=12 }
-\def\nwbegindocs#1{\ifvmode\noindent\fi}
-\let\nwenddocs=\relax
-\let\nwdocspar=\filbreak
-\raggedbottom
-\def\code{\leavevmode\begingroup\setupcode\@vobeyspaces\obeylines}
-\let\edoc=\endgroup
-\newdimen\@original@textwidth
-\def\ps@noweb{%
-  \@original@textwidth=\textwidth
-  \let\@mkboth\@gobbletwo
-  \def\@oddfoot{}\def\@evenfoot{}%       No feet.
-  \if@twoside         % If two-sided printing.
-    \def\@evenhead{\hbox to \@original@textwidth{%
-           \Rm \thepage\qquad{\Tt\leftmark}\hfil\today}}%        Left heading.
-    \def\@oddhead{\hbox to \@original@textwidth{%
-           \Rm \today\hfil{\Tt\leftmark}\qquad\thepage}}% Right heading.
-  \else               % If one-sided printing.
-    \def\@oddhead{\hbox to \@original@textwidth{%
-           \Rm \today\hfil{\Tt\leftmark}\qquad\thepage}}% Right heading.
-    \let\@evenhead\@oddhead
-  \fi
-  \let\chaptermark\@gobble
-  \let\sectionmark\@gobble
-  \let\subsectionmark\@gobble
-  \let\subsubsectionmark\@gobble
-  \let\paragraphmark\@gobble
-  \let\subparagraphmark\@gobble
-  \def\nwfilename{\begingroup\let\do\@makeother\dospecials
-                \catcode`\{=1 \catcode`\}=2 \nw@filename}
-  \def\nw@filename##1{\endgroup\markboth{##1}{##1}\let\nw@filename=\nw@laterfilename}%
-}
-\def\nw@laterfilename#1{\endgroup\clearpage \markboth{#1}{#1}}
-\let\nwfilename=\@gobble
-\def\nwcodecomment#1{\@@par\penalty\nwcodepenalty
-    \if@firstnwcodecomment
-      \vskip\nwcodecommentsep\penalty\nwcodepenalty\@firstnwcodecommentfalse
-    \fi%
-    \hspace{-\codemargin}{%
-        \rightskip=0pt plus1in
-        \interlinepenalty\nwcodepenalty
-        \let\\\relax\footnotesize\Rm #1\@@par\penalty\nwcodepenalty}}
-\def\@nwalsodefined#1{\nwcodecomment{\@nwlangdepdef\ \nwpageprep\ \@pagesl{#1}.}}
-\def\@nwused#1{\nwcodecomment{\@nwlangdepcud\ \nwpageprep\ \@pagesl{#1}.}}
-\def\@nwnotused#1{\nwcodecomment{\@nwlangdeprtc.}}
-\def\nwoutput#1{\nwcodecomment{\@nwlangdepcwf\ {\Tt \@stripstar#1*\stripped}.}}
-\def\@stripstar#1*#2\stripped{#1}
-\providecommand{\nwprevdefptr}[1]{%
-  \mbox{$\mathord{\triangleleft}\,\mathord{\mbox{\subpageref{#1}}}$}}
-\providecommand{\nwnextdefptr}[1]{%
-  \mbox{$\mathord{\mbox{\subpageref{#1}}}\,\mathord{\triangleright}$}}
-
-\providecommand{\@nwprevnextdefs}[2]{%
-  {\nwtagstyle
-  \ifx\relax#1\else ~~\nwprevdefptr{#1}\fi
-  \ifx\relax#2\else ~~\nwnextdefptr{#2}\fi}}
-\providecommand{\@nwusesondefline}[1]{{\nwtagstyle~~(\@pagenumsl{#1})}}
-\providecommand{\@nwstartdeflinemarkup}{\nobreak\hskip 1.5em plus 1fill\nobreak}
-\providecommand{\@nwenddeflinemarkup}{\nobreak\hskip \nwdefspace minus\nwdefspace\nobreak}
-\def\nwopt@longxref{%
-  \let\nwalsodefined\@nwalsodefined
-  \let\nwused\@nwused
-  \let\nwnotused\@nwnotused
-  \let\nwprevnextdefs\@gobbletwo
-  \let\nwusesondefline\@gobble
-  \let\nwstartdeflinemarkup\relax
-  \let\nwenddeflinemarkup\relax
-}
-\def\nwopt@shortxref{%
-  \let\nwalsodefined\@gobble
-  \let\nwused\@gobble
-  \let\nwnotused\@gobble
-  \let\nwprevnextdefs\@nwprevnextdefs
-  \let\nwusesondefline\@nwusesondefline
-  \let\nwstartdeflinemarkup\@nwstartdeflinemarkup
-  \let\nwenddeflinemarkup\@nwenddeflinemarkup
-}
-\def\nwopt@noxref{%
-  \let\nwalsodefined\@gobble
-  \let\nwused\@gobble
-  \let\nwnotused\@gobble
-  \let\nwprevnextdefs\@gobbletwo
-  \let\nwusesondefline\@gobble
-  \let\nwstartdeflinemarkup\relax
-  \let\nwenddeflinemarkup\relax
-}
-\nwopt@shortxref % to hell with backward compatibility!
-\newskip\nwcodecommentsep \nwcodecommentsep=3pt plus 1pt minus 1pt
-\newif\if@firstnwcodecomment\@firstnwcodecommenttrue
-\newcount\@nwlopage\newcount\@nwhipage  % range lo..hi-1
-\newcount\@nwlosub              % subpage of lo
-\newcount\@nwhisub              % subpage of hi
-\def\@nwfirstpage#1#2#3{% subpage page xref-tag
-  \@nwlopage=#2 \@nwlosub=#1
-  \def\@nwloxreftag{#3}%
-  \advance\@nwpagecount by \@ne
-  \@nwhipage=\@nwlopage\advance\@nwhipage by \@ne }
-\def\@nwnextpage#1#2#3{% subpage page xref-tag
-  \ifnum\@nwhipage=#2 
-    \advance\@nwhipage by \@ne 
-    \advance\@nwpagecount by \@ne
-    \@nwhisub=#1 
-    \def\@nwhixreftag{#3}\else
-  \ifnum#2<\@nwlopage \advance\@nwhipage by \m@ne
-                      \ifnum\@nwhipage=\@nwlopage
-                           \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                                             {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                                              {\@nwloxreftag}}}%
-                      \else
-                        \count@=\@nwhipage \advance\count@ by \m@ne
-                        \ifnum\count@=\@nwlopage % consecutive pages
-                            \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                                             {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                                              {\@nwloxreftag}}%
-                                          \noexpand\noexpand\noexpand\\%
-                                             {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
-                                              {\@nwhixreftag}}}%
-                        \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-                                \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
-                                \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-                                  \count@=\@nwlopage \divide\count@ by 100
-                                  \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
-                                  \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
-                                    \multiply\@nwpagetemp by 100
-                                    \advance \@nwhipage by -\@nwpagetemp
-                                    \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-                                  \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-                                  \fi
-                                \fi
-                              \fi%
-                        \fi
-                      \fi%
-                      \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\@nwfirstpage{#1}{#2}{#3}\else
-  \ifnum#2>\@nwhipage \advance\@nwhipage by \m@ne
-                      \ifnum\@nwhipage=\@nwlopage
-                           \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                                             {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                                              {\@nwloxreftag}}}%
-                      \else
-                        \count@=\@nwhipage \advance\count@ by \m@ne
-                        \ifnum\count@=\@nwlopage % consecutive pages
-                            \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                                             {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                                              {\@nwloxreftag}}%
-                                          \noexpand\noexpand\noexpand\\%
-                                             {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
-                                              {\@nwhixreftag}}}%
-                        \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-                                \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
-                                \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-                                  \count@=\@nwlopage \divide\count@ by 100
-                                  \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
-                                  \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
-                                    \multiply\@nwpagetemp by 100
-                                    \advance \@nwhipage by -\@nwpagetemp
-                                    \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-                                  \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-                                  \fi
-                                \fi
-                              \fi%
-                        \fi
-                      \fi%
-                      \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\@nwfirstpage{#1}{#2}{#3}\else
-    \@nwlosub=0 \@nwhisub=0
-  \fi\fi\fi
-  }
-\newcount\@nwpagetemp
-\newcount\@nwpagecount
-\def\@nwfirstpagel#1{% label
-  \@ifundefined{r@#1}{\@warning{Reference `#1' on page \thepage \space undefined}%
-                      \nwix@cons\nw@pages{\\{\bf ??}}}{%
-    \edef\@tempa{\noexpand\@nwfirstpage\subpagepair{#1}{#1}}\@tempa}}
-\def\@nwnextpagel#1{% label
-  \@ifundefined{r@#1}{\@warning{Reference `#1' on page \thepage \space undefined}%
-                      \nwix@cons\nw@pages{\\{\bf ??}}}{%
-    \edef\@tempa{\noexpand\@nwnextpage\subpagepair{#1}{#1}}\@tempa}}
-\def\@pagesl#1{%  list of labels
-  \gdef\nw@pages{}\@nwpagecount=0
-  \def\\##1{\@nwfirstpagel{##1}\let\\=\@nwnextpagel}#1%
-  \advance\@nwhipage by \m@ne
-  \ifnum\@nwhipage=\@nwlopage
-       \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                          {\@nwloxreftag}}}%
-  \else
-    \count@=\@nwhipage \advance\count@ by \m@ne
-    \ifnum\count@=\@nwlopage % consecutive pages
-        \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                          {\@nwloxreftag}}%
-                      \noexpand\noexpand\noexpand\\%
-                         {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
-                          {\@nwhixreftag}}}%
-    \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-            \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
-            \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-              \count@=\@nwlopage \divide\count@ by 100
-              \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
-              \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
-                \multiply\@nwpagetemp by 100
-                \advance \@nwhipage by -\@nwpagetemp
-                \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-              \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-              \fi
-            \fi
-          \fi%
-    \fi
-  \fi%
-  \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\def\\##1{\@nwhyperpagenum##1}%
-  \ifnum\@nwpagecount=1 \nwpageword \else \nwpagesword\fi~\commafy{\nw@pages}}
-\def\@nwhyperpagenum#1#2{\nwhyperreference{#2}{#1}}
-
-\def\@pagenumsl#1{%  list of labels -- doesn't include word `pages', commas, or `and'
-  \gdef\nw@pages{}\@nwpagecount=0
-  \def\\##1{\@nwfirstpagel{##1}\let\\=\@nwnextpagel}#1%
-  \advance\@nwhipage by \m@ne
-  \ifnum\@nwhipage=\@nwlopage
-       \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                          {\@nwloxreftag}}}%
-  \else
-    \count@=\@nwhipage \advance\count@ by \m@ne
-    \ifnum\count@=\@nwlopage % consecutive pages
-        \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                          {\@nwloxreftag}}%
-                      \noexpand\noexpand\noexpand\\%
-                         {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
-                          {\@nwhixreftag}}}%
-    \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-            \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
-            \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-              \count@=\@nwlopage \divide\count@ by 100
-              \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
-              \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
-                \multiply\@nwpagetemp by 100
-                \advance \@nwhipage by -\@nwpagetemp
-                \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-              \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-              \fi
-            \fi
-          \fi%
-    \fi
-  \fi%
-  \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa%
-  \def\\##1{\@nwhyperpagenum##1\let\\=\@nwpagenumslrest}\nw@pages}
-\def\@nwpagenumslrest#1{~\@nwhyperpagenum#1}
-\def\subpages#1{% list of {{subpage}{page}}
-  \gdef\nw@pages{}\@nwpagecount=0
-  \def\\##1{\edef\@tempa{\noexpand\@nwfirstpage##1{}}\@tempa
-            \def\\####1{\edef\@tempa{\noexpand\@nwnextpage####1}\@tempa}}#1%
-  \advance\@nwhipage by \m@ne
-  \ifnum\@nwhipage=\@nwlopage
-       \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                          {\@nwloxreftag}}}%
-  \else
-    \count@=\@nwhipage \advance\count@ by \m@ne
-    \ifnum\count@=\@nwlopage % consecutive pages
-        \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                          {\@nwloxreftag}}%
-                      \noexpand\noexpand\noexpand\\%
-                         {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
-                          {\@nwhixreftag}}}%
-    \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-            \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
-            \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-              \count@=\@nwlopage \divide\count@ by 100
-              \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
-              \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
-                \multiply\@nwpagetemp by 100
-                \advance \@nwhipage by -\@nwpagetemp
-                \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-              \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-              \fi
-            \fi
-          \fi%
-    \fi
-  \fi%
-  \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\def\\##1{\@firstoftwo##1}%
-  \ifnum\@nwpagecount=1 \nwpageword \else \nwpagesword\fi~\commafy{\nw@pages}}
-\def\@nwaddrange{\advance\@nwhipage by \m@ne
-                 \ifnum\@nwhipage=\@nwlopage
-                      \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                                        {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                                         {\@nwloxreftag}}}%
-                 \else
-                   \count@=\@nwhipage \advance\count@ by \m@ne
-                   \ifnum\count@=\@nwlopage % consecutive pages
-                       \edef\@tempa{\noexpand\noexpand\noexpand\\%
-                                        {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
-                                         {\@nwloxreftag}}%
-                                     \noexpand\noexpand\noexpand\\%
-                                        {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
-                                         {\@nwhixreftag}}}%
-                   \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-                           \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
-                           \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
-                             \count@=\@nwlopage \divide\count@ by 100
-                             \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
-                             \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
-                               \multiply\@nwpagetemp by 100
-                               \advance \@nwhipage by -\@nwpagetemp
-                               \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-                             \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
-                             \fi
-                           \fi
-                         \fi%
-                   \fi
-                 \fi%
-                 \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa}
-\def\nwpageword{\@nwlangdepchk}  % chunk, was page
-\def\nwpagesword{\@nwlangdepchks}  % chunk, was page
-\def\nwpageprep{\@nwlangdepin}     % in, was on
-\providecommand\nw@genericref[2]{% what to do, name of ref
-  \expandafter\nw@g@nericref\csname r@#2\endcsname#1{#2}}
-\providecommand\nw@g@nericref[3]{% control sequence, what to do, name
-  \ifx#1\relax
-    \ref{#3}% trigger the standard `undefined ref' mechanisms
-  \else
-    \expandafter#2#1.\\%
-  \fi}
-\def\nw@selectone#1#2#3\\{#1}
-\def\nw@selecttwo#1#2#3\\{#2}
-\def\nw@selectonetwo#1#2#3\\{{#1}{#2}}
-\providecommand{\subpageref}[1]{%
-  \nwhyperreference{#1}{\nw@genericref\@subpageref{#1}}}
-\def\@subpageref#1#2#3\\{%
-  \@ifundefined{2on#2}{#2}{\nwthepagenum{#1}{#2}}}
-\providecommand{\subpagepair}[1]{%  % produces {subpage}{page}
-  \@ifundefined{r@#1}%
-    {{0}{0}}%
-    {\nw@genericref\@subpagepair{#1}}}
-\def\@subpagepair#1#2#3\\{%
-  \@ifundefined{2on#2}{{0}{#2}}{{#1}{#2}}}
-\providecommand{\sublabel}[1]{%
-  \@bsphack
-  \nwblindhyperanchor{#1}%
-  \if@filesw {\let\thepage\relax
-   \def\protect{\noexpand\noexpand\noexpand}%
-   \edef\@tempa{\write\@auxout{\string
-      \newsublabel{#1}{{}{\thepage}}}}%
-   \expandafter}\@tempa
-   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
-\providecommand{\nosublabel}[1]{%
-  \@bsphack\if@filesw {\let\thepage\relax
-   \def\protect{\noexpand\noexpand\noexpand}%
-   \edef\@tempa{\write\@auxout{\string
-      \newlabel{#1}{{0}{\thepage}}}}%
-   \expandafter}\@tempa
-   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
-\providecommand\newsublabel{%
-  \nw@settrailers
-  \global\let\newsublabel\@newsublabel
-  \@newsublabel}
-\providecommand{\@newsublabel}[2]{%
-  \edef\this@page{\@cdr#2\@nil}%
-  \ifx\this@page\last@page\else
-    \sub@page=\z@
-  \fi
-  \edef\last@page{\this@page}
-  \advance\sub@page by \@ne
-  \ifnum\sub@page=\tw@
-    \global\@namedef{2on\this@page}{}%
-  \fi
-  \pendingsublabel{#1}%
-  \edef\@tempa##1{\noexpand\newlabel{##1}%
-    {{\number\sub@page}{\this@page}\nw@labeltrailers}}%
-  \pending@sublabels
-  \def\pending@sublabels{}}
-\providecommand\nw@settrailers{% -- won't work on first run
-  \@ifpackageloaded{nameref}%
-     {\gdef\nw@labeltrailers{{}{}{}}}%
-     {\gdef\nw@labeltrailers{}}}
-\renewcommand\nw@settrailers{% 
-  \@ifundefined{@secondoffive}%
-     {\gdef\nw@labeltrailers{}}%
-     {\gdef\nw@labeltrailers{{}{}{}}}}
-\providecommand{\nextchunklabel}[1]{%
-  \nwblindhyperanchor{#1}%   % looks slightly bogus --- nr
-  \@bsphack\if@filesw {\let\thepage\relax
-      \edef\@tempa{\write\@auxout{\string\pendingsublabel{#1}}}%
-      \expandafter}\@tempa
-   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
-\providecommand\pendingsublabel[1]{%
-  \def\@tempa{\noexpand\@tempa}%
-  \edef\pending@sublabels{\noexpand\@tempa{#1}\pending@sublabels}}
-\def\pending@sublabels{}
-\def\last@page{\relax}
-\newcount\sub@page
-\def\@alphasubpagenum#1#2{#2\ifnum#1=0 \else\@alph{#1}\fi}
-\def\@nosubpagenum#1#2{#2}
-\def\@numsubpagenum#1#2{#2\ifnum#1=0 \else.\@arabic{#1}\fi}
-\def\nwopt@nosubpage{\let\nwthepagenum=\@nosubpagenum\nwopt@nomargintag}
-\def\nwopt@numsubpage{\let\nwthepagenum=\@numsubpagenum}
-\def\nwopt@alphasubpage{\let\nwthepagenum=\@alphasubpagenum}
-\nwopt@alphasubpage
-\newcount\@nwalph@n
-\let\@nwalph@d\@tempcnta
-\let\@nwalph@bound\@tempcntb
-\def\@nwlongalph#1{{%
-  \@nwalph@n=#1\advance\@nwalph@n by-1
-  \@nwalph@bound=26
-  \loop\ifnum\@nwalph@n<\@nwalph@bound\else
-     \advance\@nwalph@n by -\@nwalph@bound
-     \multiply\@nwalph@bound by 26
-  \repeat
-  \loop\ifnum\@nwalph@bound>1
-    \divide\@nwalph@bound by 26
-    \@nwalph@d=\@nwalph@n\divide\@nwalph@d by \@nwalph@bound
-    % d := d * bound ; n -:= d; d := d / bound --- saves a temporary
-    \multiply\@nwalph@d by \@nwalph@bound
-    \advance\@nwalph@n by -\@nwalph@d
-    \divide\@nwalph@d by \@nwalph@bound
-    \advance\@nwalph@d by 1 \@alph{\@nwalph@d}%
-  \repeat
-}}
-\newcount\nw@chunkcount
-\nw@chunkcount=\@ne
-\providecommand{\weblabel}[1]{%
-  \@bsphack
-  \nwblindhyperanchor{#1}%
-  \if@filesw {\let\thepage\relax
-   \def\protect{\noexpand\noexpand\noexpand}%
-   \edef\@tempa{\write\@auxout{\string
-      \newsublabel{#1}{{}{\number\nw@chunkcount}}}}%
-   \expandafter}\@tempa
-   \global\advance\nw@chunkcount by \@ne
-   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
-\def\nwopt@webnumbering{%
-  \let\sublabel=\weblabel
-  \def\nwpageword{chunk}\def\nwpagesword{chunks}%
-  \def\nwpageprep{in}}
-% \nwindexdefn{printable name}{identifying label}{label of chunk}
-% \nwindexuse{printable name}{identifying label}{label of chunk}
-
-\def\nwindexdefn#1#2#3{\@auxix{\protect\nwixd}{#2}{#3}}
-\def\nwindexuse#1#2#3{\@auxix{\protect\nwixu}{#2}{#3}}
-
-\def\@auxix#1#2#3{% {marker}{id label}{subpage label}
-   \@bsphack\if@filesw {\let\nwixd\relax\let\nwixu\relax
-   \def\protect{\noexpand\noexpand\noexpand}%
-   \edef\@tempa{\write\@auxout{\string\nwixadd{#1}{#2}{#3}}}%
-   \expandafter}\@tempa
-   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
-% \nwixadd{marker}{idlabel}{subpage label}
-\def\nwixadd#1#2#3{%
-  \@ifundefined{nwixl@#2}%
-    {\global\@namedef{nwixl@#2}{#1{#3}}}%
-    {\expandafter\nwix@cons\csname nwixl@#2\endcsname{#1{#3}}}}
-\def\@nwsubscriptident#1#2{\mbox{$\mbox{#1}_{\mathrm{\subpageref{#2}}}$}}
-\def\@nwnosubscriptident#1#2{#1}
-\def\@nwhyperident#1#2{\leavevmode\nwhyperreference{#2}{#1}}
-\def\nwopt@subscriptidents{%
-  \let\nwlinkedidentq\@nwsubscriptident
-  \let\nwlinkedidentc\@nwsubscriptident
-}
-\def\nwopt@nosubscriptidents{%
-  \let\nwlinkedidentq\@nwnosubscriptident
-  \let\nwlinkedidentc\@nwnosubscriptident
-}
-\def\nwopt@hyperidents{%
-  \let\nwlinkedidentq\@nwhyperident
-  \let\nwlinkedidentc\@nwhyperident
-}
-\def\nwopt@nohyperidents{%
-  \let\nwlinkedidentq\@nwnosubscriptident
-  \let\nwlinkedidentc\@nwnosubscriptident
-}
-\def\nwopt@subscriptquotedidents{%
-  \let\nwlinkedidentq\@nwsubscriptident
-}
-\def\nwopt@nosubscriptquotedidents{%
-  \let\nwlinkedidentq\@nwnosubscriptident
-}
-\def\nwopt@hyperquotedidents{%
-  \let\nwlinkedidentq\@nwhyperident
-}
-\def\nwopt@nohyperquotedidents{%
-  \let\nwlinkedidentq\@nwnosubscriptident
-}
-\nwopt@hyperidents
-\newcount\@commacount
-\def\commafy#1{%
-  {\nwix@listcount{#1}\@commacount=\nwix@counter
-   \let\@comma@each=\\%
-   \ifcase\@commacount\let\\=\@comma@each\or\let\\=\@comma@each\or
-     \def\\{\def\\{ \@nwlangdepand\ \@comma@each}\@comma@each}\else
-     \def\\{\def\\{, %
-                   \advance\@commacount by \m@ne
-                   \ifnum\@commacount=1 \@nwlangdepand~\fi\@comma@each}\@comma@each}\fi
-   #1}}
-\def\nwix@cons#1#2{% {list}{\marker{element}}
-  {\toks0=\expandafter{#1}\def\@tempa{#2}\toks2=\expandafter{\@tempa}%
-   \xdef#1{\the\toks0 \the\toks2 }}}
-\def\nwix@uses#1{% {label}
-  \def\nwixu{\\}\let\nwixd\@gobble\@nameuse{nwixl@#1}}
-\def\nwix@defs#1{% {label}
-  \def\nwixd{\\}\let\nwixu\@gobble\@nameuse{nwixl@#1}}
-\newcount\nwix@counter
-\def\nwix@listcount#1{% {list with \\}
-  {\count@=0
-   \def\\##1{\advance\count@ by \@ne }%
-   #1\global\nwix@counter=\count@ }}
-\def\nwix@usecount#1{\nwix@listcount{\nwix@uses{#1}}}
-\def\nwix@defcount#1{\nwix@listcount{\nwix@defs{#1}}}
-\def\nwix@id@defs#1{% index pair
-  {{\Tt \@car#1\@nil}%
-  \def\\##1{~\subpageref{##1}}\nwix@defs{\@cdr#1\@nil}}}
-\def\nwidentuses#1{% list of index pairs
-  \nwcodecomment{\@nwlangdepuss\ \let\\=\nwix@id@defs\commafy{#1}.}}
-\def\nwix@totaluses#1{% list of index pairs
-  {\count@=0
-   \def\\##1{\nwix@usecount{\@cdr##1\@nil}\advance\count@ by\nwix@counter}%
-   #1\global\nwix@counter\count@ }}
-\def\nwix@id@uses#1#2{% {ident}{label}
-  \nwix@usecount{#2}\ifnum\nwix@counter>0
-    {\advance\leftskip by \codemargin
-     \nwcodecomment{{\Tt #1}, \@nwlangdepusd\ \nwpageprep\ \@pagesl{\nwix@uses{#2}}.}}%
-  \else
-    \ifnw@hideunuseddefs\else
-      {\advance\leftskip by \codemargin \nwcodecomment{{\Tt #1}, \@nwlangdepnvu.}}%
-    \fi
-  \fi}
-\def\nwidentdefs#1{% list of index pairs
-  \ifnw@hideunuseddefs\nwix@totaluses{#1}\else\nwix@listcount{#1}\fi
-  \ifnum\nwix@counter>0
-    \nwcodecomment{\@nwlangdepdfs:}%
-    {\def\\##1{\nwix@id@uses ##1}#1}%
-  \fi}
-\newif\ifnw@hideunuseddefs\nw@hideunuseddefsfalse
-\def\nwopt@hideunuseddefs{\nw@hideunuseddefstrue}
-\def\nwopt@noidentxref{%
-  \let\nwidentdefs\@gobble
-  \let\nwidentuses\@gobble}
-\def\nw@underlinedefs{% {list with \nwixd, \nwixu}
-  \let\\=\relax\def\nw@comma{, }
-  \def\nwixd##1{\\\underline{\subpageref{##1}}\let\\\nw@comma}%
-  \def\nwixu##1{\\\subpageref{##1}\let\\\nw@comma}}
-
-\def\nw@indexline#1#2{%
-   {\indent {\Tt #1}: \nw@underlinedefs\@nameuse{nwixl@#2}\par}}
-
-\newenvironment{thenowebindex}{\parindent=-10pt \parskip=\z@ 
-        \advance\leftskip by 10pt 
-        \advance\rightskip by 0pt plus1in\par\@afterindenttrue
-    \def\\##1{\nw@indexline##1}}{}
-\def\nowebindex{%
-  \@ifundefined{nwixs@i}%
-     {\@warning{The \string\nowebindex\space is empty}}%
-     {\begin{thenowebindex}\@nameuse{nwixs@i}\end{thenowebindex}}}
-\def\nowebindex@external{%
-  {\let\nwixadds@c=\@gobble
-   \def\nwixadds@i##1{\nw@indexline##1}%
-   \def\nwixaddsx##1##2{\@nameuse{nwixadds@##1}{##2}}%
-   \begin{thenowebindex}\@input{\jobname.nwi}\end{thenowebindex}}}
-\def\nwixlogsorted#1#2{% list data
-   \@bsphack\if@filesw 
-     \toks0={#2}\immediate\write\@auxout{\string\nwixadds{#1}{\the\toks0}}
-   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
-\def\nwixadds#1#2{%
-  \@ifundefined{nwixs@#1}%
-    {\global\@namedef{nwixs@#1}{\\{#2}}}%
-    {\expandafter\nwix@cons\csname nwixs@#1\endcsname{\\{#2}}}}
-\let\nwixaddsx=\@gobbletwo
-\def\nwopt@externalindex{%
-  \ifx\nwixadds\@gobbletwo % already called
-  \else
-    \let\nwixaddsx=\nwixadds \let\nwixadds=\@gobbletwo
-    \let\nowebindex=\nowebindex@external
-    \let\nowebchunks=\nowebchunks@external
-  \fi}
-\def\nowebchunks{%
-  \@ifundefined{nwixs@c}%
-     {\@warning{The are no \string\nowebchunks}}%
-     {\begin{thenowebchunks}\@nameuse{nwixs@c}\end{thenowebchunks}}}
-\def\nowebchunks@external{%
-  {\let\nwixadds@i=\@gobble
-   \def\nwixadds@c##1{\nw@onechunk##1}%
-   \def\nwixaddsx##1##2{\@nameuse{nwixadds@##1}{##2}}%
-   \begin{thenowebchunks}\@input{\jobname.nwi}\end{thenowebchunks}}}
-    \@namedef{r@nw@notdef}{{0}{(\@nwlangdepnvd)}}
-\def\nw@chunkunderlinedefs{% {list of labels with \nwixd, \nwixu}
-  \let\\=\relax\def\nw@comma{, }
-  \def\nwixd##1{\\\underline{\subpageref{##1}}\let\\\nw@comma}%
-  \def\nwixu##1{\\\subpageref{##1}\let\\\nw@comma}}
-\def\nw@onechunk#1#2#3{% {name}{label of first definition}{list with \nwixd, \nwixu}
-  \@ifundefined{r@#2}{}{%
-    \indent\LA #1~{\nwtagstyle\subpageref{#2}}\RA 
-    \if@nwlongchunks{~\nw@chunkunderlinedefs#3}\fi\par}}
-\newenvironment{thenowebchunks}{\vskip3pt
-  \parskip=\z@\parindent=-10pt \advance\leftskip by 10pt
-  \advance\rightskip by 0pt plus10pt \@afterindenttrue
-  \def\\##1{\nw@onechunk##1}}{}
-\newif\if@nwlongchunks
-\@nwlongchunksfalse
-\let\nwopt@longchunks\@nwlongchunkstrue
-\providecommand\@nw@hyper@ref{\hyperreference} % naras
-\providecommand\@nw@hyper@anc{\blindhyperanchor} % naras
-\providecommand\@nw@hyperref@ref[2]{\hyperlink{noweb.#1}{#2}}  % nr
-\providecommand\@nw@hyperref@anc[1]{\hypertarget{noweb.#1}{\relax}}  % nr
-%%\renewcommand\@nw@hyperref@ref[2]{{#2}}  % nr
-%%\renewcommand\@nw@hyperref@anc[1]{}  % nr
-\providecommand\nwhyperreference{%
-  \@ifundefined{hyperlink}
-    {\@ifundefined{hyperreference}
-       {\global\let\nwhyperreference\@gobble}
-       {\global\let\nwhyperreference\@nw@hyper@ref}}
-    {\global\let\nwhyperreference\@nw@hyperref@ref}%
-  \nwhyperreference
-}
-
-\providecommand\nwblindhyperanchor{%
-  \@ifundefined{hyperlink}
-    {\@ifundefined{hyperreference}
-       {\global\let\nwblindhyperanchor\@gobble}
-       {\global\let\nwblindhyperanchor\@nw@hyper@anc}}
-    {\global\let\nwblindhyperanchor\@nw@hyperref@anc}%
-  \nwblindhyperanchor
-}
-\providecommand\nwanchorto{%
-  \begingroup\let\do\@makeother\dospecials
-     \catcode`\{=1 \catcode`\}=2 \nw@anchorto}
-\providecommand\nw@anchorto[1]{\endgroup\def\nw@next{#1}\nw@anchortofin}
-\providecommand\nw@anchortofin[1]{#1\footnote{See URL \texttt{\nw@next}.}}
-\let\nwanchorname\@gobble
-\newif\ifhtml
-\htmlfalse
-\let\nwixident=\relax
-\def\nwbackslash{\char92}
-\def\nwlbrace{\char123}
-\def\nwrbrace{\char125}
-\def\nwopt@english{%
-  \def\@nwlangdepdef{This definition is continued}%
-  \def\@nwlangdepcud{This code is used}%
-  \def\@nwlangdeprtc{Root chunk (not used in this document)}%
-  \def\@nwlangdepcwf{This code is written to file}%
-  \def\@nwlangdepchk{chunk}%
-  \def\@nwlangdepchks{chunks}%
-  \def\@nwlangdepin{in}%
-  \def\@nwlangdepand{and}%
-  \def\@nwlangdepuss{Uses}%
-  \def\@nwlangdepusd{used}%
-  \def\@nwlangdepnvu{never used}%
-  \def\@nwlangdepdfs{Defines}%
-  \def\@nwlangdepnvd{never defined}%
-}
-\let\nwopt@american\nwopt@english
-\def\nwopt@portuges{%
-  \def\@nwlangdepdef{Defini\c{c}\~ao continuada em}%
-  % This definition is continued
-  \def\@nwlangdepcud{C\'odigo usado em}%
-  % This code is used
-  \def\@nwlangdeprtc{Fragmento de topo (sem uso no documento)}%
-  % Root chunk (not used in this document)
-  \def\@nwlangdepcwf{Este c\'odigo foi escrito no ficheiro}%
-  % This code is written to file
-  \def\@nwlangdepchk{fragmento}%
-  % chunk
-  \def\@nwlangdepchks{fragmentos}%
-  % chunks
-  \def\@nwlangdepin{no(s)}%
-  % in
-  \def\@nwlangdepand{e}%
-  % and
-  \def\@nwlangdepuss{Usa}%
-  % Uses
-  \def\@nwlangdepusd{usado}%
-  % used
-  \def\@nwlangdepnvu{nunca usado}%
-  % never used
-  \def\@nwlangdepdfs{Define}%
-  % Defines
-  \def\@nwlangdepnvd{nunca definido}%
-  % never defined
-}
-\def\nwopt@frenchb{%
-  \def\@nwlangdepdef{Cette d\'efinition suit}%
-  % This definition is continued
-  \def\@nwlangdepcud{Ce code est employ\'e}%
-  % This code is used
-  \def\@nwlangdeprtc{Morceau racine (pas employ\'e dans ce document)}%
-  % Root chunk (not used in this document)
-  \def\@nwlangdepcwf{Ce code est \'ecrit aux fichier}%
-  % This code is written to file
-  \def\@nwlangdepchk{le morceau}%
-  % chunk
-  \def\@nwlangdepchks{les morceaux}%
-  % chunks
-  \def\@nwlangdepin{dans}%
-  % in
-  \def\@nwlangdepand{et}%
-  % and
-  \def\@nwlangdepuss{Il emploie}%
-  % Uses
-  \def\@nwlangdepusd{employ\'{e}}%
-  % used
-  \def\@nwlangdepnvu{jamais employ\'{e}}%
-  % never used
-  \def\@nwlangdepdfs{Il d\'{e}fine}%
-  % Defines
-  % Cannot use the accent here: \def\@nwlangdepnvd{jamais d\'{e}fini}%
-  \def\@nwlangdepnvd{jamais defini}%
-  % never defined
-}
-\let\nwopt@french\nwopt@frenchb
-\def\nwopt@german{%
-  \def\@nwlangdepdef{Diese Definition wird fortgesetzt}%
-  % This definition is continued
-  \def\@nwlangdepcud{Dieser Code wird benutzt}%
-  % This code is used
-  \def\@nwlangdeprtc{Hauptteil (nicht in diesem Dokument benutzt)}%
-  % Root chunk (not used in this document)
-  \def\@nwlangdepcwf{Dieser Code schreibt man zum File}%
-  % This code is written to file
-  \def\@nwlangdepchk{Teil}%
-  % chunk
-  \def\@nwlangdepchks{Teils}%
-  % chunks
-  \def\@nwlangdepin{im}%
-  % in
-  \def\@nwlangdepand{und}%
-  % and
-  \def\@nwlangdepuss{Benutztt}%
-  % Uses
-  \def\@nwlangdepusd{benutzt}%
-  % used
-  \def\@nwlangdepnvu{nicht benutzt}%
-  % never used
-  \def\@nwlangdepdfs{Definiert}%
-  % Defines
-  \def\@nwlangdepnvd{nicht definiert}%
-  % never defined
-}
-\let\nwopt@ngerman\nwopt@german
-\ifx\languagename\undefined % default is English
-  \noweboptions{english}
-\else
-  \@ifundefined{nwopt@\languagename}
-     {\noweboptions{english}}
-     {\expandafter\noweboptions\expandafter{\languagename}}
-\fi
-% Final names for the system and its components were in doubt so
-% Language is used throughout the book to specify what the system is named.
-\providecommand{\Language}{AXIOM}
-
-% HyperName was used to specify the name of the browser
-\providecommand{\HyperName}{HyperDoc}
-
-% This is nothing more than inline math mode in Tex but has additional
-% meaning within the browser.
-\providecommand{\spad}[1]{${#1}$}
-
-% This is a way to say 8th, 100th, etc.
-% We use providecommand so it doesn't clash with amsmath package
-\providecommand{\eth}[1]{{#1}-th}
-
-% add the binom function for combfunc
-\providecommand{\binom}[2]{\left(\begin{array}{c}#1\\#2\end{array}\right)}
-
-% spadcommands are the actual text that you type at the axiom prompt
-\providecommand{\spadcommand}[1]%
-{\begin{flushleft}{\tt #1}\end{flushleft}\vskip .1cm }
-
-% spadgraph are the actual text that you type at the axiom prompt for draw
-\providecommand{\spadgraph}[1]%
-{\begin{flushleft}{\tt #1}\end{flushleft}\vskip .1cm }
-
-%% spadsig gives the standard -> notation for signatures
-\providecommand{\spadsig}[2]{{\sf #1 $\rightarrow$ #2}}
-
-% returnType is the type signature returned by the axiom interpreter
-\providecommand{\returnType}[1]%
-{\begin{flushright}{\tt #1}\end{flushright}\vskip .1cm}
-
-%%% Axiom commands are set off in a special boxed area. 
-%%% This is used to draw a line around that boxed area.
-\providecommand\boxed[2]{%
-\begin{center}
-\begin{tabular}{|c|}
-\hline
-\begin{minipage}{#1}
-\normalsize
-{#2}
-\end{minipage}\\
-\hline
-\end{tabular}
-\end{center}}
-
-% The book begins with some introductory material that is not really
-% listed as a chapter. This creates a header similar to \chapter.
-\providecommand{\pseudoChapter}[1]%
-{\vskip .5in \noindent {\Huge{\bf #1}}\vskip .5in}
-
-% The book begins with some introductory material that is not really
-% listed as a section. This creates a header similar to \section.
-\providecommand{\pseudoSection}[1]%
-{\vskip .25in \noindent {\large{\bf #1}}\vskip .25in}
-
-% spadofFrom records the operation in the index and the domain in the index
-\providecommand{\spadopFrom}[2]{\index{library!operations!#1 @\begingroup \string\tt{} #1 \endgroup}\index{#2}``{\tt #1}''}
-
-% spadfunFrom records the function name and domain in the index
-\providecommand{\spadfunFrom}[2]{{\bf #1}\index{#1 @\begingroup \string\bf{} #1 \endgroup}\index{#2}}
-
-% These are special markers within the text for Hypertex keywords
-% They have no particular meaning in the book form.
-\providecommand{\spadfun}[1]{{\it #1}}
-\providecommand{\spadgloss}[1]{{\it #1}}
-\providecommand{\spadkey}[1]{\index{#1 @\begingroup \string\tt{} #1 \endgroup}}
- 
-% spadtype records the domain in the index
-\providecommand{\spadtype}[1]{{\bf #1}\index{#1 @\begingroup \string\bf{} #1 \endgroup}}
-
-% This is used to create a caption on an included image
-\providecommand{\simpleCaption}[1]{\def\thefigure{\@arabic\c@figure}\caption{#1}}
-
-% This is the name of the ``glossy'' pages in the physical book.
-\providecommand{\Gallery}{\Language{} Images}
-
-% spadofFrom records the operation in the index and the domain in the index
-\providecommand{\spadopFrom}[2]{\index{library!operations!#1 @\begingroup \string\tt{} #1 \endgroup}\index{#2}``{\tt #1}''}
-
-%% typeset e.g. and i.e.
-\providecommand{\eg}{\emph{e.g.}}
-\providecommand{\ie}{\emph{i.e.}}
-
-%% Typeset in-line code.
-\providecommand{\Code}[1]{\texttt{#1}}
-
-%% Typeset a file name
-\providecommand{\File}[1]{{\itshape{#1}}}
-
-%% Typeset a tool name, e.g. Axiom
-\providecommand{\Tool}[1]{{\bfseries\sffamily{#1}}}
-\providecommand\AXIOM{\vskip\parindent\indent{\bf AXIOM}\vskip\parindent\noindent\ignorespaces}
-\providecommand\maxima{\vskip\parindent\noindent{\bf MAXIMA}\vskip\parindent\noindent\ignorespaces}
-\providecommand\yacas{\vskip\parindent\noindent{\bf YACAS}\vskip\parindent\noindent\ignorespaces}
diff --git a/src/Makefile.pamphlet b/src/Makefile.pamphlet
index eab651f..ebb9f2d 100644
--- a/src/Makefile.pamphlet
+++ b/src/Makefile.pamphlet
@@ -499,13 +499,24 @@ etcclean: ${SRC}/etc/Makefile
 \subsection{The doc directory}
 The doc directory contains code used for documenting Axiom.
 
+We've added the books directory above as part of the literate process.
+This takes all of the Axiom volumes and creates .pdf copies in the
+final doc directory.
+
 <<docdir>>=
-docdir: ${SRC}/doc/Makefile
+docdir: ${SPD}/books/Makefile ${SRC}/doc/Makefile
 	@echo 41 making ${SRC}/doc
 	@mkdir -p ${INT}/doc
 	@mkdir -p ${MNT}/${SYS}/bin
+	@(cd ../books ; ${ENV} ${MAKE} )
 	@(cd doc ; ${ENV} ${MAKE} )
 
+${SPD}/books/Makefile: ${SPD}/books/Makefile.pamphlet
+	@echo 52 ${SPD}/books/Makefile from ${SPD}/books/Makefile.pamphlet
+	@( cd ${SPD}/books ; \
+           ${DOCUMENT} ${NOISE} Makefile ; \
+           cp Makefile.dvi ${MNT}/${SYS}/doc/src/books.Makefile.dvi )
+
 ${SRC}/doc/Makefile: ${SRC}/doc/Makefile.pamphlet
 	@echo 42 making ${SRC}/doc/Makefile from ${SRC}/doc/Makefile.pamphlet
 	@( cd doc ; \
diff --git a/src/doc/Makefile.pamphlet b/src/doc/Makefile.pamphlet
index 6cbc985..13d39b9 100644
--- a/src/doc/Makefile.pamphlet
+++ b/src/doc/Makefile.pamphlet
@@ -35,52 +35,6 @@ ${STY}/axiom.sty: ${IN}/axiom.sty.pamphlet
 	${TANGLE} -R"axiom.sty" ${IN}/axiom.sty.pamphlet >axiom.sty )
 
 @ 
-\section{Book Volume 4: Developer Notes}
-This file contains a random collection of facts about Axiom
-intended for developers. It talks about directory structure,
-internal representations, debugging tools, and gives a cookbook
-for using CVS. There is nothing of interest for the end user.
-<<bookvol4>>=
-${DVI}/bookvol4.dvi: ${IN}/bookvol4.pamphlet ${STY}/axiom.sty
-	@echo 3 making ${DVI}/bookvol4.dvi from ${IN}/bookvol4.pamphlet
-	@(cd ${MID} ; \
-	cp ${IN}/bookvol4.pamphlet ${MID} ; \
-	${DOCUMENT} ${NOISE} bookvol4 ; \
-	cp bookvol4.dvi ${DVI} )
-
-@
-\section{Book}
-This file contains the main documentation for Axiom, the Axiom book.
-We take care to copy the whole [[ps/]] directory that contains images
-used by the book.
-<<Book>>=
-${DVI}/book.dvi: ${IN}/book.pamphlet
-	@echo 4 making ${DVI}/book.dvi from ${IN}/book.pamphlet
-	@(cd ${MID} ; \
-	cp ${IN}/book.pamphlet ${MID} ; \
-	mkdir -p ${MID}/ps ; \
-	cp ${IN}/ps/*ps* ${MID}/ps ; \
-	${DOCUMENT} ${NOISE} book ; \
-	cp book.dvi ${DVI} ; \
-	mkdir -p ${DVI}/ps ; \
-	cp ${IN}/ps/*ps* ${DVI}/ps )
-
-@
-\section{Book Volume 1: Tutorial}
-This is the tutorial volume, the first book in the new axiom series.
-<<bookvol1>>=
-${DVI}/bookvol1.dvi: ${IN}/bookvol1.pamphlet
-	@echo 4 making ${DVI}/bookvol1.dvi from ${IN}/bookvol1.pamphlet
-	@(cd ${MID} ; \
-	cp ${IN}/bookvol1.pamphlet ${MID} ;\
-	mkdir -p ${MID}/ps ; \
-	cp ${IN}/ps/*ps* ${MID}/ps ; \
-	${DOCUMENT} ${NOISE} bookvol1 ; \
-	cp bookvol1.dvi ${DVI} ; \
-	mkdir -p ${DVI}/ps ; \
-	cp ${IN}/ps/*ps* ${DVI}/ps )
-
-@
 \section{The Reference Card}
 This is the one-page, 2 sided reference card
 <<refcard>>=
@@ -174,8 +128,7 @@ STY=${OUT}/tex
 DVI=${MNT}/${SYS}/doc
 DOC=${INT}/doc
 
-FILES= ${MID}/axiom.bib ${STY}/axiom.sty ${DVI}/bookvol4.dvi \
-       ${DVI}/book.dvi ${DVI}/bookvol1.dvi ${DVI}/refcard.dvi \
+FILES= ${MID}/axiom.bib ${STY}/axiom.sty ${DVI}/refcard.dvi \
        ${DVI}/endpaper.dvi ${DVI}/rosetta.dvi ${DVI}/spadhelp/spadhelp.files
 
 CMDS=${OUT}/booklet
@@ -188,9 +141,6 @@ all: ${FILES} ${CMDS}
 <<booklet>>
 <<bibtex>>
 <<axiom.sty>>
-<<bookvol4>>
-<<Book>>
-<<bookvol1>>
 <<refcard>>
 <<Endpapers>>
 <<rosetta>>

\start
Date: Sat, 31 May 2008 18:55:24 +0200
From: Ralf Hemmecke
To: list
Subject: makeAxExportForm

src/interp/ax.boot

contains the function

makeAxExportForm(filename, constructors) ==
   $defaultFlag : local := false
   $literals := []
   axForms :=
      [modemapToAx(modemap) for cname in constructors |
             (modemap:=GETDATABASE(cname,'CONSTRUCTORMODEMAP)) and
               (not cname in '(Tuple Exit Type)) and
                 not isDefaultPackageName cname]
   if $baseForms then
      axForms := [:$baseForms, :axForms]
   if $defaultFlag then
      axForms :=
         [['Foreign, ['Declare, 'dummyDefault, 'Exit], 'Lisp], :axForms]
   axForms := APPEND(axDoLiterals(), axForms)
   axForm := ['Sequence, _
                ['Import, [], 'AxiomLib], ['Import, [], 'Boolean], :axForms]
   axForm

Can someone more clearly explain what its output format is?

Ralf

PS: Why is there a parameter "filename" if it is not used in the 
function? (Well I don't understand boot, so that may be a stupid question.)

\start
Date: Sat, 31 May 2008 18:35:12 +0100
From: Peter Broadbery
To: Ralf Hemmecke
Subject: Re: makeAxExportForm

On Sat, May 31, 2008 at 5:55 PM, Ralf Hemmecke wrote:
> src/interp/ax.boot
>
> contains the function
>
> makeAxExportForm(filename, constructors) ==
>  $defaultFlag : local := false
>  $literals := []
>  axForms :=
>     [modemapToAx(modemap) for cname in constructors |
>            (modemap:=GETDATABASE(cname,'CONSTRUCTORMODEMAP)) and
>              (not cname in '(Tuple Exit Type)) and
>                not isDefaultPackageName cname]
>  if $baseForms then
>     axForms := [:$baseForms, :axForms]
>  if $defaultFlag then
>     axForms :=
>        [['Foreign, ['Declare, 'dummyDefault, 'Exit], 'Lisp], :axForms]
>  axForms := APPEND(axDoLiterals(), axForms)
>  axForm := ['Sequence, _
>               ['Import, [], 'AxiomLib], ['Import, [], 'Boolean], :axForms]
>  axForm
>
> Can someone more clearly explain what its output format is?
>

Not sure if this a boot question or an aldor one.  The output is aldor
abstract syntax - ie. that used in .ap files.  The boot code does look
horrible; a lisp equivalent for the last assignment is something like

(setq axform `(Sequence (import  () 'AxiomLib) (Import () Boolean) ,axforms)).

Filename is unused.  The function probably created a file at one
stage, at a guess.

Peter


> Ralf
>
> PS: Why is there a parameter "filename" if it is not used in the function?
> (Well I don't understand boot, so that may be a stupid question.)




