Re: Solutions of an equation under complex form
- To: mathgroup at smc.vnet.net
- Subject: [mg54549] Re: Solutions of an equation under complex form
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Tue, 22 Feb 2005 04:25:38 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
On 2/21/05 at 3:44 AM, mmonerau at gmail.com (Michaël Monerau) wrote: >I just want the solutions of the equation : >x^2 + x + 1 == 0 >under their complex form. >So, I type : >Solve [x^2 + x + 1 == 0, x] >But I unfortunately get : <{ { {x -> -(-1)^(1/3) }, { x ->(-1)^(2/3) } } } >And I'd prefer to obtain the more "readable" form : -1/2 + >I*1/2*Sqrt[3], -1/2 - I*1/2*Sqrt[3] >that I would get under another system for instance. What special >function should I call to get this form under Mathematica ? Use ComplexExpand, i.e., In[1]:= Solve[x^2 + x + 1 == 0, x] Out[1]= {{x -> -(-1)^(1/3)}, {x -> (-1)^(2/3)}} In[2]:= (ComplexExpand[x /. #1] & ) /@ % Out[2]= {-(1/2) - (I*Sqrt[3])/2, -(1/2) + (I*Sqrt[3])/2} And if you have the defualt output set to TraditionalForm, this is even more readable -- To reply via email subtract one hundred and four