Re: branch of (-1)^(1/3)
- To: mathgroup at smc.vnet.net
- Subject: [mg94541] Re: branch of (-1)^(1/3)
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Tue, 16 Dec 2008 02:31:56 -0500 (EST)
- References: <ghtjcj$r7f$1@smc.vnet.net>
slawek schrieb: > Is a simple way to choose the branch of (-1)^(1/3) ? > > Mathematica gives a (correct) non-real answer. It is ok, but I need the (-1) > as the output when I input (1)^(1/3) because I know that it is a solution > of real-valued problem. > > Is any "standard way" to pick up a correct (i.e. arbitrary) root of > (-1)^(1/n) instead the default? > > slawek > > I use the following function to treat real branches of powers: Attributes[ReellePotenz]={Listable,NumericFunction,OneIdentity}; rprule=(b_?Negative)^Rational[m_,n_?OddQ]]:>(-(-b)^(1/n))^m; ReellePotenz[expr_]:=expr//.rprule ReellePotenz[x] -----> x ReellePotenz[(-1)^(1/3)] -----> -1 ReellePotenz[(-1)^(3/4)] -----> (-1)^(3/4) ReellePotenz[x^y] -----> x^y ReellePotenz[Sqrt[(-1)^(2/3) + 2^4 - (-8)^(-4/3)]] ----> Sqrt[271]/4 ReellePotenz[{(-4)^(2/3), 3^4, a^(2b)}] -----> {2*2^(1/3),81,a^(2b)} Gruss Peter -- ==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-== Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de