# Compare $\ln(\pi)$ and $\pi-2$ without calculator

Unlike the famous question of comparing $$e^\pi$$ and $$\pi^e$$, which I solved almost instantly, I am stuck with this problem. My thought was the following.

Since exponential function is order-preserving, we exponentiate both terms and get $$\pi$$ and $$e^{\pi-2}$$. Then we study the function $$f(x) = e^{x-2} - x$$ or the function $$g(x) = \frac{e^{x-2}}{x}$$, and compare them with zero and one respectively. I tried both. But both involve solving the equation $$e^{x-2} = x.$$

I tried Lagrange error terms and have $$f(x) = -1 + \frac{(x-2)^2}{2!} + R_2(x-2),$$ where $$\frac{(x-2)^3}{3!} \le R_2(x-2) \le \frac{e^{x-2}}{3!} (x-2)^3.$$

It is easy to see that the equation have a root between $$3$$ and $$2 + \sqrt2$$. But I don't know how close it is to $$\pi$$. It is to provide some lower bounds since we can plug in some values and calculate to show that $$f(x) > 0$$ for such values. But for the upper bound, it is hard to calculate by hands since it has the $$e^{x-2}$$ factor. At my best attempt by hand, I showed that $$f(3.15) > 0$$. All it entails is that for all $$x \ge 3.15$$, $$e^{x-2}$$ is greater than $$x$$. But it tells nothing about the other side.

Then I looked at the calculator and find that $$e^{\pi-2} < \pi$$.

I also tried Newton-Raphson iteration, but it involves a lot of exponentiation which is hard to calculate by hand and also involves approximation by themselves. And I don't know how fast and close the iteration converges to the true root of the equation.

Any other hint for comparing these two number purely by hand?

• Coincidentally enough, the difference is really small, making the common approach of defining a function and root approximating very dicey – Dhanvi Sreenivasan Dec 15 '20 at 10:09
• The values are quite close , so I guess a hand-calculation will be somewhat messy. – Peter Dec 15 '20 at 10:10
• Here is a suggestion: define the function $f(x) = \text{ln} (\pi x) - \pi x + 2$ for all $x>0$. Since $\lim_{x\to 0^+} f(x) = - \infty$ and computing first derivative one can shows $f$ attains a global maximum at some point $\alpha < 1$ where $f(\alpha)>0$, then Bolzano theorem says there is $c\in (0,1)$ with $f(c)=0$. Now, since $\text{ln}$ is strictly concave, $f$ is also concave. Therefore, given any $t\in (0,1)$, $0<f(t1 + (1-t)c) < t f(1) + (1-t)f(c) = t f(1)$. This leads to $f(1)>0$, which means $\text{ln}(\pi) > \pi -2.$ – Senna Dec 15 '20 at 10:10
• Exactly, the difference is like 0.00314 (quite amusing) – Dhanvi Sreenivasan Dec 15 '20 at 10:10
• @Senna, I followed your argument until the point where you claimed $$f(t1 + (1-t)c)\stackrel{?}<tf(1)+(1-t)f(c)\qquad\text{for}\qquad t\in(0,1).$$ Is this true only when $f$ is strictly convex? Also note that your argument, if works, should also work with $f(x)=\log(4x)-4x+2$ to show that $0<f(1)=\log(4)-4+2$, which is false. – Sangchul Lee Dec 15 '20 at 10:17

## 2 Answers

By hand I took $$e^{\pi -2} Using $$B_1=0.1416=0.1+0.04(1+0.04)$$ for manual calculation, I computed, to $$5$$ decimal places, an upper bound $$B_2$$ for $$(B_1)^2/2$$ and an upper bound $$B_3$$ for $$B_1B_2/3$$ and an upper bound $$B_4$$ for $$B_1B_3/4,$$ etc., until I was sure that the sum of the remaining terms was less than $$0.00005,$$ to obtain an upper bound $$B$$ to $$4$$ decimal places for $$e^{0.1416}.$$ Then I multiplied $$B\times 2.7183$$ and got less than $$\pi.$$

• See the book The Trachtenburg Speed System Of Basic Mathematics for some wonderful ways (that I didn't even use here) to do multiplication. – DanielWainfleet Dec 15 '20 at 13:44
• Forgive my ignorance. Could you kindly elaborate on "until the remaining terms was less than $0.00005$"? I believe this is where I am stuck. Is there any theorems about remainder bound I missed? How did you bound the remainder? Thanks. – Lei Zhao Dec 16 '20 at 6:30
• Actually $B_4$ was as far as I needed. In the power series for $e^x$, the sum $S$ of the terms of degree $5$ or more in $x$ is $S=(x^5/5!)(1+x/6+x^2/6.7+x^3/6.7.8+...)$ which for $1/6>x>0$ is less than $(x^5/5!)(1+x/6+x^2/6^2+x^3/6^3+...)=(x^5/5!)/(1-x/6).$ And the sum $S$ decreases with decreasing positive $x.$ So with $x=B_1<1/7$ we have $S<((1/7)^5/5!)/(1-1/42)<10^{-5}.$ – DanielWainfleet Dec 16 '20 at 20:37
• There are theorems about the remainder of a power series. If $r>0$ and if the series $f(x)=\sum_{j=0}^{\infty}A_jx^j$ converges whenever $|x|<r,$ then for $0<|x|<r$ and $n>0$ we have $f(x)-\sum_{j=0}^{n-1}A_jx^j= \frac {x^n f^{(n)}(y)}{n!}$ for some $y$ strictly between $0$ and $x,$ where $f^{(n)}$ denotes the $n$th derivative of $f$. – DanielWainfleet Dec 16 '20 at 21:00

All the logarithms I know by heart are \begin{align}\log_{10}2&=0.30103\\ \ln10&=2.303\\ \ln2&=0.693\end{align} Using the second fact alone we can solve this problem! We know that $$\frac12\ln\left(\frac{1+x}{1-x}\right)=x+R_2(x)$$ Where $$|R_2(x)|\le\frac{|x|^3}{3(1-|x|)^3}$$ for $$|x|<1$$. Then let $$x=\frac{-3}{487}$$ so $$\frac12\ln\left(\frac{1+x}{1-x}\right)=\ln\left(\frac{22}{7\sqrt{10}}\right)=\frac{-3}{487}+R_2\left(\frac{-3}{487}\right)$$ So we have \begin{align}\ln\left(\frac{22}7\right)&=\frac12\ln10-\frac3{487}+R_2\left(\frac{-3}{487}\right)\gt\frac{2.3025}2-\frac1{160}-\frac1{100^3}\\ &=1.15125-0.00625-10^{-6}=1.145-10^{-6}\gt1.143\gt\frac{22}7-2\end{align} And since $$f(x)=\ln x-x+2$$ is decreasing for $$x\gt1$$ and it has been known since the time of Archimedes that $$\frac{22}7\gt\pi$$ we have established the result.

But if you didn't know that $$\ln10=2.303$$ to $$3$$ decimals you might be in for a tougher slog. You could say, for example, that $$\ln10=10\ln\frac54+3\ln\frac{128}{125}\gt20\left(\frac19+\frac1{3\times9^3}\right)+6\left(\frac3{253}\right)$$ So that \begin{align}\ln\left(\frac{22}7\right)&\gt\frac{10}9+\frac{10}{2187}+\frac9{253}-\frac3{487}-10^{-6}\\ &\gt1.1111+0.004+0.035-0.007-10^{-6}\gt1.143\\ &\gt\frac{22}7-2\end{align} Where we actually had to carry out one of the long divisions to $$2$$ significant figures.