If, for example, you had the teacher's answer and student's response like the following

$TA="ln(x^a)"; $RESPONSE="a*ln(x)";

Then you could use this grading code

assume(a>0); assume(x>0); evalb(simplify($TA-$RESPONSE=0));

Alternatively you can use *simplify(.., symbolic) *which symbolically rearranges the expression, ignoring possible branch cuts.

evalb(simplify($TA-$RESPONSE=0,symbolic));]]>

If, for example, you had the teacher's answer and student's response like the following

$TA="ln(x^a)"; $RESPONSE="a*ln(x)";

Then you could use this grading code

assume(a>0); assume(x>0); evalb(simplify($TA-$RESPONSE=0));

Alternatively you can use *simplify(.., symbolic) *which symbolically rearranges the expression, ignoring possible branch cuts.

evalb(simplify($TA-$RESPONSE=0,symbolic));]]>