Depressed cubic solver
t³ − 3t + 2 = 0 has the roots 1, 1 and −2, since it factors as (t − 1)²(t + 2): enter p and q and get all three roots with the discriminant and Cardano's intermediate values. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Power (W)
- -3
- Q
- 2
- Equation
- t^3 + (-3)*t + (2) = 0
- Discriminant
- 0
- Root type
- multiple_real
- Real root count
- 3
A depressed cubic is a monic cubic that has already lost its quadratic term, written as t cubed plus p t plus q equals zero. Students meeting casus irreducibilis, tutors building step-by-step resolvent demos, and notebook authors who already depressed a polynomial by hand need the three roots—real or complex—without reopening a full symbolic suite.
What a depressed cubic is and how Cardano’s resolvent works
Start from the monic cubic x cubed plus A x squared plus B x plus C equals zero. The substitution x equals t minus A over three cancels the quadratic term and yields the depressed form t cubed plus p t plus q equals zero, where p and q are explicit polynomials in A, B, and C.
Cardano’s method does not guess roots: it introduces auxiliary numbers u and v such that t equals u plus v and three u v equals negative p, which forces u cubed and v cubed to be the two values negative q over two plus or minus the square root of the discriminant Delta equals (q over two) squared plus (p over three) cubed.
When Delta is positive there is one real root and a complex conjugate pair; when Delta is zero there are multiple real roots; when Delta is negative—the casus irreducibilis—all three roots are real and the classical cube roots become complex even though the answers are real, so this solver switches to the equivalent trigonometric form with two times the square root of negative p over three times cosine of a one-third arccos expression.
The three roots always exist in the complex plane: t zero equals u plus v, and the other two pair u and v with the non-real cube roots of unity omega and omega squared.
What you enter and what you get back
The resolvent object exposes u, v, and delta so clients can show Cardano’s intermediate cube roots without recomputing them. Fields method and formula restate that the algorithm is Cardano with the classical discriminant identity. Example: p equals negative three and q equals two yields Delta zero, multiple real roots at two, negative one, and negative one, matching the factorization (t minus one) squared times (t plus two).
Another common check is p equals zero and q equals negative eight, which recovers the real cube root two and the two complex cube roots of eight.
Where solving a depressed cubic helps
Algebra courses that teach Cardano after completing the square for cubics need a deterministic oracle that already assumes the depressed shape, so learners can focus on the resolvent and the discriminant cases instead of the depression shift. Exam generators and LMS plugins mark homework on t cubed plus p t plus q without accepting a general four-coefficient cubic as a substitute, because the learning objective is the depressed case itself.
Computer-algebra notebooks often depress a cubic by hand or with a short script, then want only the Cardano branch exercised and the complex roots returned in a fixed order for snapshot tests. Content sites that rank for depressed cubic solver gain a live free browser tool whose pure module matches the paid automation path byte for byte, capturing search intent that a general cubic-equation landing does not fully own. Failed validation does not consume balance.
Keep requests small, pin the cleaned roots and resolvent in tests, and you get reproducible Cardano roots for teaching, grading, and edge workers without standing up a full symbolic mathematics stack of your own.
What you can do with it
LMS grading of depressed cubics
Auto-mark homework that already depressed a cubic, rejecting invalid coefficients while returning a stable root order for snapshot graders.
Notebooks after manual depression
Solve only the depressed stage in scripts that shift x=t−b/(3a) themselves, without importing a full computer-algebra library.
FAQ
What is the discriminant of a depressed cubic?
Δ = (q/2)² + (p/3)³. Positive Δ means one real and two complex conjugate roots; zero means multiple real roots; negative Δ means three distinct real roots (casus irreducibilis).
What is a depressed cubic?
It is a cubic with leading coefficient 1 and no squared term, written t³ + pt + q and set to zero. Every general cubic can be brought to this shape by shifting the variable, which is why Cardano's method works on it.
How do I turn a general cubic into a depressed one?
Divide by the leading coefficient to get x³ + Ax² + Bx + C, then substitute x with t − A/3. The squared term cancels and leaves t³ + pt + q, whose p and q come from A, B and C.
What are the roots of t³ − 3t + 2 = 0?
They are 1, 1 and −2. The discriminant is 0, which signals a repeated real root, and the equation factors as (t − 1)²(t + 2).
What is the casus irreducibilis?
It is the case of a negative discriminant: all three roots are real, yet Cardano's cube roots pass through complex numbers. The solver switches to an equivalent trigonometric form with cosines to reach the three real roots directly.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/algebra/depressed-cubic \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"p":-3,"q":2}'const res = await fetch("https://api.kit.forhosting.com/algebra/depressed-cubic", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"p": -3,
"q": 2
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/depressed-cubic",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"p": -3,
"q": 2
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/depressed-cubic", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"p":-3,"q":2}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"p":-3,"q":2}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/depressed-cubic", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"p": -3,
"q": 2
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.depressed_cubic",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Every general cubic ax³+bx²+cx+d=0 reduces to this form by the shift x equals t minus b over three a, so Cardano’s classic attack lives on the depressed equation. This depressed cubic solver accepts finite coefficients p and q, forms the discriminant Delta equals (q over two) squared plus (p over three) cubed, builds the Cardano resolvent cube roots u and v, and returns all three roots as complex pairs together with root type and the resolvent payload.
Input contract, response shape, and error behaviour
POST a JSON body with two required finite numbers: p, the coefficient of t, and q, the constant term, for the equation t cubed plus p t plus q equals zero. Each field may arrive as a JSON number or as a numeric string; missing fields, empty strings, non-finite values, and non-object bodies fail with invalid_input naming the problem, and those failures are not billed. Pair the response with your own plotting or step prose if you need graphs; this endpoint solves for t only and does not emit plots or multi-page lessons beyond the formula and resolvent fields.
Where a depressed cubic Cardano API earns its keep
Engineering and physics models that already work in a shifted coordinate where the quadratic term vanished—mean-field expansions, reduced characteristic polynomials—can call a tiny parse API at the published $0.002 base price per successful item with no model tokens and no outbound network.
Integration use cases
Classroom Cardano and resolvent demos
Let students submit p and q for t³+pt+q=0 and compare the three ordered roots and the resolvent pair against hand-worked Cardano steps.
Technical questions
How do I solve the depressed cubic t³ + p t + q = 0?
Send finite numbers p and q. The API forms Δ=(q/2)²+(p/3)³, builds Cardano resolvents u and v, and returns three complex roots plus root_type and the resolvent object.
Does this solve a general cubic ax³+bx²+cx+d=0?
No. This endpoint assumes the depressed form t³+pt+q=0. Depress first with x=t−b/(3a), or use a general cubic equation solver if you need the full four-coefficient problem.
Are complex roots returned?
Yes. Every call returns three roots as {re, im} pairs. When root_type is one_real_two_complex, two of them have non-zero imaginary parts (conjugates when coefficients are real).
What does the depressed cubic solver cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.