"ExponentiationResult" (Comparison Method)
Details
- The exponentiation result comparison method considers two mathematical expressions to be equivalent if they do not differ by any exponentiation operations, e.g. x*xx^2
- Answers are considered correct even when containing differences that are not exponentiation operations, such as basic arithmetic or factoring of numeric coefficients.
- 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-exponentiation functions (i.e. excluding Power and Sqrt) are performed within the held values during assessment. It is recommended to always hold the answer.
- The following tables show comparisons of "ExponentiationResult" with other comparison methods for typical answer keys:
Examples
open all close allBasic Examples (3)
Create an AssessmentFunction for a power question:
af = AssessmentFunction[Hold[2Sqrt[7]], "ExponentiationResult"]af[Hold[Sqrt[28]]]af[Hold[Sqrt[7]2]]Create an assessment with for an algebraic expression containing radicals:
af = AssessmentFunction[Hold[2Sqrt[3] + 2x], "ExponentiationResult"]Only factored expressions which are not involving exponentiation when expanded are considered correct:
Terms like integers which do not include square roots or exponents can be factored within correct answers:
af[Hold[2(Sqrt[3] + x)]]Factoring terms with square roots creates an incorrect answer:
af[Hold[Sqrt[2](Sqrt[6] + Sqrt[2]x)]]Create an assessment for a question about exponents:
af = AssessmentFunction[Hold[2x ^ 3 + x], "ExponentiationResult"]Answers differing by factoring of numerics are considered correct:
af[Hold[2(x ^ 3 + x / 2)]]Answers with different representations of the exponents are considered incorrect:
af[Hold[2x(x ^ 2 + 1 / 2)]]Scope (2)
Create an assessment function for the solution to x^3*x^2*y^2:
af = AssessmentFunction[Hold[x ^ 5 * y ^ 2], "ExponentiationResult"]The original question is not accepted as an answer:
af[Hold[x ^ 3 * x ^ 2 * y ^ 2]]Equivalent mathematical expressions that are invariant in exponentiation are considered correct:
af[Hold[y ^ 2 * x ^ 5]]af[Hold[y ^ 2 * x ^ (3 + 2)]]Create a QuestionObject for a square root problem:
QuestionObject[
QuestionInterface["ShortAnswer", <|"Prompt" -> StringForm["Simplify the expression ``", HoldForm[Sqrt[20] + Sqrt[80]]], FieldHint -> "Find a common factor"|>],
AssessmentFunction[Hold[6 Sqrt[5]], "ExponentiationResult"]
]See Also
AssessmentFunction QuestionObject Power Sqrt
Question Interface Types: ShortAnswer MultipleShortAnswers TextCompletion
Comparison Methods: AlgebraicForm PolynomialResult AlgebraicValue