Solving Equations

One way to solve simple equations is to use rules of algebra to move operations to the opposite side until the desired variable is reached.

Equations are represented in Lisp as list structures or trees. The equation y = m · x + b is represented as:


(= Y (+ (* M X) B)) 

This is equivalent to the tree:

(3,3) (0.2,0.2) (0,0)M (1.0,1.0) (0,0)* (1.8,0.2) (0,0)X (2.6,1.0) (0,0)B (1.8,1.8) (0,0)+ (1.0,2.6) (0,0)= (0.2,1.8) (0,0)Y (0.3,0.3) (1,1)0.6 (1.1,1.1) (1,1)0.6 (0.3,1.9) (1,1)0.6 (1.1,2.5) (1,-1)0.6 (1.9,1.7) (1,-1)0.6 (1.1,0.9) (1,-1)0.6

Contents    Page-10    Prev    Next    Page+10    Index