ForHosting KIT · Math

Cube equation solver

x³ = 8 has three solutions, not one: the real root 2 and the complex pair -1 ± i√3. Enter any real k and get all three roots of x³ = k as real and imaginary parts. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
K
8
You get
Equation
x^3=8
Real root
2

The pure cube equation x cubed equals k asks for every complex number whose cube is the real constant k. Every algebra student first meets the real cube root, but the fundamental theorem of algebra guarantees two more roots that live off the real line as a conjugate pair. This cube equation solver accepts a single finite real number k, computes the unique real cube root with a sign-correct cube-root primitive, multiplies it by the three cube roots of unity, and returns the real root together with the two complex roots written in rectangular form as real and imaginary parts. Use it whenever you need all three solutions of x³ = k without standing up a full computer-algebra system.

What x³ = k means and how the three cube roots arise

Over the real numbers the map x maps to x cubed is bijective, so every real k has exactly one real cube root. Over the complex numbers the equation x cubed equals k is a monic cubic and therefore has three roots counting multiplicity.

Those three roots are the products of the real cube root r equals the cube root of k with the three cube roots of unity: one, omega, and omega squared, where omega equals negative one half plus i times the square root of three over two, and omega squared is its conjugate.

When k is positive the real root is positive and the complex pair has negative real part; when k is negative the real root is negative and the complex pair has positive real part; when k is zero all three roots collapse to the origin as a triple real root. The rectangular presentation (real part and imaginary part as separate numbers) is what most numeric APIs, spreadsheets, and plotting libraries expect; polar magnitude and argument are not required to verify that each root cubes back to k.

Because the construction uses only the real cube root and fixed algebraic factors, the result is fully deterministic and free of branch cuts that plague principal complex cube-root implementations on negative reals.

Where pure cube equations come up

Classrooms and tutoring platforms use a cube equation solver so learners can see that x cubed equals eight has one real answer and two complex answers, not only the real cube root printed by a pocket calculator. Exam-prep generators need a deterministic oracle that returns ordered rectangular pairs instead of floating polar angles that differ by two pi between engines.

Engineering and signal-processing notebooks often reduce cube-root branches of characteristic equations or Cardano intermediate steps to the pure form x cubed equals k and need both complex roots without importing a full computer-algebra library. Failed validation does not consume balance. Keep requests small, pin the rounded rectangular components in tests, and you get reproducible cube roots for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own.

Classroom and homework checks

Let students submit k for x³ = k and verify the real cube root plus both complex rectangular roots against textbook roots-of-unity methods.

Notebooks and Cardano intermediates

Resolve pure x³ = k branches inside cubic solvers or signal models without importing a full computer-algebra system.

Does the solver return complex roots?

Yes. For real k ≠ 0 there is always one real root and two complex conjugate roots. Both complex roots are returned with re and im fields.

What if k is negative?

Negative k is allowed. The real cube root is negative (Math.cbrt preserves sign), and the complex pair has positive real part −r/2 with r < 0.

Why does x³ = k have three roots instead of one?

Over the complex numbers every cubic has three roots. They are the real cube root of k multiplied by the three cube roots of unity, which adds a complex conjugate pair to the real answer.

What happens when k is zero?

All three roots collapse to 0, so zero is a triple real root. There is no complex pair in that case, because every product with the real root 0 is also 0.

How can I check the complex roots?

Cube each root and compare with k. For x³ = 8, the roots -1 + i√3 and -1 - i√3 both give 8 when cubed, just like the real root 2.

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.

POSThttps://api.kit.forhosting.com/algebra/solve-cube-equation

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.

curl -X POST https://api.kit.forhosting.com/algebra/solve-cube-equation \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"k":8}'
{
  "k": 8
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "algebra.solve_cube_equation",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Invalid or missing k fails with invalid_input and is not billed.

What x³ = k means and how the three cube roots arise

Expanding the products yields the rectangular forms returned by this endpoint: the real root r with imaginary part zero, and the conjugate pair negative r over two plus or minus i times r times the square root of three over two.

Input contract, response shape, and error behaviour

Example: k equals eight yields real root two and the complex pair negative one plus or minus i times the square root of three, because two cubed is eight and each complex root also cubes to eight. Example: k equals negative eight yields real root negative two and the complex pair one plus or minus i times the square root of three. POST a JSON body with one required finite number field named k, the right-hand side of x cubed equals k. The value may arrive as a JSON number or as a numeric string; missing fields, empty strings, NaN, and Infinity fail with invalid_input naming the field, and those failures are not billed. On success the body echoes the cleaned k, an equation string of the form x^3 equals k for display, real_root as the unique real cube root rounded to twelve significant decimal places for stable goldens across runtimes, complex_roots as an array of two objects each with re and im fields ordered so the member with non-negative imaginary part comes first, roots as the three rectangular numbers with the real root first then the complex pair, and a formula string restating the cube-roots-of-unity identity. Pair the numeric roots with your own verification step that multiplies each complex number by itself twice if you need an independent check; this endpoint solves and formats, it does not emit step-by-step prose beyond the formula field or plot the roots in the complex plane.

Exam and LMS auto-grading

Mark cube-equation items with a deterministic oracle that returns ordered re/im pairs and rejects non-finite k as invalid_input.

How do I solve x³ = k for all three roots?

Send a finite number k. The API returns the real cube root r = ∛k and the two complex roots r·ω and r·ω² in rectangular form, where ω = −1/2 ± i√3/2.

What input is rejected?

Missing k, empty strings, non-numeric values, NaN, and Infinity fail with invalid_input and are not billed.

What does the cube equation solver cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →