Solve.js
function(eq) {
            var lhs = new Symbol(0),
                rhs = new Symbol(0);
            eq.each(function(x) {
                if(x.contains(solve_for, true))
                    lhs = _.add(lhs, x.clone());
                else
                    rhs = _.subtract(rhs, x.clone());
            });
            return [lhs, rhs];
        }
function(eq) {
            var lhs = new Symbol(0),
                rhs = new Symbol(0);
            eq.each(function(x) {
                if(x.contains(solve_for, true))
                    lhs = _.add(lhs, x.clone());
                else
                    rhs = _.subtract(rhs, x.clone());
            });
            return [lhs, rhs];
        }
function ( eq ) { var lhs = new Symbol ( 0 ) , rhs = new Symbol ( 0 ) ; eq . each ( function ( x ) { if ( x . contains ( solve_for , true ) ) lhs = _ . add ( lhs , x . clone ( ) ) ; else rhs = _ . subtract ( rhs , x . clone ( ) ) ; } ) ; return [ lhs , rhs ] ; }
separate the equation
separate the equation