Maxima's commandline aviabilities



On 10/29/07, ??????? ??????? <shuler at 1adw.com> wrote:
> I have a such task - I need to wite PHP-script, which would compare
> two mathematics formulas.
> I have read a lot of about your product and decided to use Maxima's
> function ratsimp in such way as
>          ratsimp(formula1 / formula2)
> and if it returns '1', then our formulas are equivalent.

If formula2 is 0, this will cause an error, even if formula1 is also
0.  It might be better to use ratsimp(formula1-formula2), which is
what Maxima's is(equal( X, Y )) does.

Note, too, that there will be many cases of false negatives.  For
example, ratsimp ( sin(2*x) - 2*sin(x)*cos(x) ) # 0, ratsimp(
sqrt(x^2-1)/sqrt(x-1) - sqrt(x+1) ) # 0, etc.

In general, simplification is very difficult, though if you know the
particular cases you care about, there may be good methods (cf.
radcan, trigsimp, trigrat).

       -s