{
  "tool": "matric-nqf4.maths_quadratic_formula",
  "name": "Quadratic equation by the formula (CDU-GEN-NSC-400)",
  "answers": "The roots of ax² + bx + c = 0 by x = (−b ± √Δ)/(2a), every substitution shown.",
  "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 M2 (offline reconstruction); x = (−b ± √(b² − 4ac)) / (2a), a ≠ 0",
  "endpoint": "/faculty/matric-nqf4/maths_quadratic_formula",
  "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"
    ],
    "properties": {
      "rootA": {
        "type": "number",
        "description": "the smaller root"
      },
      "rootB": {
        "type": "number",
        "description": "the larger root"
      },
      "discriminant": {
        "type": "number",
        "description": "Δ = b² − 4ac"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "a": 2,
    "b": 3,
    "c": -2
  }
}