# Confusion regarding $\log(x)$ and $\ln(x)$

I was solving an integral and I encountered in some question

$$\displaystyle \int_{2}^{4}\frac{1}{x} \, \mathrm dx$$

I know its integration is $\log(x)$. But my answer comes correct when I use $\ln(x)$ instead. What is this confusion? How do I know which one to use? Thanks

• In mathematics, the natural logarithm is the one which is applicable in the generally used formulas and theorems. So in a mathematical context, the symbol $\color{red}{\log}$ will always mean the natural logarithm, which is also sometimes denoted as $\color{red}{\ln}$ . In physics and chemistry, log tables used to be very useful for calculations and they used base 10 so the formulas in chemistry generally mean $\color{red}{\log_{10}}$ if they just write $\color{red}{\log}$ . Commented Jan 11, 2016 at 12:26
• @G-man: And in computer science the natural and base 10 logarithms are almost never used; a computer scientist will assume that log is the base two logarithm. Commented Jan 11, 2016 at 17:14
• @G-Man's comment is more explaining than any answer here. +1 Commented Jan 11, 2016 at 17:18
• Without context log() is always assumed to be base 10. ln() is explicitly the natural log. For proof see your calculator. log₂() you just have to subscript. Why? It's not on your calculator. Any document can redefine anything within it's own context but if you don't people assume their calculator is right. Please keep this in mind as you write new mathematical texts. You're confusing people pointlessly. Commented Jan 11, 2016 at 18:19
• @EricLippert I disagree - when the base of a logarithm is relevant (e.g., when constant factors matter and one isn't just saying something like $\Theta(n\log n)$ ) base-two logs are generally written as $\lg$ rather than $\log$. More often than not, though, results are talked about 'up to a constant factor' asymptotically and so the base of a logarithm is moot. Commented Feb 1, 2016 at 18:59

$\log(x)$ has different meanings depending on context. It can often mean:

• any logarithm if the base is not important (e.g. in general proofs about logarithms)
• the natural logarithm $\log_e(x) = \ln(x)$ (usual convention in mathematics)
• the decadic logarithm $\log_{10}(x)$ (usual convention in chemistry, biology and other sciences)
• the binary logarithm $\log_{2}(x)$ (most often used in computer science)

In your case, $\log(x)$ just means the same as $\ln(x)$

• in exam which one i use Commented Jan 11, 2016 at 12:24
• It depends on both you and your teacher's preferences. Some teacher's make students use one notation above another. If you are given the option to choose, I suggest writing something like "Let $\log x$ be the natural logarithm with base $e$" to minimize any confusion. Commented Jan 11, 2016 at 12:54
• @TaylorTed I used to face the same problem. I am used to calculus and number theoretic aspects, where the neutral base is always $e$, but my chemistry teacher kept complaining I gave wrong answers, as he thought it should've been $\ln$. Finally, I resorted to using them according to the context. During exams, I almost always use the subscript. That keeps confusion away. Commented Jan 11, 2016 at 17:23
• @zz20s Why not recommend just using $\ln x$ so there's never any confusion or need to clarify? I've never used $\log x$ to mean $\ln x$. The natural logarithm is the only one that has a clear, consistent, dedicated symbol for it. I think we should use it. Commented Jan 11, 2016 at 17:45
• I annoyed my teacher using ln x for natural log everywhere. :( Commented Jan 11, 2016 at 17:47

The notation $\log$ is used for logarithms in general. For specific logarithm bases you normally use $\ln$ (for natural logarithm), $\lg$ (for base 10). Sometimes $\operatorname{lb}$ is used for base two.

So the question is what base is meant when writing $\log$. Normally one would indicate the base by subscribing the base. For example $\lg x = \log_{10} x$ or $\ln x = \log_ex$.

The problem then is what you make of an expression of $\log x$? That's ambiguous since the base is not specified. However in some cases it would be assumed that the default base is $e$ (but in some cases it maybe different).

Bottom line is if you don't want confusion you should normally use $\ln$ instead, or maybe $\log_e$ and never use $\log$ without subscript.