14
$\begingroup$

Find $x$ for $4^{x-4} = 7$.

Answer I got, using log, was ${\log(7)\over 2\log(2)} + 4$

but the actual answer was ${\ln(7)\over2\ln(2)} + 4$

I plugged both in my calculator and turns out both are the equivalent value.

Anyways, is using either one of ln or log appropriate for this question? Obviously ln is when log has the base e, and log is when it has the base 10.

Final question: How do I know when to use which? that is which of ln or log is used when solving a question??

For example, if a question asks to find $x$ for $e^x = 100$, I will use $\ln$ since $\ln(e)$ cancels out.

If a question asks to find $2^x = 64$, i will use log since "$e$" isn't present in the question.

So is using either $\log$ or $\ln$ the same?

$\endgroup$
  • 10
    $\begingroup$ $$\log_{10}x=\frac{\ln x}{\ln 10}$$ $\endgroup$ – Lord Shark the Unknown Sep 20 at 6:52
  • 5
    $\begingroup$ As an aside, to make matters worse, some authors will write $\log$ without a subscript and mean different things than one another. In texts on combinatorics for instance it is not uncommon to see $\log$ without a subscript be meant to be interpreted as being the base 2 logarithm $\log_2$ while other authors might intend it to be the base 10 logarithm $\log_{10}$. Others still may use $\log$ as the natural logarithm rather than writing it as $\ln$. The nice thing is, regardless which base it is you always have $\log_n(a)/\log_n(b)=\log_b(a)$ $\endgroup$ – JMoravitz Sep 20 at 14:55
  • 1
    $\begingroup$ "In order to kill an exponential, you have to hit it with a log". Which raises the question "which log". The answer is -- it doesn't matter. $\endgroup$ – John Coleman Sep 20 at 16:11
  • $\begingroup$ You can always contrive that there are $e$'s around. Note $2^x=(e^{\text{ln}(2)})^x = e^{x\text{ln}2}$ $\endgroup$ – jacob1729 Sep 20 at 18:00
  • 4
    $\begingroup$ @JohnColeman: Just don't use base 1. math.stackexchange.com/questions/413713/log-base-1-of-1 $\endgroup$ – Joshua Sep 20 at 19:10
23
$\begingroup$

You can use any logarithm you want.

As a result of the base change formula $$\log_2(7) = \frac{\log(7)}{\log(2)} = \frac{\ln(7)}{\ln(2)} = \frac{\log_b(7)}{\log_b(2)}$$ so as long as both logs have the same base, their ratio will be the same, regardless of the chosen base (as long as $b > 0, b\neq 1$).

$\endgroup$
  • $\begingroup$ Thank you. Out of curiosity, why would one prefer to use natural log in the question 4^(x-4) = 7, when it does not contain "e" $\endgroup$ – harold232 Sep 20 at 6:56
  • 1
    $\begingroup$ @harold232 Since they're equivalent, the choice is harmless, but you still have to make a choice. The only reason I can think of to default to the natural log is that it is in some ways computationally easier than other logarithms (coming from formulas of calculus). $\endgroup$ – Brian Moehring Sep 20 at 7:01
  • 15
    $\begingroup$ @harold232 for mathematicians, $e$ is the default base for logarithms which they would use unless there is a particular reason for choosing something else. (This is largely because it has nice properties for calculus.) After base $e$, the next most common in maths is base $2$. $10$, as Michael Palin might say, is right out. $\endgroup$ – Especially Lime Sep 20 at 7:05
  • 5
    $\begingroup$ $10$ was popular in the days before calculators. In those days, it was the easiest one to work with as we had tables for it. I agree that its utility in pure maths is low today but it lives in a few cases where log scales are used e.g. pH in chemistry and the decibels. $\endgroup$ – badjohn Sep 20 at 8:43
  • 2
    $\begingroup$ @EspeciallyLime: 10 is used by "scientists". See my answer below. $\endgroup$ – JonathanZ Sep 20 at 17:15
10
$\begingroup$

Either is fine. You can write logarithms in terms of any base that you like with the change of base formula $$\log_ba=\frac{\log_ca}{\log_cb}$$

One thing learned from secondary school is that exponential equations can be solved be rewriting the relationship in logarithmic form. As such, your equation can be rewritten as follows: \begin{align} 4^{x-4}&=7\\ x-4&=\log_47\\ x&=4+\log_47 \end{align}

And since $\log_47$ can be rewritten as $\frac{\log7}{\log4}$ or $\frac{\ln7}{\ln4}$ or $\frac{\log_{999876}7}{\log_{999876}4}$ it does not matter which base of logarithm you use.

$\endgroup$
  • $\begingroup$ By the way I noticed that you left the denominator as log(4), shouldn't it be 2log(2) by power rule, since it is more simplified. Or does it not matter? $\endgroup$ – harold232 Sep 20 at 7:00
  • 1
    $\begingroup$ @harold232 As you say, $\log(4)=2\log(2)$. So it does not really matter $\endgroup$ – Henry Sep 20 at 7:09
  • 1
    $\begingroup$ If you want to input the logarithm into a calculator that does not have a log function that accepts a base parameter, then you can simply type in $\log\ 7 \div \log\ 4$. If you want to show your work or write a final solution as its exact value, I tend to accept $\log_47$ or $\frac{\ln7}{2\ln2}$ or its variants. $\endgroup$ – Andrew Chin Sep 20 at 7:10
  • 2
    $\begingroup$ No educator worth his salt is going to be that pedantic. To you, is $\frac12\log_27$ more acceptable compared to $\log_47$? $\endgroup$ – Andrew Chin Sep 20 at 7:20
  • 1
    $\begingroup$ Wolfram says at best it as an alternative $\endgroup$ – Andrew Chin Sep 20 at 7:29
7
$\begingroup$

Culturally

  • Computer science / programming people tend to use log base $2$
  • Mathematicians tend to use log base $e$
  • Engineers / physicist / chemists etc. tend to use log base $10$

Writers really should make it explicit the first time they use "$\log$", but they don't always. As others have pointed out, the only difference is a constant factor, and in your case the factors in the numerator and denominator cancelled each other out. So the answer to your question is "If it's in a math context you'll probably see $\ln()$ used."

Heck, even if you were asked to solve $10^{x - 3} = 6$ you'd still see $\ln()$ used, even though it looks like $\log_{10}$ might seem more "natural" for that particular problem. It's just what math people tend to do.

$\endgroup$
  • 3
    $\begingroup$ It is called the "natural logarithm", after all. (: $\endgroup$ – Andrew Chin Sep 20 at 17:38
  • 2
    $\begingroup$ :) We've learned that what different groups of people consider to be "natural" can vary greatly, and even contradict each other. Hence my starting off with the word "culturally". $\endgroup$ – JonathanZ Sep 20 at 17:52
  • 1
    $\begingroup$ @JonathanZ you made me laugh out loud in a library! @@ It was a natural reaction of course. $\endgroup$ – uhoh Sep 21 at 5:43
4
$\begingroup$

There's an interesting unstated question here: what counts as an answer?

You can clearly argue that using either $\ln$ or $\log_{10}$ should be acceptable. But in that case $$ x = \log_4(7) + 4 $$ should be just as correct. As @BrianMoehring says in his answer, you can use any logarithm you want.

As for

If a question asks to find $2^x=64$, i will use log since "e" isn't present in the question.

I would just say $x=6$. That's really using $\log_2$, by inspection.

$\endgroup$
2
$\begingroup$

In this case the other two answers are technically correct of course, in that the base doesn't really matter. But I want to point out that when you see $\log(x)$, it can either mean base $10$, base $2$ or base $e$, with the latter two (especially base $e$) being much more common as you move up the math ladder. The notation $\ln(x)$ is still used for base $e$, but whenever you see $\log(x)$ you should always assume it is also base $e$ unless context implies otherwise (if it's supposed to mean base $2$, it should be clear from context).

Part of the reason is exactly because of the reason mentioned by the two other answers: for any $a,b$ we have $$\log_a(b)=\frac{\log(b)}{\log(a)},$$ So we can express logarithms of any base using the natural logarithm anyway and there's no need to designate a special symbol for it. And indeed you will see that base $e$ is much more useful than base $10$ most of the time.

$\endgroup$
  • 7
    $\begingroup$ log is often considered log_2 in CS papers $\endgroup$ – RiaD Sep 20 at 16:32
1
$\begingroup$

Use the change of base formula if you suspect that the answer is irrational, otherwise take the logarithm to both sides of the equation of a base that seems reasonable.

There's nothing magical about the change of base formula. $$\begin{align} \log_c b &= \log_c b\\ \log_c a^{\log_a b} &= \log_c b\\ \log_a b \cdot\log_c a &= \log_c b\\ \log_a b &= \frac{\log_c b}{\log_c a}\\ \end{align}$$

Even if the solution is integral or rational, using the change of base formula will get you to an answer, for example:

$$\begin{align} 2^x &= 64\\ \log_{10}2^x &= \log_{10} 64\\ x\log_{10}2 &= \log_{10} 64\\ x &= \frac{\log_{10} 64}{\log_{10}2}\\ x &= \log_{2} 64\\ x &= \log_{2} 2^6\\ x &= 6\log_{2} 2\\ x &= 6\\ \end{align}$$ although, it does insert a lot of extra [unnecessary] steps.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.