"CalculusResult" (Comparison Method)
Details
- The calculus comparison method considers two mathematical expressions to be equivalent if they do not differ by any calculus operations, e.g. D[x^2,x]2x.
- Answers are considered correct even when containing differences that are not calculus operations, such as basic arithmetic or representations of trigonometric functions.
- The values of the key and answer can both be specified as held expressions Hold[expr] to maintain the values exactly as they were given. Even when the values are held, evaluation of non-calculus functions (i.e. excluding D and Integrate) are performed within the held values during assessment. It is recommended to always hold the answer.
- When values in the answer key contain integration constants represented using C, by default any appropriate symbolic representation of an integration constant in the answer is considered equivalent. For example, AssessmentFunction[x+C[1],"CalculusResult] will mark x+a as correct.
- For answer key values containing multiple constants C[i],C[j],…, any answer containing unique symbolic constants consistent with the answer key is considered equivalent to the answer key.
- For results of the form expr+C[i] (consistent with first-order integration), by default the constant term can be omitted and the answer is still considered correct. Use "IgnoreConstantTerm"False as shown below to require the constant term in the given answer:
- AssessmentFunction[key,<|"ComparisonMethod""CalculusResult","IgnoreConstantTerm"->False|>]
- The following tables show comparisons of "CalculusResult" with other comparison methods for typical answer keys and several possible submitted answers:


Examples
open all close allBasic Examples (1)
Create an AssessmentFunction for a calculus question:
Scope (4)
Create an assessment function for the solution to D[Tan[x],x]:
The original question is not accepted as an answer:
Equivalent mathematical expressions that are invariant in calculus operations are considered correct:
Include an integration constant in the answer:
Answers are considered correct if they use any C[i], unique symbol, or if they omit the constant:
More complicated expressions are considered incorrect:
Set "IgnoreConstantTerm" False to require a constant term in the answer:
Omitting the constant is considered incorrect:
Equivalent symbolic constants are accepted:
Compute the solution to a differential equation:
Create an assessment function using the solution:
Any equivalent representation of constants is considered correct:
Applications (1)
Create a QuestionGenerator that generates calculus questions including plots:
Properties & Relations (1)
See Also
AssessmentFunction QuestionObject
Question Interface Types: ShortAnswer MultipleShortAnswers TextCompletion
Comparison Methods: ArithmeticResult PolynomialResult AlgebraicValue