Note - this question was posted here and garnered some decent replies before it was closed as off-topic in Stack Overflow.

Online systems, such as ALEKS, Cengage's WebAssign, and even Khan Academy employ some kind of logical matching for polynomial expressions and numerical values (ie, fractions). What unpaid tools (libraries, command line programs, scripts, etc) exist that can provide expression/numerical matching? For example, a student enters the expression

enter image description here

but the following expression is equivalent and would also be acceptable:

enter image description here

The question about how to do this mathematically has an excellent answer in this post, and a question addressing one particular way to implement this has a partial answer in this post. Sympy looks promising, but the command line Maxima could work, and so could the WolframAlpha API, Maple, MatLab, and any number of symbolic computer algebra systems.

It's fine to talk about things that "could work", but what tools are already being used? How has this already been implemented? Can anyone speak from experience about what online math learning programs are using on the backend? Give examples or direct to existing projects.

To clarify the question, I'm talking about logically comparing simple expressions(middle/high school math), minimally complicated, with canonical forms typically easy to obtain. The implementation will be online (html+nifty_tool) and input will most likely be captured as a string unless someone can suggest a better input method for math learners - a LaTeX front-end perhaps?

Almost 20 years ago, I faced a similar issue in the course of designing some on-line calculus exercises... For me, it turned out to be simplest to use a Monte-Carlo idea, namely, to evaluate both expressions at a "random" set of locations, and test for agreement within some not-too-tight bound. Yes, some necessity of tolerating invalid inputs and such, but such "errors" can be "caught" and dealt with.

Getting the details reasonably correct was much easier than implementing a genuine symbol-manipulation version... which would inevitably have some open-ended issues.

(In particular, this was implemented in Java, and "expressions" were converted to tree structures, and so on. Pretty typical.)

  • This is a useful comment. Since the details of implementing symbolic systems tend to be... diverse, I'm also looking for existing tools that have been developed to overcome these issues. Did you see the response about STACK in the original post? – Zediiiii Aug 4 at 0:39

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.