
(/VERSIONCHECK 2) 

(DEFUN |INTTR;logprmderiv| (|f| |derivation| $)
  (SPADCALL (SPADCALL |f| |derivation| (QREFELT $ 12)) |f|
      (QREFELT $ 13))) 

(DEFUN |INTTR;UP2UP2| (|p| $)
  (SPADCALL (CONS #'|INTTR;UP2UP2!0| $) |p| (QREFELT $ 18))) 

(DEFUN |INTTR;UP2UP2!0| (|#1| $) (SPADCALL |#1| (QREFELT $ 14))) 

(DEFUN |INTTR;UP2UPR| (|p| $)
  (SPADCALL (CONS #'|INTTR;UP2UPR!0| $) |p| (QREFELT $ 23))) 

(DEFUN |INTTR;UP2UPR!0| (|#1| $)
  (SPADCALL (SPADCALL |#1| (QREFELT $ 14)) (QREFELT $ 19))) 

(DEFUN |INTTR;UP22UPR| (|p| $)
  (SPADCALL (CONS #'|INTTR;UP22UPR!0| $) |p| (QREFELT $ 26))) 

(DEFUN |INTTR;UP22UPR!0| (|#1| $) (SPADCALL |#1| (QREFELT $ 19))) 

(DEFUN |INTTR;kappa| (|p| |derivation| $)
  (PROG (|ans|)
    (RETURN
      (SEQ (LETT |ans| (|spadConstant| $ 27) . #0=(|INTTR;kappa|))
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((SPADCALL |p| (|spadConstant| $ 27)
                                (QREFELT $ 30))
                            'NIL)
                           ('T 'T)))
                   (GO G191)))
                (SEQ (LETT |ans|
                           (SPADCALL |ans|
                               (SPADCALL
                                   (SPADCALL
                                    (SPADCALL
                                     (SPADCALL |p| (QREFELT $ 31))
                                     (QREFELT $ 14))
                                    |derivation|)
                                   (SPADCALL (|spadConstant| $ 32)
                                    (SPADCALL |p| (QREFELT $ 35))
                                    (QREFELT $ 36))
                                   (QREFELT $ 37))
                               (QREFELT $ 38)) . #0#)
                     (EXIT (LETT |p|
                                 (SPADCALL |p| (QREFELT $ 39)) . #0#)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT |ans|))))) 

(DEFUN |INTTR;monomialIntegrate;FMR;6| (|f| |derivation| $)
  (PROG (|r| |inum| |iden| |x| |resultvec| |respoly| |rec| #0=#:G1903
             |term| #1=#:G1904 |logs| |dlog| |p| |u|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |f| (QREFELT $ 40))
              (VECTOR (|spadConstant| $ 42) (|spadConstant| $ 9)
                      (|spadConstant| $ 27)))
             ('T
              (SEQ (LETT |r| (SPADCALL |f| |derivation| (QREFELT $ 45))
                         . #2=(|INTTR;monomialIntegrate;FMR;6|))
                   (EXIT (COND
                           ((SPADCALL
                                (LETT |inum|
                                      (SPADCALL (QVELT |r| 1)
                                       (QREFELT $ 46)) . #2#)
                                (QREFELT $ 47))
                            (VECTOR (SPADCALL (QVELT |r| 0)
                                     (QREFELT $ 48))
                                    (QVELT |r| 2) (QVELT |r| 3)))
                           ('T
                            (SEQ (LETT |iden|
                                       (SPADCALL (QVELT |r| 1)
                                        (QREFELT $ 49)) . #2#)
                                 (LETT |x|
                                       (SPADCALL (|spadConstant| $ 32)
                                        1 (QREFELT $ 36)) . #2#)
                                 (LETT |resultvec|
                                       (SPADCALL
                                        (SPADCALL
                                         (|INTTR;UP2UP2| |inum| $)
                                         (SPADCALL
                                          (SPADCALL |x| (QREFELT $ 50))
                                          (|INTTR;UP2UP2|
                                           (SPADCALL |iden|
                                            |derivation|)
                                           $)
                                          (QREFELT $ 51))
                                         (QREFELT $ 52))
                                        (|INTTR;UP2UP2| |iden| $)
                                        (QREFELT $ 55)) . #2#)
                                 (LETT |respoly|
                                       (SPADCALL
                                        (SPADCALL (ELT |resultvec| 0)
                                         (QREFELT $ 56))
                                        (QREFELT $ 57)) . #2#)
                                 (LETT |rec|
                                       (SPADCALL |respoly|
                                        (CONS
                                         #'|INTTR;monomialIntegrate;FMR;6!0|
                                         (VECTOR $ |derivation|))
                                        (QREFELT $ 60)) . #2#)
                                 (LETT |logs|
                                       (PROGN
                                         (LETT #0# NIL . #2#)
                                         (SEQ (LETT |term| NIL . #2#)
                                          (LETT #1#
                                           (SPADCALL (QCDR |rec|)
                                            (QREFELT $ 64)) . #2#)
                                          G190
                                          (COND
                                            ((OR (ATOM #1#)
                                              (PROGN
                                                (LETT |term|
                                                 (CAR #1#) . #2#)
                                                NIL))
                                             (GO G191)))
                                          (SEQ
                                           (EXIT
                                            (LETT #0#
                                             (CONS
                                              (VECTOR
                                               (|spadConstant| $ 66)
                                               (|INTTR;UP2UPR|
                                                (QCAR |term|) $)
                                               (|INTTR;UP22UPR|
                                                (SPADCALL
                                                 (SPADCALL
                                                  (ELT |resultvec|
                                                   (QCDR |term|))
                                                  (QCAR |term|)
                                                  (QREFELT $ 67))
                                                 (QREFELT $ 69))
                                                $))
                                              #0#) . #2#)))
                                          (LETT #1# (CDR #1#) . #2#)
                                          (GO G190) G191
                                          (EXIT (NREVERSE0 #0#)))) . #2#)
                                 (LETT |dlog|
                                       (COND
                                         ((SPADCALL
                                           (SPADCALL |x| |derivation|)
                                           (|spadConstant| $ 33)
                                           (QREFELT $ 30))
                                          (QVELT |r| 1))
                                         ('T
                                          (SPADCALL
                                           (SPADCALL
                                            (|spadConstant| $ 9) |logs|
                                            NIL (QREFELT $ 74))
                                           (CONS
                                            #'|INTTR;monomialIntegrate;FMR;6!1|
                                            (VECTOR $ |derivation|))
                                           (QREFELT $ 76)))) . #2#)
                                 (LETT |u|
                                       (SPADCALL
                                        (LETT |p|
                                         (SPADCALL (QVELT |r| 1) |dlog|
                                          (QREFELT $ 77)) . #2#)
                                        (QREFELT $ 79)) . #2#)
                                 (EXIT (COND
                                         ((QEQCAR |u| 0)
                                          (VECTOR
                                           (SPADCALL (QVELT |r| 0)
                                            |logs| NIL (QREFELT $ 74))
                                           (QVELT |r| 2)
                                           (SPADCALL (QVELT |r| 3)
                                            (QCDR |u|) (QREFELT $ 38))))
                                         ('T
                                          (VECTOR
                                           (SPADCALL (QVELT |r| 0)
                                            |logs|
                                            (LIST
                                             (CONS |p| (QREFELT $ 10)))
                                            (QREFELT $ 74))
                                           (QVELT |r| 2) (QVELT |r| 3)))))))))))))))) 

(DEFUN |INTTR;monomialIntegrate;FMR;6!1| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 12))) 

(DEFUN |INTTR;monomialIntegrate;FMR;6!0| (|#1| $$)
  (|INTTR;kappa| |#1| (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |INTTR;monomialIntPoly;UPMR;7| (|p| |derivation| $)
  (PROG (|dt| |d| |l| |n| #0=#:G1906 |term| |ans|)
    (RETURN
      (SEQ (LETT |d|
                 (SPADCALL
                     (LETT |dt|
                           (SPADCALL
                               (SPADCALL (|spadConstant| $ 32) 1
                                   (QREFELT $ 36))
                               |derivation|)
                           . #1=(|INTTR;monomialIntPoly;UPMR;7|))
                     (QREFELT $ 35)) . #1#)
           (EXIT (COND
                   ((< |d| 2)
                    (|error| "monomIntPoly: monomial must have degree 2 or more"))
                   ('T
                    (SEQ (LETT |l|
                               (SPADCALL |dt| (QREFELT $ 31)) . #1#)
                         (LETT |ans| (|spadConstant| $ 27) . #1#)
                         (SEQ G190
                              (COND
                                ((NULL (< 0
                                        (LETT |n|
                                         (-
                                          (+ 1
                                           (SPADCALL |p|
                                            (QREFELT $ 35)))
                                          |d|) . #1#)))
                                 (GO G191)))
                              (SEQ (LETT |ans|
                                    (SPADCALL |ans|
                                     (LETT |term|
                                      (SPADCALL
                                       (SPADCALL
                                        (SPADCALL |p| (QREFELT $ 31))
                                        (SPADCALL |n| |l|
                                         (QREFELT $ 84))
                                        (QREFELT $ 85))
                                       (PROG1 (LETT #0# |n| . #1#)
                                         (|check-subtype| (>= #0# 0)
                                          '(|NonNegativeInteger|) #0#))
                                       (QREFELT $ 36)) . #1#)
                                     (QREFELT $ 38)) . #1#)
                                   (EXIT
                                    (LETT |p|
                                     (SPADCALL |p|
                                      (SPADCALL |term| |derivation|)
                                      (QREFELT $ 86)) . #1#)))
                              NIL (GO G190) G191 (EXIT NIL))
                         (EXIT (CONS |ans| |p|)))))))))) 

(DEFUN |INTTR;expintegratepoly| (|p| FRDE $)
  (PROG (|n| |a| |ans1| |answr| |missing| |coef0| |notelm|)
    (RETURN
      (SEQ (LETT |coef0| (|spadConstant| $ 28)
                 . #0=(|INTTR;expintegratepoly|))
           (LETT |notelm|
                 (LETT |answr| (|spadConstant| $ 90) . #0#) . #0#)
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((SPADCALL |p| (|spadConstant| $ 90)
                                (QREFELT $ 91))
                            'NIL)
                           ('T 'T)))
                   (GO G191)))
                (SEQ (LETT |ans1|
                           (SPADCALL
                               (LETT |n|
                                     (SPADCALL |p| (QREFELT $ 92)) . #0#)
                               (LETT |a|
                                     (SPADCALL |p| (QREFELT $ 93)) . #0#)
                               FRDE) . #0#)
                     (LETT |answr|
                           (SPADCALL |answr|
                               (SPADCALL (QVELT |ans1| 0) |n|
                                   (QREFELT $ 94))
                               (QREFELT $ 95)) . #0#)
                     (COND
                       ((SPADCALL (QVELT |ans1| 2) (QREFELT $ 96))
                        (SEQ (LETT |missing|
                                   (SPADCALL |a| (QVELT |ans1| 1)
                                    (QREFELT $ 97)) . #0#)
                             (EXIT (COND
                                     ((ZEROP |n|)
                                      (LETT |coef0| |missing| . #0#))
                                     ('T
                                      (LETT |notelm|
                                       (SPADCALL |notelm|
                                        (SPADCALL |missing| |n|
                                         (QREFELT $ 94))
                                        (QREFELT $ 95)) . #0#)))))))
                     (EXIT (LETT |p|
                                 (SPADCALL |p| (QREFELT $ 98)) . #0#)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT (COND
                   ((SPADCALL |notelm| (QREFELT $ 99))
                    (CONS 0 (CONS |answr| |coef0|)))
                   ('T
                    (CONS 1
                          (CONS |answr|
                                (SPADCALL |notelm|
                                    (SPADCALL |coef0| 0 (QREFELT $ 94))
                                    (QREFELT $ 95))))))))))) 

(DEFUN |INTTR;tanintegratespecial| (|f| |derivation| FRDE $)
  (PROG (|p| |n| |r| |a| |b| #0=#:G1940 |l| |term| |ans| |c0| |u|
             #1=#:G1939)
    (RETURN
      (SEQ (EXIT (SEQ (EXIT (SEQ (LETT |ans| (|spadConstant| $ 9)
                                       . #2=(|INTTR;tanintegratespecial|))
                                 (LETT |p|
                                       (SPADCALL
                                        (SPADCALL (|spadConstant| $ 32)
                                         2 (QREFELT $ 36))
                                        (|spadConstant| $ 33)
                                        (QREFELT $ 38)) . #2#)
                                 (SEQ G190
                                      (COND
                                        ((NULL
                                          (SEQ
                                           (LETT |n|
                                            (QUOTIENT2
                                             (SPADCALL
                                              (SPADCALL |f|
                                               (QREFELT $ 49))
                                              (QREFELT $ 35))
                                             2) . #2#)
                                           (EXIT
                                            (COND
                                              ((EQL |n| 0) 'NIL)
                                              ('T 'T)))))
                                         (GO G191)))
                                      (SEQ
                                       (LETT |r|
                                        (SPADCALL
                                         (SPADCALL |f| (QREFELT $ 46))
                                         |p| (QREFELT $ 100)) . #2#)
                                       (LETT |a|
                                        (SPADCALL |r| 1
                                         (QREFELT $ 101)) . #2#)
                                       (LETT |b|
                                        (SPADCALL |r| 0
                                         (QREFELT $ 101)) . #2#)
                                       (LETT |u|
                                        (SPADCALL |n| |a| |b| FRDE) . #2#)
                                       (EXIT
                                        (COND
                                          ((QEQCAR |u| 1)
                                           (PROGN
                                             (LETT #0#
                                              (CONS 1 (CONS |ans| |f|)) . #2#)
                                             (GO #0#)))
                                          ('T
                                           (SEQ
                                            (LETT |l| (QCDR |u|) . #2#)
                                            (LETT |term|
                                             (SPADCALL
                                              (SPADCALL
                                               (SPADCALL
                                                (|SPADfirst| |l|) 1
                                                (QREFELT $ 36))
                                               (SPADCALL
                                                (SPADCALL |l|
                                                 (QREFELT $ 103))
                                                (QREFELT $ 14))
                                               (QREFELT $ 38))
                                              (SPADCALL |f|
                                               (QREFELT $ 49))
                                              (QREFELT $ 104)) . #2#)
                                            (LETT |ans|
                                             (SPADCALL |ans| |term|
                                              (QREFELT $ 105)) . #2#)
                                            (EXIT
                                             (LETT |f|
                                              (SPADCALL |f|
                                               (SPADCALL |term|
                                                |derivation|)
                                               (QREFELT $ 77)) . #2#)))))))
                                      NIL (GO G190) G191 (EXIT NIL))
                                 (COND
                                   ((SPADCALL
                                     (LETT |c0|
                                      (SPADCALL
                                       (SPADCALL |f| (QREFELT $ 106))
                                       (QREFELT $ 107)) . #2#)
                                     (QREFELT $ 108))
                                    (EXIT (CONS 0 (CONS |ans| |c0|))))
                                   ('T
                                    (SEQ
                                     (LETT |u|
                                      (SPADCALL 0 |c0|
                                       (|spadConstant| $ 28) FRDE) . #2#)
                                     (EXIT
                                      (COND
                                        ((QEQCAR |u| 1)
                                         (PROGN
                                           (LETT #1#
                                            (CONS 0 (CONS |ans| |c0|)) . #2#)
                                           (GO #1#))))))))
                                 (EXIT (CONS 0
                                        (CONS
                                         (SPADCALL |ans|
                                          (SPADCALL
                                           (SPADCALL
                                            (|SPADfirst| (QCDR |u|))
                                            (QREFELT $ 14))
                                           (QREFELT $ 19))
                                          (QREFELT $ 105))
                                         (|spadConstant| $ 28))))))
                      #1# (EXIT #1#)))
           #0# (EXIT #0#))))) 

(DEFUN |INTTR;expextintfrac| (|f| |derivation| |g| $)
  (PROG (|r| |c|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |f| (QREFELT $ 40))
              (CONS 0 (CONS (|spadConstant| $ 9) (|spadConstant| $ 9))))
             ((NULL (< (SPADCALL (SPADCALL |f| (QREFELT $ 46))
                           (QREFELT $ 35))
                       (SPADCALL (SPADCALL |f| (QREFELT $ 49))
                           (QREFELT $ 35))))
              (|error| "Not a proper fraction"))
             ((NULL (EQL (SPADCALL (SPADCALL |f| (QREFELT $ 49))
                             (SPADCALL (|spadConstant| $ 32) 1
                                 (QREFELT $ 36))
                             (QREFELT $ 109))
                         0))
              (|error| "Not integral at t = 0"))
             ('T
              (SEQ (LETT |r| (SPADCALL |f| |derivation| (QREFELT $ 45))
                         . #0=(|INTTR;expextintfrac|))
                   (EXIT (COND
                           ((SPADCALL |g| (QREFELT $ 40))
                            (COND
                              ((NULL (SPADCALL (QVELT |r| 1)
                                      (|spadConstant| $ 9)
                                      (QREFELT $ 110)))
                               (CONS 1 "failed"))
                              ('T
                               (CONS 0
                                     (CONS (QVELT |r| 0)
                                      (|spadConstant| $ 9))))))
                           ((NULL (< (SPADCALL
                                      (SPADCALL |g| (QREFELT $ 46))
                                      (QREFELT $ 35))
                                     (SPADCALL
                                      (SPADCALL |g| (QREFELT $ 49))
                                      (QREFELT $ 35))))
                            (|error| "Not a proper fraction"))
                           ((NULL (EQL (SPADCALL
                                        (SPADCALL |g| (QREFELT $ 49))
                                        (SPADCALL (|spadConstant| $ 32)
                                         1 (QREFELT $ 36))
                                        (QREFELT $ 109))
                                       0))
                            (|error| "Not integral at t = 0"))
                           ((NULL (SPADCALL
                                      (SPADCALL
                                       (LETT |c|
                                        (SPADCALL (QVELT |r| 1) |g|
                                         (QREFELT $ 13)) . #0#)
                                       |derivation| (QREFELT $ 12))
                                      (|spadConstant| $ 9)
                                      (QREFELT $ 110)))
                            (CONS 1 "failed"))
                           ('T (CONS 0 (CONS (QVELT |r| 0) |c|)))))))))))) 

(DEFUN |INTTR;limitedLogs| (|f| |logderiv| |lu| $)
  (PROG (|u0| |num| |den| #0=#:G1984 #1=#:G1985 |v| |l1| #2=#:G1986 |u|
              #3=#:G1987 |rows| |cols| #4=#:G1988 #5=#:G1990 #6=#:G1989
              |m| |i| #7=#:G1991 |j| #8=#:G1993 |pp| #9=#:G1992 OK |c|
              |c0| |ans| #10=#:G1983)
    (RETURN
      (SEQ (EXIT (COND
                   ((SPADCALL |f| (QREFELT $ 40)) (CONS 0 NIL))
                   ((NULL |lu|) (CONS 1 "failed"))
                   ((NULL (CDR |lu|))
                    (COND
                      ((NULL (SPADCALL
                                 (SPADCALL
                                     (LETT |c0|
                                      (SPADCALL |f|
                                       (SPADCALL
                                        (LETT |u0| (|SPADfirst| |lu|)
                                         . #11=(|INTTR;limitedLogs|))
                                        |logderiv|)
                                       (QREFELT $ 13)) . #11#)
                                     |logderiv|)
                                 (|spadConstant| $ 9) (QREFELT $ 110)))
                       (CONS 1 "failed"))
                      ('T (CONS 0 (LIST (CONS |c0| |u0|))))))
                   ('T
                    (SEQ (LETT |num|
                               (SPADCALL |f| (QREFELT $ 46)) . #11#)
                         (LETT |den|
                               (SPADCALL |f| (QREFELT $ 49)) . #11#)
                         (LETT |l1|
                               (PROGN
                                 (LETT #0# NIL . #11#)
                                 (SEQ (LETT |u| NIL . #11#)
                                      (LETT #1# |lu| . #11#) G190
                                      (COND
                                        ((OR (ATOM #1#)
                                          (PROGN
                                            (LETT |u| (CAR #1#) . #11#)
                                            NIL))
                                         #12=(GO G191)))
                                      (SEQ
                                       (EXIT
                                        (COND
                                          ((SPADCALL
                                            (SPADCALL
                                             (LETT |v|
                                              (SPADCALL |den|
                                               (SPADCALL |u|
                                                |logderiv|)
                                               (QREFELT $ 111)) . #11#)
                                             (QREFELT $ 49))
                                            (|spadConstant| $ 33)
                                            (QREFELT $ 30))
                                           (LETT #0#
                                            (CONS
                                             (CONS |u|
                                              (SPADCALL |v|
                                               (QREFELT $ 46)))
                                             #0#) . #11#)))))
                                      (LETT #1# (CDR #1#) . #11#)
                                      #13=(GO G190) G191
                                      (EXIT (NREVERSE0 #0#)))) . #11#)
                         (LETT |rows|
                               (MAX (SPADCALL |den| (QREFELT $ 35))
                                    (+ 1
                                     (SPADCALL (ELT $ 112)
                                      (PROGN
                                        (LETT #2# NIL . #11#)
                                        (SEQ (LETT |u| NIL . #11#)
                                         (LETT #3# |l1| . #11#) G190
                                         (COND
                                           ((OR (ATOM #3#)
                                             (PROGN
                                               (LETT |u|
                                                (CAR #3#) . #11#)
                                               NIL))
                                            #12#))
                                         (SEQ
                                          (EXIT
                                           (LETT #2#
                                            (CONS
                                             (SPADCALL (QCDR |u|)
                                              (QREFELT $ 35))
                                             #2#) . #11#)))
                                         (LETT #3# (CDR #3#) . #11#)
                                         #13# G191
                                         (EXIT (NREVERSE0 #2#))))
                                      0 (QREFELT $ 115)))) . #11#)
                         (LETT |m|
                               (SPADCALL |rows|
                                   (LETT |cols|
                                    (+ 1 (LENGTH |l1|)) . #11#)
                                   (QREFELT $ 117)) . #11#)
                         (SEQ (LETT |i| 0 . #11#)
                              (LETT #4# (- |rows| 1) . #11#) G190
                              (COND ((QSGREATERP |i| #4#) #12#))
                              (SEQ (SEQ
                                    (LETT |j|
                                     (SPADCALL |m| (QREFELT $ 118)) . #11#)
                                    (LETT #5#
                                     (- (SPADCALL |m| (QREFELT $ 119))
                                      1) . #11#)
                                    (LETT |pp| NIL . #11#)
                                    (LETT #6# |l1| . #11#) G190
                                    (COND
                                      ((OR (ATOM #6#)
                                        (PROGN
                                          (LETT |pp| (CAR #6#) . #11#)
                                          NIL)
                                        (> |j| #5#))
                                       #12#))
                                    (SEQ
                                     (EXIT
                                      (SPADCALL |m|
                                       (+ |i|
                                        (SPADCALL |m| (QREFELT $ 120)))
                                       |j|
                                       (SPADCALL (QCDR |pp|) |i|
                                        (QREFELT $ 101))
                                       (QREFELT $ 121))))
                                    (LETT #6#
                                     (PROG1 (CDR #6#)
                                       (LETT |j| (+ |j| 1) . #11#)) . #11#)
                                    #13# G191 (EXIT NIL))
                                   (EXIT
                                    (SPADCALL |m|
                                     (+ |i|
                                      (SPADCALL |m| (QREFELT $ 120)))
                                     (SPADCALL |m| (QREFELT $ 119))
                                     (SPADCALL |num| |i|
                                      (QREFELT $ 101))
                                     (QREFELT $ 121))))
                              (LETT |i| (QSADD1 |i|) . #11#) #13# G191
                              (EXIT NIL))
                         (LETT |m|
                               (SPADCALL |m| (QREFELT $ 122)) . #11#)
                         (LETT |ans| NIL . #11#)
                         (SEQ (LETT |i|
                                    (SPADCALL |m| (QREFELT $ 120)) . #11#)
                              (LETT #7#
                                    (SPADCALL |m| (QREFELT $ 123)) . #11#)
                              G190 (COND ((> |i| #7#) #12#))
                              (SEQ (EXIT
                                    (COND
                                      ((COND
                                         ((SPADCALL
                                           (SPADCALL |m| |i|
                                            (SPADCALL |m|
                                             (QREFELT $ 119))
                                            (QREFELT $ 124))
                                           (|spadConstant| $ 28)
                                           (QREFELT $ 125))
                                          'NIL)
                                         ('T 'T))
                                       (SEQ (LETT OK 'NIL . #11#)
                                        (SEQ
                                         (LETT |j|
                                          (SPADCALL |m|
                                           (QREFELT $ 118)) . #11#)
                                         (LETT #8#
                                          (-
                                           (SPADCALL |m|
                                            (QREFELT $ 119))
                                           1) . #11#)
                                         (LETT |pp| NIL . #11#)
                                         (LETT #9# |l1| . #11#) G190
                                         (COND
                                           ((OR (ATOM #9#)
                                             (PROGN
                                               (LETT |pp|
                                                (CAR #9#) . #11#)
                                               NIL)
                                             (> |j| #8#)
                                             (NULL
                                              (COND (OK 'NIL) ('T 'T))))
                                            #12#))
                                         (SEQ
                                          (EXIT
                                           (COND
                                             ((NULL
                                               (SPADCALL
                                                (SPADCALL |m| |i| |j|
                                                 (QREFELT $ 124))
                                                (|spadConstant| $ 28)
                                                (QREFELT $ 125)))
                                              (SEQ (LETT OK 'T . #11#)
                                               (LETT |c|
                                                (SPADCALL
                                                 (SPADCALL |m| |i|
                                                  (SPADCALL |m|
                                                   (QREFELT $ 119))
                                                  (QREFELT $ 124))
                                                 (SPADCALL |m| |i| |j|
                                                  (QREFELT $ 124))
                                                 (QREFELT $ 85)) . #11#)
                                               (COND
                                                 ((NULL
                                                   (SPADCALL
                                                    (SPADCALL
                                                     (LETT |c0|
                                                      (SPADCALL
                                                       (SPADCALL |c|
                                                        (QREFELT $ 14))
                                                       (QREFELT $ 19)) . #11#)
                                                     |logderiv|)
                                                    (|spadConstant| $
                                                     9)
                                                    (QREFELT $ 110)))
                                                  (EXIT
                                                   (PROGN
                                                     (LETT #10#
                                                      (CONS 1 "failed") . #11#)
                                                     (GO #10#)))))
                                               (EXIT
                                                (LETT |ans|
                                                 (CONS
                                                  (CONS |c0|
                                                   (QCAR |pp|))
                                                  |ans|) . #11#)))))))
                                         (LETT #9#
                                          (PROG1 (CDR #9#)
                                            (LETT |j| (+ |j| 1) . #11#)) . #11#)
                                         #13# G191 (EXIT NIL))
                                        (EXIT
                                         (COND
                                           ((NULL OK)
                                            (PROGN
                                              (LETT #10#
                                               (CONS 1 "failed") . #11#)
                                              (GO #10#))))))))))
                              (LETT |i| (+ |i| 1) . #11#) #13# G191
                              (EXIT NIL))
                         (EXIT (CONS 0 |ans|))))))
           #10# (EXIT #10#))))) 

(DEFUN |INTTR;primintfldpoly;UPMFU;12| (|p| |extendedint| |t'| $)
  (PROG (|u|)
    (RETURN
      (SEQ (LETT |u|
                 (|INTTR;primintegratepoly| |p| |extendedint| |t'| $)
                 |INTTR;primintfldpoly;UPMFU;12|)
           (EXIT (COND
                   ((OR (QEQCAR |u| 1)
                        (NULL (SPADCALL (QCDR (QCDR |u|))
                                  (|spadConstant| $ 28)
                                  (QREFELT $ 125))))
                    (CONS 1 "failed"))
                   ('T (CONS 0 (QCAR (QCDR |u|)))))))))) 

(DEFUN |INTTR;expintfldpoly;LpMU;13| (|p| FRDE $)
  (PROG (|u|)
    (RETURN
      (SEQ (LETT |u| (|INTTR;expintegratepoly| |p| FRDE $)
                 |INTTR;expintfldpoly;LpMU;13|)
           (EXIT (COND
                   ((OR (QEQCAR |u| 1)
                        (NULL (SPADCALL (QCDR (QCDR |u|))
                                  (|spadConstant| $ 28)
                                  (QREFELT $ 125))))
                    (CONS 1 "failed"))
                   ('T (CONS 0 (QCAR (QCDR |u|)))))))))) 

(DEFUN |INTTR;primlimitedint;FMMLU;14|
       (|f| |derivation| |extendedint| |lu| $)
  (PROG (|qr| |u1| |u2|)
    (RETURN
      (SEQ (LETT |qr|
                 (SPADCALL (SPADCALL |f| (QREFELT $ 46))
                     (SPADCALL |f| (QREFELT $ 49)) (QREFELT $ 135))
                 . #0=(|INTTR;primlimitedint;FMMLU;14|))
           (LETT |u1|
                 (SPADCALL
                     (SPADCALL (QCDR |qr|)
                         (SPADCALL |f| (QREFELT $ 49)) (QREFELT $ 104))
                     |derivation| |lu| (QREFELT $ 140)) . #0#)
           (EXIT (COND
                   ((QEQCAR |u1| 1) (CONS 1 "failed"))
                   (#1='T
                    (SEQ (LETT |u2|
                               (|INTTR;primintegratepoly| (QCAR |qr|)
                                   |extendedint|
                                   (SPADCALL
                                    (SPADCALL
                                     (SPADCALL (|spadConstant| $ 32) 1
                                      (QREFELT $ 36))
                                     |derivation|)
                                    (QREFELT $ 107))
                                   $) . #0#)
                         (EXIT (COND
                                 ((QEQCAR |u2| 1) (CONS 1 "failed"))
                                 (#1#
                                  (CONS 0
                                        (CONS
                                         (CONS
                                          (SPADCALL (QCAR (QCDR |u1|))
                                           (SPADCALL (QCAR (QCDR |u2|))
                                            (QREFELT $ 19))
                                           (QREFELT $ 105))
                                          (QCDR (QCDR |u1|)))
                                         (QCDR (QCDR |u2|))))))))))))))) 

(DEFUN |INTTR;explimitedint;FMMLU;15| (|f| |derivation| FRDE |lu| $)
  (PROG (|qr| |u1| |u2|)
    (RETURN
      (SEQ (LETT |qr| (SPADCALL |f| (QREFELT $ 145))
                 . #0=(|INTTR;explimitedint;FMMLU;15|))
           (LETT |u1|
                 (|INTTR;explimintfrac| (QCDR |qr|) |derivation| |lu|
                     $) . #0#)
           (EXIT (COND
                   ((QEQCAR |u1| 1) (CONS 1 "failed"))
                   (#1='T
                    (SEQ (LETT |u2|
                               (|INTTR;expintegratepoly| (QCAR |qr|)
                                   FRDE $) . #0#)
                         (EXIT (COND
                                 ((QEQCAR |u2| 1) (CONS 1 "failed"))
                                 (#1#
                                  (CONS 0
                                        (CONS
                                         (CONS
                                          (SPADCALL (QCAR (QCDR |u1|))
                                           (SPADCALL (QCAR (QCDR |u2|))
                                            (QREFELT $ 146))
                                           (QREFELT $ 105))
                                          (QCDR (QCDR |u1|)))
                                         (QCDR (QCDR |u2|))))))))))))))) 

(DEFUN |INTTR;primlimintfrac;FMLU;16| (|f| |derivation| |lu| $)
  (PROG (|r| |u|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |f| (QREFELT $ 40))
              (CONS 0 (CONS (|spadConstant| $ 9) NIL)))
             ((NULL (< (SPADCALL (SPADCALL |f| (QREFELT $ 46))
                           (QREFELT $ 35))
                       (SPADCALL (SPADCALL |f| (QREFELT $ 49))
                           (QREFELT $ 35))))
              (|error| "Not a proper fraction"))
             ('T
              (SEQ (LETT |r| (SPADCALL |f| |derivation| (QREFELT $ 45))
                         . #0=(|INTTR;primlimintfrac;FMLU;16|))
                   (EXIT (COND
                           ((SPADCALL (QVELT |r| 1) (QREFELT $ 40))
                            (CONS 0 (CONS (QVELT |r| 0) NIL)))
                           ('T
                            (SEQ (LETT |u|
                                       (|INTTR;limitedLogs|
                                        (QVELT |r| 1)
                                        (CONS
                                         #'|INTTR;primlimintfrac;FMLU;16!0|
                                         (VECTOR $ |derivation|))
                                        |lu| $) . #0#)
                                 (EXIT (COND
                                         ((QEQCAR |u| 1)
                                          (CONS 1 "failed"))
                                         ('T
                                          (CONS 0
                                           (CONS (QVELT |r| 0)
                                            (QCDR |u|))))))))))))))))) 

(DEFUN |INTTR;primlimintfrac;FMLU;16!0| (|#1| $$)
  (|INTTR;logprmderiv| |#1| (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |INTTR;explimintfrac| (|f| |derivation| |lu| $)
  (PROG (|r| |eta'| |u| |v| #0=#:G2117 #1=#:G2111 #2=#:G2109
             #3=#:G2110)
    (RETURN
      (SEQ (COND
             ((SPADCALL |f| (QREFELT $ 40))
              (CONS 0 (CONS (|spadConstant| $ 9) NIL)))
             ((NULL (< (SPADCALL (SPADCALL |f| (QREFELT $ 46))
                           (QREFELT $ 35))
                       (SPADCALL (SPADCALL |f| (QREFELT $ 49))
                           (QREFELT $ 35))))
              (|error| "Not a proper fraction"))
             ('T
              (COND
                ((< 0
                    (SPADCALL (SPADCALL |f| (QREFELT $ 49))
                        (SPADCALL (|spadConstant| $ 32) 1
                            (QREFELT $ 36))
                        (QREFELT $ 109)))
                 (|error| "Not integral at t = 0"))
                ('T
                 (SEQ (LETT |r|
                            (SPADCALL |f| |derivation| (QREFELT $ 45))
                            . #4=(|INTTR;explimintfrac|))
                      (EXIT (COND
                              ((SPADCALL (QVELT |r| 1) (QREFELT $ 40))
                               (CONS 0 (CONS (QVELT |r| 0) NIL)))
                              ('T
                               (SEQ (LETT |eta'|
                                     (SPADCALL
                                      (SPADCALL
                                       (SPADCALL (|spadConstant| $ 32)
                                        1 (QREFELT $ 36))
                                       |derivation|)
                                      1 (QREFELT $ 101)) . #4#)
                                    (LETT |u|
                                     (|INTTR;limitedLogs| (QVELT |r| 1)
                                      (CONS #'|INTTR;explimintfrac!0|
                                       (VECTOR $ |eta'| |derivation|))
                                      |lu| $) . #4#)
                                    (EXIT
                                     (COND
                                       ((QEQCAR |u| 1)
                                        (CONS 1 "failed"))
                                       ('T
                                        (CONS 0
                                         (CONS
                                          (SPADCALL (QVELT |r| 0)
                                           (SPADCALL
                                            (SPADCALL |eta'|
                                             (QREFELT $ 14))
                                            (PROGN
                                              (LETT #3# NIL . #4#)
                                              (SEQ (LETT |v| NIL . #4#)
                                               (LETT #0#
                                                (QCDR |u|) . #4#)
                                               G190
                                               (COND
                                                 ((OR (ATOM #0#)
                                                   (PROGN
                                                     (LETT |v|
                                                      (CAR #0#) . #4#)
                                                     NIL))
                                                  (GO G191)))
                                               (SEQ
                                                (EXIT
                                                 (PROGN
                                                   (LETT #1#
                                                    (SPADCALL
                                                     (-
                                                      (SPADCALL
                                                       (SPADCALL
                                                        (QCDR |v|)
                                                        (QREFELT $ 46))
                                                       (QREFELT $ 35))
                                                      (SPADCALL
                                                       (SPADCALL
                                                        (QCDR |v|)
                                                        (QREFELT $ 49))
                                                       (QREFELT $ 35)))
                                                     (QCAR |v|)
                                                     (QREFELT $ 148)) . #4#)
                                                   (COND
                                                     (#3#
                                                      (LETT #2#
                                                       (SPADCALL #2#
                                                        #1#
                                                        (QREFELT $ 105)) . #4#))
                                                     ('T
                                                      (PROGN
                                                        (LETT #2#
                                                         #1# . #4#)
                                                        (LETT #3#
                                                         'T . #4#)))))))
                                               (LETT #0#
                                                (CDR #0#) . #4#)
                                               (GO G190) G191
                                               (EXIT NIL))
                                              (COND
                                                (#3# #2#)
                                                ('T
                                                 (|spadConstant| $ 9))))
                                            (QREFELT $ 111))
                                           (QREFELT $ 77))
                                          (QCDR |u|))))))))))))))))))) 

(DEFUN |INTTR;explimintfrac!0| (|#1| $$)
  (|INTTR;logexpderiv| |#1| (QREFELT $$ 2) (QREFELT $$ 1)
      (QREFELT $$ 0))) 

(DEFUN |INTTR;logexpderiv| (|f| |derivation| |eta'| $)
  (SPADCALL
      (SPADCALL (SPADCALL |f| |derivation| (QREFELT $ 12)) |f|
          (QREFELT $ 13))
      (SPADCALL
          (SPADCALL
              (SPADCALL
                  (- (SPADCALL (SPADCALL |f| (QREFELT $ 46))
                         (QREFELT $ 35))
                     (SPADCALL (SPADCALL |f| (QREFELT $ 49))
                         (QREFELT $ 35)))
                  |eta'| (QREFELT $ 84))
              (QREFELT $ 14))
          (QREFELT $ 19))
      (QREFELT $ 77))) 

(DEFUN |INTTR;notelementary| (|rec| $)
  (SPADCALL (QVELT |rec| 0)
      (SPADCALL
          (SPADCALL (SPADCALL (QVELT |rec| 2) (QREFELT $ 19))
              (QVELT |rec| 1) (QREFELT $ 105))
          (SPADCALL (SPADCALL (|spadConstant| $ 32) 1 (QREFELT $ 36))
              (QREFELT $ 19))
          (QREFELT $ 149))
      (QREFELT $ 150))) 

(DEFUN |INTTR;primintegrate;FMMR;20| (|f| |derivation| |extendedint| $)
  (PROG (|rec| |i1| |u2|)
    (RETURN
      (SEQ (LETT |rec| (SPADCALL |f| |derivation| (QREFELT $ 81))
                 . #0=(|INTTR;primintegrate;FMMR;20|))
           (COND
             ((NULL (SPADCALL (LETT |i1| (QVELT |rec| 0) . #0#)
                        (QREFELT $ 151)))
              (EXIT (CONS (|INTTR;notelementary| |rec| $)
                          (|spadConstant| $ 28)))))
           (LETT |u2|
                 (|INTTR;primintegratepoly| (QVELT |rec| 2)
                     |extendedint|
                     (SPADCALL
                         (SPADCALL
                             (SPADCALL (|spadConstant| $ 32) 1
                                 (QREFELT $ 36))
                             |derivation|)
                         (QREFELT $ 107))
                     $) . #0#)
           (EXIT (COND
                   ((QEQCAR |u2| 1)
                    (CONS (SPADCALL
                              (SPADCALL |i1|
                                  (SPADCALL
                                      (SPADCALL (QCAR (QCDR |u2|))
                                       (QREFELT $ 19))
                                      (QREFELT $ 48))
                                  (QREFELT $ 150))
                              (SPADCALL
                                  (SPADCALL (QCDR (QCDR |u2|))
                                      (QREFELT $ 19))
                                  (SPADCALL
                                      (SPADCALL (|spadConstant| $ 32) 1
                                       (QREFELT $ 36))
                                      (QREFELT $ 19))
                                  (QREFELT $ 149))
                              (QREFELT $ 150))
                          (|spadConstant| $ 28)))
                   ('T
                    (CONS (SPADCALL |i1|
                              (SPADCALL
                                  (SPADCALL (QCAR (QCDR |u2|))
                                      (QREFELT $ 19))
                                  (QREFELT $ 48))
                              (QREFELT $ 150))
                          (QCDR (QCDR |u2|)))))))))) 

(DEFUN |INTTR;expintegrate;FMMR;21| (|f| |derivation| FRDE $)
  (PROG (|rec| |i1| #0=#:G2143 |special| |u2|)
    (RETURN
      (SEQ (LETT |rec| (SPADCALL |f| |derivation| (QREFELT $ 81))
                 . #1=(|INTTR;expintegrate;FMMR;21|))
           (COND
             ((NULL (SPADCALL (LETT |i1| (QVELT |rec| 0) . #1#)
                        (QREFELT $ 151)))
              (EXIT (CONS (|INTTR;notelementary| |rec| $)
                          (|spadConstant| $ 28)))))
           (LETT |special|
                 (SPADCALL (SPADCALL (QVELT |rec| 2) (QREFELT $ 154))
                     (PROG2 (LETT #0#
                                  (SPADCALL
                                      (SPADCALL
                                       (SPADCALL (QVELT |rec| 1)
                                        (QREFELT $ 46))
                                       (QREFELT $ 154))
                                      (SPADCALL
                                       (SPADCALL (QVELT |rec| 1)
                                        (QREFELT $ 49))
                                       (QREFELT $ 154))
                                      (QREFELT $ 156)) . #1#)
                            (QCDR #0#)
                       (|check-union| (QEQCAR #0# 0)
                           (|LaurentPolynomial| (QREFELT $ 6)
                               (QREFELT $ 7))
                           #0#))
                     (QREFELT $ 95)) . #1#)
           (LETT |u2|
                 (|INTTR;expintegratepoly| |special| FRDE $) . #1#)
           (EXIT (COND
                   ((QEQCAR |u2| 1)
                    (CONS (SPADCALL
                              (SPADCALL |i1|
                                  (SPADCALL
                                      (SPADCALL (QCAR (QCDR |u2|))
                                       (QREFELT $ 146))
                                      (QREFELT $ 48))
                                  (QREFELT $ 150))
                              (SPADCALL
                                  (SPADCALL (QCDR (QCDR |u2|))
                                      (QREFELT $ 146))
                                  (SPADCALL
                                      (SPADCALL (|spadConstant| $ 32) 1
                                       (QREFELT $ 36))
                                      (QREFELT $ 19))
                                  (QREFELT $ 149))
                              (QREFELT $ 150))
                          (|spadConstant| $ 28)))
                   ('T
                    (CONS (SPADCALL |i1|
                              (SPADCALL
                                  (SPADCALL (QCAR (QCDR |u2|))
                                      (QREFELT $ 146))
                                  (QREFELT $ 48))
                              (QREFELT $ 150))
                          (QCDR (QCDR |u2|)))))))))) 

(DEFUN |INTTR;tanintegrate;FMMR;22| (|f| |derivation| FRDE $)
  (PROG (|rec| |i1| |r| |t| |c| |logs| |c0| |u|)
    (RETURN
      (SEQ (LETT |rec| (SPADCALL |f| |derivation| (QREFELT $ 81))
                 . #0=(|INTTR;tanintegrate;FMMR;22|))
           (COND
             ((NULL (SPADCALL (LETT |i1| (QVELT |rec| 0) . #0#)
                        (QREFELT $ 151)))
              (EXIT (CONS (|INTTR;notelementary| |rec| $)
                          (|spadConstant| $ 28)))))
           (LETT |r|
                 (SPADCALL (QVELT |rec| 2) |derivation| (QREFELT $ 88)) . #0#)
           (LETT |t|
                 (SPADCALL (|spadConstant| $ 32) 1 (QREFELT $ 36)) . #0#)
           (LETT |c|
                 (SPADCALL (SPADCALL (QCDR |r|) 1 (QREFELT $ 101))
                     (SPADCALL (SPADCALL |t| |derivation|)
                         (QREFELT $ 31))
                     (QREFELT $ 85)) . #0#)
           (COND
             ((NULL (SPADCALL
                        (SPADCALL (SPADCALL |c| (QREFELT $ 14))
                            |derivation|)
                        (|spadConstant| $ 27) (QREFELT $ 30)))
              (EXIT (CONS (SPADCALL |i1|
                              (SPADCALL
                                  (SPADCALL (QCAR |r|) (QREFELT $ 19))
                                  NIL
                                  (LIST (CONS
                                         (SPADCALL
                                          (SPADCALL (QCDR |r|)
                                           (QREFELT $ 19))
                                          (QVELT |rec| 1)
                                          (QREFELT $ 105))
                                         (QREFELT $ 10)))
                                  (QREFELT $ 74))
                              (QREFELT $ 150))
                          (|spadConstant| $ 28)))))
           (LETT |logs|
                 (COND
                   ((SPADCALL |c| (QREFELT $ 108)) NIL)
                   ('T
                    (LIST (VECTOR (|spadConstant| $ 66)
                                  (SPADCALL
                                      (SPADCALL (|spadConstant| $ 82) 1
                                       (QREFELT $ 158))
                                      (SPADCALL
                                       (SPADCALL
                                        (SPADCALL
                                         (SPADCALL |c|
                                          (SPADCALL 2 (QREFELT $ 159))
                                          (QREFELT $ 85))
                                         (QREFELT $ 14))
                                        (QREFELT $ 19))
                                       (QREFELT $ 160))
                                      (QREFELT $ 161))
                                  (SPADCALL
                                      (SPADCALL
                                       (SPADCALL (|spadConstant| $ 33)
                                        (SPADCALL |t| 2
                                         (QREFELT $ 163))
                                        (QREFELT $ 38))
                                       (QREFELT $ 19))
                                      (QREFELT $ 160)))))) . #0#)
           (LETT |c0| (SPADCALL (QCDR |r|) 0 (QREFELT $ 101)) . #0#)
           (LETT |u|
                 (|INTTR;tanintegratespecial| (QVELT |rec| 1)
                     (CONS #'|INTTR;tanintegrate;FMMR;22!0|
                           (VECTOR $ |derivation|))
                     FRDE $) . #0#)
           (EXIT (COND
                   ((QEQCAR |u| 1)
                    (CONS (SPADCALL |i1|
                              (SPADCALL
                                  (SPADCALL
                                      (SPADCALL (QCAR |r|)
                                       (QREFELT $ 19))
                                      (QCAR (QCDR |u|))
                                      (QREFELT $ 105))
                                  |logs|
                                  (LIST (CONS (QCDR (QCDR |u|))
                                         (QREFELT $ 10)))
                                  (QREFELT $ 74))
                              (QREFELT $ 150))
                          |c0|))
                   ('T
                    (CONS (SPADCALL |i1|
                              (SPADCALL
                                  (SPADCALL
                                      (SPADCALL (QCAR |r|)
                                       (QREFELT $ 19))
                                      (QCAR (QCDR |u|))
                                      (QREFELT $ 105))
                                  |logs| NIL (QREFELT $ 74))
                              (QREFELT $ 150))
                          (SPADCALL (QCDR (QCDR |u|)) |c0|
                              (QREFELT $ 164)))))))))) 

(DEFUN |INTTR;tanintegrate;FMMR;22!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 12))) 

(DEFUN |INTTR;primextendedint;FMMFU;23|
       (|f| |derivation| |extendedint| |g| $)
  (PROG (|fqr| |gqr| |u1| |u3| |u2|)
    (RETURN
      (SEQ (LETT |fqr|
                 (SPADCALL (SPADCALL |f| (QREFELT $ 46))
                     (SPADCALL |f| (QREFELT $ 49)) (QREFELT $ 135))
                 . #0=(|INTTR;primextendedint;FMMFU;23|))
           (LETT |gqr|
                 (SPADCALL (SPADCALL |g| (QREFELT $ 46))
                     (SPADCALL |g| (QREFELT $ 49)) (QREFELT $ 135)) . #0#)
           (LETT |u1|
                 (SPADCALL
                     (SPADCALL (QCDR |fqr|)
                         (SPADCALL |f| (QREFELT $ 49)) (QREFELT $ 104))
                     |derivation|
                     (SPADCALL (QCDR |gqr|)
                         (SPADCALL |g| (QREFELT $ 49)) (QREFELT $ 104))
                     (QREFELT $ 170)) . #0#)
           (EXIT (COND
                   ((QEQCAR |u1| 1) (CONS 2 "failed"))
                   ((SPADCALL (QCDR |gqr|) (QREFELT $ 47))
                    (COND
                      ((< 0 (SPADCALL (QCAR |gqr|) (QREFELT $ 35)))
                       (|error| "Sorry - cannot handle that integrand yet"))
                      ('T
                       (SEQ (LETT |u3|
                                  (|INTTR;primintegratepoly|
                                      (QCAR |fqr|) |extendedint|
                                      (SPADCALL
                                       (SPADCALL
                                        (SPADCALL (|spadConstant| $ 32)
                                         1 (QREFELT $ 36))
                                        |derivation|)
                                       (QREFELT $ 107))
                                      $) . #0#)
                            (EXIT (COND
                                    ((QEQCAR |u3| 1) (CONS 2 "failed"))
                                    ('T
                                     (CONS 0
                                      (CONS
                                       (SPADCALL (QCAR (QCDR |u1|))
                                        (SPADCALL (QCAR (QCDR |u3|))
                                         (QREFELT $ 19))
                                        (QREFELT $ 105))
                                       (QCDR (QCDR |u3|)))))))))))
                   ('T
                    (SEQ (LETT |u2|
                               (SPADCALL
                                   (SPADCALL (QCAR |fqr|)
                                    (SPADCALL
                                     (SPADCALL (QCDR (QCDR |u1|))
                                      (QREFELT $ 106))
                                     (QCAR |gqr|) (QREFELT $ 37))
                                    (QREFELT $ 86))
                                   |extendedint|
                                   (SPADCALL
                                    (SPADCALL
                                     (SPADCALL (|spadConstant| $ 32) 1
                                      (QREFELT $ 36))
                                     |derivation|)
                                    (QREFELT $ 107))
                                   (QREFELT $ 129)) . #0#)
                         (EXIT (COND
                                 ((QEQCAR |u2| 1) (CONS 2 "failed"))
                                 ('T
                                  (CONS 1
                                        (CONS
                                         (SPADCALL
                                          (SPADCALL (QCDR |u2|)
                                           (QREFELT $ 19))
                                          (QCAR (QCDR |u1|))
                                          (QREFELT $ 105))
                                         (QCDR (QCDR |u1|))))))))))))))) 

(DEFUN |INTTR;expextendedint;FMMFU;24| (|f| |derivation| FRDE |g| $)
  (PROG (|qf| |qg| |u1| |u3| |u2|)
    (RETURN
      (SEQ (LETT |qf| (SPADCALL |f| (QREFELT $ 145))
                 . #0=(|INTTR;expextendedint;FMMFU;24|))
           (LETT |qg| (SPADCALL |g| (QREFELT $ 145)) . #0#)
           (LETT |u1|
                 (|INTTR;expextintfrac| (QCDR |qf|) |derivation|
                     (QCDR |qg|) $) . #0#)
           (EXIT (COND
                   ((QEQCAR |u1| 1) (CONS 2 "failed"))
                   ((SPADCALL (QCDR |qg|) (QREFELT $ 40))
                    (COND
                      ((QEQCAR (SPADCALL (QCAR |qg|) (QREFELT $ 175))
                               1)
                       (|error| "Sorry - cannot handle that integrand yet"))
                      ('T
                       (SEQ (LETT |u3|
                                  (|INTTR;expintegratepoly| (QCAR |qf|)
                                      FRDE $) . #0#)
                            (EXIT (COND
                                    ((QEQCAR |u3| 1) (CONS 2 "failed"))
                                    ('T
                                     (CONS 0
                                      (CONS
                                       (SPADCALL (QCAR (QCDR |u1|))
                                        (SPADCALL (QCAR (QCDR |u3|))
                                         (QREFELT $ 146))
                                        (QREFELT $ 105))
                                       (QCDR (QCDR |u3|)))))))))))
                   ('T
                    (SEQ (LETT |u2|
                               (SPADCALL
                                   (SPADCALL (QCAR |qf|)
                                    (SPADCALL
                                     (SPADCALL
                                      (SPADCALL (QCDR (QCDR |u1|))
                                       (QREFELT $ 106))
                                      (QREFELT $ 154))
                                     (QCAR |qg|) (QREFELT $ 176))
                                    (QREFELT $ 177))
                                   FRDE (QREFELT $ 133)) . #0#)
                         (EXIT (COND
                                 ((QEQCAR |u2| 1) (CONS 2 "failed"))
                                 ('T
                                  (CONS 1
                                        (CONS
                                         (SPADCALL
                                          (SPADCALL (QCDR |u2|)
                                           (QREFELT $ 146))
                                          (QCAR (QCDR |u1|))
                                          (QREFELT $ 105))
                                         (QCDR (QCDR |u1|))))))))))))))) 

(DEFUN |INTTR;primintegratepoly| (|p| |extendedint| |t'| $)
  (PROG (|d| #0=#:G2258 #1=#:G2252 |ans| |rp| |ans1|)
    (RETURN
      (SEQ (EXIT (COND
                   ((SPADCALL |p| (QREFELT $ 47))
                    (CONS 0
                          (CONS (|spadConstant| $ 27)
                                (|spadConstant| $ 28))))
                   ('T
                    (SEQ (LETT |ans| (|spadConstant| $ 27)
                               . #2=(|INTTR;primintegratepoly|))
                         (SEQ G190
                              (COND
                                ((NULL (< 0
                                        (LETT |d|
                                         (SPADCALL |p| (QREFELT $ 35)) . #2#)))
                                 (GO G191)))
                              (SEQ (LETT |ans1|
                                    (SPADCALL
                                     (SPADCALL |p| (QREFELT $ 31))
                                     |extendedint|) . #2#)
                                   (EXIT
                                    (COND
                                      ((QEQCAR |ans1| 1)
                                       (PROGN
                                         (LETT #0#
                                          (CONS 1 (CONS |ans| |p|)) . #2#)
                                         (GO #0#)))
                                      ('T
                                       (SEQ
                                        (LETT |p|
                                         (SPADCALL
                                          (SPADCALL |p| (QREFELT $ 39))
                                          (SPADCALL
                                           (SPADCALL
                                            (SPADCALL |d| |t'|
                                             (QREFELT $ 179))
                                            (QCAR (QCDR |ans1|))
                                            (QREFELT $ 180))
                                           (PROG1
                                            (LETT #1# (- |d| 1) . #2#)
                                             (|check-subtype|
                                              (>= #1# 0)
                                              '(|NonNegativeInteger|)
                                              #1#))
                                           (QREFELT $ 36))
                                          (QREFELT $ 86)) . #2#)
                                        (EXIT
                                         (LETT |ans|
                                          (SPADCALL
                                           (SPADCALL |ans|
                                            (SPADCALL
                                             (QCAR (QCDR |ans1|)) |d|
                                             (QREFELT $ 36))
                                            (QREFELT $ 38))
                                           (SPADCALL
                                            (SPADCALL
                                             (QCDR (QCDR |ans1|))
                                             (SPADCALL (+ |d| 1)
                                              (QREFELT $ 159))
                                             (QREFELT $ 85))
                                            (+ |d| 1) (QREFELT $ 36))
                                           (QREFELT $ 38)) . #2#)))))))
                              NIL (GO G190) G191 (EXIT NIL))
                         (LETT |ans1|
                               (SPADCALL
                                   (LETT |rp|
                                    (SPADCALL |p| (QREFELT $ 107)) . #2#)
                                   |extendedint|) . #2#)
                         (EXIT (COND
                                 ((QEQCAR |ans1| 1)
                                  (CONS 0 (CONS |ans| |rp|)))
                                 ('T
                                  (CONS 0
                                        (CONS
                                         (SPADCALL
                                          (SPADCALL
                                           (SPADCALL
                                            (QCDR (QCDR |ans1|)) 1
                                            (QREFELT $ 36))
                                           (SPADCALL
                                            (QCAR (QCDR |ans1|))
                                            (QREFELT $ 14))
                                           (QREFELT $ 38))
                                          |ans| (QREFELT $ 38))
                                         (|spadConstant| $ 28))))))))))
           #0# (EXIT #0#))))) 

(DEFUN |INTTR;primextintfrac;FMFU;26| (|f| |derivation| |g| $)
  (PROG (|r| |c|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |f| (QREFELT $ 40))
              (CONS 0 (CONS (|spadConstant| $ 9) (|spadConstant| $ 9))))
             ((NULL (< (SPADCALL (SPADCALL |f| (QREFELT $ 46))
                           (QREFELT $ 35))
                       (SPADCALL (SPADCALL |f| (QREFELT $ 49))
                           (QREFELT $ 35))))
              (|error| "Not a proper fraction"))
             ('T
              (SEQ (LETT |r| (SPADCALL |f| |derivation| (QREFELT $ 45))
                         . #0=(|INTTR;primextintfrac;FMFU;26|))
                   (EXIT (COND
                           ((SPADCALL |g| (QREFELT $ 40))
                            (COND
                              ((NULL (SPADCALL (QVELT |r| 1)
                                      (|spadConstant| $ 9)
                                      (QREFELT $ 110)))
                               (CONS 1 "failed"))
                              ('T
                               (CONS 0
                                     (CONS (QVELT |r| 0)
                                      (|spadConstant| $ 9))))))
                           ((NULL (< (SPADCALL
                                      (SPADCALL |g| (QREFELT $ 46))
                                      (QREFELT $ 35))
                                     (SPADCALL
                                      (SPADCALL |g| (QREFELT $ 49))
                                      (QREFELT $ 35))))
                            (|error| "Not a proper fraction"))
                           ((NULL (SPADCALL
                                      (SPADCALL
                                       (LETT |c|
                                        (SPADCALL (QVELT |r| 1) |g|
                                         (QREFELT $ 13)) . #0#)
                                       |derivation| (QREFELT $ 12))
                                      (|spadConstant| $ 9)
                                      (QREFELT $ 110)))
                            (CONS 1 "failed"))
                           ('T (CONS 0 (CONS (QVELT |r| 0) |c|)))))))))))) 

(DEFUN |TranscendentalIntegration| (&REST #0=#:G2273)
  (PROG ()
    (RETURN
      (PROG (#1=#:G2274)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (|devaluateList| #0#)
                       (HGET |$ConstructorCache|
                             '|TranscendentalIntegration|)
                       '|domainEqualList|)
                   . #2=(|TranscendentalIntegration|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (APPLY (|function| |TranscendentalIntegration;|)
                             #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache|
                        '|TranscendentalIntegration|))))))))))) 

(DEFUN |TranscendentalIntegration;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|TranscendentalIntegration|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT |dv$|
              (LIST '|TranscendentalIntegration| DV$1 DV$2) . #0#)
        (LETT $ (GETREFV 181) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|TranscendentalIntegration|
            (LIST DV$1 DV$2) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 10 (|spadConstant| $ 9))
        $)))) 

(MAKEPROP '|TranscendentalIntegration| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|Fraction| 7) (0 . |Zero|) '|dummy| (|Mapping| 7 7)
             (4 . |differentiate|) (10 . /) (16 . |coerce|)
             (|SparseUnivariatePolynomial| 7) (|Mapping| 7 6)
             (|UnivariatePolynomialCategoryFunctions2| 6 7 7 15)
             (21 . |map|) (27 . |coerce|)
             (|SparseUnivariatePolynomial| 8) (|Mapping| 8 6)
             (|UnivariatePolynomialCategoryFunctions2| 6 7 8 20)
             (32 . |map|) (|Mapping| 8 7)
             (|SparseUnivariatePolynomialFunctions2| 7 8) (38 . |map|)
             (44 . |Zero|) (48 . |Zero|) (|Boolean|) (52 . =)
             (58 . |leadingCoefficient|) (63 . |One|) (67 . |One|)
             (|NonNegativeInteger|) (71 . |degree|) (76 . |monomial|)
             (82 . *) (88 . +) (94 . |reductum|) (99 . |zero?|)
             (|IntegrationResult| 8) (104 . |Zero|)
             (|Record| (|:| |answer| 8) (|:| |logpart| 8)
                 (|:| |specpart| 8) (|:| |polypart| 7))
             (|TranscendentalHermiteIntegration| 6 7)
             (108 . |HermiteIntegrate|) (114 . |numer|) (119 . |zero?|)
             (124 . |coerce|) (129 . |denom|) (134 . |coerce|)
             (139 . *) (145 . -) (|PrimitiveArray| 15)
             (|SubResultantPackage| 7 15) (151 . |subresultantVector|)
             (157 . |leadingCoefficient|) (162 . |primitivePart|)
             (|Record| (|:| |normal| 63) (|:| |special| 63))
             (|MonomialExtensionTools| 6 7) (167 . |splitSquarefree|)
             (|Record| (|:| |factor| 7) (|:| |exponent| 83))
             (|List| 61) (|Factored| 7) (173 . |factors|)
             (|Fraction| 83) (178 . |One|) (182 . |primitivePart|)
             (|CommuteUnivariatePolynomialCategory| 6 7 15)
             (188 . |swap|)
             (|Record| (|:| |scalar| 65) (|:| |coeff| 20)
                 (|:| |logand| 20))
             (|List| 70)
             (|Record| (|:| |integrand| 8) (|:| |intvar| 8))
             (|List| 72) (193 . |mkAnswer|) (|Mapping| 8 8)
             (200 . |differentiate|) (206 . -) (|Union| 7 '"failed")
             (212 . |retractIfCan|)
             (|Record| (|:| |ir| 41) (|:| |specpart| 8)
                 (|:| |polypart| 7))
             |INTTR;monomialIntegrate;FMR;6| (217 . |One|) (|Integer|)
             (221 . *) (227 . /) (233 . -)
             (|Record| (|:| |answer| 7) (|:| |polypart| 7))
             |INTTR;monomialIntPoly;UPMR;7| (|LaurentPolynomial| 6 7)
             (239 . |Zero|) (243 . =) (249 . |degree|)
             (254 . |leadingCoefficient|) (259 . |monomial|) (265 . +)
             (271 . ~) (276 . -) (282 . |reductum|) (287 . |zero?|)
             (292 . |rem|) (298 . |coefficient|) (|List| 6)
             (304 . |second|) (309 . /) (315 . +) (321 . |retract|)
             (326 . |retract|) (331 . |zero?|) (336 . |order|)
             (342 . =) (348 . *) (354 . |max|) (|Mapping| 34 34 34)
             (|List| 34) (360 . |reduce|) (|Matrix| 6) (367 . |zero|)
             (373 . |minColIndex|) (378 . |maxColIndex|)
             (383 . |minRowIndex|) (388 . |qsetelt!|)
             (396 . |rowEchelon|) (401 . |maxRowIndex|) (406 . |qelt|)
             (413 . =) (|Record| (|:| |ratpart| 6) (|:| |coeff| 6))
             (|Union| 126 '"failed") (|Mapping| 127 6)
             |INTTR;primintfldpoly;UPMFU;12| (|Union| 89 '"failed")
             (|Record| (|:| |ans| 6) (|:| |right| 6) (|:| |sol?| 29))
             (|Mapping| 131 83 6) |INTTR;expintfldpoly;LpMU;13|
             (|Record| (|:| |quotient| $) (|:| |remainder| $))
             (419 . |divide|)
             (|Record| (|:| |coeff| 8) (|:| |logand| 8))
             (|Record| (|:| |mainpart| 8)
                 (|:| |limitedlogs| (|List| 136)))
             (|Union| 137 '"failed") (|List| 8)
             |INTTR;primlimintfrac;FMLU;16|
             (|Record| (|:| |answer| 137) (|:| |a0| 6))
             (|Union| 141 '"failed") |INTTR;primlimitedint;FMMLU;14|
             (|Record| (|:| |polyPart| $) (|:| |fracPart| 8))
             (425 . |separate|) (430 . |convert|)
             |INTTR;explimitedint;FMMLU;15| (435 . *)
             (441 . |integral|) (447 . +) (453 . |elem?|)
             (|Record| (|:| |answer| 41) (|:| |a0| 6))
             |INTTR;primintegrate;FMMR;20| (458 . |coerce|)
             (|Union| $ '"failed") (463 . |exquo|)
             |INTTR;expintegrate;FMMR;21| (469 . |monomial|)
             (475 . |coerce|) (480 . |coerce|) (485 . -)
             (|PositiveInteger|) (491 . **) (497 . +)
             (|Union| 102 '"failed") (|Mapping| 165 83 6 6)
             |INTTR;tanintegrate;FMMR;22|
             (|Record| (|:| |ratpart| 8) (|:| |coeff| 8))
             (|Union| 168 '"failed") |INTTR;primextintfrac;FMFU;26|
             (|Record| (|:| |answer| 8) (|:| |a0| 6))
             (|Union| 171 168 '"failed")
             |INTTR;primextendedint;FMMFU;23| (|Union| 6 '"failed")
             (503 . |retractIfCan|) (508 . *) (514 . -)
             |INTTR;expextendedint;FMMFU;24| (520 . *) (526 . *))
          '#(|tanintegrate| 532 |primlimitedint| 539 |primlimintfrac|
             547 |primintfldpoly| 554 |primintegrate| 561
             |primextintfrac| 568 |primextendedint| 575
             |monomialIntegrate| 583 |monomialIntPoly| 589
             |explimitedint| 595 |expintfldpoly| 603 |expintegrate| 609
             |expextendedint| 616)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 180
                                '(0 8 0 9 2 8 0 0 11 12 2 8 0 0 0 13 1
                                  7 0 6 14 2 17 15 16 7 18 1 8 0 7 19 2
                                  22 20 21 7 23 2 25 20 24 15 26 0 7 0
                                  27 0 6 0 28 2 7 29 0 0 30 1 7 6 0 31
                                  0 6 0 32 0 7 0 33 1 7 34 0 35 2 7 0 6
                                  34 36 2 7 0 0 0 37 2 7 0 0 0 38 1 7 0
                                  0 39 1 8 29 0 40 0 41 0 42 2 44 43 8
                                  11 45 1 8 7 0 46 1 7 29 0 47 1 41 0 8
                                  48 1 8 7 0 49 1 15 0 7 50 2 15 0 0 0
                                  51 2 15 0 0 0 52 2 54 53 15 15 55 1
                                  15 7 0 56 1 7 0 0 57 2 59 58 7 11 60
                                  1 63 62 0 64 0 65 0 66 2 54 15 15 7
                                  67 1 68 15 15 69 3 41 0 8 71 73 74 2
                                  41 8 0 75 76 2 8 0 0 0 77 1 8 78 0 79
                                  0 8 0 82 2 6 0 83 0 84 2 6 0 0 0 85 2
                                  7 0 0 0 86 0 89 0 90 2 89 29 0 0 91 1
                                  89 83 0 92 1 89 6 0 93 2 89 0 6 83 94
                                  2 89 0 0 0 95 1 29 0 0 96 2 6 0 0 0
                                  97 1 89 0 0 98 1 89 29 0 99 2 7 0 0 0
                                  100 2 7 6 0 34 101 1 102 6 0 103 2 8
                                  0 7 7 104 2 8 0 0 0 105 1 8 7 0 106 1
                                  7 6 0 107 1 6 29 0 108 2 7 34 0 0 109
                                  2 8 29 0 0 110 2 8 0 7 0 111 2 34 0 0
                                  0 112 3 114 34 113 0 34 115 2 116 0
                                  34 34 117 1 116 83 0 118 1 116 83 0
                                  119 1 116 83 0 120 4 116 6 0 83 83 6
                                  121 1 116 0 0 122 1 116 83 0 123 3
                                  116 6 0 83 83 124 2 6 29 0 0 125 2 7
                                  134 0 0 135 1 89 144 8 145 1 89 8 0
                                  146 2 8 0 83 0 148 2 41 0 8 8 149 2
                                  41 0 0 0 150 1 41 29 0 151 1 89 0 7
                                  154 2 89 155 0 0 156 2 20 0 8 34 158
                                  1 6 0 83 159 1 20 0 8 160 2 20 0 0 0
                                  161 2 7 0 0 162 163 2 6 0 0 0 164 1
                                  89 174 0 175 2 89 0 0 0 176 2 89 0 0
                                  0 177 2 6 0 34 0 179 2 6 0 0 0 180 3
                                  0 152 8 11 166 167 4 0 142 8 11 128
                                  139 143 3 0 138 8 11 139 140 3 0 78 7
                                  128 6 129 3 0 152 8 11 128 153 3 0
                                  169 8 11 8 170 4 0 172 8 11 128 8 173
                                  2 0 80 8 11 81 2 0 87 7 11 88 4 0 142
                                  8 11 132 139 147 2 0 130 89 132 133 3
                                  0 152 8 11 132 157 4 0 172 8 11 132 8
                                  178)))))
          '|lookupComplete|)) 
