Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compare two expressions with maxima?

Tags:

compare

maxima

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

like image 797
erik Avatar asked Jun 12 '15 18:06

erik


1 Answers

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.

like image 186
Robert Dodier Avatar answered Nov 15 '22 10:11

Robert Dodier