Re: Re: Trigonometric form of complex numbers

*To*: mathgroup at smc.vnet.net*Subject*: [mg64199] Re: [mg64181] Re: Trigonometric form of complex numbers*From*: Bob Hanlon <hanlonr at cox.net>*Date*: Sun, 5 Feb 2006 04:44:53 -0500 (EST)*Reply-to*: hanlonr at cox.net*Sender*: owner-wri-mathgroup at wolfram.com

p[x_]:=Abs[x]*(Cos[Arg[x]]+I*Sin[Arg[x]]); f[y_,n_Integer]:=Module[{x}, p/@(x/.Solve[x^n==y,x])]; r=f[z,3] {Abs[z]^(1/3)*(Cos[Arg[z]/3] + I*Sin[Arg[z]/3]), Abs[z]^(1/3)*(Cos[Arg[(-(-1)^(1/3))*z^(1/3)]] + I*Sin[Arg[(-(-1)^(1/3))*z^(1/3)]]), Abs[z]^(1/3)*(Cos[Arg[(-1)^(2/3)*z^(1/3)]] + I*Sin[Arg[(-1)^(2/3)*z^(1/3)]])} FullSimplify[Times@@r] z However, you can get the sign inverted r=f[5+I*6,2] {61^(1/4)*(Cos[Arg[-Sqrt[5 + 6*I]]] + I*Sin[Arg[-Sqrt[5 + 6*I]]]), 61^(1/4)*(Cos[(1/2)*ArcTan[6/5]] + I*Sin[(1/2)*ArcTan[6/5]])} FullSimplify[Times@@r] -5 - 6*I Bob Hanlon > > From: ivan.svaljek at gmail.com To: mathgroup at smc.vnet.net > Subject: [mg64199] [mg64181] Re: Trigonometric form of complex numbers > > I'm looking for a solution that would produce something like this: > r (cos f + i sin f). > > And would return n roots of a complex number in such form. > > Mathematica itself does nothing to return roots of complex numbers. Am > I wrong ? > >