math_quadratic_solver
Solve quadratic equations from coefficients, evaluate f(x), or build quadratics from roots. Returns discriminant, roots, vertex, axis of symmetry, and factored form.
Instructions
Quadratic Equation Solver. Solve a quadratic equation ax^2 + bx + c = 0 from its coefficients, evaluate f(x) = ax^2 + bx + c at a point, or build a monic quadratic from two roots; selected by the operation field. Solving returns the discriminant and its sign, real or complex-conjugate roots, root count, vertex, axis of symmetry, factored form when the roots are rational, and the Vieta sum/product of roots; it also handles the degenerate a = 0 (linear) cases. Use this for second-degree polynomial algebra; use math_scientific_calculator for general expression evaluation and math_matrix_calculator for linear algebra. Runs locally on the numbers you provide: read-only, non-destructive, contacts no external service, and is rate-limited (60 requests/minute for anonymous callers).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Mode to run. solve needs a, b, c. evaluate needs a, b, c, x. fromRoots needs r1, r2. | |
| a | No | Quadratic (x^2) coefficient for solve and evaluate. May be 0, in which case the equation is treated as linear or degenerate. Required for solve and evaluate. | |
| b | No | Linear (x) coefficient for solve and evaluate. Required for solve and evaluate. | |
| c | No | Constant term for solve and evaluate. Required for solve and evaluate. | |
| x | No | Point at which to evaluate f(x) = ax^2 + bx + c. Required for the evaluate operation only. | |
| r1 | No | First root of the quadratic to construct. Required for the fromRoots operation only. | |
| r2 | No | Second root of the quadratic to construct. Required for the fromRoots operation only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | Whether the calculation succeeded. | |
| operation | No | The operation performed (solve, evaluate, or fromRoots). | |
| result | No | Operation output. solve fields listed here; evaluate returns a, b, c, x, y, vertex, axis; fromRoots returns a, b, c, equation. |