
(/VERSIONCHECK 2) 

(DEFUN |NODE1;solve;2FBoSU;1| (|m| |n| |y| |x| $)
  (PROG (|v| |w| |k1| |nn| |mm| |mu| |u| |d| |lv| |lk| |yx|)
    (RETURN
     (SEQ
      (LETT |lk|
            (LIST
             (SPADCALL
              (LETT |yx|
                    (SPADCALL |y| (SPADCALL |x| (QREFELT $ 14)) (QREFELT $ 16))
                    . #1=(|NODE1;solve;2FBoSU;1|))
              (QREFELT $ 18)))
            . #1#)
      (LETT |lv| (LIST (SPADCALL (QREFELT $ 13) (QREFELT $ 19))) . #1#)
      (LETT |mm| (SPADCALL |m| |lk| |lv| (QREFELT $ 22)) . #1#)
      (LETT |nn| (SPADCALL |n| |lk| |lv| (QREFELT $ 22)) . #1#)
      (LETT |d|
            (SPADCALL
             (SPADCALL (SPADCALL |mm| (QREFELT $ 24))
                       (SPADCALL |nn| (QREFELT $ 24)) (QREFELT $ 26))
             (QREFELT $ 27))
            . #1#)
      (LETT |mm| (SPADCALL |d| |mm| (QREFELT $ 28)) . #1#)
      (LETT |nn| (SPADCALL |d| |nn| (QREFELT $ 28)) . #1#)
      (LETT |u| (|NODE1;integratingFactor| |mm| |nn| (QREFELT $ 10) |x| $)
            . #1#)
      (EXIT
       (COND
        ((QEQCAR |u| 0)
         (SEQ (LETT |mu| (QCDR |u|) . #1#)
              (LETT |mm| (SPADCALL |mm| |mu| (QREFELT $ 28)) . #1#)
              (LETT |nn| (SPADCALL |nn| |mu| (QREFELT $ 28)) . #1#)
              (EXIT
               (CONS 0
                     (SPADCALL
                      (SPADCALL (SPADCALL |mm| |x| (QREFELT $ 30))
                                (SPADCALL
                                 (SPADCALL |nn|
                                           (SPADCALL
                                            (SPADCALL |mm| (QREFELT $ 10)
                                                      (QREFELT $ 31))
                                            |x| (QREFELT $ 30))
                                           (QREFELT $ 32))
                                 (QREFELT $ 10) (QREFELT $ 30))
                                (QREFELT $ 33))
                      (LIST (QREFELT $ 13)) (LIST |yx|) (QREFELT $ 22))))))
        (#2='T
         (SEQ
          (LETT |w|
                (|NODE1;checkBernoulli| |m| |n|
                 (LETT |k1| (|SPADfirst| |lk|) . #1#) $)
                . #1#)
          (EXIT
           (COND
            ((QEQCAR |w| 0) (|NODE1;solveBernoulli| (QCDR |w|) |y| |x| |yx| $))
            (#2#
             (SEQ (LETT |v| (|NODE1;checkRiccati| |m| |n| |k1| $) . #1#)
                  (EXIT
                   (COND
                    ((QEQCAR |v| 0)
                     (|NODE1;solveRiccati| (QCDR |v|) |y| |x| |yx| $))
                    (#2# (CONS 1 "failed")))))))))))))))) 

(DEFUN |NODE1;integratingFactor| (|m| |n| |y| |x| $)
  (PROG (|f| |d|)
    (RETURN
     (COND
      ((SPADCALL
        (LETT |d|
              (SPADCALL (SPADCALL |m| |y| (QREFELT $ 31))
                        (SPADCALL |n| |x| (QREFELT $ 31)) (QREFELT $ 32))
              . #1=(|NODE1;integratingFactor|))
        (QREFELT $ 37))
       (CONS 0 (|spadConstant| $ 38)))
      ((NULL
        (SPADCALL |y|
                  (SPADCALL (LETT |f| (SPADCALL |d| |n| (QREFELT $ 39)) . #1#)
                            (QREFELT $ 41))
                  (QREFELT $ 42)))
       (CONS 0 (SPADCALL |f| |x| (QREFELT $ 43))))
      ((NULL
        (SPADCALL |x|
                  (SPADCALL
                   (LETT |f|
                         (SPADCALL (SPADCALL |d| |m| (QREFELT $ 39))
                                   (QREFELT $ 44))
                         . #1#)
                   (QREFELT $ 41))
                  (QREFELT $ 42)))
       (CONS 0 (SPADCALL |f| |y| (QREFELT $ 43))))
      ('T (CONS 1 "failed")))))) 

(DEFUN |NODE1;checkBernoulli| (|m| |n| |ky| $)
  (PROG (#1=#:G1860 |b| |a| |pp| |d| |p| |y| |r| |f|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |r|
              (SPADCALL
               (SPADCALL
                (LETT |f| (SPADCALL |m| |n| (QREFELT $ 39))
                      . #2=(|NODE1;checkBernoulli|))
                (QREFELT $ 24))
               (QREFELT $ 27))
              . #2#)
        (COND
         ((SPADCALL |r| (LETT |y| (SPADCALL |ky| (QREFELT $ 19)) . #2#)
                    (QREFELT $ 45))
          (SEQ
           (LETT |d|
                 (SPADCALL
                  (LETT |p|
                        (SPADCALL (SPADCALL |f| (QREFELT $ 46)) |ky|
                                  (QREFELT $ 48))
                        . #2#)
                  (QREFELT $ 51))
                 . #2#)
           (EXIT
            (COND
             ((OR
               (OR
                (OR
                 (OR (< |d| 2)
                     (NULL
                      (EQL
                       (SPADCALL
                        (LETT |pp| (SPADCALL |p| (QREFELT $ 52)) . #2#)
                        (QREFELT $ 51))
                       1)))
                 (NULL
                  (SPADCALL (SPADCALL |pp| (QREFELT $ 52))
                            (|spadConstant| $ 53) (QREFELT $ 54))))
                (NULL
                 (SPADCALL
                  (LETT |a|
                        (SPADCALL (SPADCALL |pp| (QREFELT $ 55))
                                  (QREFELT $ 27))
                        . #2#)
                  |y| (QREFELT $ 45))))
               (NULL
                (SPADCALL
                 (LETT |b|
                       (SPADCALL (SPADCALL |p| (QREFELT $ 55)) (QREFELT $ 27))
                       . #2#)
                 |y| (QREFELT $ 45))))
              (PROGN (LETT #1# (CONS 1 #3="failed") . #2#) (GO #1#)))))))
         ('T (EXIT (CONS 1 #3#))))
        (EXIT
         (CONS 0
               (VECTOR (SPADCALL |a| |r| (QREFELT $ 39))
                       (SPADCALL |b| |r| (QREFELT $ 39)) |d|)))))
      #1# (EXIT #1#))))) 

(DEFUN |NODE1;solveBernoulli| (|rec| |y| |x| |yx| $)
  (PROG (|sol| #1=#:G1873 |deq| |n1|)
    (RETURN
     (SEQ (LETT |n1| (- 1 (QVELT |rec| 2)) . #2=(|NODE1;solveBernoulli|))
          (LETT |deq|
                (SPADCALL
                 (SPADCALL (SPADCALL |yx| |x| (QREFELT $ 31))
                           (SPADCALL
                            (SPADCALL |n1| (QVELT |rec| 0) (QREFELT $ 58)) |yx|
                            (QREFELT $ 28))
                           (QREFELT $ 33))
                 (SPADCALL |n1| (QVELT |rec| 1) (QREFELT $ 58)) (QREFELT $ 33))
                . #2#)
          (LETT |sol|
                (PROG2
                    (LETT #1# (SPADCALL |deq| |y| |x| (QREFELT $ 62)) . #2#)
                    (QCDR #1#)
                  (|check-union| (QEQCAR #1# 0)
                                 (|Record| (|:| |particular| (QREFELT $ 7))
                                           (|:| |basis|
                                                (|List| (QREFELT $ 7))))
                                 #1#))
                . #2#)
          (EXIT
           (CONS 0
                 (SPADCALL
                  (SPADCALL (SPADCALL |yx| |n1| (QREFELT $ 63)) (QCAR |sol|)
                            (QREFELT $ 32))
                  (|SPADfirst| (QCDR |sol|)) (QREFELT $ 39)))))))) 

(DEFUN |NODE1;checkRiccati| (|m| |n| |ky| $)
  (PROG (|a2| |a1| |a0| |p| |y| |q| |f|)
    (RETURN
     (SEQ
      (LETT |q|
            (SPADCALL
             (SPADCALL
              (LETT |f| (SPADCALL |m| |n| (QREFELT $ 39))
                    . #1=(|NODE1;checkRiccati|))
              (QREFELT $ 24))
             (QREFELT $ 27))
            . #1#)
      (COND
       ((SPADCALL |q| (LETT |y| (SPADCALL |ky| (QREFELT $ 19)) . #1#)
                  (QREFELT $ 45))
        (COND
         ((OR
           (OR
            (OR
             (< 2
                (SPADCALL
                 (LETT |p|
                       (SPADCALL (SPADCALL |f| (QREFELT $ 46)) |ky|
                                 (QREFELT $ 48))
                       . #1#)
                 (QREFELT $ 51)))
             (NULL
              (SPADCALL
               (LETT |a0|
                     (SPADCALL (SPADCALL |p| 0 (QREFELT $ 66)) (QREFELT $ 27))
                     . #1#)
               |y| (QREFELT $ 45))))
            (NULL
             (SPADCALL
              (LETT |a1|
                    (SPADCALL (SPADCALL |p| 1 (QREFELT $ 66)) (QREFELT $ 27))
                    . #1#)
              |y| (QREFELT $ 45))))
           (NULL
            (SPADCALL
             (LETT |a2|
                   (SPADCALL (SPADCALL |p| 2 (QREFELT $ 66)) (QREFELT $ 27))
                   . #1#)
             |y| (QREFELT $ 45))))
          (EXIT (CONS 1 #2="failed")))))
       ('T (EXIT (CONS 1 #2#))))
      (EXIT
       (CONS 0
             (LIST (SPADCALL |a0| |q| (QREFELT $ 39))
                   (SPADCALL |a1| |q| (QREFELT $ 39))
                   (SPADCALL |a2| |q| (QREFELT $ 39))))))))) 

(DEFUN |NODE1;solveRiccati| (|l| |y| |x| |yx| $)
  (PROG (|gsol| #1=#:G1901 |deq| |u|)
    (RETURN
     (SEQ
      (LETT |u| (|NODE1;partSolRiccati| |l| |y| |x| |yx| $)
            . #2=(|NODE1;solveRiccati|))
      (EXIT
       (COND ((QEQCAR |u| 1) (CONS 1 "failed"))
             ('T
              (SEQ
               (LETT |deq|
                     (SPADCALL
                      (SPADCALL (SPADCALL |yx| |x| (QREFELT $ 31))
                                (SPADCALL
                                 (SPADCALL (SPADCALL |l| 2 (QREFELT $ 68))
                                           (SPADCALL
                                            (SPADCALL 2
                                                      (SPADCALL |l| 3
                                                                (QREFELT $ 68))
                                                      (QREFELT $ 70))
                                            (QCDR |u|) (QREFELT $ 28))
                                           (QREFELT $ 33))
                                 |yx| (QREFELT $ 28))
                                (QREFELT $ 32))
                      (SPADCALL |l| 3 (QREFELT $ 68)) (QREFELT $ 32))
                     . #2#)
               (LETT |gsol|
                     (PROG2
                         (LETT #1# (SPADCALL |deq| |y| |x| (QREFELT $ 62))
                               . #2#)
                         (QCDR #1#)
                       (|check-union| (QEQCAR #1# 0)
                                      (|Record|
                                       (|:| |particular| (QREFELT $ 7))
                                       (|:| |basis| (|List| (QREFELT $ 7))))
                                      #1#))
                     . #2#)
               (EXIT
                (CONS 0
                      (SPADCALL
                       (SPADCALL
                        (SPADCALL (SPADCALL |yx| (QCDR |u|) (QREFELT $ 32))
                                  (QREFELT $ 71))
                        (QCAR |gsol|) (QREFELT $ 32))
                       (|SPADfirst| (QCDR |gsol|)) (QREFELT $ 39)))))))))))) 

(DEFUN |NODE1;partSolRiccati| (|l| |y| |x| |yx| $)
  (PROG (#1=#:G1917 |bas| |gsol| |lineq| |q1| |q0| |l3|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |q0|
              (SPADCALL (SPADCALL |l| 1 (QREFELT $ 68))
                        (LETT |l3| (SPADCALL |l| 3 (QREFELT $ 68))
                              . #2=(|NODE1;partSolRiccati|))
                        (QREFELT $ 28))
              . #2#)
        (LETT |q1|
              (SPADCALL (SPADCALL |l| 2 (QREFELT $ 68))
                        (SPADCALL (SPADCALL |l3| |x| (QREFELT $ 31)) |l3|
                                  (QREFELT $ 39))
                        (QREFELT $ 32))
              . #2#)
        (LETT |lineq|
              (SPADCALL
               (SPADCALL (SPADCALL |yx| |x| 2 (QREFELT $ 72))
                         (SPADCALL |q1| (SPADCALL |yx| |x| (QREFELT $ 31))
                                   (QREFELT $ 28))
                         (QREFELT $ 33))
               (SPADCALL |q0| |yx| (QREFELT $ 28)) (QREFELT $ 33))
              . #2#)
        (SEQ (LETT |gsol| (SPADCALL |lineq| |y| |x| (QREFELT $ 62)) . #2#)
             (EXIT
              (COND
               ((QEQCAR |gsol| 0)
                (COND
                 ((NULL (LETT |bas| (QCDR (QCDR |gsol|)) . #2#))
                  (PROGN (LETT #1# (CONS 1 #3="failed") . #2#) (GO #1#)))))
               ('T (PROGN (LETT #1# (CONS 1 #3#) . #2#) (GO #1#))))))
        (EXIT
         (CONS 0
               (SPADCALL (SPADCALL (|SPADfirst| |bas|) |x| (QREFELT $ 31))
                         (SPADCALL |l3| (|SPADfirst| |bas|) (QREFELT $ 28))
                         (QREFELT $ 39))))))
      #1# (EXIT #1#))))) 

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

(DEFUN |NonLinearFirstOrderODESolver;| (|#1| |#2|)
  (PROG (|pv$| $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|NonLinearFirstOrderODESolver|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT |dv$| (LIST '|NonLinearFirstOrderODESolver| DV$1 DV$2) . #1#)
      (LETT $ (GETREFV 73) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|NonLinearFirstOrderODESolver|
                  (LIST DV$1 DV$2) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (SETF |pv$| (QREFELT $ 3))
      (QSETREFV $ 10 (SPADCALL (QREFELT $ 9)))
      (QSETREFV $ 13 (SPADCALL (QREFELT $ 10) (QREFELT $ 12)))
      $)))) 

(MAKEPROP '|NonLinearFirstOrderODESolver| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|Symbol|)
              (0 . |new|) '|unk| (|Kernel| 7) (4 . |kernel|) '|kunk|
              (9 . |coerce|) (|BasicOperator|) (14 . |elt|) (|Kernel| $)
              (20 . |retract|) (25 . |coerce|) (|List| 17) (|List| $)
              (30 . |eval|) (|SparseMultivariatePolynomial| 6 17)
              (37 . |denom|) (|SparseMultivariatePolynomial| 6 11) (42 . |lcm|)
              (48 . |coerce|) (53 . *) (|ODEIntegration| 6 7) (59 . |int|)
              (65 . |differentiate|) (71 . -) (77 . +) (|Union| 7 '"failed")
              |NODE1;solve;2FBoSU;1| (|Boolean|) (83 . |zero?|) (88 . |One|)
              (92 . /) (|List| 8) (98 . |variables|) (103 . |member?|)
              (109 . |expint|) (115 . -) (120 . |freeOf?|) (126 . |numer|)
              (|SparseUnivariatePolynomial| $) (131 . |univariate|)
              (|NonNegativeInteger|) (|SparseUnivariatePolynomial| 25)
              (137 . |degree|) (142 . |reductum|) (147 . |Zero|) (151 . =)
              (157 . |leadingCoefficient|) (162 . |One|) (|Integer|) (166 . *)
              (|Record| (|:| |particular| 7) (|:| |basis| 67))
              (|Union| 59 7 '"failed") (|ElementaryFunctionODESolver| 6 7)
              (172 . |solve|) (179 . ^) (185 . |Zero|) (189 . |Zero|)
              (193 . |coefficient|) (|List| 7) (199 . |elt|)
              (|PositiveInteger|) (205 . *) (211 . |inv|)
              (216 . |differentiate|))
           '#(|solve| 223) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 72
                                                 '(0 8 0 9 1 11 0 8 12 1 7 0 8
                                                   14 2 7 0 15 0 16 1 7 17 0 18
                                                   1 7 0 17 19 3 7 0 0 20 21 22
                                                   1 7 23 0 24 2 25 0 0 0 26 1
                                                   7 0 23 27 2 7 0 0 0 28 2 29
                                                   7 7 8 30 2 7 0 0 8 31 2 7 0
                                                   0 0 32 2 7 0 0 0 33 1 7 36 0
                                                   37 0 7 0 38 2 7 0 0 0 39 1 7
                                                   40 0 41 2 40 36 8 0 42 2 29
                                                   7 7 8 43 1 7 0 0 44 2 7 36 0
                                                   0 45 1 7 23 0 46 2 25 47 0
                                                   11 48 1 50 49 0 51 1 50 0 0
                                                   52 0 50 0 53 2 50 36 0 0 54
                                                   1 50 25 0 55 0 6 0 56 2 7 0
                                                   57 0 58 3 61 60 7 15 8 62 2
                                                   7 0 0 57 63 0 6 0 64 0 7 0
                                                   65 2 50 25 0 49 66 2 67 7 0
                                                   57 68 2 7 0 69 0 70 1 7 0 0
                                                   71 3 7 0 0 8 49 72 4 0 34 7
                                                   7 15 8 35)))))
           '|lookupComplete|)) 
