# How to solve this equation?

Mathematica does not give me the correct solution (-1) for this equation:

Solve[9^(x + 4) == 27^(1 - x), x]


Do I miss something or is Solve the wrong approach here? Why?

• Solve[9^(x + 4) == 27^(1 - x), x, Reals] All those solutions are right too ... – Dr. belisarius Sep 18 '14 at 22:48

eqn = 9^(x + 4) == 27^(1 - x);

In the following, C[1] is an arbitrary integer constant

sol1 = Assuming[Element[C[1], Integers],
Solve[9^(x + 4) == 27^(1 - x)] // Simplify]


{{x -> -1 + (2 I [Pi] C[1])/Log[3]}, {x -> ( 2 I [Pi] C[1] + Log[-(1/3) (-1)^(1/5)])/Log[3]}, {x -> ( 2 I [Pi] C[1] + Log[1/3 (-1)^(2/5)])/Log[3]}, {x -> ( 2 I [Pi] C[1] + Log[-(1/3) (-1)^(3/5)])/Log[3]}, {x -> ( 2 I [Pi] C[1] + Log[1/3 (-1)^(4/5)])/Log[3]}}

Substituting the solutions back into the equation to verify that they satisfy it

And @@ Assuming[Element[C[1], Integers], eqn /. sol1 // Simplify]


True

If you set the arbitrary constant C[1] to zero your expected solution is evident

sol1 /. C[1] -> 0


{{x -> -1}, {x -> Log[-(1/3) (-1)^(1/5)]/Log[3]}, {x -> Log[1/3 (-1)^(2/5)]/ Log[3]}, {x -> Log[-(1/3) (-1)^(3/5)]/Log[3]}, {x -> Log[1/3 (-1)^(4/5)]/ Log[3]}}

% // N


{{x -> -1.}, {x -> -1. - 2.28768 I}, {x -> -1. + 1.14384 I}, {x -> -1. - 1.14384 I}, {x -> -1. + 2.28768 I}}

Restricting solutions to be real as recommended by @belisarius, forces C[1] to be zero and only the one of the soutions remains.

Solve[9^(x + 4) == 27^(1 - x), x, Reals]


{{x -> -1}}