\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/input schaum21.input}
\author{Timothy Daly}
\maketitle
\eject
\tableofcontents
\eject
\section{\cite{1}:14.440~~~~~$\displaystyle
\int{\cot{ax}}~dx$}
$$\int{\cot{ax}}=
\frac{1}{a}\ln\sin{ax}
$$
<<*>>=
)spool schaum21.output
)set message test on
)set message auto off
)clear all

--S 1
aa:=integrate(cot(a*x),x)
--R 
--R
--R               sin(2a x)                2
--R        2log(-------------) - log(-------------)
--R             cos(2a x) + 1        cos(2a x) + 1
--R   (1)  ----------------------------------------
--R                           2a
--R                                          Type: Union(Expression Integer,...)
--E 

--S 2
bb:=1/a*log(sin(a*x))
--R
--R        log(sin(a x))
--R   (2)  -------------
--R              a
--R                                                     Type: Expression Integer
--E

--S 3
cc:=aa-bb
--R
--R               sin(2a x)                                 2
--R        2log(-------------) - 2log(sin(a x)) - log(-------------)
--R             cos(2a x) + 1                         cos(2a x) + 1
--R   (3)  ---------------------------------------------------------
--R                                    2a
--R                                                     Type: Expression Integer
--E

--S 4
dd:=expandLog cc
--R
--R        2log(sin(2a x)) - 2log(sin(a x)) - log(cos(2a x) + 1) - log(2)
--R   (4)  --------------------------------------------------------------
--R                                      2a
--R                                                     Type: Expression Integer
--E

--S 5      14:440 Schaums and Axiom agree
ee:=complexNormalize dd
--R
--R   (5)  0
--R                                                     Type: Expression Integer
--E
@

\section{\cite{1}:14.441~~~~~$\displaystyle
\int{\cot^2{ax}}~dx$}
$$\int{\cot^2{ax}}=
-\frac{\cot{ax}}{a}-x
$$
<<*>>=
)clear all

--S 6
aa:=integrate(cot(a*x)^2,x)
--R 
--R
--R        - a x sin(2a x) - cos(2a x) - 1
--R   (1)  -------------------------------
--R                  a sin(2a x)
--R                                          Type: Union(Expression Integer,...)
--E 

--S 7
bb:=-cot(a*x)/a-x
--R
--R        - cot(a x) - a x
--R   (2)  ----------------
--R                a
--R                                                     Type: Expression Integer
--E

--S 8
cc:=aa-bb
--R
--R        cot(a x)sin(2a x) - cos(2a x) - 1
--R   (3)  ---------------------------------
--R                   a sin(2a x)
--R                                                     Type: Expression Integer
--E

--S 9
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 10
dd:=cotrule cc
--R
--R        cos(a x)sin(2a x) + (- cos(2a x) - 1)sin(a x)
--R   (5)  ---------------------------------------------
--R                     a sin(a x)sin(2a x)
--R                                                     Type: Expression Integer
--E

--S 11     14:441 Schaums and Axiom agree
ee:=complexNormalize dd
--R
--R   (6)  0
--R                                                     Type: Expression Integer
--E
@

\section{\cite{1}:14.442~~~~~$\displaystyle
\int{\cot^3{ax}}~dx$}
$$\int{\cot^3{ax}}=
-\frac{\cot^2{ax}}{2a}-\frac{1}{a}\ln\sin{ax}
$$
<<*>>=
)clear all

--S 12
aa:=integrate(cot(a*x)^3,x)
--R 
--R
--R   (1)
--R                               sin(2a x)                               2
--R       (- 2cos(2a x) + 2)log(-------------) + (cos(2a x) - 1)log(-------------)
--R                             cos(2a x) + 1                       cos(2a x) + 1
--R     + 
--R       cos(2a x) + 1
--R  /
--R     2a cos(2a x) - 2a
--R                                          Type: Union(Expression Integer,...)
--E 

--S 13
bb:=-cot(a*x)^2/(2*a)-1/a*log(sin(a*x))
--R
--R                                   2
--R        - 2log(sin(a x)) - cot(a x)
--R   (2)  ----------------------------
--R                     2a
--R                                                     Type: Expression Integer
--E

--S 14
cc:=aa-bb
--R
--R   (3)
--R                               sin(2a x)
--R       (- 2cos(2a x) + 2)log(-------------) + (2cos(2a x) - 2)log(sin(a x))
--R                             cos(2a x) + 1
--R     + 
--R                                2                                 2
--R       (cos(2a x) - 1)log(-------------) + (cos(2a x) - 1)cot(a x)  + cos(2a x)
--R                          cos(2a x) + 1
--R     + 
--R       1
--R  /
--R     2a cos(2a x) - 2a
--R                                                     Type: Expression Integer
--E

--S 15
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 16
dd:=cotrule cc
--R
--R   (5)
--R                                 2      sin(2a x)
--R       (- 2cos(2a x) + 2)sin(a x) log(-------------)
--R                                      cos(2a x) + 1
--R     + 
--R                               2
--R       (2cos(2a x) - 2)sin(a x) log(sin(a x))
--R     + 
--R                              2          2                                 2
--R       (cos(2a x) - 1)sin(a x) log(-------------) + (cos(2a x) + 1)sin(a x)
--R                                   cos(2a x) + 1
--R     + 
--R               2                    2
--R       cos(a x) cos(2a x) - cos(a x)
--R  /
--R                                2
--R     (2a cos(2a x) - 2a)sin(a x)
--R                                                     Type: Expression Integer
--E

--S 17
ee:=expandLog dd
--R
--R   (6)
--R                                 2
--R       (- 2cos(2a x) + 2)sin(a x) log(sin(2a x))
--R     + 
--R                               2
--R       (2cos(2a x) - 2)sin(a x) log(sin(a x))
--R     + 
--R                              2
--R       (cos(2a x) - 1)sin(a x) log(cos(2a x) + 1)
--R     + 
--R                                                   2           2
--R       ((log(2) + 1)cos(2a x) - log(2) + 1)sin(a x)  + cos(a x) cos(2a x)
--R     + 
--R                 2
--R       - cos(a x)
--R  /
--R                                2
--R     (2a cos(2a x) - 2a)sin(a x)
--R                                                     Type: Expression Integer
--E

--S 18     14:442 Schaums and Axiom agree
ff:=complexNormalize ee
--R
--R   (7)  0
--R                                                     Type: Expression Integer
--E
@

\section{\cite{1}:14.443~~~~~$\displaystyle
\int{\cot^n{ax}\csc^2{ax}}~dx$}
$$\int{\cot^n{ax}\csc^2{ax}}=
-\frac{\cot^{n+1}{ax}}{(n+1)a}
$$
<<*>>=
)clear all

--S 19
aa:=integrate(cot(a*x)^n*csc(a*x)^2,x)
--R 
--R
--R                          cos(a x)
--R                    n log(--------)
--R                          sin(a x)
--R          cos(a x)%e
--R   (1)  - -------------------------
--R              (a n + a)sin(a x)
--R                                          Type: Union(Expression Integer,...)
--E 

--S 20
bb:=-cot(a*x)^(n+1)/((n+1)*a)
--R
--R                  n + 1
--R          cot(a x)
--R   (2)  - -------------
--R             a n + a
--R                                                     Type: Expression Integer
--E

--S 21
cc:=aa-bb
--R
--R                          cos(a x)
--R                    n log(--------)
--R                          sin(a x)                    n + 1
--R        - cos(a x)%e                + sin(a x)cot(a x)
--R   (3)  ---------------------------------------------------
--R                         (a n + a)sin(a x)
--R                                                     Type: Expression Integer
--E

--S 22
explog:=rule(%e^(n*log(x)) == x^n)
--R
--R          n log(x)     n
--R   (4)  %e         == x
--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
--E

--S 23
dd:=explog cc
--R
--R                        n + 1            cos(a x) n
--R        sin(a x)cot(a x)      - cos(a x)(--------)
--R                                         sin(a x)
--R   (5)  -------------------------------------------
--R                     (a n + a)sin(a x)
--R                                                     Type: Expression Integer
--E

--S 24
cotrule:=rule(cot(a) == cos(a)/sin(a))
--R
--R                  cos(a)
--R   (6)  cot(a) == ------
--R                  sin(a)
--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
--E

--S 25
ee:=cotrule dd
--R
--R                 cos(a x) n + 1            cos(a x) n
--R        sin(a x)(--------)      - cos(a x)(--------)
--R                 sin(a x)                  sin(a x)
--R   (7)  ---------------------------------------------
--R                      (a n + a)sin(a x)
--R                                                     Type: Expression Integer
--E

--S 26     14:443 Schaums and Axiom agree
ff:=complexNormalize ee
--R
--R   (8)  0
--R                                                     Type: Expression Integer
--E
@

\section{\cite{1}:14.444~~~~~$\displaystyle
\int{\frac{\csc^2{ax}}{\cot{ax}}}~dx$}
$$\int{\frac{\csc^2{ax}}{\cot{ax}}}=
-\frac{1}{a}\ln\cot{ax}
$$
<<*>>=
)clear all

--S 27
aa:=integrate(csc(a*x)^2/cot(a*x),x)
--R 
--R
--R              sin(a x)              2cos(a x)
--R        log(------------) - log(- ------------)
--R            cos(a x) + 1          cos(a x) + 1
--R   (1)  ---------------------------------------
--R                           a
--R                                          Type: Union(Expression Integer,...)
--E 

--S 28
bb:=-1/a*log(cot(a*x))
--R
--R          log(cot(a x))
--R   (2)  - -------------
--R                a
--R                                                     Type: Expression Integer
--E

--S 29
cc:=aa-bb
--R
--R              sin(a x)                              2cos(a x)
--R        log(------------) + log(cot(a x)) - log(- ------------)
--R            cos(a x) + 1                          cos(a x) + 1
--R   (3)  -------------------------------------------------------
--R                                   a
--R                                                     Type: Expression Integer
--E

--S 30
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 31
dd:=cotrule cc
--R
--R              sin(a x)          cos(a x)            2cos(a x)
--R        log(------------) + log(--------) - log(- ------------)
--R            cos(a x) + 1        sin(a x)          cos(a x) + 1
--R   (5)  -------------------------------------------------------
--R                                   a
--R                                                     Type: Expression Integer
--E

--S 32     14:444 Schaums and Axiom differ by a constant
ee:=expandLog dd
--R
--R          log(- 2)
--R   (6)  - --------
--R              a
--R                                                     Type: Expression Integer
--E
@

\section{\cite{1}:14.445~~~~~$\displaystyle
\int{\frac{dx}{\cot{ax}}}~dx$}
$$\int{\frac{1}{\cot{ax}}}=
-\frac{1}{a}\ln\cos{ax}
$$
<<*>>=
)clear all

--S 33
aa:=integrate(1/cot(a*x),x)
--R 
--R
--R                  2
--R        log(-------------)
--R            cos(2a x) + 1
--R   (1)  ------------------
--R                2a
--R                                          Type: Union(Expression Integer,...)
--E 

--S 34
bb:=-1/a*log(cos(a*x))
--R
--R          log(cos(a x))
--R   (2)  - -------------
--R                a
--R                                                     Type: Expression Integer
--E

--S 35
cc:=aa-bb
--R
--R                                   2
--R        2log(cos(a x)) + log(-------------)
--R                             cos(2a x) + 1
--R   (3)  -----------------------------------
--R                         2a
--R                                                     Type: Expression Integer
--E

--S 36
dd:=expandLog cc
--R
--R        - log(cos(2a x) + 1) + 2log(cos(a x)) + log(2)
--R   (4)  ----------------------------------------------
--R                              2a
--R                                                     Type: Expression Integer
--E

--S 37     14:445 Schaums and Axiom agree
ee:=complexNormalize dd
--R
--R   (5)  0
--R                                                     Type: Expression Integer
--E
@

\section{\cite{1}:14.446~~~~~$\displaystyle
\int{x\cot{ax}}~dx$}
$$\int{x\cot{ax}}=
\frac{1}{a^2}\left\{ax
-\frac{(ax)^3}{9}-\frac{(ax)^5}{225}
-\cdots-\frac{2^{2n}B_n(ax)^{2n+1}}{(2n+1)!}-\cdots\right\}
$$
<<*>>=
)clear all

--S 38     14:446 Axiom cannot compute this integral
aa:=integrate(x*cot(a*x),x)
--R 
--R
--R           x
--R         ++
--I   (1)   |   %I cot(%I a)d%I
--R        ++
--R                                          Type: Union(Expression Integer,...)
--E 
@

\section{\cite{1}:14.447~~~~~$\displaystyle
\int{\frac{\cot{ax}}{x}}~dx$}
$$\int{\frac{\cot{ax}}{x}}=
-\frac{1}{ax}-\frac{ax}{3}-\frac{(ax)^3}{135}-\cdots
-\frac{2^{2n}B_n(ax)^{2n-1}}{(2n-1)(2n)!}-\cdots
$$
<<*>>=
)clear all

--S 39     14:447 Axiom cannot compute this integral
aa:=integrate(cot(a*x)/x,x)
--R 
--R
--R           x
--I         ++  cot(%I a)
--I   (1)   |   --------- d%I
--I        ++       %I
--R                                          Type: Union(Expression Integer,...)
--E 
@

\section{\cite{1}:14.448~~~~~$\displaystyle
\int{x\cot^2{ax}}~dx$}
$$\int{x\cot^2{ax}}=
-\frac{x\cot{ax}}{a}+\frac{1}{a^2}\ln\sin{ax}-\frac{x^2}{2}
$$
<<*>>=
)clear all

--S 40
aa:=integrate(x*cot(a*x)^2,x)
--R 
--R
--R   (1)
--R                       sin(2a x)                         2
--R       2sin(2a x)log(-------------) - sin(2a x)log(-------------)
--R                     cos(2a x) + 1                 cos(2a x) + 1
--R     + 
--R          2 2
--R       - a x sin(2a x) - 2a x cos(2a x) - 2a x
--R  /
--R       2
--R     2a sin(2a x)
--R                                          Type: Union(Expression Integer,...)
--E

--S 41
bb:=-(x*cot(a*x))/a+1/a^2*log(sin(a*x))-x^2/2
--R
--R                                          2 2
--R        2log(sin(a x)) - 2a x cot(a x) - a x
--R   (2)  -------------------------------------
--R                           2
--R                         2a
--R                                                     Type: Expression Integer
--E

--S 42
cc:=aa-bb
--R
--R   (3)
--R                       sin(2a x)
--R       2sin(2a x)log(-------------) - 2sin(2a x)log(sin(a x))
--R                     cos(2a x) + 1
--R     + 
--R                            2
--R       - sin(2a x)log(-------------) + 2a x cot(a x)sin(2a x) - 2a x cos(2a x)
--R                      cos(2a x) + 1
--R     + 
--R       - 2a x
--R  /
--R       2
--R     2a sin(2a x)
--R                                                     Type: Expression Integer
--E

--S 43
dd:=expandLog cc
--R
--R   (4)
--R       2sin(2a x)log(sin(2a x)) - 2sin(2a x)log(sin(a x))
--R     + 
--R       - sin(2a x)log(cos(2a x) + 1) + (2a x cot(a x) - log(2))sin(2a x)
--R     + 
--R       - 2a x cos(2a x) - 2a x
--R  /
--R       2
--R     2a sin(2a x)
--R                                                     Type: Expression Integer
--E

--S 44     14:448 Schaums and Axiom agree
ee:=complexNormalize dd
--R
--R   (5)  0
--R                                                     Type: Expression Integer
--E
@

\section{\cite{1}:14.449~~~~~$\displaystyle
\int{\frac{dx}{p+q\cot{ax}}}~dx$}
$$\int{\frac{1}{p+q\cot{ax}}}=
\frac{px}{p^2+q^2}-\frac{q}{a(p^2+q^2)}\ln(p\sin{ax}+q\cos{ax})
$$
<<*>>=
)clear all

--S 45
aa:=integrate(1/(p+q*cot(a*x)),x)
--R 
--R
--R   (1)
--R            p sin(2a x) + q cos(2a x) + q                2
--R   - 2q log(-----------------------------) + q log(-------------) + 2a p x
--R                    cos(2a x) + 1                  cos(2a x) + 1
--R   -----------------------------------------------------------------------
--R                                    2       2
--R                                2a q  + 2a p
--R                                          Type: Union(Expression Integer,...)
--E 

--S 46
bb:=(p*x)/(p^2+q^2)-q/(a*(p^2+q^2))*log(p*sin(a*x)+q*cos(a*x))
--R
--R        - q log(p sin(a x) + q cos(a x)) + a p x
--R   (2)  ----------------------------------------
--R                          2      2
--R                       a q  + a p
--R                                                     Type: Expression Integer
--E

--S 47
cc:=aa-bb
--R
--R   (3)
--R                p sin(2a x) + q cos(2a x) + q
--R       - 2q log(-----------------------------) + 2q log(p sin(a x) + q cos(a x))
--R                        cos(2a x) + 1
--R     + 
--R                   2
--R       q log(-------------)
--R             cos(2a x) + 1
--R  /
--R         2       2
--R     2a q  + 2a p
--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
\int{\cot^n{ax}}~dx$}
$$\int{\cot^n{ax}}=
-\frac{\cot^{n-1}{ax}}{(n-1)a}-\int{\cos^{n-2}{ax}}
$$
<<*>>=
)clear all

--S 53     14:450 Axiom cannot compute this integral
aa:=integrate(cot(a*x)^n,x)
--R 
--R
--R           x
--R         ++           n
--I   (1)   |   cot(%I a) d%I
--R        ++
--R                                          Type: Union(Expression Integer,...)
--E 

)spool
)lisp (bye)
@

\eject
\begin{thebibliography}{99}
\bibitem{1} Spiegel, Murray R.
{\sl Mathematical Handbook of Formulas and Tables}\\
Schaum's Outline Series McGraw-Hill 1968 p81
\end{thebibliography}
\end{document}
