# 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 is an arbitrary integer constant

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


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

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

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


True

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

sol1 /. C -> 0


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

% // 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 to be zero and only the one of the soutions remains.

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


{{x -> -1}}