; (= (* 2 c) (/ (- (* 3 (* a b)) (* 5 (* (^ c 2) d))) (- (* 2 (* a c)) (* 6 (* (^ x 2) y)))))
(defun ocurre (X Expr)
(if (eq X Expr)
T
(if (listp Expr)
(or (ocurre X (second Expr))
(ocurre X (third Expr))
)
NIL
)
)
)
(defun resuelve (X Ecuacion)
(if (eq X (second Ecuacion))
Ecuacion
(let* ( (L-Izq (second Ecuacion))
(L-Der (third Ecuacion))
(Op (first L-Izq))
(A (second L-Izq))
(B (third L-Izq))
)
(cond ( (eq Op '+) ; A + B = L-Der ; (= (+ A B) L-Der)
(if (ocurre X A) ; A = L-Der - B ; (= A (- L-Der B))
(resuelve X (list '= A (list '- L-Der B)))
(resuelve X (list '= B (list '- L-Der A)))
)
)
( (eq Op '*)
(if (ocurre X A)
(resuelve X (list '= A (list '/ L-Der B)))
(resuelve X (list '= B (list '/ L-Der A)))
)
)
; ... resta, multiplicacion, etc.
)
)
)
)
               (
geocities.com/mx)