Algebra · real student question

Solve the cubic equation x³ + 2x² + 7x + 4 = 0.

Question

Solve

x3+2x2+7x+4=0x^3 + 2x^2 + 7x + 4 = 0

Step-by-step solution

  1. Test every rational candidate. By the rational root theorem the only possibilities are divisors of 44:

    f(1)=14,f(1)=2,f(2)=34,f(2)=10,f(4)=128,f(4)=56f(1) = 14, \quad f(-1) = -2, \quad f(2) = 34, \quad f(-2) = -10, \quad f(4) = 128, \quad f(-4) = -56

    None is zero, so the cubic is irreducible over Q\mathbb{Q} and no exact factorisation by inspection is available.

  2. Bracket the single real root. A cubic always has at least one real root. The sign change

    f(1)=2<0,f(0)=4>0f(-1) = -2 < 0, \qquad f(0) = 4 > 0

    pins a root in (1,0)(-1, 0). Moreover f(x)=3x2+4x+7f'(x) = 3x^2 + 4x + 7 has discriminant 1684<016 - 84 < 0, so f>0f' > 0 everywhere: ff is strictly increasing and there is exactly one real root.

  3. Refine with Newton's method. Iterating xn+1=xnxn3+2xn2+7xn+43xn2+4xn+7x_{n+1} = x_n - \dfrac{x_n^3 + 2x_n^2 + 7x_n + 4}{3x_n^2 + 4x_n + 7} from x0=0.7x_0 = -0.7 converges quickly to

    x10.6535951654x_1 \approx -0.6535951654

    At 40-digit working precision the residual is below 103910^{-39}. (A common slip is to stop at a coarse estimate such as 0.6954-0.6954; there f=0.2368f = -0.2368, not 00.)

  4. Divide out the real root. Synthetic division by (xx1)\left(x - x_1\right) leaves the quadratic

    x2+1.3464048346x+6.1199963094=0x^2 + 1.3464048346\,x + 6.1199963094 = 0

    with zero remainder, where the coefficients are 2+x12 + x_1 and 7+x1(2+x1)7 + x_1(2 + x_1).

  5. Solve the quadratic for the complex pair. Its discriminant is negative:

    Δ=1.346404834624(6.1199963094)=22.6671792591\Delta = 1.3464048346^2 - 4(6.1199963094) = -22.6671792591

    x=1.3464048346±i22.667179259120.6732024173±2.3805030592ix = \frac{-1.3464048346 \pm i\sqrt{22.6671792591}}{2} \approx -0.6732024173 \pm 2.3805030592\,i

  6. Cross-check with Vieta's formulas. The three roots must sum to 2-2 and multiply to 4-4:

    0.6535951654+2(0.6732024173)=2.0000000000 -0.6535951654 + 2(-0.6732024173) = -2.0000000000 \ \checkmark

    (0.6535951654)(0.67320241732+2.38050305922)=4.0000000000 (-0.6535951654)\left(0.6732024173^2 + 2.3805030592^2\right) = -4.0000000000 \ \checkmark

    Both identities close, confirming the numerics independently of the iteration.

Answer

x0.6535952(real),x0.6732024±2.3805031ix \approx -0.6535952 \quad \text{(real)}, \qquad x \approx -0.6732024 \pm 2.3805031\,i

Need to solve a different problem like this? Open the solver →