Re: cubic equation solver
- To: mathgroup at smc.vnet.net
- Subject: [mg130248] Re: cubic equation solver
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Thu, 28 Mar 2013 11:55:58 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <20130328080639.90E5769F4@smc.vnet.net>
eqn = x^3 + (Sqrt[6] + 2 Sqrt[3] + 2 Sqrt[2] - 9) x + 2 Sqrt[3] - Sqrt[2] - 2 == 0; sol = Solve[eqn, x] // Simplify {{x -> (-2*3^(1/3)*(-9 + 2*Sqrt[2] + 2*Sqrt[3] + Sqrt[6]) + 2^(1/3)* (9*(2 + Sqrt[2] - 2*Sqrt[3]) + I*Sqrt[6*(2331 - 626*Sqrt[2] - 648*Sqrt[3] - 132*Sqrt[6])])^(2/3))/ (6^(2/3)*(9*(2 + Sqrt[2] - 2*Sqrt[3]) + I*Sqrt[6*(2331 - 626*Sqrt[2] - 648*Sqrt[3] - 132*Sqrt[6])])^(1/3))}, {x -> (2*3^(1/3)*((-9 - 6*I) + (2 - 3*I)*Sqrt[2] + (2 + 9*I)*Sqrt[3] + (1 - 2*I)*Sqrt[6]) + 2^(1/3)*(-1 - I*Sqrt[3])* (9*(2 + Sqrt[2] - 2*Sqrt[3]) + I*Sqrt[6*(2331 - 626*Sqrt[2] - 648*Sqrt[3] - 132*Sqrt[6])])^(2/3))/ (2*6^(2/3)*(9*(2 + Sqrt[2] - 2*Sqrt[3]) + I*Sqrt[6*(2331 - 626*Sqrt[2] - 648*Sqrt[3] - 132*Sqrt[6])])^(1/3))}, {x -> (2*3^(1/3)*((-9 + 6*I) + (2 + 3*I)*Sqrt[2] + (2 - 9*I)*Sqrt[3] + (1 + 2*I)*Sqrt[6]) + I*2^(1/3)*(I + Sqrt[3])* (9*(2 + Sqrt[2] - 2*Sqrt[3]) + I*Sqrt[6*(2331 - 626*Sqrt[2] - 648*Sqrt[3] - 132*Sqrt[6])])^(2/3))/ (2*6^(2/3)*(9*(2 + Sqrt[2] - 2*Sqrt[3]) + I*Sqrt[6*(2331 - 626*Sqrt[2] - 648*Sqrt[3] - 132*Sqrt[6])])^(1/3))}} Although not in the simplest form, these are the correct roots eqn /. sol // Simplify {True, True, True} To find simpler forms without using FullSimplify (which seems to go on indefinitely) sol2 = ({x -> RootApproximant[#[[-1, -1]]]} & /@ sol) // ToRadicals {{x -> Sqrt[5 - 2*Sqrt[6]]}, {x -> 2 - Sqrt[3]}, {x -> -2 + Sqrt[2]}} Verifying that these are exact solutions eqn /. sol2 // FullSimplify {True, True, True} I assume that these are the values in your first sentence which was garbled (presumably you did not convert to InputForm before copying). Bob Hanlon On Thu, Mar 28, 2013 at 4:06 AM, Elim Qiu <elim.qiu at gmail.com> wrote: > x^3 + (=E2=88=9A6 + 2=E2=88=9A3 + 2=E2=88=9A2 -9)x + 2=E2=88=9A3 -=E2=88=9A2 -2 = 0 > has exact roots =E2=88=9A2-2, =E2=88=9A3-=E2=88=9A2, 2-=E2=88=9A3 > > But Mathematica says: > > Solve[x^3 + (Sqrt[6] + 2 Sqrt[3] + 2 Sqrt[2] - 9) x + 2 Sqrt[3] - > Sqrt[2] - 2 == 0, x] > > {{x -> (1/ > 2 (18 + 9 Sqrt[2] - 18 Sqrt[3] + > I Sqrt[3 (4662 - 1252 Sqrt[2] - 1296 Sqrt[3] - > 264 Sqrt[6])]))^(1/3)/3^( > 2/3) - (-9 + 2 Sqrt[2] + 2 Sqrt[3] + Sqrt[ > 6])/(3/2 (18 + 9 Sqrt[2] - 18 Sqrt[3] + > I Sqrt[3 (4662 - 1252 Sqrt[2] - 1296 Sqrt[3] - > 264 Sqrt[6])]))^( > 1/3)}, {x -> -(((1 + I Sqrt[3]) (1/ > 2 (18 + 9 Sqrt[2] - 18 Sqrt[3] + > I Sqrt[3 (4662 - 1252 Sqrt[2] - 1296 Sqrt[3] - > 264 Sqrt[6])]))^(1/3))/( > 2 3^(2/3))) + ((1 - I Sqrt[3]) (-9 + 2 Sqrt[2] + 2 Sqrt[3] + > Sqrt[6]))/( > 2^(2/3) (3 (18 + 9 Sqrt[2] - 18 Sqrt[3] + > I Sqrt[3 (4662 - 1252 Sqrt[2] - 1296 Sqrt[3] - > 264 Sqrt[6])]))^( > 1/3))}, {x -> -(((1 - I Sqrt[3]) (1/ > 2 (18 + 9 Sqrt[2] - 18 Sqrt[3] + > I Sqrt[3 (4662 - 1252 Sqrt[2] - 1296 Sqrt[3] - > 264 Sqrt[6])]))^(1/3))/( > 2 3^(2/3))) + ((1 + I Sqrt[3]) (-9 + 2 Sqrt[2] + 2 Sqrt[3] + > Sqrt[6]))/( > 2^(2/3) (3 (18 + 9 Sqrt[2] - 18 Sqrt[3] + > I Sqrt[3 (4662 - 1252 Sqrt[2] - 1296 Sqrt[3] - > 264 Sqrt[6])]))^(1/3))}} >
- References:
- cubic equation solver
- From: Elim Qiu <elim.qiu@gmail.com>
- cubic equation solver