Create physPad Questions Using Algebraic Mode with Mathematica

You can create physPad 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.

  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='phys'; ''> 
    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.
  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 physPad Question Using Algebraic Mode with Mathematica

The following topic contains examples that you can reference: