I have two complicated mathematical expressions. How can I compare them, to find if they express the same using Maxima?
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With