Cubic Equation Calculator

Cubic Equation Calculator

ax3+bx2+cx+d=0

Answer:
Solutions for x
x1 =
x2 =
x3 =

The Cubic Equation Calculator helps you solve cubic equations of the form:

ax3+bx2+cx+d=0ax^3 + bx^2 + cx + d = 0

where:

  • aa, bb, cc, and dd are real coefficients of the equation.
  • xx represents the variable, and the calculator provides up to three real or complex solutions for xx.

How to Use:

  1. Enter Coefficients:

    • In the input fields, enter values for the coefficients aa, bb, cc, and dd. The coefficient aa must be non-zero because a cubic equation requires the x3x^3 term.
    • Use the +/− button to easily toggle between positive and negative values for each coefficient.
  2. Select Significant Figures:

    • If you want a specific precision for your answers, adjust the significant figures setting (optional).
  3. Click “Calculate”:

    • Once you’ve entered all values, click the “Calculate” button to compute the solutions.
  4. View Solutions:

    • The calculator will display the real or complex solutions for xx. If the equation has complex solutions, they will be shown in the form a+bia + bi.
  5. Clear Fields:

    • Use the “Clear” button to reset all input fields and start a new calculation.

Example

Let’s solve the cubic equation:

2x3−4x2+3x−6=02x^3 – 4x^2 + 3x – 6 = 0

  1. Enter Values:

    • a=2a = 2
    • b=−4b = -4
    • c=3c = 3
    • d=−6d = -6
  2. Click “Calculate”: The calculator processes the inputs and solves the cubic equation.

  3. View Results:

    • You’ll see the following results:
      • x1=2.540x_1 = 2.540
      • x2=−0.740+1.561ix_2 = -0.740 + 1.561i
      • x3=−0.740−1.561ix_3 = -0.740 – 1.561i

Formulas

The calculator uses the following approach to solve the cubic equation:

  1. Depressed Cubic Transformation: The cubic equation is simplified using the formula:

p=3ac−b23a2,q=2b3−9abc+27a2d27a3p = \frac{3ac – b^2}{3a^2}, \quad q = \frac{2b^3 – 9abc + 27a^2d}{27a^3}

  1. Discriminant: The discriminant is calculated to determine the nature of the roots:

Δ=(q2)2+(p3)3\Delta = \left(\frac{q}{2}\right)^2 + \left(\frac{p}{3}\right)^3

  • If Δ>0\Delta > 0, there is one real root and two complex conjugate roots.
  • If Δ=0\Delta = 0, there are multiple real roots.
  • If Δ<0\Delta < 0, all three roots are real.
  1. Solving for Roots:

    • For real roots, the solutions are determined by:
    x1=2r3cos⁡(θ3)−b3ax_1 = 2\sqrt[3]{r}\cos\left(\frac{\theta}{3}\right) – \frac{b}{3a}

    Where r=−q2r = -\frac{q}{2} and θ\theta is the angle calculated based on the discriminant.

  2. Complex Roots: If the discriminant is negative, the complex roots are computed using trigonometric or hyperbolic functions, resulting in expressions like x2=a+bix_2 = a + bi.

Quick Tips

  • Make sure aa is non-zero; otherwise, the equation is not cubic.
  • Complex solutions are shown in the form x=a+bix = a + bi, where ii is the imaginary unit.
  • The calculator can handle both positive and negative coefficients, and you can easily toggle the sign using the +/− button.
Advertisements