# Cubic Equation Solver (ax³ + bx² + cx + d = 0)

> Cubic Equation Solver (ax³ + bx² + cx + d = 0) is a paid API for AI agents from math-geometry.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Solves a cubic equation given coefficients a, b, c, d and returns all three roots (real and complex) using Cardano's formula and the trigonometric method.

## Facts

- Endpoint: GET https://math-geometry.x402tookit.com/cubic-solve?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cubic-equation-solver-ax-bx-cx-d-0-329a2e23
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DrVxC7VwGGkoPgAfdmTJy

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability cubic-equation-solver-ax-bx-cx-d-0-329a2e23
```

Example prompt: Solve the cubic equation 2x³ - 3x² + x - 5 = 0 and give me all three roots, including any complex ones.

## When to prefer this

Use this endpoint when you need an analytic, symbolic-style solution for a cubic polynomial (degree exactly 3), especially when you need all three roots including complex ones and want intermediate results like the discriminant and depressed cubic. Prefer it over numerical root-finders when exact Cardano/trigonometric closed-form methodology is required or when root type classification matters.

## Known failure modes

- Coefficient a = 0 (not a cubic): rejected or falls back to quadratic
- Malformed or missing query parameters a, b, c, d: 400 error
- Very large or very small coefficients causing numerical overflow
- Network or payment failure returning 402 or 5xx

## How this service works

Solve ax^3 + bx^2 + cx + d = 0: all three roots (real and complex) by Cardano and the trigonometric method.

## Output

Returns all three roots of the cubic as strings (supporting complex notation), a rootType classification (e.g. three real, one real + two complex), the discriminant, the depressed cubic coefficients p and q, separate arrays of realRoots and complexRoots, and a human-readable summary. May also include a disclaimer about numerical precision.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "a",
      "b",
      "c",
      "d"
     ],
     "properties": {
      "a": {
       "type": "number",
       "description": "Coefficient of x^3 (not 0)"
      },
      "b": {
       "type": "number",
       "description": "Coefficient of x^2"
      },
      "c": {
       "type": "number",
       "description": "Coefficient of x"
      },
      "d": {
       "type": "number",
       "description": "Constant term"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "a": {
       "type": [
        "null",
        "number"
       ]
      },
      "b": {
       "type": [
        "null",
        "number"
       ]
      },
      "c": {
       "type": [
        "null",
        "number"
       ]
      },
      "d": {
       "type": [
        "null",
        "number"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "roots": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "rootType": {
       "type": [
        "null",
        "string"
       ]
      },
      "depressed": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "p": {
         "type": [
          "null",
          "number"
         ]
        },
        "q": {
         "type": [
          "null",
          "nu
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cubic-equation-solver-ax-bx-cx-d-0-329a2e23/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from math-geometry.x402tookit.com](https://www.zero.xyz/host/math-geometry.x402tookit.com/llms.txt)
