Re: Roots selection
- To: mathgroup at smc.vnet.net
- Subject: [mg42989] Re: Roots selection
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Thu, 7 Aug 2003 00:53:49 -0400 (EDT)
- References: <bgqa9u$dae$1@smc.vnet.net>
- Reply-to: "Allan Hayes" <hay at haystack.demon.co.uk>
- Sender: owner-wri-mathgroup at wolfram.com
"Alex" <akhmel at hotmail.com> wrote in message news:bgqa9u$dae$1 at smc.vnet.net... > I am solving a cubic equation and I got 3 roots. How can select root > number 2 for processing? > > Thanks, > > Alex > Alex: In[11]:= sln = Solve[x^3 == 1, x] Out[11]= {{x -> 1}, {x -> -(-1)^(1/3)}, {x -> (-1)^(2/3)}} In[12]:= root2 = x /. sln[[2]] Out[12]= -(-1)^(1/3) Allan --------------- Allan Hayes hay at haystack.demon.co.uk Voice: +44 (0)116 241 8747 Fax: +44 (0)870 164 0565