In:
$(x-4):(2x^3-7x^2+x+3)$
How do I find the roots of x in the cubic expression? I tried substituting the equation for 1, 3, 1:2 and 3:2, but it doesn't equal 0 in any of these cases. What should I do?
In:
$(x-4):(2x^3-7x^2+x+3)$
How do I find the roots of x in the cubic expression? I tried substituting the equation for 1, 3, 1:2 and 3:2, but it doesn't equal 0 in any of these cases. What should I do?
$$x\approx \:-0.54997,\:x\approx \:0.85315,\:x\approx \:3.19681$$
One way to solve is to find one of the root using Newton-Raphson and then divide by that to form a quadratic equation that can then be solved.
Another approach is to use Cardano's Formula, more details available at https://proofwiki.org/wiki/Cardano%27s_Formula
If you apply the trigonometric for three real roots (have a look here), you should obtain $$x_k=\frac{7}{6}+\frac{\sqrt{43}}{3} \cos \left(\frac{2 \pi k}{3}-\frac{1}{3} \cos ^{-1}\left(\frac{118}{43 \sqrt{43}}\right)\right) \qquad \text{for} \qquad k=0,1,2$$
You can use Kahan's algorithm: To solve a real cubic equation
Result is numerically very accurate.
For you example, $f(x) = Ax^3 + Bx^2 + Cx+D,\quad \{A,B,C,D\} = \{2,-7,1,3\}$
$k = \large{-B \over 3A} = {7 \over 6}$
${f(k) \over A} ≈ -1.09259, \quad{f'(k) \over A} ≈ -3.58333 < 0$
$guess = k - 1.324718(-1)\max(\sqrt[3]{1.09259}, \sqrt{3.58333}) = 3.67432$
Apply Newton's method: $3.67432 → 3.30194 → 3.20372 → 3.19685 → x = 3.196818400$
$|x^3| ≈ 32.670 > |{D \over A}| = 1.5$, deflate cubic in reversed order:
$F = {-D \over x} = -0.9384330372, \quad E = {F-C \over x} = -0.6063632008$
Solve the deflated quadratic, $Ax^2+Ex+F=0$, we have all 3 roots:
$$x = \{-0.5499762239,\; 0.8531578243,\; 3.196818400\}$$