Grasple has multiple check methods using the Computer Algebra System (CAS) which can be used within the editor to indicate when the answer of a student should be marked correct/incorrect. A full list of current options can be found in this article.

This article covers the Exact Form check. There are three sections in this article:

When to use the Exact Form check?

Example cases

How does the Exact Form check work?

Pitfalls of the Exact Form check

# When to use the Exact Form check?

If you want to check whether two expressions are mathematically equal AND have the same exact form, you should use this check. A simple example would be: "*2x+3*" is considered to have the same exact form as "*3+2x*" but not as "*x+x+3*".

You can apply this method to:

exact numbers (e.g. 3 or pi)

formulas (e.g. 3x+4)

vectors and matrices

unordered collections/lists

If the form of the expression is not important, use the Algebraically Equivalent check.

# Example cases

This method has the same logic as the Algebraically Equivalent check and in addition checks whether the exact form is the same.

# How does the Exact Form check work?

For the Exact Form check the CAS verifies whether parsing the left-hand side and the right-hand side result in the exact same parse-tree. In this process the check takes into account the associative properties of *addition* and *multiplication*, so the ordering of the terms are not considered to be important for these operators.

# Pitfalls of the Exact Form check

When using the Exact Form check in combination with parameters the internal form of the expression can be different from what you might expect. For example, assume you have a parameter *a* which has a value of *-10, *and the expression in the answer field is *10 - a. *The Exact Form will then compare the answer of the student to the expression *10 - (-10)*, which is not in the same form as the expression *10 + 10*.

To prevent this situation from happening you can create an additional parameter of the *Formula* type to construct the answer expression. Alternatively, you can make sure there is an additional answer rule to handle this specific situation.

Do you want to know more about this check, whether you should use it for your exercise or any of the other checks? Please let us know via the chat icon in the right bottom of the screen!