Hello,

Any idea why I obtain a huge numerical precision using complexSolve here,
at least, displayed?

(1) -> complexSolve(x^3+3*x^2+x+17=0, 0.0000000001)

   (1)
   [x = - 3.8744001380_296332337,
    x = 0.4372000690_1481618814_9406395091_6108308765_2840423528 -
2.0485683086_313182244 %i,

       x
     =
         0.4372000690_1481618814_9406395091_6108308765_2840423528
       +
         2.0485683086_3131822439_9819882819_4290399551_391601562 %i
     ]
                                                              Type:
List(Equation(Polynomial(Complex(Float))))
(2) -> precision()$Float

   (2)  68

             Type: PositiveInteger

(3) -> digits()$Float

   (3)  20

Regards,

Greg

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dZfeWi0kGYXSMQWzi1m-FmT_giYQUqU9qt2rpUMZ%3D9CJg%40mail.gmail.com.
Title: Cubic Equation Solver - Results

Cubic Equation Solved

Equation: \(x^3 + 3x^2 + x + 17 = 0\)
\[x^3 + 3x^2 + x + 17 = 0\]
First Root (\(x_1\)) Real Root
\[x_1 = \frac{\left(-3\sqrt{-3}+3\right)\left(\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}\right)^{2}+\left(-3\sqrt{-3}-3\right)\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}-4}{\left(3\sqrt{-3}+3\right)\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}}\]
x_1 = \frac{\left(-3\sqrt{-3}+3\right)\left(\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}\right)^{2}+\left(-3\sqrt{-3}-3\right)\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}-4}{\left(3\sqrt{-3}+3\right)\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}}
Second Root (\(x_2\)) Complex Conjugate
\[x_2 = \frac{\left(-3\sqrt{-3}-3\right)\left(\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}\right)^{2}+\left(-3\sqrt{-3}+3\right)\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}+4}{\left(3\sqrt{-3}-3\right)\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}}\]
x_2 = \frac{\left(-3\sqrt{-3}-3\right)\left(\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}\right)^{2}+\left(-3\sqrt{-3}+3\right)\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}+4}{\left(3\sqrt{-3}-3\right)\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}}
Third Root (\(x_3\)) Complex Conjugate
\[x_3 = \frac{3\left(\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}\right)^{2}-3\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}+2}{3\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}}\]
x_3 = \frac{3\left(\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}\right)^{2}-3\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}+2}{3\sqrt[3]{\frac{\sqrt{\frac{2179}{3}}-27}{3}}}
Real Root x1
x = -3.8744001380296332337...
Complex Conjugate Root 1 x2
x = 0.43720006901481618814940639509161083087652840423528 - 2.0485683086313182244 i
Complex Conjugate Root 2 x3
x = 0.43720006901481618814940639509161083087652840423528 + 2.0485683086313182244 i

Step 1: Depress the Cubic

Substitute \(x = y - 1\) to eliminate the quadratic (\(x^2\)) term. The equation becomes:

\[y^3 - 2y + 18 = 0\]

Step 2: Apply Cardano's Formula

For a depressed cubic of the form \(y^3 + py + q = 0\), the solution is given by \(y = u + v\), where:

\[u^3 + v^3 = -q = -18, \quad u \cdot v = -\frac{p}{3} = \frac{2}{3}\]

Solving the quadratic equation for \(u^3\) gives:

\[u = \sqrt[3]{-9 + \sqrt{\frac{2179}{27}}} \approx -0.25445209\] \[v = \frac{2}{3u} \approx -2.61994805\]

Step 3: Construct the Three Roots

Using the primitive cube root of unity \(\omega = \frac{-1 + i\sqrt{3}}{2}\), we obtain the values for \(x = y - 1\):

\[x_1 = u + v - 1 \approx -3.874400138\] \[x_2 = \omega u + \omega^2 v - 1 \approx 0.437200069 - 2.048568309 i\] \[x_3 = \omega^2 u + \omega v - 1 \approx 0.437200069 + 2.048568309 i\]

Reply via email to