Mathematica tells me that a^(b c ) - (a^b)^c does equal zero, unless I assume a>0 and b>0. Is this some rule of exponents that I missed in school, have I forgotten everything important, or is this a flaw in Mathematica?
Thank you.
Mathematica tells me that a^(b c ) - (a^b)^c does equal zero, unless I assume a>0 and b>0. Is this some rule of exponents that I missed in school, have I forgotten everything important, or is this a flaw in Mathematica?
Thank you.
Can’t check right now, but I think the equality will fail if you plug in I for all three variables.
— edit —
My example was not quite apt. Instead we can take a=-I.
In[104]:= ayepowers = {-I^(I*I), (-I^I)^I}
N[ayepowers]
Out[104]= {I, (-I^I)^I}
Out[105]= {0. + 1. I, 2.64609*10^-18 - 0.0432139 I}
— end edit —
I myself teach that when we do (nonpositive number)^(noninteger number) we enter a minefield, where familiar rules break down. It seems that it is not widely taught.
Thank you. When i use Assumptions → {a > 0, Element[b, Integers]}, I get a^(b c ) - (a^b)^c = 0. Both assumptions are necessary. Could you please provide a reference for this? My problem requires b to be non-integer, so I would like more details to understand what can be done.
Again, thanks.
You really only need that b is real.
In[120]:= e1 = a^(b c);
e2 = (a^b)^c;
In[122]:= Simplify[e1 - e2, Assumptions -> {a > 0, Element[b, Reals]}]
Out[122]= 0
By definition a^b is Exp[b*Log[a]]. From there it can be worked out that the value of c is not relevant in this, and it comes down to whether Log[a^b] == Log[a]*b. The conditions shown above are sufficient though not necessary.
Possibly someone has a decent reference handy. Mine is “I worked it out by hand using the definition of a^b”.
Thank you. With sufficient assumptions, Mathematica and I now agree.
Unfortunately this is not taught well in US high schools. A related subject is that students lean that (-8.0)^(1/3) = -2.0. However, Mathematica and most software that will do that computation give a complex number. I think high schools should cover (negative)^(1/2) and (negative)^(integer) but not mention (negative)^x. I also think all high school students should lean the content in the attached.
Or that the exponents are integers:
Simplify[a^(b c) - (a^b)^c == 0,
Element[b | c, Integers]]
Actually we only need the following:
Simplify[(a^b)^c == a^(b c), Element[c, Integers]]
That and much more is in the document I uploaded above.
A slightly obscure case that I didn’t include in my attachment is the following
Simplify[(a^b)^c==a^(b c),-1<b<1]
Both of the above are true for all complex numbers except when the second argument of Simplify specifies otherwise.