Create mathPad Questions Using Algebraic Mode with Mathematica

You can create mathPad questions that use Algebraic mode and a Mathematica grading statement to compare the answer key and your students' responses for mathematical equivalence. Using Algebraic mode and Mathematica lets you accurately evaluate your students' responses in situations where Symbolic evaluation cannot be used — for example, to distinguish between factored and unfactored expressions, or for questions with multiple correct answers.

How-ToInstructor HelpWebAssign
  1. Click Questions Create.

    The Question Editor opens.

  2. In Mode, select Algebraic.

    • Use the answer placeholder string <_> to specify where the answer box should be displayed.
    • Be sure that your question identifies any variables that the student should use in their answer.
  3. In the Question Editor, click Mathematica under Page Tools to create and test your Mathematica grading statement and answer key.

    1. In the Mathematica window, type your grading statement, using Mathematica expressions for the answer key and student response that you want to test.

      • Your grading statement is a Mathematica statement providing information about how to compare your answer key and your students' responses.
      • Your answer key is a Mathematica expression specifying the correct answer to the question; sometimes the answer key is one of multiple possible correct answers.
    2. Click Execute.

      Your grading statement is evaluated using the expressions you specified for the answer key and student response, and the result is displayed. If your grading statement evaluates to True, then the response will be marked correct. Otherwise, the response will be marked incorrect.

    For example, if your question asks students to calculate an indefinite integral, your grading statement might compare the derivatives of your answer key and of your student's response:

    grading statement example

    The answer key specifies one of the correct responses: 3 · sin(x2) + 2x + C. The specified response is also a valid answer and the grading statement evaluates as True.

  4. In Answer, type the following items on a single line:

    <eqn $CASGRADER='mathematica'; $PAD='devmath'; ''> 
    variable_list:answer_key {tab} grading_statement

    where:

    • variable_list is a comma-delimited list of the variables used in the answer key.
    • answer_key is the Mathematica answer key you created in the previous step.
    • grading_statement is the Mathematica grading statement you created, with your answer key and student response expressions replaced by the keywords key and response. When the question is scored, the actual answer key and student response values will be used in place of these keywords.

    For example, the following answer key and grading statement allows students to submit the equation of an ellipse in standard form with the 1 on either side of the equation:

    <EQN $CASGRADER='mathematica'; $PAD='devmath';'' > 
    x,y:(x+4)^2/9+(y-5)^2/5 == 1 {tab} Apply[List,key] == 
    {(response)[[1]],(response)[[2]]}||Apply[List,key] == 
    {(response)[[2]],(response)[[1]]}

    The following responses would be accepted as correct:

    1 = fraction: ((x + 4)2 over 9) + fraction: ((y - 5)2 over 5)

    or

    fraction: ((x + 4)2 over 9) + fraction: ((y - 5)2 over 5) = 1

    Responses not in the standard form, such as the following, would be marked incorrect:

    1 - fraction: ((y - 5)2 over 5) = fraction: ((x + 4)2 over 9)
  5. Type a Solution.

    The solution helps your students understand the steps they need to take to determine the correct answer to the question. Your assignment settings specify when to show the solution.

Example mathPad Question Using Algebraic Mode with Mathematica The following table summarizes an actual question. QID 1344935 Name Template2 4.MATHP.02. Mode Algebraic Question Find the equation in standard form of the following ellipse: <div class="indent"> Center: (-4, 5)<br> Vertices: (-7, 5) and (-1, 5)<br> Foci: (-6, 5) and (-2, 5) </div> <_> Answer <EQN $CASGRADER='mathematica'; $PAD='devmath';'' > x,y:(x+4)^2/9+(y-5)^2/5 == 1 {tab} Apply[List,key] == {(response)[[1]],(response)[[2]]}||Apply[List,key] == {(response)[[2]],(response)[[1]]} Display to Students