# Logarithms - How to handle factors within a difference or sum term of logarithms?

Edit: I just rewrote the whole question, to make it clear, what I'm looking for. Originally I asked about solving $16^{x+1} = 4^{x+3}$, then corrected it to $16^{x+2} = 4^{x+3}$.

But what I really want to know is this: How do you get from

$$(x + 2)\ln(16) - (x + 3)\ln(4) = \ln(1)$$

to

$$x = \frac{3\ln(4) - 2\ln(16)}{\ln(16) - \ln(4)}$$

I'm particularly concerned about the factors $(x+2)$ and $(x+3)$ as I don't understand, how they lead up the the last term above.

-
Multiply everything out, then group any term with an $x$. Remember than $\ln 1 = 0$. –  Antonio Vargas May 17 '12 at 22:31
You know that $(x+1)\ln 16 = x\ln 16 + 1\ln 16$, right? –  Rahul May 17 '12 at 22:39
Why are you using logarithm ? However if you want to use it in a appropriated basis. –  checkmath May 17 '12 at 22:39
Because I'm learning how to calculate with logarithms. –  Miroslav Cetojevic May 17 '12 at 22:40
If you edit the question to make a correction, please mention that you've done so in the question, so that people understand why the answers are all now wrong. –  Ben Millwood May 17 '12 at 23:16

Once you've got $(x+2)\ln(16)−(x+3)\ln(4)=\ln(1)$, use $\log 1 = 0$ (true regardless of the base) and then forget about the logs entirely for now: the rest is just algebra, so let $a = \ln(16)$ and $b = \ln(4)$. Then solve $$(x+2)a - (x+3)b = 0$$ for $x$, by expanding the brackets and rearranging; you will get $$x = \frac{3b - 2a}{a - b}$$, which is indeed (substituting back in $a$ and $b$) exactly what you wanted.

(If you can't do the algebra, say so and I'll give a bit more detail).

-
Ah, now it makes sense. I got too focused on the logs and somehow fumbled over the whole equation. –  Miroslav Cetojevic May 17 '12 at 23:35

Why would you apply logarithms before simplifying stuff??

$16^{x+1}=4^{x+3}\Longrightarrow \left((2^4)\right)^{x+1}=\left(2^2\right)^{x+3}\Longrightarrow 2^{4x+4}=2^{2x+6}\Longrightarrow 4x+4=2x+6\Longrightarrow x=1$

-
Well, uh, it's about learning logarithms. The solution of $x$ was marked as $-1$, is this wrong? –  Miroslav Cetojevic May 17 '12 at 22:37
@MiroslavCetojevic Yes $x=-1$ is indeed wrong. You can check this by plugging in the value $x=-1$ to get the incorrect statement that $16^{-1+1} = 4^{-1+3}$ –  user17762 May 17 '12 at 22:52
Of course it is wrong! $,1=16^0=16^{-1+1}\neq 4^{-1+2}=4^2=16$ –  DonAntonio May 17 '12 at 22:52
Ah, shit, I put in the wrong number! It's supposed to be $x+2$. –  Miroslav Cetojevic May 17 '12 at 22:57

To proceed with what you have done, you need to recognize that $\ln(1) = 0$ and $\ln(a^b) = b \times \ln(a)$ i.e. $\ln(16) = \ln(4^2) = 2 \ln(4)$. Then you can simplify the expression you have to get $$(x+2) \times 2 \times \ln(4) - (x+3) \times \ln(4) = 0$$ i.e. \begin{align*} (x+2) \times 2 \times \ln(4) &= (x+3) \times \ln(4) \\ 2(x+2) &= x+3 \\ 2x+4 &= x +3 \\ x&=-1 \end{align*}

The easier way is to take the logarithm to the base $4$. Then we get that $$(x+2) \times \log_4(16) = (x+3) \times \log_4(4)$$ Hence, \begin{align*} (x+2) \times \log_4(4^2) &= (x+3) \times 1 \\ (x+2) \times 2 \times \log_4(4) &= (x+3) \times 1 \\ (x+2) \times 2 \times 1 &= (x+3) \times 1 \\ 2x+4 &= x+3 \\ x&=-1 \end{align*}

-