
(/VERSIONCHECK 2) 

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

(DEFUN |INTTR;UP2UP2| (|p| $) (SPADCALL (ELT $ 14) |p| (QREFELT $ 18))) 

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

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

(DEFUN |INTTR;UP22UPR| (|p| $) (SPADCALL (ELT $ 19) |p| (QREFELT $ 26))) 

(DEFUN |INTTR;kappa| (|p| |derivation| $)
  (PROG (|ans|)
    (RETURN
     (SEQ (LETT |ans| (|spadConstant| $ 27) . #1=(|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))
                      . #1#)
                (EXIT (LETT |p| (SPADCALL |p| (QREFELT $ 39)) . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT |ans|))))) 

(DEFUN |INTTR;monomialIntegrate;FMR;6| (|f| |derivation| $)
  (PROG (|u| |p| |dlog| |logs| #1=#:G750 |term| #2=#:G749 |rec| |respoly|
         |resultvec| |x| |iden| |inum| |r|)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL |f| (QREFELT $ 40))
        (VECTOR (|spadConstant| $ 42) (|spadConstant| $ 9)
                (|spadConstant| $ 27)))
       (#3='T
        (SEQ
         (LETT |r| (SPADCALL |f| |derivation| (QREFELT $ 45))
               . #4=(|INTTR;monomialIntegrate;FMR;6|))
         (EXIT
          (COND
           ((SPADCALL
             (LETT |inum| (SPADCALL (QVELT |r| 1) (QREFELT $ 46)) . #4#)
             (QREFELT $ 47))
            (VECTOR (SPADCALL (QVELT |r| 0) (QREFELT $ 48)) (QVELT |r| 2)
                    (QVELT |r| 3)))
           (#3#
            (SEQ (LETT |iden| (SPADCALL (QVELT |r| 1) (QREFELT $ 49)) . #4#)
                 (LETT |x| (SPADCALL (|spadConstant| $ 32) 1 (QREFELT $ 36))
                       . #4#)
                 (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))
                       . #4#)
                 (LETT |respoly|
                       (SPADCALL (SPADCALL (ELT |resultvec| 0) (QREFELT $ 56))
                                 (QREFELT $ 57))
                       . #4#)
                 (LETT |rec|
                       (SPADCALL |respoly|
                                 (CONS #'|INTTR;monomialIntegrate;FMR;6!0|
                                       (VECTOR $ |derivation|))
                                 (QREFELT $ 60))
                       . #4#)
                 (LETT |logs|
                       (PROGN
                        (LETT #2# NIL . #4#)
                        (SEQ (LETT |term| NIL . #4#)
                             (LETT #1# (SPADCALL (QCDR |rec|) (QREFELT $ 64))
                                   . #4#)
                             G190
                             (COND
                              ((OR (ATOM #1#)
                                   (PROGN (LETT |term| (CAR #1#) . #4#) NIL))
                               (GO G191)))
                             (SEQ
                              (EXIT
                               (LETT #2#
                                     (CONS
                                      (VECTOR (|spadConstant| $ 66)
                                              (|INTTR;UP2UPR| (QCAR |term|) $)
                                              (|INTTR;UP22UPR|
                                               (SPADCALL
                                                (SPADCALL
                                                 (ELT |resultvec|
                                                      (QCDR |term|))
                                                 (QCAR |term|) (QREFELT $ 67))
                                                (QREFELT $ 69))
                                               $))
                                      #2#)
                                     . #4#)))
                             (LETT #1# (CDR #1#) . #4#) (GO G190) G191
                             (EXIT (NREVERSE0 #2#))))
                       . #4#)
                 (LETT |dlog|
                       (COND
                        ((SPADCALL (SPADCALL |x| |derivation|)
                                   (|spadConstant| $ 33) (QREFELT $ 30))
                         (QVELT |r| 1))
                        (#3#
                         (SPADCALL
                          (SPADCALL (|spadConstant| $ 9) |logs| NIL
                                    (QREFELT $ 74))
                          (CONS #'|INTTR;monomialIntegrate;FMR;6!1|
                                (VECTOR $ |derivation|))
                          (QREFELT $ 76))))
                       . #4#)
                 (LETT |u|
                       (SPADCALL
                        (LETT |p|
                              (SPADCALL (QVELT |r| 1) |dlog| (QREFELT $ 77))
                              . #4#)
                        (QREFELT $ 79))
                       . #4#)
                 (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))))
                   (#3#
                    (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| (|x1| $$)
  (PROG (|derivation| $)
    (LETT |derivation| (QREFELT $$ 1) . #1=(|INTTR;monomialIntegrate;FMR;6|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |x1| |derivation| (QREFELT $ 12)))))) 

(DEFUN |INTTR;monomialIntegrate;FMR;6!0| (|x1| $$)
  (PROG (|derivation| $)
    (LETT |derivation| (QREFELT $$ 1) . #1=(|INTTR;monomialIntegrate;FMR;6|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (|INTTR;kappa| |x1| |derivation| $))))) 

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

(DEFUN |INTTR;expintegratepoly| (|p| FRDE $)
  (PROG (|notelm| |coef0| |missing| |answr| |ans1| |a| |n|)
    (RETURN
     (SEQ (LETT |coef0| (|spadConstant| $ 28) . #1=(|INTTR;expintegratepoly|))
          (LETT |notelm| (LETT |answr| (|spadConstant| $ 90) . #1#) . #1#)
          (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)) . #1#)
                                (LETT |a| (SPADCALL |p| (QREFELT $ 93)) . #1#)
                                FRDE)
                      . #1#)
                (LETT |answr|
                      (SPADCALL |answr|
                                (SPADCALL (QVELT |ans1| 0) |n| (QREFELT $ 94))
                                (QREFELT $ 95))
                      . #1#)
                (COND
                 ((SPADCALL (QVELT |ans1| 2) (QREFELT $ 96))
                  (SEQ
                   (LETT |missing|
                         (SPADCALL |a| (QVELT |ans1| 1) (QREFELT $ 97)) . #1#)
                   (EXIT
                    (COND ((ZEROP |n|) (LETT |coef0| |missing| . #1#))
                          ('T
                           (LETT |notelm|
                                 (SPADCALL |notelm|
                                           (SPADCALL |missing| |n|
                                                     (QREFELT $ 94))
                                           (QREFELT $ 95))
                                 . #1#)))))))
                (EXIT (LETT |p| (SPADCALL |p| (QREFELT $ 98)) . #1#)))
               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 (#1=#:G785 |u| |c0| |ans| |term| |l| #2=#:G786 |b| |a| |r| |n| |p|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (EXIT
         (SEQ
          (LETT |ans| (|spadConstant| $ 9) . #3=(|INTTR;tanintegratespecial|))
          (LETT |p|
                (SPADCALL (SPADCALL (|spadConstant| $ 32) 2 (QREFELT $ 36))
                          (|spadConstant| $ 33) (QREFELT $ 38))
                . #3#)
          (SEQ G190
               (COND
                ((NULL
                  (SEQ
                   (LETT |n|
                         (QUOTIENT2
                          (SPADCALL (SPADCALL |f| (QREFELT $ 49))
                                    (QREFELT $ 35))
                          2)
                         . #3#)
                   (EXIT (COND ((EQL |n| 0) 'NIL) ('T 'T)))))
                 (GO G191)))
               (SEQ
                (LETT |r|
                      (SPADCALL (SPADCALL |f| (QREFELT $ 46)) |p|
                                (QREFELT $ 100))
                      . #3#)
                (LETT |a| (SPADCALL |r| 1 (QREFELT $ 101)) . #3#)
                (LETT |b| (SPADCALL |r| 0 (QREFELT $ 101)) . #3#)
                (LETT |u| (SPADCALL |n| |a| |b| FRDE) . #3#)
                (EXIT
                 (COND
                  ((QEQCAR |u| 1)
                   (PROGN (LETT #2# (CONS 1 (CONS |ans| |f|)) . #3#) (GO #2#)))
                  ('T
                   (SEQ (LETT |l| (QCDR |u|) . #3#)
                        (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))
                              . #3#)
                        (LETT |ans| (SPADCALL |ans| |term| (QREFELT $ 105))
                              . #3#)
                        (EXIT
                         (LETT |f|
                               (SPADCALL |f| (SPADCALL |term| |derivation|)
                                         (QREFELT $ 77))
                               . #3#)))))))
               NIL (GO G190) G191 (EXIT NIL))
          (COND
           ((SPADCALL
             (LETT |c0|
                   (SPADCALL (SPADCALL |f| (QREFELT $ 106)) (QREFELT $ 107))
                   . #3#)
             (QREFELT $ 108))
            (EXIT (CONS 0 (CONS |ans| |c0|))))
           ('T
            (SEQ (LETT |u| (SPADCALL 0 |c0| (|spadConstant| $ 28) FRDE) . #3#)
                 (EXIT
                  (COND
                   ((QEQCAR |u| 1)
                    (PROGN
                     (LETT #1# (CONS 0 (CONS |ans| |c0|)) . #3#)
                     (GO #1#))))))))
          (EXIT
           (CONS 0
                 (CONS
                  (SPADCALL |ans|
                            (SPADCALL
                             (SPADCALL (|SPADfirst| (QCDR |u|)) (QREFELT $ 14))
                             (QREFELT $ 19))
                            (QREFELT $ 105))
                  (|spadConstant| $ 28))))))
        #1# (EXIT #1#)))
      #2# (EXIT #2#))))) 

(DEFUN |INTTR;expextintfrac| (|f| |derivation| |g| $)
  (PROG (|c| |r|)
    (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"))
       (#1='T
        (SEQ
         (LETT |r| (SPADCALL |f| |derivation| (QREFELT $ 45))
               . #2=(|INTTR;expextintfrac|))
         (EXIT
          (COND
           ((SPADCALL |g| (QREFELT $ 40))
            (COND
             ((NULL
               (SPADCALL (QVELT |r| 1) (|spadConstant| $ 9) (QREFELT $ 110)))
              (CONS 1 "failed"))
             (#1# (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)) . #2#)
               |derivation| (QREFELT $ 12))
              (|spadConstant| $ 9) (QREFELT $ 110)))
            (CONS 1 "failed"))
           (#1# (CONS 0 (CONS (QVELT |r| 0) |c|)))))))))))) 

(DEFUN |INTTR;limitedLogs| (|f| |logderiv| |lu| $)
  (PROG (#1=#:G829 |ans| |c0| |c| OK #2=#:G838 |pp| #3=#:G839 |j| #4=#:G837 |i|
         |m| #5=#:G835 #6=#:G836 #7=#:G834 |cols| |rows| #8=#:G833 |u|
         #9=#:G832 |l1| |v| #10=#:G831 #11=#:G830 |den| |num| |u0|)
    (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|)
                                          . #12=(|INTTR;limitedLogs|))
                                    |logderiv|)
                                   (QREFELT $ 13))
                         . #12#)
                   |logderiv|)
                  (|spadConstant| $ 9) (QREFELT $ 110)))
                (CONS 1 "failed"))
               ('T (CONS 0 (LIST (CONS |c0| |u0|))))))
             (#13='T
              (SEQ (LETT |num| (SPADCALL |f| (QREFELT $ 46)) . #12#)
                   (LETT |den| (SPADCALL |f| (QREFELT $ 49)) . #12#)
                   (LETT |l1|
                         (PROGN
                          (LETT #11# NIL . #12#)
                          (SEQ (LETT |u| NIL . #12#) (LETT #10# |lu| . #12#)
                               G190
                               (COND
                                ((OR (ATOM #10#)
                                     (PROGN (LETT |u| (CAR #10#) . #12#) NIL))
                                 #14=(GO G191)))
                               (SEQ
                                (EXIT
                                 (COND
                                  ((SPADCALL
                                    (SPADCALL
                                     (LETT |v|
                                           (SPADCALL |den|
                                                     (SPADCALL |u| |logderiv|)
                                                     (QREFELT $ 111))
                                           . #12#)
                                     (QREFELT $ 49))
                                    (|spadConstant| $ 33) (QREFELT $ 30))
                                   (LETT #11#
                                         (CONS
                                          (CONS |u|
                                                (SPADCALL |v| (QREFELT $ 46)))
                                          #11#)
                                         . #12#)))))
                               (LETT #10# (CDR #10#) . #12#) #15=(GO G190) G191
                               (EXIT (NREVERSE0 #11#))))
                         . #12#)
                   (LETT |rows|
                         (MAX (SPADCALL |den| (QREFELT $ 35))
                              (+ 1
                                 (SPADCALL (ELT $ 112)
                                           (PROGN
                                            (LETT #9# NIL . #12#)
                                            (SEQ (LETT |u| NIL . #12#)
                                                 (LETT #8# |l1| . #12#) G190
                                                 (COND
                                                  ((OR (ATOM #8#)
                                                       (PROGN
                                                        (LETT |u| (CAR #8#)
                                                              . #12#)
                                                        NIL))
                                                   #14#))
                                                 (SEQ
                                                  (EXIT
                                                   (LETT #9#
                                                         (CONS
                                                          (SPADCALL (QCDR |u|)
                                                                    (QREFELT $
                                                                             35))
                                                          #9#)
                                                         . #12#)))
                                                 (LETT #8# (CDR #8#) . #12#)
                                                 #15# G191
                                                 (EXIT (NREVERSE0 #9#))))
                                           0 (QREFELT $ 115))))
                         . #12#)
                   (LETT |m|
                         (SPADCALL |rows|
                                   (LETT |cols| (+ 1 (LENGTH |l1|)) . #12#)
                                   (QREFELT $ 117))
                         . #12#)
                   (SEQ (LETT |i| 0 . #12#) (LETT #7# (- |rows| 1) . #12#) G190
                        (COND ((QSGREATERP |i| #7#) #14#))
                        (SEQ
                         (SEQ (LETT |j| (SPADCALL |m| (QREFELT $ 118)) . #12#)
                              (LETT #6# (- (SPADCALL |m| (QREFELT $ 119)) 1)
                                    . #12#)
                              (LETT |pp| NIL . #12#) (LETT #5# |l1| . #12#)
                              G190
                              (COND
                               ((OR (ATOM #5#)
                                    (PROGN (LETT |pp| (CAR #5#) . #12#) NIL)
                                    (> |j| #6#))
                                #14#))
                              (SEQ
                               (EXIT
                                (SPADCALL |m|
                                          (+ |i|
                                             (SPADCALL |m| (QREFELT $ 120)))
                                          |j|
                                          (SPADCALL (QCDR |pp|) |i|
                                                    (QREFELT $ 101))
                                          (QREFELT $ 121))))
                              (LETT #5#
                                    (PROG1 (CDR #5#)
                                      (LETT |j| (+ |j| 1) . #12#))
                                    . #12#)
                              #15# 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|) . #12#) #15# G191 (EXIT NIL))
                   (LETT |m| (SPADCALL |m| (QREFELT $ 122)) . #12#)
                   (LETT |ans| NIL . #12#)
                   (SEQ (LETT |i| (SPADCALL |m| (QREFELT $ 120)) . #12#)
                        (LETT #4# (SPADCALL |m| (QREFELT $ 123)) . #12#) G190
                        (COND ((> |i| #4#) #14#))
                        (SEQ
                         (EXIT
                          (COND
                           ((COND
                             ((SPADCALL
                               (SPADCALL |m| |i| (SPADCALL |m| (QREFELT $ 119))
                                         (QREFELT $ 124))
                               (|spadConstant| $ 28) (QREFELT $ 125))
                              'NIL)
                             (#13# 'T))
                            (SEQ (LETT OK 'NIL . #12#)
                                 (SEQ
                                  (LETT |j| (SPADCALL |m| (QREFELT $ 118))
                                        . #12#)
                                  (LETT #3#
                                        (- (SPADCALL |m| (QREFELT $ 119)) 1)
                                        . #12#)
                                  (LETT |pp| NIL . #12#) (LETT #2# |l1| . #12#)
                                  G190
                                  (COND
                                   ((OR (ATOM #2#)
                                        (PROGN
                                         (LETT |pp| (CAR #2#) . #12#)
                                         NIL)
                                        (> |j| #3#)
                                        (NULL (COND (OK 'NIL) ('T 'T))))
                                    #14#))
                                  (SEQ
                                   (EXIT
                                    (COND
                                     ((NULL
                                       (SPADCALL
                                        (SPADCALL |m| |i| |j| (QREFELT $ 124))
                                        (|spadConstant| $ 28) (QREFELT $ 125)))
                                      (SEQ (LETT OK 'T . #12#)
                                           (LETT |c|
                                                 (SPADCALL
                                                  (SPADCALL |m| |i|
                                                            (SPADCALL |m|
                                                                      (QREFELT
                                                                       $ 119))
                                                            (QREFELT $ 124))
                                                  (SPADCALL |m| |i| |j|
                                                            (QREFELT $ 124))
                                                  (QREFELT $ 85))
                                                 . #12#)
                                           (COND
                                            ((NULL
                                              (SPADCALL
                                               (SPADCALL
                                                (LETT |c0|
                                                      (SPADCALL
                                                       (SPADCALL |c|
                                                                 (QREFELT $
                                                                          14))
                                                       (QREFELT $ 19))
                                                      . #12#)
                                                |logderiv|)
                                               (|spadConstant| $ 9)
                                               (QREFELT $ 110)))
                                             (EXIT
                                              (PROGN
                                               (LETT #1# (CONS 1 "failed")
                                                     . #12#)
                                               (GO #1#)))))
                                           (EXIT
                                            (LETT |ans|
                                                  (CONS (CONS |c0| (QCAR |pp|))
                                                        |ans|)
                                                  . #12#)))))))
                                  (LETT #2#
                                        (PROG1 (CDR #2#)
                                          (LETT |j| (+ |j| 1) . #12#))
                                        . #12#)
                                  #15# G191 (EXIT NIL))
                                 (EXIT
                                  (COND
                                   ((NULL OK)
                                    (PROGN
                                     (LETT #1# (CONS 1 "failed") . #12#)
                                     (GO #1#))))))))))
                        (LETT |i| (+ |i| 1) . #12#) #15# G191 (EXIT NIL))
                   (EXIT (CONS 0 |ans|))))))
      #1# (EXIT #1#))))) 

(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 (|u2| |u1| |qr|)
    (RETURN
     (SEQ
      (LETT |qr|
            (SPADCALL (SPADCALL |f| (QREFELT $ 46))
                      (SPADCALL |f| (QREFELT $ 49)) (QREFELT $ 135))
            . #1=(|INTTR;primlimitedint;FMMLU;14|))
      (LETT |u1|
            (SPADCALL
             (SPADCALL (QCDR |qr|) (SPADCALL |f| (QREFELT $ 49))
                       (QREFELT $ 104))
             |derivation| |lu| (QREFELT $ 140))
            . #1#)
      (EXIT
       (COND ((QEQCAR |u1| 1) (CONS 1 "failed"))
             (#2='T
              (SEQ
               (LETT |u2|
                     (|INTTR;primintegratepoly| (QCAR |qr|) |extendedint|
                      (SPADCALL
                       (SPADCALL
                        (SPADCALL (|spadConstant| $ 32) 1 (QREFELT $ 36))
                        |derivation|)
                       (QREFELT $ 107))
                      $)
                     . #1#)
               (EXIT
                (COND ((QEQCAR |u2| 1) (CONS 1 "failed"))
                      (#2#
                       (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 (|u2| |u1| |qr|)
    (RETURN
     (SEQ
      (LETT |qr| (SPADCALL |f| (QREFELT $ 145))
            . #1=(|INTTR;explimitedint;FMMLU;15|))
      (LETT |u1| (|INTTR;explimintfrac| (QCDR |qr|) |derivation| |lu| $) . #1#)
      (EXIT
       (COND ((QEQCAR |u1| 1) (CONS 1 "failed"))
             (#2='T
              (SEQ
               (LETT |u2| (|INTTR;expintegratepoly| (QCAR |qr|) FRDE $) . #1#)
               (EXIT
                (COND ((QEQCAR |u2| 1) (CONS 1 "failed"))
                      (#2#
                       (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 (|u| |r|)
    (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))
               . #1=(|INTTR;primlimintfrac;FMLU;16|))
         (EXIT
          (COND
           ((SPADCALL (QVELT |r| 1) (QREFELT $ 40))
            (CONS 0 (CONS (QVELT |r| 0) NIL)))
           (#2='T
            (SEQ
             (LETT |u|
                   (|INTTR;limitedLogs| (QVELT |r| 1)
                    (CONS #'|INTTR;primlimintfrac;FMLU;16!0|
                          (VECTOR $ |derivation|))
                    |lu| $)
                   . #1#)
             (EXIT
              (COND ((QEQCAR |u| 1) (CONS 1 "failed"))
                    (#2# (CONS 0 (CONS (QVELT |r| 0) (QCDR |u|))))))))))))))))) 

(DEFUN |INTTR;primlimintfrac;FMLU;16!0| (|x1| $$)
  (PROG (|derivation| $)
    (LETT |derivation| (QREFELT $$ 1) . #1=(|INTTR;primlimintfrac;FMLU;16|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (|INTTR;logprmderiv| |x1| |derivation| $))))) 

(DEFUN |INTTR;explimintfrac| (|f| |derivation| |lu| $)
  (PROG (#1=#:G956 #2=#:G955 #3=#:G957 #4=#:G963 |v| |u| |eta'| |r|)
    (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"))
         (#5='T
          (SEQ
           (LETT |r| (SPADCALL |f| |derivation| (QREFELT $ 45))
                 . #6=(|INTTR;explimintfrac|))
           (EXIT
            (COND
             ((SPADCALL (QVELT |r| 1) (QREFELT $ 40))
              (CONS 0 (CONS (QVELT |r| 0) NIL)))
             (#5#
              (SEQ
               (LETT |eta'|
                     (SPADCALL
                      (SPADCALL
                       (SPADCALL (|spadConstant| $ 32) 1 (QREFELT $ 36))
                       |derivation|)
                      1 (QREFELT $ 101))
                     . #6#)
               (LETT |u|
                     (|INTTR;limitedLogs| (QVELT |r| 1)
                      (CONS #'|INTTR;explimintfrac!0|
                            (VECTOR $ |eta'| |derivation|))
                      |lu| $)
                     . #6#)
               (EXIT
                (COND ((QEQCAR |u| 1) (CONS 1 "failed"))
                      (#5#
                       (CONS 0
                             (CONS
                              (SPADCALL (QVELT |r| 0)
                                        (SPADCALL
                                         (SPADCALL |eta'| (QREFELT $ 14))
                                         (PROGN
                                          (LETT #1# NIL . #6#)
                                          (SEQ (LETT |v| NIL . #6#)
                                               (LETT #4# (QCDR |u|) . #6#) G190
                                               (COND
                                                ((OR (ATOM #4#)
                                                     (PROGN
                                                      (LETT |v| (CAR #4#)
                                                            . #6#)
                                                      NIL))
                                                 (GO G191)))
                                               (SEQ
                                                (EXIT
                                                 (PROGN
                                                  (LETT #3#
                                                        (SPADCALL
                                                         (-
                                                          (SPADCALL
                                                           (SPADCALL (QCDR |v|)
                                                                     (QREFELT $
                                                                              46))
                                                           (QREFELT $ 35))
                                                          (SPADCALL
                                                           (SPADCALL (QCDR |v|)
                                                                     (QREFELT $
                                                                              49))
                                                           (QREFELT $ 35)))
                                                         (QCAR |v|)
                                                         (QREFELT $ 148))
                                                        . #6#)
                                                  (COND
                                                   (#1#
                                                    (LETT #2#
                                                          (SPADCALL #2# #3#
                                                                    (QREFELT $
                                                                             105))
                                                          . #6#))
                                                   ('T
                                                    (PROGN
                                                     (LETT #2# #3# . #6#)
                                                     (LETT #1# 'T . #6#)))))))
                                               (LETT #4# (CDR #4#) . #6#)
                                               (GO G190) G191 (EXIT NIL))
                                          (COND (#1# #2#)
                                                (#5# (|spadConstant| $ 9))))
                                         (QREFELT $ 111))
                                        (QREFELT $ 77))
                              (QCDR |u|))))))))))))))))))) 

(DEFUN |INTTR;explimintfrac!0| (|x1| $$)
  (PROG (|derivation| |eta'| $)
    (LETT |derivation| (QREFELT $$ 2) . #1=(|INTTR;explimintfrac|))
    (LETT |eta'| (QREFELT $$ 1) . #1#)
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (|INTTR;logexpderiv| |x1| |derivation| |eta'| $))))) 

(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 (|u2| |i1| |rec|)
    (RETURN
     (SEQ
      (LETT |rec| (SPADCALL |f| |derivation| (QREFELT $ 81))
            . #1=(|INTTR;primintegrate;FMMR;20|))
      (COND
       ((NULL (SPADCALL (LETT |i1| (QVELT |rec| 0) . #1#) (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))
             $)
            . #1#)
      (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 (|u2| |special| #1=#:G989 |i1| |rec|)
    (RETURN
     (SEQ
      (LETT |rec| (SPADCALL |f| |derivation| (QREFELT $ 81))
            . #2=(|INTTR;expintegrate;FMMR;21|))
      (COND
       ((NULL (SPADCALL (LETT |i1| (QVELT |rec| 0) . #2#) (QREFELT $ 151)))
        (EXIT (CONS (|INTTR;notelementary| |rec| $) (|spadConstant| $ 28)))))
      (LETT |special|
            (SPADCALL (SPADCALL (QVELT |rec| 2) (QREFELT $ 154))
                      (PROG2
                          (LETT #1#
                                (SPADCALL
                                 (SPADCALL
                                  (SPADCALL (QVELT |rec| 1) (QREFELT $ 46))
                                  (QREFELT $ 154))
                                 (SPADCALL
                                  (SPADCALL (QVELT |rec| 1) (QREFELT $ 49))
                                  (QREFELT $ 154))
                                 (QREFELT $ 156))
                                . #2#)
                          (QCDR #1#)
                        (|check-union| (QEQCAR #1# 0)
                                       (|LaurentPolynomial| (QREFELT $ 6)
                                                            (QREFELT $ 7))
                                       #1#))
                      (QREFELT $ 95))
            . #2#)
      (LETT |u2| (|INTTR;expintegratepoly| |special| FRDE $) . #2#)
      (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 (|u| |c0| |logs| |c| |t| |r| |i1| |rec|)
    (RETURN
     (SEQ
      (LETT |rec| (SPADCALL |f| |derivation| (QREFELT $ 81))
            . #1=(|INTTR;tanintegrate;FMMR;22|))
      (COND
       ((NULL (SPADCALL (LETT |i1| (QVELT |rec| 0) . #1#) (QREFELT $ 151)))
        (EXIT (CONS (|INTTR;notelementary| |rec| $) (|spadConstant| $ 28)))))
      (LETT |r| (SPADCALL (QVELT |rec| 2) |derivation| (QREFELT $ 88)) . #1#)
      (LETT |t| (SPADCALL (|spadConstant| $ 32) 1 (QREFELT $ 36)) . #1#)
      (LETT |c|
            (SPADCALL (SPADCALL (QCDR |r|) 1 (QREFELT $ 101))
                      (SPADCALL (SPADCALL |t| |derivation|) (QREFELT $ 31))
                      (QREFELT $ 85))
            . #1#)
      (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)
                  (#2='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))))))
            . #1#)
      (LETT |c0| (SPADCALL (QCDR |r|) 0 (QREFELT $ 101)) . #1#)
      (LETT |u|
            (|INTTR;tanintegratespecial| (QVELT |rec| 1)
             (CONS #'|INTTR;tanintegrate;FMMR;22!0| (VECTOR $ |derivation|))
             FRDE $)
            . #1#)
      (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|))
        (#2#
         (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| (|x1| $$)
  (PROG (|derivation| $)
    (LETT |derivation| (QREFELT $$ 1) . #1=(|INTTR;tanintegrate;FMMR;22|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |x1| |derivation| (QREFELT $ 12)))))) 

(DEFUN |INTTR;primextendedint;FMMFU;23| (|f| |derivation| |extendedint| |g| $)
  (PROG (|u2| |u3| |u1| |gqr| |fqr|)
    (RETURN
     (SEQ
      (LETT |fqr|
            (SPADCALL (SPADCALL |f| (QREFELT $ 46))
                      (SPADCALL |f| (QREFELT $ 49)) (QREFELT $ 135))
            . #1=(|INTTR;primextendedint;FMMFU;23|))
      (LETT |gqr|
            (SPADCALL (SPADCALL |g| (QREFELT $ 46))
                      (SPADCALL |g| (QREFELT $ 49)) (QREFELT $ 135))
            . #1#)
      (LETT |u1|
            (SPADCALL
             (SPADCALL (QCDR |fqr|) (SPADCALL |f| (QREFELT $ 49))
                       (QREFELT $ 104))
             |derivation|
             (SPADCALL (QCDR |gqr|) (SPADCALL |g| (QREFELT $ 49))
                       (QREFELT $ 104))
             (QREFELT $ 170))
            . #1#)
      (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"))
               (#2='T
                (SEQ
                 (LETT |u3|
                       (|INTTR;primintegratepoly| (QCAR |fqr|) |extendedint|
                        (SPADCALL
                         (SPADCALL
                          (SPADCALL (|spadConstant| $ 32) 1 (QREFELT $ 36))
                          |derivation|)
                         (QREFELT $ 107))
                        $)
                       . #1#)
                 (EXIT
                  (COND ((QEQCAR |u3| 1) (CONS 2 "failed"))
                        (#2#
                         (CONS 0
                               (CONS
                                (SPADCALL (QCAR (QCDR |u1|))
                                          (SPADCALL (QCAR (QCDR |u3|))
                                                    (QREFELT $ 19))
                                          (QREFELT $ 105))
                                (QCDR (QCDR |u3|)))))))))))
             (#2#
              (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))
                     . #1#)
               (EXIT
                (COND ((QEQCAR |u2| 1) (CONS 2 "failed"))
                      (#2#
                       (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 (|u2| |u3| |u1| |qg| |qf|)
    (RETURN
     (SEQ
      (LETT |qf| (SPADCALL |f| (QREFELT $ 145))
            . #1=(|INTTR;expextendedint;FMMFU;24|))
      (LETT |qg| (SPADCALL |g| (QREFELT $ 145)) . #1#)
      (LETT |u1| (|INTTR;expextintfrac| (QCDR |qf|) |derivation| (QCDR |qg|) $)
            . #1#)
      (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"))
               (#2='T
                (SEQ
                 (LETT |u3| (|INTTR;expintegratepoly| (QCAR |qf|) FRDE $)
                       . #1#)
                 (EXIT
                  (COND ((QEQCAR |u3| 1) (CONS 2 "failed"))
                        (#2#
                         (CONS 0
                               (CONS
                                (SPADCALL (QCAR (QCDR |u1|))
                                          (SPADCALL (QCAR (QCDR |u3|))
                                                    (QREFELT $ 146))
                                          (QREFELT $ 105))
                                (QCDR (QCDR |u3|)))))))))))
             (#2#
              (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))
                     . #1#)
               (EXIT
                (COND ((QEQCAR |u2| 1) (CONS 2 "failed"))
                      (#2#
                       (CONS 1
                             (CONS
                              (SPADCALL (SPADCALL (QCDR |u2|) (QREFELT $ 146))
                                        (QCAR (QCDR |u1|)) (QREFELT $ 105))
                              (QCDR (QCDR |u1|))))))))))))))) 

(DEFUN |INTTR;primintegratepoly| (|p| |extendedint| |t'| $)
  (PROG (|ans1| |rp| |ans| #1=#:G1098 #2=#:G1104 |d|)
    (RETURN
     (SEQ
      (EXIT
       (COND
        ((SPADCALL |p| (QREFELT $ 47))
         (CONS 0 (CONS (|spadConstant| $ 27) (|spadConstant| $ 28))))
        (#3='T
         (SEQ
          (LETT |ans| (|spadConstant| $ 27) . #4=(|INTTR;primintegratepoly|))
          (SEQ G190
               (COND
                ((NULL (< 0 (LETT |d| (SPADCALL |p| (QREFELT $ 35)) . #4#)))
                 (GO G191)))
               (SEQ
                (LETT |ans1|
                      (SPADCALL (SPADCALL |p| (QREFELT $ 31)) |extendedint|)
                      . #4#)
                (EXIT
                 (COND
                  ((QEQCAR |ans1| 1)
                   (PROGN (LETT #2# (CONS 1 (CONS |ans| |p|)) . #4#) (GO #2#)))
                  ('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) . #4#)
                                       (|check-subtype| (>= #1# 0)
                                                        '(|NonNegativeInteger|)
                                                        #1#))
                                     (QREFELT $ 36))
                                    (QREFELT $ 86))
                          . #4#)
                    (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))
                           . #4#)))))))
               NIL (GO G190) G191 (EXIT NIL))
          (LETT |ans1|
                (SPADCALL (LETT |rp| (SPADCALL |p| (QREFELT $ 107)) . #4#)
                          |extendedint|)
                . #4#)
          (EXIT
           (COND ((QEQCAR |ans1| 1) (CONS 0 (CONS |ans| |rp|)))
                 (#3#
                  (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))))))))))
      #2# (EXIT #2#))))) 

(DEFUN |INTTR;primextintfrac;FMFU;26| (|f| |derivation| |g| $)
  (PROG (|c| |r|)
    (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"))
       (#1='T
        (SEQ
         (LETT |r| (SPADCALL |f| |derivation| (QREFELT $ 45))
               . #2=(|INTTR;primextintfrac;FMFU;26|))
         (EXIT
          (COND
           ((SPADCALL |g| (QREFELT $ 40))
            (COND
             ((NULL
               (SPADCALL (QVELT |r| 1) (|spadConstant| $ 9) (QREFELT $ 110)))
              (CONS 1 "failed"))
             (#1# (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)) . #2#)
               |derivation| (QREFELT $ 12))
              (|spadConstant| $ 9) (QREFELT $ 110)))
            (CONS 1 "failed"))
           (#1# (CONS 0 (CONS (QVELT |r| 0) |c|)))))))))))) 

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

(DEFUN |TranscendentalIntegration;| (|#1| |#2|)
  (PROG (|pv$| $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|TranscendentalIntegration|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT |dv$| (LIST '|TranscendentalIntegration| DV$1 DV$2) . #1#)
      (LETT $ (GETREFV 181) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|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|)) 
