# Existing Tools for Math Expression Equivalence Logic

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

$$2p^2(p+5)-8,$$

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

$$2(p^2+4p-4)(p+1).$$

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?

• Look at WeBWorK which uses a pearl-based language. webwork.maa.org Aug 4, 2018 at 0:42
• This tool (wiris.com/en/mathtype) builds in Microsoft's MathType tool, including handwriting recognition, to online services such as Gsuites, Moodle, Schoology, Canvas, etc. Very basic use is free for schools, subscription otherwise. Sep 23, 2018 at 1:53
• EquatIO (by TextHelp, the next generation of the dead g(math) addon) is free for teachers (with premium plan costs) and has an intuitive typed, handwritten, voice dictated, screen shot reader, and Desmos-based graph inputs. The outputs are either URL to an image (likely mathjax based or similar for the LaTeX, the link is to their own API), plain text (ie, coding format) and LaTeX code formats. This might be my favorite I've found, especially considering the multiple in/out formats and integration with Google and Microsoft products. Sep 26, 2018 at 22:23
• While there is often a lot of disdain here for simplifying solutions, if you have some standard for the required format of an answer, it actually takes care of this problem. This is true whether you do it manually, require the student to do it manually, or have a CAS system perform the operations. Once the anwser is in prescribed simplified form, than you just see if the answer is exactly the same as the key. Sep 27, 2018 at 3:07
• @guest This is what stack.ed.ac.uk does - the program teaches students to write correctly formatted math (programming style, not in TeX) and shows them the TeX formatted results. Sep 27, 2018 at 18:50