Cubic Equation Solver

Solve cubic equations, classify the root pattern, and show Cardano-style intermediate values

Example Results

1 examples

Solve a cubic with three real roots

Analyze x^3 - 6x^2 + 11x - 6 = 0 and recover the classic roots 1, 2, and 3.

{
  "result": {
    "realRoots": [
      1,
      2,
      3
    ]
  }
}
View input parameters
{ "inputFormat": "equation", "aOrEquation": "x^3 - 6x^2 + 11x - 6 = 0", "b": -6, "c": 11, "d": -6, "decimalPlaces": 6, "showSteps": true }

Key Facts

Category
Math, Date & Finance
Input Types
select, text, number, checkbox
Output Type
json
Sample Coverage
1
API Ready
Yes

Overview

The Cubic Equation Solver is a specialized mathematical utility designed to calculate the roots of third-degree polynomials. Whether you input individual coefficients or a complete equation string, it instantly computes real and complex roots, classifies the root pattern based on the discriminant, and provides Cardano-style intermediate values for deeper mathematical analysis.

When to Use

  • When you need to find the exact real and complex roots of a third-degree polynomial equation.
  • When verifying manual calculations using Cardano's formula for academic or engineering purposes.
  • When analyzing the discriminant to classify the root pattern of a cubic function.

How It Works

  • Select your preferred input format: either individual coefficients (a, b, c, d) or a complete equation string.
  • Enter the equation or coefficients into the designated input fields.
  • Adjust the decimal places for precision and toggle the option to show intermediate calculation steps.
  • View the structured JSON output containing the calculated roots, discriminant, and Cardano-style intermediate values.

Use Cases

Engineering students verifying manual root calculations for control systems or fluid dynamics assignments.
Mathematics educators generating step-by-step examples of Cardano's method for classroom demonstrations.
Software developers needing a quick way to validate custom polynomial root-finding algorithms.

Examples

1. Solving a standard cubic equation with three real roots

Math Student
Background
A student is learning about polynomial roots and needs to verify their homework.
Problem
Find the roots of x^3 - 6x^2 + 11x - 6 = 0 and check the intermediate steps.
How to Use
Select 'Complete Equation' as the input format, enter 'x^3 - 6x^2 + 11x - 6 = 0', and enable 'Show Steps'.
Example Config
{
  "inputFormat": "equation",
  "aOrEquation": "x^3 - 6x^2 + 11x - 6 = 0",
  "showSteps": true
}
Outcome
The tool outputs the three real roots (1, 2, and 3) along with the intermediate Cardano values.

2. Analyzing a cubic equation with complex roots

Engineer
Background
An engineer is analyzing a system's characteristic equation to determine stability.
Problem
Calculate the roots of a cubic polynomial where only the coefficients are known (a=1, b=2, c=3, d=4).
How to Use
Select 'Individual Coefficients', input 1, 2, 3, and 4 into the respective fields, and set decimal places to 4.
Example Config
{
  "inputFormat": "coefficients",
  "aOrEquation": "1",
  "b": 2,
  "c": 3,
  "d": 4,
  "decimalPlaces": 4
}
Outcome
The solver returns one real root and two complex conjugate roots, rounded to four decimal places.

Try with Samples

math-&-numbers

Related Hubs

FAQ

Can I input the full equation instead of just coefficients?

Yes, you can switch the Input Format to 'Complete Equation' and type the full string, such as x^3 - 6x^2 + 11x - 6 = 0.

Does this tool calculate complex roots?

Yes, the solver calculates and returns both real and complex roots based on the equation's discriminant.

What are Cardano-style intermediate values?

These are the intermediate variables (often denoted as p, q, and the discriminant) used in Cardano's formula to solve cubic equations analytically.

Can I control the precision of the output?

Yes, you can adjust the 'Decimal Places' setting between 0 and 10 to round the calculated roots to your required precision.

What happens if the coefficient 'a' is zero?

If 'a' is zero, the equation is quadratic, not cubic. You must provide a non-zero value for the 'a' coefficient for a valid cubic equation.

API Documentation

Request Endpoint

POST /en/api/tools/cubic-equation-solver

Request Parameters

Parameter Name Type Required Description
inputFormat select Yes -
aOrEquation text Yes -
b number No -
c number No -
d number No -
decimalPlaces number No -
showSteps checkbox No -

Response Format

{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
JSON Data: JSON Data

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-cubic-equation-solver": {
      "name": "cubic-equation-solver",
      "description": "Solve cubic equations, classify the root pattern, and show Cardano-style intermediate values",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=cubic-equation-solver",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]