Good morning,
I have been looking around, and I am wondering if there is a way Doenet can determine the correct solution (multiple) for a given problem without me writing each of the possible answers. For example,
<answer>
<label>What is the derivative of <m>f</m> when <m>f(x)=\dfrac{1}{x}</m>?</label>
<award>-x^-2</award>
<award>-1/x^2</award>
<award credit="0.75">x^-2</award>
<award credit="0.75">1/x^2</award>
</answer>r paste code here
I gave two correct responses and two responses that would give them partial credit. I don’t want to have to do this for every single problem that I put in the problem set, unless I have to. I am also attaching my file. I have several examples where order may not matter for the solution.
The Power Rule
The default answer checker for Doenet already does that for you. It does a numerical comparison so that any mathematically equivalent answers are considered correct. (It picks something like 20 points in the complex plane, evaluates the student’s answer and the correct answer at those points, and considers the student’s answer correct if the values match at those 20 points.)
The only reason you are having trouble is that Doenet interprets x^-2 as x^- * 2 for some reason. If you change that to x^(-2), then you don’t need the second award.
If, on the other hand, you do want Doenet to distinguish between x^(-2) and 1/x^2, then you can given the <answer> or <award> the symbolicEquality attribute. See Require the exact form from this Writing mathematical questions guide.