# Why I am not getting True when testing equation?

My input is:

$$\frac{1}{a^x}==(\frac{1}{a})^x$$

I want to get output:

True


But getting output:

$$a^{-x}==\left(\frac{1}{a}\right)^x$$

Question: How to get output: True

Your expression is only true if a is positive.

Simplify[a^-x == (1/a)^x, a > 0]


True

• Is there a way to ask Mathematica in which cases it is true and in which not? So instead of me specifing for cases when a > 0, Mathematica will give me all possible cases with corresponding TRUE/False values. – vasili111 Nov 21 at 16:40
• @vasili111 That is an excellent, yet different question. I strongly suggest asking it as a separate question! – rubenvb Nov 22 at 14:28
• @rubenvb Done: mathematica.stackexchange.com/questions/210131/… – vasili111 Nov 22 at 17:38

You can use PowerExpand to find out the ratio in general:

PowerExpand[(1/a)^x a^x, Assumptions->True]


E^(2 I π x Floor[1/2 + Arg[a]/(2 π)])

For generic x this expression is only 1 when

Floor[1/2+Arg[a]/(2 π)] == 0


Using Reduce gives:

Reduce[Floor[1/2 + Arg[a]/(2 π)] == 0, a, Complexes]


(Im[a] != 0 && Re[a] < 0) || Re[a] >= 0

So the equality is only untrue for negative reals (i.e., along the branch cut for logs and powers).

Check with Simplify:

Simplify[a^-x == (1/a)^x, (Im[a] != 0 && Re[a] < 0) || Re[a] >= 0]


True

• Great answer. Thank you. – vasili111 Nov 21 at 17:08