"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, any appropriate 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 results of the form expr+C[i] (consistent with first-order integration) the constant term can be omitted and the answer is still considered correct.
- For answer key values containing multiple constants C[i],C[j],…, any answer containing unique constants consistent with the answer key are considered equivalent to the answer key.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Create an AssessmentFunction for a calculus question:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-9o8p7j


https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-umczou

Scope (3)Survey of the scope of standard use cases
Create an assessment function for the solution to D[Tan[x],x]:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-2w37ey

The original question is not accepted as an answer:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-60l204

Equivalent mathematical expressions that are invariant in calculus operations are considered correct:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-80w6st


https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-6uzlr8

Include an integration constant in the answer:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-4f9p6e

Answers are considered correct if they use any C, unique symbol or omit the constant:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-n2qx5a


https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-yufjq0


https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-vxxf1o

More complicated expressions are considered incorrect:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-838rae

Compute the solution to a differential equation:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-2h5jk1

Create an assessment function using the solution:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-ptgif4

Any equivalent representation of constants is considered correct:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-rtdb1y

Applications (1)Sample problems that can be solved with this function
Create a QuestionGenerator that generates calculus questions including plots:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-ln3rtg


https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-j15qas

Properties & Relations (1)Properties of the function, and connections to other functions
Evaluation for operations not considered to be calculus occurs even when the answer is held:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-gjqjez


Global definitions of variables are ignored during assessment:

https://wolfram.com/xid/00v9kkokcwqh5i5ksdi0sgt8ge6za-d6e6im
