isFactorised

Overview

The isFactorised method checks that a mathematical expression is in factorised form. It can handle polynomials up to degree 2, with a single variable.

When using isFactorised, Field must be specified. Authors can select between the following depending on the type of expression they are dealing with:

  • integer
  • real numbers
  • complex numbers

isFactorised doesn’t take any value property, and is generally used as a supporting method in conjunction with equivSymbolic.

  • Allow thousands separator

    Authors can specify what separators can be used by the student. From the Thousand Separator drop down menu you can select dot, comma, and/or space. The Decimal Separator menu contains the option for either a dot or a comma. Note that the specified thousand separator and decimal separator cannot be the same, e.g. both dot.


  • Inverse result

    Enabling this means that the value specified in the Value field will not be accepted as the correct answer. It is a useful way of excluding very specific answers from validation.



Example

isFactorised does not take any value, which means when used alone it will validate any mathematical expression presented in its factored form.

AnswerMarking
\(x\)true
\(3\)true
\((x-1)(x-2)\)true
\(x^2-3\)true
\(x^2-25\)false
\(x^2+10x+25\)false
Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "Enter a factorised expression.",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "isFactorised",
                    "options": {
                        "field": "integer"
                    }
                }
            ]
        }
    }
}


Combining Methods

Example

In this example, we use isFactorised combined with equivSymbolic, and put the whole expression into the equivSymbolic Value field in the validation area to ensure students responses are not only factorised, but also match the expression.

AnswerMarking
\((x-1)(x-2)\)true
\(x(x-3)+2\)true
\(x^2-3x+2\)false
Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "Enter a factorised expression that is symbolically equivalent to \\(x^2 -3x + 2\\)",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "isFactorised",
                    "options": {
                        "field": "integer"
                    }
                },
                {
                    "method": "equivSymbolic",
                    "value": "x^2 - 3x +2",
                    "options": {
                        "allowDecimal": false,
                        "decimalPlaces": 10
                    }
                }
            ]
        }
    }
}