# Unexpected examples of natural logarithm

Quite often, mathematics students become surprised by the fact that for a mathematician, the term “logarithm” and the expression $$\log$$ nearly always mean natural logarithm instead of the common logarithm. Because of that, I have been gathering examples of problems whose statement have nothing to do with logarithms (or the exponential function), but whose solution does involve natural logarithms. The goal is, of course, to make the students see how natural the natural logarithms really are. Here are some of these problems:

1. The sum of the series $$1-\frac12+\frac13-\frac14+\cdots$$ is $$\log2$$.
2. If $$x\in(0,+\infty)$$, then $$\lim_{n\to\infty}n\bigl(\sqrt[n]x-1\bigr)=\log x$$.
3. What's the average distance from a point of a square with the side of length $$1$$ to the center of the square? The question is ambiguous. Is the square a line or a two-dimensional region? In the first case, the answer is $$\frac14\bigl(\sqrt2+\log\bigl(1+\sqrt2\bigr)\bigr)$$; in the second case, the answer is smaller (of course): $$\frac16\bigl(\sqrt2+\log\bigl(1+\sqrt2\bigr)\bigr)$$.
4. The length of an arc of a parabola can be expressed using logarithms.
5. The area below an arc of the hyperbola $$y=\frac1x$$ (and above the $$x$$-axis) can be expressed using natural logarithms.
6. Suppose that there is an urn with $$n$$ different coupons, from which coupons are being collected, equally likely, with replacement. How many coupons do you expect you need to draw (with replacement) before having drawn each coupon at least once? The answer is about $$n\log(n)+\gamma n+\frac12$$, where $$\gamma$$ is the Euler–Mascheroni constant.
7. For each $$n\in\mathbb N$$, let $$P_p(n)$$ be the number of primitive Pythagorean triples whose perimeter is smaller than $$n$$. Then $$\displaystyle P_p(n)\sim\frac{n\log2}{\pi^2}$$. (By the way, this is also an unexpected use of $$\pi$$.)

Could you please suggest some more?

• I always thought $\log_{10}$ was written $\operatorname{lg}$ ... – Hagen von Eitzen Jul 3 '17 at 13:20
• For me, $log = ln$ seems to be common for people working in analysis. If you are looking, for example, at computer science, you would almost always have $log = ld$ - and I assume there are also examples of fields where $log = lg$ is the most common or where $log$ is not specified at all (e.g. "logarithmic scale", "logarithmic running time"). Mathematics is a very wide area, stretching out into many other fields; and I think you can't simply state that $log = ln$ is most common for all these fields. – Dirk Jul 3 '17 at 13:32
• The usage in the English world is really surprising. Why don't you just write $ln$ for the natural logarithm? It's even shorter. I would use $log$ only if I want to specify other base or if the base doesn't matter at all. – Džuris Jul 3 '17 at 16:51
• As an aside, in computer science, $\log_2$ is the most prevalent logarithm. – user14972 Jul 3 '17 at 17:07
• @HagenvonEitzen You're introducing more confusion :-) $\log_{10}$ is never written $\lg$ AFAIK; the notation $\lg$ is used for $\log_2$. – ShreevatsaR Jul 4 '17 at 18:40

What about the Prime Number Theorem? The number of primes smaller than $x$ is denoted by $\pi (x)$ and you have $$\pi (x) \sim \frac{x}{\log x}$$

• Is that meant to be a proportionality symbol? – theonlygusti Jul 4 '17 at 6:27
• The symbol means "in limit to infinity" here, no proportionality involved. The logarithm should actually be a natural logarithm, making this a great answer to the question. – tomsmeding Jul 4 '17 at 7:30
• Agreed with answer and tomsmeding. This is asymptotic equivalence, not proportionality, and it is the natural logarithm that is used here. – Meni Rosenfeld Jul 4 '17 at 10:29
• I've always found it more enlightening to write the asymptotic relation in the Prime Number Theorem in the form $$\frac{\pi(x)}{x} \sim \frac{1}{\log x},$$ because now the fraction on the left is the proportion of primes among numbers up to $x$. – murray Jul 5 '17 at 16:37
• @murray: The one I always remember (I keep forgetting what π(x) even is, I'm not a mathematician) is that the nth prime tends to n log n. It's short and the one I'd probably care about the most. – Mehrdad Jul 6 '17 at 1:30

Here are some of my favorites:

• By "reversing" Euler's identity, $$\ln(\cos x+i\sin x)=ix$$

• The natural log appears in some of the integrals of trigonometric functions: $$\int \tan (x) dx=\ln(\sec(x))+C$$ $$\int \cot (x) dx=\ln(\sin(x))+C$$ $$\int \sec (x) dx=\ln(\sec(x)+\tan(x))+C$$

• The appearance of the natural logarithm in the Tsiolkovsky rocket equation: $$\Delta v=v_e\ln\frac{m_0}{m_f}$$

• @Christoph Haha, thanks! – Franklin Pezzuti Dyer Jul 4 '17 at 13:10
• Be careful with the logarithms, $\ln(\cos x+i\sin x)$ has a period of $2\pi$, whilst $ix$ is not periodic at all. – Simply Beautiful Art Jul 7 '17 at 13:01
• @SimplyBeautifulArt Hmmm, why might that be? – Franklin Pezzuti Dyer Jul 7 '17 at 13:10
• It happens to be that $e^z$ is not a bijective function on $\mathbb C$. Indeed, $e^z=e^{z+2\pi i}$. One usually fixes this with what is called the principal value. – Simply Beautiful Art Jul 7 '17 at 13:23
• @SimplyBeautifulArt Oh, I see... thanks! – Franklin Pezzuti Dyer Jul 7 '17 at 13:24

Your first point can be generalized. Write $[a_1,a_2,a_3,\dots]$ for $\sum a_n/n$. You wrote:$$[\overline{1,-1}]=\ln2.$$(The bar means repeat.) Then we also have:\begin{align}[\overline{1,1,-2}]&=\ln3,\\ [\overline{1,1,1,-3}]&=\ln4,\end{align}and in general:$$[\overline{\underbrace{1,1,\dots,1}_{n-1},1-n}]=\ln n.$$

As a side note, one can see that $\ln m+\ln n=\ln mn$ from this. For example, note that, from the definition, we have $[\overline{0,2,0,-2}]=[\overline{1,-1}]=\ln2$ (from doubling the numerators and denominators). We then have:\begin{align}\ln2+\ln2={}&[\overline{1,-1,1,-1}]+\\&[\overline{0,2,0,-2}]\\{}=&[\overline{1,1,1,-3}]=\ln4\end{align} Similarly: \begin{align}\ln2+\ln3={}&[\overline{0,0,3,0,0,-3}]+\\&[\overline{1,1,-2,1,1,-2}]\\{}=&[\overline{1,1,1,1,1,-5}]=\ln6\end{align}

• Very cute! I didn't know that one. – José Carlos Santos Jul 5 '17 at 22:17
• How would one prove the general representation of $\ln n$? – Fizikus Sep 1 '18 at 8:41
• @Fizikus Hint: See the answer by Hurkyl ($H_n\approx\ln(n)+\gamma$). Consider $H_{kn}-H_n$. – Akiva Weinberger Sep 1 '18 at 17:21
• If we extend it backwards we get the trivial identity that $[\overline{0}] = 0\times\frac11 + 0\times\frac12 + 0\times\frac13 + \cdots = 0$! – Solomon Ucko Mar 23 at 22:25
• @SolomonUcko ${}=\ln(1)$, as it should! – Akiva Weinberger Mar 24 at 8:11

The continuous solution of the functional equation $f(x\cdot y)=f(x)+f(y)$, with the condition $f'(1)=1$ is $f(x)=\ln (x)$.

Changing the value of $f'(1)$ we find the other logarithm functions.

• This seems very closely related to rules of logarithm (to multiply, add logs) and therefore not terribly surprising. – Ross Presser Jul 3 '17 at 14:51
• Certainly not surprising. It can be used as a definition. – Emilio Novati Jul 3 '17 at 14:57
• Can you please elaborate on "other logarithm functions"? – spraff Jul 5 '17 at 8:55
• If $f'(1)=a$ the solution of the functional equation becomes $f(x)=a \ln x=\log_{e^a} x$ – Emilio Novati Jul 5 '17 at 9:16
• @spraff Other bases. – Akiva Weinberger Jul 5 '17 at 19:12

Here's another one related to some of your examples: the $n$-th harmonic number

$$H_n = 1 + \frac{1}{2} + \ldots + \frac{1}{n}$$

satisfies

$$H_n \approx \ln(n) + \gamma$$

where $\gamma$ is the Euler-Mascheroni constant. The error in the above approximation is slightly less than $\frac{1}{2n}$.

• Another good one is that $\sum_{p\le n}p^{-1} \sim \ln \ln n$, where $p$ is prime and $n$ is an integer. – eyeballfrog Jul 3 '17 at 22:17
• Notably, the coupon collection problem mentioned by the OP, is closely related to these harmonic numbers. The approximate solution he gave is simply the first few terms in the expansion of $H_n$, multiplied by $n$. – Meni Rosenfeld Jul 4 '17 at 10:30
• This looks closely related to "the antiderivative of $x^{-1}$ is $\ln x$." – Kevin Jul 4 '17 at 17:29
• As a consequence, $\lim_{k\to\infty}H_{nk}-H_k=\ln n$. (EDIT: Also, $H_{2n}-H_n$ is the partial sum of $\sum(-1)^{n+1}/n$, which means that OP's first fact is implied by your fact.) – Akiva Weinberger Jul 5 '17 at 19:14

Using $\sigma(n)$ as the sum of the (positive) divisors of a natural number $n,$ we have $$\sigma(n) \leq e^\gamma \, n \, \log \log n + \frac{0.64821364942... \; n}{\log \log n},$$ with the constant in the numerator giving equality for $n=12.$ Here $\gamma = \lim H_n - \log n.$

As suggested by Oscar, we may write this without approximations as $$\sigma(n) \leq e^\gamma \, n \, \log \log n + \frac{ n \; ( \log \log 12) \left(\frac{7}{3} -e^\gamma \,\log \log 12 \right)}{\log \log n}.$$

There are some numbers up to $n \leq 5040 \;$ (such as $n=12$) for which $\sigma(n) > e^\gamma \, n \, \log \log n .$ The conjecture that, for $n > 5040,$ we have $\sigma(n) < e^\gamma \, n \, \log \log n ,$ is equivalent to the Riemann Hypothesis.

Note that the occurrence of $\log \log n$ means that we cannot replace the natural logarithm by some other without changing the sense of the statement. We would not just be multiplying by a constant if we used a different logarithm.

• The constant on the right side is rendered exactly as $(\log \log 12)(7/3-e^{\gamma}\log \log 12)$. – Oscar Lanzi Jul 4 '17 at 10:40

Something I found some months back. Would be surprised if this hasn't been looked at before. No citations.

We say a set $S$ can express $n$ if it's possible to express $n$ as a potentially repeating sum of elements of $S$.

We say that a set $S$ is critical for $n$ if $S$ can express $n$ and no strict subset of $S$ can express $n$.

Let $u_n$ be the size of the largest subset of $\{1,2,\dotsc ,n\}$ that is critical for $n$. It's conjectured that $u_n$ grows like $\log_e n$.

Evidence:

• Post this as its own question. I'm curious what a solution for this would look like. – Brevan Ellefsen Jul 6 '17 at 20:20

Consider phase transition in the Erdős-Rényi model $G(n, p)$. We have

The property that $G(n, p)$ has diameter two has a sharp threshold at $p = \sqrt{\frac{2\ln n}{n}}$.

That is, if $p$ is smaller than $\sqrt{\frac{2\ln n}{n}}$, then the probability that the diameter of $G(n, p)$ is greater than $2$ goes to $1$ in the limit, as $n$ goes to $\infty$; if $p$ is greater than $\sqrt{\frac{2\ln n}{n}}$, then the probability that the diameter of $G(n, p)$ is smaller than or equal to $2$ goes to $1$ as $n$ goes to $\infty$.

Another similar conclusion is

The disappearance of isolated vertices in $G(n, p)$ has a sharp threshold at $p = \frac{\ln n}{n}$.

The law of the iterated logarithm states that $$\limsup_{n \to \infty} \frac{X_1+\ldots+X_n}{\sqrt{n \log\log n}} = \sqrt 2$$ almost surely, where $X_1,\ldots,X_n$ are iid random variables with means zero and unit variances.

$$\frac{d}{dx}\,(x^x) = x^x \ (\ln(x)+1)$$

How do you count connected labeled graphs on $n$ vertices?

Let's take the not-necessarily-connected case first. There are $\binom{n}{2}$ possible edges between the $n$ vertices, and for each you may include it or not. So there are $$2^\binom{n}{2}$$ possible graphs.

Now to count connected graphs, we need to do some "generatingfunctionology", to steal Wilf's term. Let $$f(x) = \sum_{n=0}^\infty 2^\binom{n}{2} \frac{x^n}{n!}$$ be the (formal) exponential generating function for labeled graphs. Then if $c_n$ is the number of connected graphs on $n$ vertices, we have

$$\sum_{n=1}^\infty c_n \frac{x^n}{n!} = \log f(x) = \log\sum_{n=0}^\infty 2^\binom{n}{2} \frac{x^n}{n!}.$$

This is astonishing the first time you see it, but it is very natural once you understand how exponentiation works on exponential generating functions.

$$\sum_{k=1}^{\infty} \frac{k \mod{j}}{k(k+1)} = \log{j}, \: \forall j \in \mathbb{N}$$

• very interesting: could you pls. show how to obtain it, or give a reference ? – G Cab Jun 24 '18 at 21:10
• @GCab d-scholarship.pitt.edu/7545 page 11 – bloomers Jun 24 '18 at 22:10
• Thanks indeed for the reference – G Cab Jun 25 '18 at 0:50

Solve $x^n-x-1=0$ for various values of $n$ ($n\ge 2$). There will be one root greater than $1$ for each $n$. The asymptotic behavior of this root as $n$ increases without bound is given to two terms as:

$x=1+(\log 2)/n+o(1/n)$

In Calculus I the student learns how to find antiderviatives of $x^n$ for all integers $n \ne -1$. They scratch their heads and scream

"Give me the antiderivative of the inversion function $1/x$!"

OK you say, here it is:

$\ln(t)=\int _{1}^{t}{\frac {1}{x}}\,dx$

• I see now you already have it listed - might as well keep my answer since it goes as it in a different way... – CopyPasteIt Jul 3 '17 at 19:59
• Note that $\displaystyle\int_1^xt^n\operatorname d\!t=\frac{x^{n+1}-1}{n+1}$, and $\displaystyle\lim_{n\to-1}\frac{x^{n+1}-1}{n+1}=\ln x$. Thus, this result is a limiting case of the integral power rule. – Akiva Weinberger Jul 5 '17 at 19:25
• But this is one of the possible definitions of the $\ln$ function, and hence not surprising. – 200_success Jul 24 '17 at 6:31
• It might be surprising to a calculus student who knows about $f(x) = e^x$ and only that the log function is the inverted graph of $f$. In any event, it is fascinating that the 'puzzle pieces' fit together the way they do. – CopyPasteIt Jul 24 '17 at 10:54

Here is one containing a lot of $\log$s.

Consider the standard multiplication table, but with rows and columns indexed by $1$ to $N$ instead of $1$ to $10$. The question is, how many distinct integers are there among these? Perhaps surprisingly, the answer is asymptotically less than $N^2$. Ford has shown that the answer is, asymptotically, $$\frac{N^2}{(\log N)^{c_1}(\log\log N)^{3/2}},$$ where $c_1=1-\frac{1+\log\log 2}{\log 2}$. Similarly, if we were to consider $k+1$ dimensional multiplication table (defined in the obvious manner) the number of distinct integers in it is $$\frac{N^{k+1}}{(\log N)^{c_k}(\log\log N)^{3/2}},c_k=\frac{\log(k+1)+k\log k-k\log\log(k+1)-k}{\log(k+1)}.$$

I found it quite remarkable that $$\int\frac{1}{x\log(x)\log(\log(x))}dx = \log(\log(\log|x|))$$ But more generally, if $$\log^{\circ i}(x)$$ means $$\log\underbrace\cdots_{i\text{ times}}\log x$$, then $$\int\frac{dx}{x\prod_{i=1}^n{\log^{\circ i}(x)}} = \log^{\circ n+1}|x|, n\in\mathbb{N}$$ Indeed, $${\mathrm d\over\mathrm dx}\frac{1}{\log\log\log\log|x|}=\frac{1}{x\log(x)\log\log(x)\log\log\log(x)}$$

• I would use either $\log^i(x)$ or $\log^{\circ i}(x)$ to avoid confusion with the base-$i$ logarithm. – Akiva Weinberger Jul 5 '17 at 19:27
• @AkivaWeinberger: had the same thought. I'll try to improve it. – edmz Jul 5 '17 at 19:37

Perhaps the students would enjoy that the area of the unit circle may be expressed as $$- \sqrt{-1} \log{(-1)}$$

• In the immortal words of miss Eliza Doolittle: “Not bloody likely”. – José Carlos Santos Jul 19 '17 at 15:22
• @JoséCarlosSantos I'll stick to the weather and my health then... – ekkilop Jul 19 '17 at 15:39

This is more about $e$ than the natural logarithm, but I was surprised that the maximum of $x^{1/x}$ was at $e$.

That comes up in studying the equation $a^b = b^a$ for $a, b \in \mathbb{R}$ with $a\ne b$.

$$S = k\ln{W}$$

• This is not specifically about natural logarithms. I know that the standard way of expressing Boltzmann's entropy equation uses them but, with a different constant, we would be ablle to express the equation using, say, common logarithms or base $2$ logarithms. – José Carlos Santos Jul 6 '17 at 10:46
• True, but the constant is the Boltzmann constant which is $R/N_A$ and thus not very arbitrary. I find the relationships with those other constants to be cool. – Archie Gertsman Jul 6 '17 at 11:21

My favorite facts involving logarithms are indeed law of the iterated logarithm, coupon collector's problem and giant component, but they seem to be already mentioned in previous answers.

However, there is a lot of cute facts about logarithms, that were not mentioned yet:

1) The logarithm is used to express relationships between uniform continuous, exponential and Pareto distributions:

If $X \sim U(0,1)$ then $- {\lambda}^{-1} \ln {X} \sim Exp(\lambda)$

If $X \sim P(\lambda, t)$, then $\ln{\frac{X}{t}} \sim Exp(\lambda)$

2) $\exists c \in \mathbb{R}, B_n \leq {(\frac{cn}{\ln {(n+1)}})}^n$, where $B_n$ is the n-th Bell number.

3) The smallest possible independence number in an n-vertex triangle-free graph is $O({(n \ln{n})}^{\frac{1}{2}})$

4) $\frac{2(\ln n)}{\ln(\frac{1}{p})}$ is the size of the largest clique in almost every random graph with $n$ vertices and edge probability $p$

5) The number of groups of order $n$ is less, than $n^{\frac{(\ln n)^2}{2}}$

6) Every finite group $G$, whose composition factors are isomorphic neither to Steinberg groups, nor to Suzuki groups, nor to Ree groups, has a presentation of order $O((\ln |G|)^3)$

7) If $G$ is a non-abelian simple group, $\exists S (\langle S \rangle = G) \cup (|S| \leq 7) \cup (diam(Cay(G, S)) \leq {10}^{10}\ln|G|)$

8) There exists such a constant $C$, such that every finite group G has less than $\frac{C \ln |G|}{(\ln \ln |G|)^8}$ conjugacy classes.

9) And there are also several inequalities for Ramsey numbers, that involve logarithms:

$$\exists c \in \mathbb{R} \forall n \in \mathbb{N} \text{ }R(n, n) \leq n^{\frac{-c \ln{n}}{\ln{\ln{n}}}} 4^n \text{(Conlon inequality)}$$

$$R(3, n) = O(\frac{n^2}{\ln {n}})$$

$$\exists \{c_n\}_{n=1}^{\infty} \subset \mathbb{R} \forall n \in \mathbb{N} \forall m \in \mathbb{N} \text{ } c_n \frac{m^{\frac{m+1}{2}}}{{(\ln{m})}^{\frac{n+1}{2} - \frac{1}{n-2}}} \leq R(n, m) \text{(Bohman-Keevash inequality)}$$

$$\exists \{c_n\}_{n=1}^{\infty} \subset \mathbb{R} \forall n \in \mathbb{N} \forall m \in \mathbb{N} \text{ } R(n, m) \leq c_n \frac{m^{n-1}}{{(\ln{m})}^{n-2}} \text{(Ajtai-Komlós-Szemerédi inequality)}$$

Recently I was reading some works of the famous Indian Mathematician Srinivasa Ramanujan and found a beautiful result (attributed both to Landau and Ramanujan):

Let $$N(x)$$ denote the number of integers less than $$x$$ that can be represented as sum of two squares then $$\lim_\limits{x \to \infty}\frac{N(x)}{\large{\frac{x}{\sqrt{\log(x)}}}}=c$$ where $$c$$ is now called the Landau-Ramanujan Constant.

It is very mysterious as to why $$\log(x)$$ would turnup here !?

Here is the Wikipedia article