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.
 Before using this procedure, see Evaluation Modes for Math Questions.
 You must know how to write Mathematica expressions. For reference information, see Mathematica Reference (Version 7).

Click
Questions > Create.
The Question Editor opens.
 In Name, type a name for the question.
 In Mode, select Algebraic.

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.
 Use the answer placeholder string

In the Question Editor, click Mathematica under Page
Tools to create and test your Mathematica grading statement and answer key.

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.

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:The answer key specifies one of the correct responses: 3 · sin(x^{2}) + 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. 
In the Mathematica window, type your grading statement, using Mathematica expressions for the answer key and student response that you want to
test.

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 commadelimited 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
andresponse
. 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.
 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.
 Click Test/Preview to test the appearance and behavior of the question. See Test Questions.
 Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question.
 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.

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.