Question: comparing expressions in expanded and factorized forms

Hi I teach in a high school. Basically I have found that if I ask a question like: Factorize fully (x4-y4), and use a MathContainer for both the question and the answer (to be filled by students), I can't find a way to see whether the students have fully factorized the expression. Suppose (x4-y4) is in MathContainer1 and MathContainer2 is to be filled in by students. Using the code:

if GetProperty('MathContainer1','expression')=GetProperty('MathContainer2','expression')

does not work well because, as long as the student key in another equivalent forms of the expression, the above comparison evaluates as true. For example, the student could key into MathContainer2 (x2-y2)(x2+y2) and the comparison evaluates as true. For that matter, the student could copy and paste (x4-y4) into MathContainer2 and it is still true! But I want the system to only accept the answer (x-y)(x+y)(x2+y2) or anything like that, such as (x+y)(x-y)(x2+y2).

Is this even possible?

I have found this to be a problem for other cases, such as simplifying: 2x/4 vs x/2, 3^3 vs 27. There is no way I can think of to differentiate these expressions in different forms.

Please Wait...