{
  "tool": "matric-nqf4.maths_quadratic_factorise",
  "name": "Quadratic equation by factorising (CDU-GEN-NSC-400)",
  "answers": "The roots of ax² + bx + c = 0 by factorisation, with the discriminant, the sum and the product of the roots checked.",
  "degree": {
    "id": "competency:matric-nqf4",
    "code": "CDU-GEN-NSC-400",
    "name": "Senior Certificate (Amended) — exam-readiness programme (NQF 4 matric)",
    "version": "1.0.0"
  },
  "reference": "CAPS Grade 12 Mathematics, worked reference M1 (offline reconstruction); quadratic formula and nature of roots",
  "endpoint": "/faculty/matric-nqf4/maths_quadratic_factorise",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "a",
      "b",
      "c"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "a": {
        "type": "number",
        "description": "coefficient of x² (a ≠ 0)",
        "minimum": -100,
        "maximum": 100
      },
      "b": {
        "type": "number",
        "description": "coefficient of x",
        "minimum": -1000,
        "maximum": 1000
      },
      "c": {
        "type": "number",
        "description": "constant term",
        "minimum": -10000,
        "maximum": 10000
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "rootA",
      "rootB",
      "discriminant",
      "sumOfRoots",
      "productOfRoots"
    ],
    "properties": {
      "rootA": {
        "type": "number",
        "description": "the smaller root"
      },
      "rootB": {
        "type": "number",
        "description": "the larger root"
      },
      "discriminant": {
        "type": "number",
        "description": "Δ = b² − 4ac"
      },
      "sumOfRoots": {
        "type": "number",
        "description": "−b/a"
      },
      "productOfRoots": {
        "type": "number",
        "description": "c/a"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "a": 1,
    "b": -5,
    "c": 6
  }
}