1

This question has some good responses, but has been moved to a more appropriate forum at this link.

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?

Zediiiii
  • 750
  • 1
  • 7
  • 21
  • You haven't said what format a student would use in inputting an expression. Are you assuming LaTeX? – Bill Bell May 17 '18 at 03:04
  • I can (tediously) ask a different question for the specific implementation cases for each of the programs I listed with MWEs for each question... But I was hoping to compile a resource that gives starting points for accomplishing the goal outlined above. I understand the need to avoid opinionated and spammy answers, but this question is pivotal for the developing personalization movement in mathematics education. Can you recommend another venue that is more appropriate for this question? – Zediiiii May 18 '18 at 04:18
  • Possibly https://matheducators.stackexchange.com/ or quora.com? – Bill Bell May 19 '18 at 16:45

2 Answers2

2

Providing that you could translate the student's input into Python it would be easy enough to verify the equality of expressions in most cases. For instance,

>>> from sympy import *
>>> var('p')
p
>>> f_1 = 2*p**2*(p+5)-8
>>> f_2 = 2*(p**2+4*p-4)*(p+1)
>>> f_1.expand()==f_2.expand()
True

If you have an input widget that enables a student to enter expressions of the kind displayed in your question, and that outputs LaTeX, say, then you might be able to use a parser such as https://github.com/alvinwan/tex2py to get the inputs you need for sympy.

Bill Bell
  • 21,021
  • 5
  • 43
  • 58
  • This is similar, though more rigorous than the response at https://stackoverflow.com/questions/37112738/. – Zediiiii May 18 '18 at 04:25
1

Take a look at STACK, which is an automated system for assessing students' math answers. STACK is based on Maxima. The main web site appears to be: http://www.stack.ed.ac.uk/

I found some other links that could be interesting to you:

I'm actually not sure how STACK makes use of Maxima to determine whether an answer is correct. If the form of the answer doesn't matter, then ratsimp(answer - expected) should be 0 if answer is equivalent to expected. But if the form of the answer must be verified as well, the comparison becomes more complicated. I can imagine some ways to do that, but I don't know what STACK actually does.

I see the issues forum for the Github project (https://github.com/maths/moodle-qtype_stack/issues) seems to have a fair amount of traffic, so perhaps if you run into problems you can ask for help there.

Robert Dodier
  • 16,905
  • 2
  • 31
  • 48
  • Stack uses this approach : `if simplify(student_answer-teacher_answer) = 0 then mark = 1, else mark = 0.` This was probably the best suggestion before this question got closed. – Zediiiii Aug 02 '18 at 22:39
  • [This demo of STACK](https://stack2.maths.ed.ac.uk/demo/index.php?) shows real promise. Thanks for the good tip. – Zediiiii Aug 05 '18 at 02:32