Re: Exponential forms and substitution
- To: mathgroup at smc.vnet.net
- Subject: [mg34494] Re: [mg34460] Exponential forms and substitution
- From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
- Date: Fri, 24 May 2002 02:41:54 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On Wednesday, May 22, 2002, at 03:46 PM, Steve Gray wrote:
> For various reasons I have complex exponentials written
> both as (for example) (-1)^(2/5) and the equivalent
> E^(I Pi/5). How do I convert both forms into the same
> form of my choice?
There is no way to automatically convert them to a "form of your
choice", but there are several commands that will usually let you do so,
although using them requires a bit of skill and sometimes trial and
error. The most useful ones are ExpToTrig, RootReduce and ToRadicals.
Here is what you can do in your case:
In[161]:=
ls = {(-1)^(2/5), E^(I*(Pi/5))};
In[162]:=
ExpToTrig /@ ls
Out[162]=
{-(1/4) + Sqrt[5]/4 + (1/2)*I*Sqrt[(1/2)*(5 + Sqrt[5])],
1/4 + Sqrt[5]/4 + (1/2)*I*Sqrt[(1/2)*(5 - Sqrt[5])]}
In[163]:=
RootReduce /@ %
Out[163]=
{Root[1 + #1 + #1^2 + #1^3 + #1^4 & , 4], Root[1 - #1 + #1^2 - #1^3 +
#1^4 & , 4]}
In[164]:=
ToRadicals /@ %
Out[164]=
{(-1)^(2/5), (-1)^(1/5)}
Of course you can also do
In[165]:=
(Abs[#1]*E^(I*Arg[#1]) & ) /@ %
Out[165]=
{E^((2*I*Pi)/5), E^((I*Pi)/5)}
Which I think accounts for all the forms you might desire.
> Also I have a variable, say g, defined as (-1)^(2/5) . In
> the complex matrices I work with it is important for visual
> reasons to have the symbol g itself appear when I need it,
> instead of one of its numeric equivalents. Using the usual
> substitution rules as I understand them does not seem to
> work.
Use HoldForm[g].
Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/