"CalculusResult" (Comparison Method)

Compare mathematical expressions in a way suitable for exercises about calculus, allowing computation that does not include operations of calculus.

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.

范例

打开所有单元关闭所有单元

基本范例  (1)

Create an AssessmentFunction for a calculus question:

Use it to assess an answer:

Scope  (3)

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, unique symbol or omit the constant:

More complicated expressions are considered incorrect:

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:

Generate a random question:

Properties & Relations  (1)

Evaluation for operations not considered to be calculus occurs even when the answer is held:

Global definitions of variables are ignored during assessment: