anchor.diff:          (A  (solution-r1 s))
           (B  (solution-r2 s)))
       (lambda (x)
  -      (* (exp (* A x))
  -         (+ (* c1 (cos (* B x)))
  -            (* c2 (sin (* B x))))))))
  +      (let ((Ax (* A x))
  +            (Bx (* B x)))
  +        (* (exp Ax)
  +           (+ (* A
  +                 (+ (* c1 (cos Bx))
  +                    (* c2 (sin Bx))))
  +              (* B
  +                 (- (* c2 (cos Bx))
  +                    (* c1 (sin Bx))))))))))
  +
  +(defmethod solution-y-prime-prime ((s complex-solution))
  +  "y(x) = \\exp(\\alpha x) \\left(
  +              \\alpha \\left( c_1 \\cos(\\beta x) + c_2 \\sin(\\beta x) \\right)
  +            + \\beta  \\left( c_2 \\cos(\\beta x) - c_1 \\sin(\\beta x) \\right)
  +          \\right)"
  +  (let ((c1 (solution-c1 s))
  +        (c2 (solution-c2 s))
  +        (A  (solution-r1 s))
  +        (B  (solution-r2 s)))
  +    (lambda (x)
  +      (let ((Ax (* A x))
  +            (Bx (* B x)))
  +        (* (exp Ax)
  +           (- (* A A
  +                 (+ (* c1 (cos Bx))
  +                    (* c2 (sin Bx))))
  +              (* 2 A B
  +                 (- (* c1 (sin Bx))
  +                    (* c2 (cos Bx))))
  +              (* B B
  +                 (+ (* c1 (cos Bx))
  +                    (* c2 (sin Bx))))))))))
  
positive.code: (defconstant *num-points* 100)
  
  (defclass equation ()
    ((a        :reader equation-a    :initarg :a)
     (b        :reader equation-b    :initarg :b)
     (c        :reader equation-c    :initarg :c)
     (init-val :reader equation-init :initarg :init-val)
     (min      :reader equation-min  :initarg :min)
     (max      :reader equation-max  :initarg :max)))
  
  (defclass solution ()
    ((c1 :reader solution-c1 :initarg :c1)
  
negative.code:    (r1 :reader solution-r1 :initarg :r1)
     (r2 :reader solution-r2 :initarg :r2)))
  
  (defclass real-distinct-solution (solution) ())
  
  (defmethod display ((s real-distinct-solution)
                      &optional (dest t))
    (format dest
            "y(x) = ~D⋅exp(~D⋅x) + ~D⋅exp(~D⋅x)~%"
            (solution-c1 s) (solution-r1 s)
            (solution-c2 s) (solution-r2 s)))
  
  (defclass real-repeated-solution (solution) ())
  
  (defmethod solution-r ((s real-repeated-solution))
    (let ((s1 (solution-r1 s))
          (s2 (solution-r2 s)))
      (when (= s1 s2)
        s1)))
  
  (defmethod display ((s real-repeated-solution)
                      &optional (dest t))
    (format dest
            "y(x) = ~D⋅exp(~D⋅x) + ~D⋅x⋅exp(~D⋅x)~%"
            (solution-c1 s) (solution-r s)
            (solution-c2 s) (solution-r s)))
  
  (defclass       complex-solution (solution) ())
  
  (defmethod solution-A ((s complex-solution))
    (solution-r1 s))
  
  (defmethod solution-B ((s complex-solution))
    (solution-r2 s))
  
  (defmethod display ((s complex-solution)
                      &optional (dest t))
    (format dest
            "y(x) = exp(~D⋅x) (~D⋅cos(~D⋅x) + ~D⋅sin(~D⋅x))~%"
            (solution-A  s)
            (solution-c1 s) (solution-B s)
            (solution-c2 s) (solution-B s)))
  
  (defmethod solution-y ((s real-distinct-solution))
    "y(x) = c_1 \\exp(r_1 x) + c_2 \\exp(r_2 x)"
  