
(/VERSIONCHECK 2) 

(DEFUN |FSINT;K2KG| (|k| $)
  (SPADCALL
   (SPADCALL
    (SPADCALL (|SPADfirst| (SPADCALL |k| (QREFELT $ 19))) (QREFELT $ 22))
    (QREFELT $ 23))
   (QREFELT $ 25))) 

(DEFUN |FSINT;tan2temp| (|k| $)
  (SPADCALL (QREFELT $ 16) (SPADCALL |k| (QREFELT $ 19))
            (SPADCALL |k| (QREFELT $ 26)) (QREFELT $ 27))) 

(DEFUN |FSINT;trans?| (|f| $)
  (SPADCALL (CONS #'|FSINT;trans?!0| $) (SPADCALL |f| (QREFELT $ 32))
            (QREFELT $ 34))) 

(DEFUN |FSINT;trans?!0| (|x1| $)
  (COND
   ((OR (SPADCALL |x1| '|log| (QREFELT $ 29))
        (SPADCALL |x1| '|exp| (QREFELT $ 29)))
    (|spadConstant| $ 30))
   ('T (SPADCALL |x1| '|atan| (QREFELT $ 29))))) 

(DEFUN |FSINT;mkPrimh| (|f| |x| |h| |comp| $)
  (PROG (|g|)
    (RETURN
     (SEQ (LETT |f| (SPADCALL |f| (QREFELT $ 36)) . #1=(|FSINT;mkPrimh|))
          (COND (|comp| (LETT |f| (SPADCALL |f| (QREFELT $ 38)) . #1#)))
          (LETT |g| (SPADCALL |f| |x| (QREFELT $ 40)) . #1#)
          (COND
           (|h|
            (COND
             ((|FSINT;trans?| |g| $) (EXIT (SPADCALL |g| (QREFELT $ 41)))))))
          (EXIT |g|))))) 

(DEFUN |FSINT;rinteg| (|i| |f| |x| |h| |comp| $)
  (PROG (|l| #1=#:G690 #2=#:G689)
    (RETURN
     (SEQ
      (COND
       ((NULL (SPADCALL |i| (QREFELT $ 43)))
        (CONS 0 (SPADCALL |f| |x| (QREFELT $ 44))))
       ('T
        (COND
         ((NULL
           (CDR
            (LETT |l|
                  (PROGN
                   (LETT #2# NIL . #3=(|FSINT;rinteg|))
                   (SEQ (LETT |f| NIL . #3#)
                        (LETT #1# (SPADCALL |i| (QREFELT $ 46)) . #3#) G190
                        (COND
                         ((OR (ATOM #1#)
                              (PROGN (LETT |f| (CAR #1#) . #3#) NIL))
                          (GO G191)))
                        (SEQ
                         (EXIT
                          (LETT #2#
                                (CONS (|FSINT;mkPrimh| |f| |x| |h| |comp| $)
                                      #2#)
                                . #3#)))
                        (LETT #1# (CDR #1#) . #3#) (GO G190) G191
                        (EXIT (NREVERSE0 #2#))))
                  . #3#)))
          (CONS 0 (|SPADfirst| |l|)))
         ('T (CONS 1 |l|))))))))) 

(DEFUN |FSINT;halfangle| (|a| $)
  (SEQ (LETT |a| (SPADCALL 2 |a| (QREFELT $ 48)) |FSINT;halfangle|)
       (EXIT
        (SPADCALL
         (SPADCALL (|spadConstant| $ 50) (SPADCALL |a| (QREFELT $ 51))
                   (QREFELT $ 52))
         (SPADCALL (|spadConstant| $ 50) (SPADCALL |a| (QREFELT $ 51))
                   (QREFELT $ 53))
         (QREFELT $ 54))))) 

(DEFUN |FSINT;Khalf| (|k| $)
  (PROG (|a|)
    (RETURN
     (SEQ
      (LETT |a|
            (SPADCALL 2 (|SPADfirst| (SPADCALL |k| (QREFELT $ 19)))
                      (QREFELT $ 48))
            |FSINT;Khalf|)
      (EXIT
       (SPADCALL (SPADCALL |a| (QREFELT $ 55))
                 (SPADCALL (|spadConstant| $ 50) (SPADCALL |a| (QREFELT $ 51))
                           (QREFELT $ 53))
                 (QREFELT $ 54))))))) 

(DEFUN |FSINT;postSubst| (|f| |lv| |lk| |comp| |ltan| |x| $)
  (PROG (#1=#:G720 |k| #2=#:G719 #3=#:G718 #4=#:G717 |ltemp| #5=#:G716
         #6=#:G715 |kk| |u| #7=#:G713 |v| #8=#:G714)
    (RETURN
     (SEQ
      (SEQ (LETT |k| NIL . #9=(|FSINT;postSubst|)) (LETT #8# |lk| . #9#)
           (LETT |v| NIL . #9#) (LETT #7# |lv| . #9#) G190
           (COND
            ((OR (ATOM #7#) (PROGN (LETT |v| (CAR #7#) . #9#) NIL) (ATOM #8#)
                 (PROGN (LETT |k| (CAR #8#) . #9#) NIL))
             #10=(GO G191)))
           (SEQ (LETT |u| (SPADCALL |v| (QREFELT $ 57)) . #9#)
                (EXIT
                 (COND
                  ((QEQCAR |u| 0)
                   (SEQ
                    (COND
                     ((SPADCALL
                       (SPADCALL (LETT |kk| (QCDR |u|) . #9#) (QREFELT $ 58))
                       (QREFELT $ 11) (QREFELT $ 59))
                      (LETT |f|
                            (SPADCALL
                             (SPADCALL |f| |kk| (SPADCALL |kk| (QREFELT $ 61))
                                       (QREFELT $ 64))
                             (SPADCALL |kk| (QREFELT $ 65)) (QREFELT $ 66))
                            . #9#)))
                    (EXIT
                     (LETT |f|
                           (SPADCALL |f| (LIST (QCDR |u|))
                                     (LIST (SPADCALL |k| (QREFELT $ 65)))
                                     (QREFELT $ 69))
                           . #9#)))))))
           (LETT #7# (PROG1 (CDR #7#) (LETT #8# (CDR #8#) . #9#)) . #9#)
           #11=(GO G190) G191 (EXIT NIL))
      (COND
       ((NULL |comp|)
        (COND
         ((NULL (NULL |ltan|))
          (SEQ
           (LETT |ltemp|
                 (PROGN
                  (LETT #6# NIL . #9#)
                  (SEQ (LETT |k| NIL . #9#) (LETT #5# |ltan| . #9#) G190
                       (COND
                        ((OR (ATOM #5#) (PROGN (LETT |k| (CAR #5#) . #9#) NIL))
                         #10#))
                       (SEQ
                        (EXIT
                         (LETT #6# (CONS (|FSINT;tan2temp| |k| $) #6#) . #9#)))
                       (LETT #5# (CDR #5#) . #9#) #11# G191
                       (EXIT (NREVERSE0 #6#))))
                 . #9#)
           (LETT |f|
                 (SPADCALL |f| |ltan|
                           (PROGN
                            (LETT #4# NIL . #9#)
                            (SEQ (LETT |k| NIL . #9#) (LETT #3# |ltemp| . #9#)
                                 G190
                                 (COND
                                  ((OR (ATOM #3#)
                                       (PROGN (LETT |k| (CAR #3#) . #9#) NIL))
                                   #10#))
                                 (SEQ
                                  (EXIT
                                   (LETT #4#
                                         (CONS (SPADCALL |k| (QREFELT $ 65))
                                               #4#)
                                         . #9#)))
                                 (LETT #3# (CDR #3#) . #9#) #11# G191
                                 (EXIT (NREVERSE0 #4#))))
                           (QREFELT $ 69))
                 . #9#)
           (LETT |f|
                 (SPADCALL |f| '|%temptan| 2
                           (CONS (|function| |FSINT;halfangle|) $)
                           (QREFELT $ 71))
                 . #9#)
           (EXIT
            (LETT |f|
                  (SPADCALL |f| |ltemp|
                            (PROGN
                             (LETT #2# NIL . #9#)
                             (SEQ (LETT |k| NIL . #9#) (LETT #1# |ltemp| . #9#)
                                  G190
                                  (COND
                                   ((OR (ATOM #1#)
                                        (PROGN (LETT |k| (CAR #1#) . #9#) NIL))
                                    #10#))
                                  (SEQ
                                   (EXIT
                                    (LETT #2# (CONS (|FSINT;Khalf| |k| $) #2#)
                                          . #9#)))
                                  (LETT #1# (CDR #1#) . #9#) #11# G191
                                  (EXIT (NREVERSE0 #2#))))
                            (QREFELT $ 69))
                  . #9#)))))))
      (EXIT (SPADCALL |f| |x| (QREFELT $ 72))))))) 

(DEFUN |FSINT;goComplex?| (|rt| |l| |ltan| $)
  (COND ((NULL |ltan|) |rt|) ((NULL (CDR (CDR |l|))) 'NIL) ('T 'T))) 

(DEFUN |FSINT;integrate;FSU;10| (|f| |x| $)
  (PROG (#1=#:G751 |h| #2=#:G750 |u| |ltg| |i| |gg| #3=#:G749 |k| #4=#:G748
         |comp| |el| |rtg| |tg| #5=#:G747 #6=#:G746 |g| |rec| |ht| |ltf| |tf|
         #7=#:G745 #8=#:G744)
    (RETURN
     (SEQ
      (COND
       ((OR (|HasSignature| (QREFELT $ 6) (LIST '|imaginary| (LIST '$)))
            (|domainEqual| (QREFELT $ 6) (|AlgebraicNumber|)))
        (CONS 0 (SPADCALL |f| |x| (QREFELT $ 74))))
       ((NULL (SPADCALL |f| (QREFELT $ 75)))
        (CONS 0 (SPADCALL |f| |x| (QREFELT $ 74))))
       ('T
        (SEQ
         (LETT |f| (SPADCALL |f| (SPADCALL |x| (QREFELT $ 76)) (QREFELT $ 77))
               . #9=(|FSINT;integrate;FSU;10|))
         (LETT |tf|
               (PROGN
                (LETT #8# NIL . #9#)
                (SEQ (LETT |k| NIL . #9#)
                     (LETT #7# (SPADCALL |f| (QREFELT $ 78)) . #9#) G190
                     (COND
                      ((OR (ATOM #7#) (PROGN (LETT |k| (CAR #7#) . #9#) NIL))
                       #10=(GO G191)))
                     (SEQ
                      (EXIT
                       (COND
                        ((SPADCALL |x|
                                   (SPADCALL (SPADCALL |k| (QREFELT $ 65))
                                             (QREFELT $ 80))
                                   (QREFELT $ 81))
                         (LETT #8# (CONS |k| #8#) . #9#)))))
                     (LETT #7# (CDR #7#) . #9#) #11=(GO G190) G191
                     (EXIT (NREVERSE0 #8#))))
               . #9#)
         (LETT |ltf|
               (SPADCALL (CONS #'|FSINT;integrate;FSU;10!0| $) |tf|
                         (QREFELT $ 84))
               . #9#)
         (LETT |ht|
               (SPADCALL
                (CONS #'|FSINT;integrate;FSU;10!1| (VECTOR (QREFELT $ 9) $))
                |tf| (QREFELT $ 85))
               . #9#)
         (LETT |rec|
               (SPADCALL (SPADCALL |f| |x| (QREFELT $ 87)) |x| (QREFELT $ 89))
               . #9#)
         (LETT |g| (SPADCALL (QVELT |rec| 0) (QREFELT $ 91)) . #9#)
         (LETT |tg|
               (PROGN
                (LETT #6# NIL . #9#)
                (SEQ (LETT |k| NIL . #9#)
                     (LETT #5# (SPADCALL |g| (QREFELT $ 78)) . #9#) G190
                     (COND
                      ((OR (ATOM #5#) (PROGN (LETT |k| (CAR #5#) . #9#) NIL))
                       #10#))
                     (SEQ
                      (EXIT
                       (COND
                        ((SPADCALL |x|
                                   (SPADCALL (SPADCALL |k| (QREFELT $ 65))
                                             (QREFELT $ 80))
                                   (QREFELT $ 81))
                         (LETT #6# (CONS |k| #6#) . #9#)))))
                     (LETT #5# (CDR #5#) . #9#) #11# G191
                     (EXIT (NREVERSE0 #6#))))
               . #9#)
         (LETT |ltg|
               (SPADCALL (CONS #'|FSINT;integrate;FSU;10!2| $) |tg|
                         (QREFELT $ 84))
               . #9#)
         (LETT |rtg|
               (SPADCALL
                (CONS #'|FSINT;integrate;FSU;10!3| (VECTOR (QREFELT $ 8) $))
                |tg| (QREFELT $ 85))
               . #9#)
         (LETT |el|
               (SPADCALL
                (CONS #'|FSINT;integrate;FSU;10!4| (VECTOR (QREFELT $ 10) $))
                |tg| (QREFELT $ 85))
               . #9#)
         (SEQ (LETT |comp| (|FSINT;goComplex?| |rtg| |tg| |ltg| $) . #9#)
              (EXIT
               (COND
                (|comp|
                 (SEQ
                  (LETT |gg|
                        (SPADCALL (SPADCALL |g| (QREFELT $ 22))
                                  (PROGN
                                   (LETT #4# NIL . #9#)
                                   (SEQ (LETT |k| NIL . #9#)
                                        (LETT #3# |tf| . #9#) G190
                                        (COND
                                         ((OR (ATOM #3#)
                                              (PROGN
                                               (LETT |k| (CAR #3#) . #9#)
                                               NIL))
                                          #10#))
                                        (SEQ
                                         (EXIT
                                          (COND
                                           ((COND
                                             ((SPADCALL |k| '|tan|
                                                        (QREFELT $ 92))
                                              'T)
                                             (#12='T
                                              (SPADCALL |k| '|cot|
                                                        (QREFELT $ 92))))
                                            (LETT #4#
                                                  (CONS (|FSINT;K2KG| |k| $)
                                                        #4#)
                                                  . #9#)))))
                                        (LETT #3# (CDR #3#) . #9#) #11# G191
                                        (EXIT (NREVERSE0 #4#))))
                                  (LIST |x|) (QREFELT $ 94))
                        . #9#)
                  (EXIT
                   (LETT |i|
                         (SPADCALL (ELT $ 95)
                                   (SPADCALL |gg| |x| (QREFELT $ 98))
                                   (QREFELT $ 101))
                         . #9#))))
                (#12# (LETT |i| (SPADCALL |g| |x| (QREFELT $ 103)) . #9#)))))
         (LETT |ltg| (SPADCALL |ltg| |ltf| (QREFELT $ 104)) . #9#)
         (LETT |u|
               (|FSINT;rinteg| |i| |f| |x| (COND (|el| |ht|) (#12# 'NIL))
                |comp| $)
               . #9#)
         (EXIT
          (COND
           ((QEQCAR |u| 0)
            (CONS 0
                  (|FSINT;postSubst| (QCDR |u|) (QVELT |rec| 2) (QVELT |rec| 1)
                   |comp| |ltg| |x| $)))
           (#12#
            (CONS 1
                  (PROGN
                   (LETT #2# NIL . #9#)
                   (SEQ (LETT |h| NIL . #9#) (LETT #1# (QCDR |u|) . #9#) G190
                        (COND
                         ((OR (ATOM #1#)
                              (PROGN (LETT |h| (CAR #1#) . #9#) NIL))
                          #10#))
                        (SEQ
                         (EXIT
                          (LETT #2#
                                (CONS
                                 (|FSINT;postSubst| |h| (QVELT |rec| 2)
                                  (QVELT |rec| 1) |comp| |ltg| |x| $)
                                 #2#)
                                . #9#)))
                        (LETT #1# (CDR #1#) . #9#) #11# G191
                        (EXIT (NREVERSE0 #2#))))))))))))))) 

(DEFUN |FSINT;integrate;FSU;10!4| (|x1| $$)
  (PROG ($ ELEM)
    (LETT $ (QREFELT $$ 1) . #1=(|FSINT;integrate;FSU;10|))
    (LETT ELEM (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN (SPADCALL (SPADCALL |x1| (QREFELT $ 58)) ELEM (QREFELT $ 59)))))) 

(DEFUN |FSINT;integrate;FSU;10!3| (|x1| $$)
  (PROG ($ RTRIG)
    (LETT $ (QREFELT $$ 1) . #1=(|FSINT;integrate;FSU;10|))
    (LETT RTRIG (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN (SPADCALL (SPADCALL |x1| (QREFELT $ 58)) RTRIG (QREFELT $ 59)))))) 

(DEFUN |FSINT;integrate;FSU;10!2| (|x1| $)
  (SPADCALL (SPADCALL |x1| (QREFELT $ 58)) '|tan| (QREFELT $ 29))) 

(DEFUN |FSINT;integrate;FSU;10!1| (|x1| $$)
  (PROG ($ HTRIG)
    (LETT $ (QREFELT $$ 1) . #1=(|FSINT;integrate;FSU;10|))
    (LETT HTRIG (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN (SPADCALL (SPADCALL |x1| (QREFELT $ 58)) HTRIG (QREFELT $ 59)))))) 

(DEFUN |FSINT;integrate;FSU;10!0| (|x1| $)
  (SPADCALL (SPADCALL |x1| (QREFELT $ 58)) '|tan| (QREFELT $ 29))) 

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

(DEFUN |FunctionSpaceIntegration;| (|#1| |#2|)
  (PROG (|pv$| $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|FunctionSpaceIntegration|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT |dv$| (LIST '|FunctionSpaceIntegration| DV$1 DV$2) . #1#)
      (LETT $ (GETREFV 107) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|FunctionSpaceIntegration|
                  (LIST DV$1 DV$2) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (QSETREFV $ 8 '|rtrig|)
      (QSETREFV $ 9 '|htrig|)
      (QSETREFV $ 10 '|elem|)
      (QSETREFV $ 11 '|%alg|)
      (QSETREFV $ 16 (SPADCALL '|%temptan| 1 (QREFELT $ 15)))
      $)))) 

(MAKEPROP '|FunctionSpaceIntegration| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) 'RTRIG
              'HTRIG 'ELEM 'ALGOP (|Symbol|) (|NonNegativeInteger|)
              (|BasicOperator|) (0 . |operator|) '|optemp| (|List| 7)
              (|Kernel| 7) (6 . |argument|) (|Expression| (|Complex| 6))
              (|InnerTrigonometricManipulations| 6 7 20) (11 . F2FG)
              (16 . |tan|) (|Kernel| $) (21 . |retract|) (26 . |height|)
              (31 . |kernel|) (|Boolean|) (38 . |is?|) (44 . |true|)
              (|List| 14) (48 . |operators|) (|Mapping| 28 14) (53 . |any?|)
              (|TrigonometricManipulations| 6 7) (59 . |real|)
              (|TranscendentalManipulations| 6 7) (64 . |removeSinSq|)
              (|IntegrationTools| 6 7) (69 . |mkPrim|) (75 . |htrigs|)
              (|IntegrationResult| 7) (80 . |elem?|) (85 . |integral|)
              (|IntegrationResultToFunction| 6 7) (91 . |expand|)
              (|PositiveInteger|) (96 . *) (102 . |One|) (106 . |One|)
              (110 . |cos|) (115 . -) (121 . +) (127 . /) (133 . |sin|)
              (|Union| 24 '"failed") (138 . |retractIfCan|) (143 . |operator|)
              (148 . |has?|) (|SparseUnivariatePolynomial| $) (154 . |minPoly|)
              (|SparseUnivariatePolynomial| 7)
              (|PolynomialCategoryQuotientFunctions| (|IndexedExponents| 18) 18
                                                     6
                                                     (|SparseMultivariatePolynomial|
                                                      6 18)
                                                     7)
              (159 . |univariate|) (166 . |coerce|) (171 . |elt|) (|List| 24)
              (|List| $) (177 . |eval|) (|Mapping| $ $) (184 . |eval|)
              (192 . |removeConstantTerm|)
              (|FunctionSpaceComplexIntegration| 6 7)
              (198 . |complexIntegrate|) (204 . |real?|) (209 . |coerce|)
              (214 . |distribute|) (220 . |tower|) (|List| 12)
              (225 . |variables|) (230 . |member?|) (|Mapping| 28 18)
              (|List| 18) (236 . |select|) (242 . |any?|)
              (|ElementaryFunctionStructurePackage| 6 7)
              (248 . |realElementary|)
              (|Record| (|:| |func| 7) (|:| |kers| 83) (|:| |vals| 17))
              (254 . |rischNormalize|) (|AlgebraicManipulations| 6 7)
              (260 . |rootSimp|) (265 . |is?|) (|List| (|Kernel| 20))
              (271 . |trigs2explogs|) (278 . FG2F) (|IntegrationResult| 20)
              (|ElementaryIntegration| (|Complex| 6) 20) (283 . |lfintegrate|)
              (|Mapping| 7 20) (|IntegrationResultFunctions2| 20 7)
              (289 . |map|) (|ElementaryIntegration| 6 7) (295 . |lfintegrate|)
              (301 . |setDifference|) (|Union| 7 17) |FSINT;integrate;FSU;10|)
           '#(|integrate| 307) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 106
                                                 '(2 14 0 12 13 15 1 18 17 0 19
                                                   1 21 20 7 22 1 20 0 0 23 1
                                                   20 24 0 25 1 18 13 0 26 3 18
                                                   0 14 17 13 27 2 14 28 0 12
                                                   29 0 28 0 30 1 7 31 0 32 2
                                                   31 28 33 0 34 1 35 7 7 36 1
                                                   37 7 7 38 2 39 7 7 12 40 1
                                                   37 7 7 41 1 42 28 0 43 2 7 0
                                                   0 12 44 1 45 17 42 46 2 7 0
                                                   47 0 48 0 6 0 49 0 7 0 50 1
                                                   7 0 0 51 2 7 0 0 0 52 2 7 0
                                                   0 0 53 2 7 0 0 0 54 1 7 0 0
                                                   55 1 7 56 0 57 1 18 14 0 58
                                                   2 14 28 0 12 59 1 7 60 24 61
                                                   3 63 62 7 18 62 64 1 7 0 24
                                                   65 2 62 7 0 7 66 3 7 0 0 67
                                                   68 69 4 7 0 0 12 13 70 71 2
                                                   39 7 7 12 72 2 73 7 7 12 74
                                                   1 35 28 7 75 1 7 0 12 76 2 7
                                                   0 0 0 77 1 7 67 0 78 1 7 79
                                                   0 80 2 79 28 12 0 81 2 83 0
                                                   82 0 84 2 83 28 82 0 85 2 86
                                                   7 7 12 87 2 86 88 7 12 89 1
                                                   90 7 7 91 2 18 28 0 12 92 3
                                                   21 20 20 93 79 94 1 21 7 20
                                                   95 2 97 96 20 12 98 2 100 42
                                                   99 96 101 2 102 42 7 12 103
                                                   2 83 0 0 0 104 2 0 105 7 12
                                                   106)))))
           '|lookupComplete|)) 
