# How can I write Log[a]/Log[b] in the form Log[b,a]?

I solve the equation $$2^x + 2^{x + 4} + 2^{x + 3} == 3^x + 3^{x + 4} + 3^{x + 3}$$. I tried

Solve[2^x + 2^{x + 4} + 2^{x + 3} == 3^x + 3^{x + 4} + 3^{x + 3}, x, Reals] // FullSimplify


{{x -> -(Log[109/25]/Log[3/2])}}

How can I write the answer -(Log[109/25]/Log[3/2]) in the form -Log[3/2,Log[109/25]?

• See and mathematica.stackexchange.com/a/107405 and the SystemOptions setting "AutosimplifyTwoArgumentLog". Commented Jan 15 at 4:48
• @Goofy I tried that first thing. But here it does not work. This is a reverse problem. !Mathematica graphics How will this option otherwise help here? Commented Jan 15 at 5:03
• @Nasser this worked for me: !Mathematica graphics Commented Jan 15 at 5:17
• @Goofy sure. But you had to do the manual step Log[a_]/Log[b_] :> Log[b, a] after setting this flag. I thought you meant without doing this manual step. This is same solution as Syed but instead of using Defer this setting is used in its place. Commented Jan 15 at 5:25
• @Nasser Of course. How could you possibly make Mma use a particular base for Log? That's not what blocking autosimplification is about. Defer only holds up autosimplification for output purposes. It reverts to natural log when evaluated. That does not happen if autosimplification is turned off. They're different, no? Commented Jan 15 at 5:31

sol = First@
Solve[2^x + 2^{x + 4} + 2^{x + 3} == 3^x + 3^{x + 4} + 3^{x + 3},
x, Reals] // FullSimplify

x /. sol /. Log[a_]/Log[b_] :> Defer[Log[b, a]]


-Log[3/2, 109/25]