How to solve/transform/simplify an equation by a simple algorithm? MathePower provides an form. There you can input a formula (1st input field) and a variable to release (2nd input field) and it will output a simplified version of that formula.
I want to write a script which needs to do something similar.
So my question is:


*

*Do you know about any simple algorithm which can do something like the script on MathePower? (I just want to simplify formulas based on the four basic arithmetical operations.)

*Are there any example implementations in a programming language?


Thanks for your answer. (And please execuse my bad English.)

This is generally known as "computer algebra," and there are entire books and courses on the subject.  There's no single magic bullet.  Generally it relies on things like specifying canonical forms for certain types of expressions and massaging them.  Playing with the form, it seems to know how to simplify a rational expression, but not for instance that $\sin^2 x + \cos^2 x = 1$.
