Skip to content
HALOWERK

Codewerk

formula solve

Symbolic and exact numeric operations with mathjs: simplify (algebraic rule set), derivative with respect to one variable, polynomial roots up to degree 3 (closed form) from coefficients, and linear systems A·x = b via LU decomposition. This is not a full computer algebra system; general non-linear equations are rejected rather than approximated. (Catalog name was sympy-solve; renamed because SymPy is not used.)

POST https://code.halowerk.com/v1/formula-solve

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
operationstringYes
expressionstringNo
variablestringNo
coefficientsarrayNoPolynomial coefficients from constant term upward: c0, c1, c2, c3.
matrixarrayNo
vectorarrayNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "operation"
  ],
  "properties": {
    "operation": {
      "type": "string",
      "enum": [
        "simplify",
        "derivative",
        "polynomial_roots",
        "linear_system"
      ]
    },
    "expression": {
      "type": "string",
      "maxLength": 2000
    },
    "variable": {
      "type": "string",
      "pattern": "^[a-zA-Z]\\w{0,10}$",
      "default": "x"
    },
    "coefficients": {
      "type": "array",
      "minItems": 2,
      "maxItems": 4,
      "items": {
        "type": "number"
      },
      "description": "Polynomial coefficients from constant term upward: c0, c1, c2, c3."
    },
    "matrix": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "items": {
        "type": "array",
        "minItems": 1,
        "maxItems": 20,
        "items": {
          "type": "number"
        }
      }
    },
    "vector": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "items": {
        "type": "number"
      }
    }
  }
}

Open original schema

Published input example

{
  "operation": "derivative",
  "expression": "x^3 + 2x",
  "variable": "x"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →