How to compare two expressions with maxima?

5k views Asked by At

I have two complicated mathematical expressions. How can I compare them, to find if they express the same using Maxima?

1

There are 1 answers

0
Robert Dodier On BEST ANSWER

is(equal(e1, e2)). Note that "=" is identity (i.e. same expression), while "equal" is equivalence. E.g. is(equal(x*(x + 1), x^2 + x)) => true while is(x*(x + 1) = x^2 + x) => false. Note also that is(equal(e1, e2)) actually computes ratsimp(e1 - e2) and looks to see if the result is 0. Maxima cannot reduce all equivalent expressions to 0 so there are cases in which it will incorrectly return false.