Computer Algebra: Algorithms for solving equations symbolically As a hobby, I have written a basic computer algebra system.  My CAS handles expressions as trees.  I have advanced it to the point where it can simplify expressions symbolically (i.e., sin(pi/2) returns 1), and all expressions can be reduced to a canonical form.  It can also do differentiation.
Using this paradigm, what kinds of algorithms are there for solving algebraic equations?  An equation in my model would be represented as an (=) tree with two subtrees that are the left and right expressions.  I know there is no "magic bullet" for solving all equations, but are there algorithms out there that are designed to symbolically solve an equation?  If there aren't, what would be the general approach?  What kind of classes can equations be split into (so that I might be able to implement an algorithm for each kind)?  I don't want to use naive methods and then paint myself into a metaphorical corner.
 A: That does not answer really the question, but I don't think that computer algebra is really about solving equations. For most kind of equations I can think about (polynomial equations, ordinary differential equations, etc), a closed-form solution using predefined primitives usually does not exist, and when it does it is less useful than the equation itself. For example, consider univariate polynomial equations. It is not always possible to solve these equations using nth-roots, and when it is, it is smarter to represent a solution of such an equation by the equation itself. With this representation you can perform addition and multiplication easily.
I my opinion, computer algebra is more about manipulating the equations themselves.
For example, you have two univariate polynomial equations, virtually defining two algebraic numbers, and you want to compute the equation satisfied by the sum of these two numbers. Most of time you want the equality to be decidable.
 You have to delimit carefully the class of objects you are working with because if the class is too wide the equality decision problem may quickly become unsolvable, see Richardson's theorem
Of course there is numerous situations in computer algebra where one want to solve an equation.
Of fundamental importance, there are linear equations, they are ubiquitous.
I think also of polynomial system. In the domain of ordinary differential equations, I think of rational resolution: given an ODE, you want to find all rational solutions; or power series resolution.
To answer more precisely your question, I think you should implement first the resolution of linear system of equations. You may use Gauss' elimination. When efficiency will become an issue, you may have a look at Bareiss' algorithm. After that there is a whole bunch of various and specialised algorithms to consider.
After that, all depends on what you are interested in. You could implement algebraic numbers, polynomial factorization. You might also be interested in numerical computation, fancy linear algebra, arbitrary precision computation, etc.
A: There is an excellent (but old) paper describing a general method for solving equation found at http://www.research.ed.ac.uk/portal/files/413486/Solving_Symbolic_Equations_%20with_PRESS.pdf.  There isn't any code but they do explain the method very clearly and thoroughly.
A: There are a number of books and articles on computer algebra (CA) and symbolic computation (SC) algorithms.
Note that although CA and SC sometimes are taken as meaning the same thing, CA usualy is more algebraic while SC is more symbolic (see a related presentation).
Here is Computer Algebra, Algorithms, Systems and Applications, 1999 (pdf)
A: You might start with linear and quadratic equations, and those that can be reduced to linear and quadratic equations.  Next step is factoring polynomials, and that's a big step...
A: You have to implement differentiation first and then implement with integration which involve factorization of polynomials in order to do  solver. There are quite many cases to consider.
dsolve need integration, factorization is mainly for integration, for example dy/dx = x
A: Let's see if I can provide an algorithm for this old question. The algorithm is:

*

*Parse the equation into a binary expression tree.

*Create a canonical representation by evaluating the expression tree.

*Apply canned solvers.

The first step is easy. Given an equation, say, $(x-8)^2 = 5x^2 - 8$ transform it into $(x-8)^2 - (5x^2 - 8) = 0$ and build an expression tree of the left hand side. The second step appear difficult because how can you evaluate an expression containing unknowns? The answer is that the result of the evaluation (in this case) is a polynomial! Thus, simply apply the rules of polynomial addition, subtraction, multiplication, and, optionally, division, to the expression tree. Here is pseudo-code for doing just that:
def eval(tree):
    if tree is Add:
        return poly_add(eval(tree.left), eval(tree.right))
    elif tree is Sub:
        return poly_sub(eval(tree.left), eval(tree.right))
    elif tree is Mul:
        return poly_mul(eval(tree.left), eval(tree.right))
    elif tree is Name:
        return poly_from_name(tree.name)
    elif tree is Integer:
        return poly_from_int(tree.value)
    elif tree is UnarySub:
        return poly_mul(poly_from_int(-1), eval(tree.child))

poly_add, poly_sub, etc is standard polynomial addition, subtraction etc.
Now you have a canonical representation of the above equation $-4x^2-16x+72$ which you can represent as a three-element vector $(-4, -16, 72)$ and solve using the quadratic formula. Of course, for higher degree polynomials and multivariate polynomials you need techniques more powerful than the quadratic formula, but the three-step approach I described is still the same.
