# Solving logarithmic equation with different bases

$\log_2\left(x-5\right)=\log_5\left(2x+7\right)$ I have to solve this but my answer vary from x = 7, x = -9, x = 5/3 and I don't know why this happens. Here is my approach:

$\frac{\log_5\left(x-5\right)}{\log_5\left(2\right)}=\log_5\left(2x+7\right)$

$\frac{\log_5\left(x-5\right)}{\log_5\left(2x+7\right)}=\log_5\left(2\right)$

$\log_{2x+7}\left(x-5\right)=\log_5\left(2\right)$

Conditions: x > 5

So we are left with: x - 5 = 2 => x = 7 (verifies the conditions)

2x + 7 = 5 => x = -1 (does not verify the conditions)

Therefore, x = 7.

But when you plug in x = 7 => $\log_2\left(2\right)=\log_5\left(21\right)$ which are not equal.

I guessed a solution that works which is x = 9.

trying to solve that system, i found another way to solve it

x - 5 = 2 | *(-1)

2x + 7 = 5

=> - x + 5 = -2

  2x + 7 = 5


We add them up and we have:

x + 12 = 3 => x = -9 which does not verify the condition.

What am I doing wrong?

• You say $x-5 =2$ verifies one condition and $2x + 7 = 5$ fails the condition. Why would you assume these are the only two options? I might be wrong, but I'm pretty sure there are more than two real numbers. – fleablood Feb 11 '18 at 17:48
• Ah... I see. You are assuming that if $\log_a b = \log_c d$ means that either $b = d$ or $a = c$. That's simply wrong. – fleablood Feb 11 '18 at 17:51
• @fleablood oh... i see... then what should i do? – user473470 Feb 11 '18 at 18:10
• If it is known that $x$ is an integer just plug in the numbers $6,7,8,9,10,11,...$ – callculus Feb 11 '18 at 18:19
• @callculus so you're telling me there is no way of solving this but just guessing? – user473470 Feb 11 '18 at 18:41

## 1 Answer

$\log_2(x-5) = \log_5(2x+7)=k$

$2^k = x-5$ so $x = 2^k + 5$. $5^k =2x - 7$ so $x = \frac {5^k -7}2$

Or $2*2^k +10 = 5^k - 7$

$2^{k+1} = 5^k-17$

[cute that $2^{k+1} -8 = 5^k -25$... but, I'll assume I wasn't clever enough to see that.]

At this point we can really only guess but clearly if we increase $k$ by small incrementss the RHS will increase more than the LHS, so there is only one solution and we can hone in on values. If the RHS is larger than the LHS we take smaller values of $k$ and vice versa.

$2^{1+1} > 5^1 - 17$ so $k > 1$

And $2^{3 + 1} < 5^3 - 17$ so $k < 3$

It's simple enough to discover $k = 2$ is a solution..

(Even simpler if we noticed $2^{k+1} - 8 = 5^k - 25$ so $2^3 - 8 = 5^2 - 25 = 0$)

So $x = 2^2 + 5 = \frac{5^2 - 7}2 = 9$.