MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Trigonometric form of complex numbers


Expanding on that, you can have complex numbers printed in this form  
by default. (Note, this only changes the printout. Internally, it's  
still stored as a complex number.)

MakeBoxes[z_Complex, StandardForm] :=
   ToBoxes[Abs[z] HoldForm[E]^(HoldForm[I] Arg[z]), StandardForm]

N[Solve[x^3 == -1, x]]
{{x -> -1.}, {x -> 1. E^(1.0472 I)}, {x -> 1. E^(1.0472 I)}}

----------------------------------------------
Omega Consulting
The final answer to your Mathematica needs.
http://omegaconsultinggroup.com

On Feb 3, 2006, at 12:03 AM, Bob Hanlon wrote:

> polar[x_]:=Abs[x]*Exp[I*Arg[x]];
>
> polar/@(x/.Solve[x^3==-1,x])
>
> {-1, E^((I*Pi)/3), E^(-((I*Pi)/3))}
>
>
> Bob Hanlon
>
>>
>> From: ivan.svaljek at gmail.com
To: mathgroup at smc.vnet.net
>> Subject: [mg64190] [mg64166] [mg64158] Trigonometric form of complex numbers
>>
>> Is there a way to force mathematica to output complex numbers in
>> trigonometric form (I guess you call it Phasor).
>> Can it return all 3 roots of a complex number in such a form ?
>>
>> Thanks.
>>
>>


  • Prev by Date: Notebooks, packages, cells, and literate programming
  • Next by Date: Re: Problem to evaluate a function inside a function
  • Previous by thread: Re: Trigonometric form of complex numbers
  • Next by thread: Re: Trigonometric form of complex numbers