Re: Simplify

*To*: mathgroup at smc.vnet.net*Subject*: [mg32034] Re: Simplify*From*: "Alan Mason" <swt at austin.rr.com>*Date*: Wed, 19 Dec 2001 04:29:23 -0500 (EST)*References*: <9vmrje$hh7$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

<Matthias.Bode at oppenheim.de> wrote in message news:9vmrje$hh7$1 at smc.vnet.net... > Dear Colleagues, > > why should I not expect MATHEMATICA to (Full)Simplify > > (a^b)^(1/b) or a^b^(1/b) to a? > Matthias, the reason is because they are not equal for general complex-valued a, b, c. The following notebook illustrates how to make a rule to enforce the desired simplification (which is correct only for a, b, c real), and also gives a case where equality fails. z^w is defined as Exp[w Log[z]], and Log has a branch cut; this complication is the reason for the failure. In[1]:= test = (a^b)^(1/b) Out[1]= \!\(\((a\^b)\)\^\(1\/b\)\) In[2]:= FullSimplify[%] Out[2]= \!\(\((a\^b)\)\^\(1\/b\)\) In[3]:= test2 = (a^b)^c Out[3]= \!\(\((a\^b)\)\^c\) In[4]:= FullSimplify[%] Out[4]= \!\(\((a\^b)\)\^c\) In[5]:= rule = Power[Power[a_, b_], c_]\[RuleDelayed] Power[a, b c] Out[5]= \!\(\((a_\^b_)\)\^c_ \[RuleDelayed] a\^\(b\ c\)\) In[6]:= test /. rule Out[6]= a In[7]:= test2 /. rule Out[7]= \!\(a\^\(b\ c\)\) In[8]:= a = 2 + 3 I;b = 3 +I; c = -2-4I; In[9]:= N[(a^b)^c] Out[9]= \!\(4.240023659792295`*^-7 - 7.75911100859049`*^-7\ \[ImaginaryI]\) In[10]:= N[a^(b c)] Out[10]= 34864.2\[InvisibleSpace]-63800.3 \[ImaginaryI] Alan