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.

Note: Do not require your students to use function notation in an answer. WebAssign® cannot grade answers that use function notation.

To create a mathPad question using Algebraic mode with Mathematica:

  1. Click Questions > Create.
    The Question Editor opens.
  2. In Name, type a name for the question.
  3. In Mode, select Algebraic.
  4. In Question, type your question.
    • 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.
  5. 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. 

    Note: Most, but not all, Mathematica expressions are valid in WebAssign. Any expression that works in the WebAssign Mathematica tool will work in your question.
  6. 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.
    Note:
    • To add the {tab} operator, either type the characters {tab} or click Add tab.You cannot enter {tab} by pressing the Tab key.
    • If an answer extends beyond the right side of the Answer box, it is wrapped to the next line, but it is still considered a single line so long as you do not press ENTER.
    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 = x + 4 2 9 + y - 5 2 5

    or

    x + 4 2 9 + y - 5 2 5 = 1

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

    1 - y - 5 2 5 = x + 4 2 9
  7. Optional: 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.

  8. Click Test/Preview to test the appearance and behavior of the question. See Test Questions.
  9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question.
  10. Optional: Click Show Additional Information and change the question's sharing permission or add descriptive information.
    • By default, other instructors can use your question only if you provide them with the question ID, and only you can edit the question or find it in search results. To change the permission, see Share Questions With Other Instructors.
    • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Add Search Metadata to Questions.
  11. When your question displays and functions correctly, click Save.

    WebAssign assigns it a unique question ID (QID), which is displayed in parentheses after the question name.

    You can use your question in an assignment and see it in your My Questions list only after it is saved.

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

Question as displayed to students