For example when the correct answer is ln |x| and the student enters: ln x.

But what if the situation is the other way around?

What if the correct answer is ln x and the student enters: ln |x|? When I try to add negative values to test_at, I get the error: Can't evaluate formula on test point (-1)

Yet when I don't check at negative values, the student is given full credit for the ln |x|, even though it is NOT equivalent to the correct function. It just happens to be equivalent on the domain of the correct answer.

The same issue comes up with sqrt(x) and sqrt|x| for example.

Can anyone point me to the way to help the checker to discriminate correctly in these cases?

Thanks!

Paul