"ArithmeticResult" (Comparison Method)

Compare mathematical expressions in a way suitable for exercises about arithmetic, allowing rearrangement but not arithmetic computation.

Details

  • The arithmetic comparison method considers two mathematical expressions to be equivalent if they match without doing any arithmetic operations, e.g. 1 + 1 2.
  • Answers are considered correct when the only differences are ordering of terms inside orderless operations like addition and multiplication.
  • The values of the key and answer can both be specified as held expressions Hold[expr] to prevent evaluation. Even when the values are held, reordering transformations are performed to determine equivalence during assessment. It is recommended to always hold the answer.

Examples

open allclose all

Basic Examples  (1)

Create an AssessmentFunction for an arithmetic question:

Non-computed addition is considered inequivalent and incorrect:

Reordered terms are considered equivalent and correct:

Scope  (2)

Create a simple addition question without holding the answer key:

The original question is not accepted as an answer:

The computed result is correct:

Create a radical simplification question: