How do I approximate the value $\log{2}\approx 0.693$ without using the Maclaurin series?
The book gives the hint: consider $f(x)=e^x-e^{-x}-2x$.
How do I approximate the value $\log{2}\approx 0.693$ without using the Maclaurin series?
The book gives the hint: consider $f(x)=e^x-e^{-x}-2x$.
If you start from $\ln(2)=\int_1^2\frac{1}{x}\,dx$, then Simpson's Rule with $n=4$ gets you there fast:
$$\ln(2)\approx\frac{1}{12}\left(1+4\left(\frac45\right)+2\left(\frac23\right)+4\left(\frac47\right)+\frac12\right)\approx0.693\ldots$$
Surely not what the book's author had in mind, but still instructive:
On a calculator with a $\sqrt{\phantom2}$ button you could approximate $\log c$ by repeatedly hitting $\sqrt{\phantom2}$, getting a sequence of numbers each about twice as close to $1$ as the one before. After $n$ iterations we reach $c^{2^{-n}}$, which for large $n$ is about $1 + 2^{-n} \log c$. So subtract $1$ and multiply by $2^n$ to approximate $\log c$. On a 10-digit calculator you can get 5-digit accuracy (confirmed by comparison with the output of the "$\ln$" button...) by iterating enough times to get within about $10^{-5}$ of $1$, which is to say $n \cong 16.6 + \log_2 \ln c$ [with $16.6$ arising as $\log_2 (10^5)$].
For $c=2$ we get $n \cong 16$, and indeed calculation of $$ 2^{16} (2^{2^{-16}} - 1) = 2^{16} \left(\sqrt{\sqrt{\sqrt{\cdots\sqrt 2}}} - 1 \right) $$ yields a number between $0.6931$ and $0.6932$.
Motivated by the hint, $\ln(2)$ is a fixed point of $$f(x)=\frac{e^x-e^{-x}-2x-\frac32}{-2}$$ (This is a bit of a departure from the hint.)
It happens to be an attractor. Now, I'm assuming you can exponentiate an arbitrary decimal, since the hint gives you $e^x$. You have
$$\begin{align} a_0&=1\\ a_1&=f(a_0)=0.57\ldots\\ a_2&=f(a_1)=0.71\ldots\\ a_3&=f(a_2)=0.6867\ldots\\ a_4&=f(a_3)=0.6947\ldots\\ a_5&=f(a_4)=0.6927\ldots\\ a_6&=f(a_5)=0.6932\ldots\\ a_7&=f(a_6)=0.69312\ldots\\ a_8&=f(a_7)=0.69315\ldots\\ a_9&=f(a_8)=0.69314\ldots\\ \end{align}$$ Continue for more accuracy.
A standard definition of $\log 2$ is $$\log 2:=\int_1^2{dx\over x}\ .$$ Consider the function $$h(x):=2-{4x\over3}+{8x^2\over27}\ .$$ Writing $x:={3\over2}+t$ $\>\bigl(-{1\over2}\leq t\leq{1\over2}\bigr)$, one computes $${1\over{3\over2}+t}-h\left({3\over2}+t\right)=-{16t^3\over 81+54 t}\tag{1}$$ (and this explains the choice of $h$). Using $(1)$ we obtain $$\log 2=\int_1^2 h(x)\>dx+R={56\over81}+R$$ with $$R=\int_{-1/2}^{1/2}{-16t^3\over 81+54t}\>dt=\int_0^{1/2}16t^3\left({1\over 81-54 t}-{1\over 81+54t}\right)\>dt\ .$$ From $$0\leq\left({1\over 81-54 t}-{1\over 81+54t}\right)\leq {108 t\over 81^2-27^2}\qquad\left(0\leq t\leq{1\over2}\right)$$ it then follows that $$0<R\leq{1\over 540}\ .$$ This proves the estimate $$0.691\leq{56\over81}\leq\log2\leq{1123\over1620}\leq0.69321\ .$$
What is "the" MacLaurin series you are referring to? To get $\log(2)$, for instance, we may evaluate the Taylor series of $\log(1-x)$ around $x=0$ at $x=-1$, or at $x=\frac{1}{2}$. In the second case we get the pretty fast-convergent series: $$ \log(2) = \sum_{n\geq 1}\frac{1}{n 2^n} \tag{1}$$ that can be further "accelerated" through Euler's method, getting: $$ \log(2) = 1-\sum_{n\geq 1}\frac{1}{n(n+1) 2^n}\tag{2} $$ or: $$ \log(2) = \frac{1}{2}+2\sum_{n\geq 1}\frac{1}{n(n+1)(n+2)\,2^n}.\tag{3}$$ Another fast-convergent representation (a BBP-type series) that comes from the integral of a rational function over $[0,1]$ is: $$ \log(2)=\frac{1}{3}\sum_{n\geq 0}\frac{(-1)^n}{(27)^n}\left(\frac{3}{6n+1}-\frac{2}{6n+3}-\frac{1}{6n+4}\right)\tag{4}$$ and the last representation requires just $2$ terms (!) to reach the wanted accuracy.
Another chance is given by the following technique (essentially due to Beuker). The integral: $$ I = \int_{0}^{1}\frac{x^6(1-x)^6}{1+x}\,dx = -\frac{19519}{440}+64 \log(2)\tag{5}$$ is clearly positive but smaller than $\frac{1}{4^6}$. The approximation: $$ \log(2)\approx \frac{19519}{28160}\tag{6}$$ hence meet the required accuracy.
If $y=\ln(x)$, then $$y'=\frac{1}{x}\quad\text{and}\quad y'=e^{-y}$$ and you can numerically solve either differential equation to $x=2$, using initial condition $y(1)=0$.
With the first differential equation, using the Runge-Kutta method with only two steps: $$ \begin{array}{rrr|rrrr} n&x_n&y_n&k_{1,n}&k_{2,n}&k_{3,n}&k_{4,n}\\ 0&1&0\\ &&&\frac{1}{1}=1&\frac{1}{1+\frac{1}{4}}=\frac{4}{5}&\frac{1}{1+\frac{1}{4}}=\frac{4}{5}&\frac{1}{1+\frac{1}{2}}=\frac{2}{3}\\ 1&\frac32&0+\frac{\frac{1}{2}}{6}\left(1+2\cdot\frac{4}{5}+2\cdot\frac{4}{5}+\frac{2}{3}\right)=\frac{73}{180}\\ &&&\frac{1}{\frac{3}{2}}=\frac{2}{3}&\frac{1}{\frac{3}{2}+\frac{1}{4}}=\frac{4}{7}&\frac{1}{\frac{3}{2}+\frac{1}{4}}=\frac{4}{7}&\frac{1}{\frac{3}{2}+\frac{1}{2}}=\frac{1}{2}\\ 2&2&\frac{73}{180}+\frac{\frac{1}{2}}{6}\left(\frac{2}{3}+2\cdot\frac{4}{7}+2\cdot\frac{4}{7}+\frac{1}{2}\right)=\frac{1747}{2520} \end{array} $$ And $\frac{1747}{2520}=0.693\ldots$. For more accuracy, you have to start over with a smaller step size (and hence, more steps).
$\ln(2)$ is a zero to $f(x)=e^x-2$. Assuming you can exponentiate an arbitrary decimal, Newton's method converges fast.
$$ \begin{align} a_0&=1\\ a_1&=a_0-\frac{e^{a_0}-2}{e^{a_0}}=a_0-1+2e^{-a_0}=0.7357\ldots\\ a_2&=a_1-1+2e^{-a_1}=0.6940\ldots\\ a_3&=a_2-1+2e^{-a_2}=0.6931\ldots\\ \end{align} $$
and continue to the desired precision.
If you really don't want to use power series methods, here is one way: $e^{.6}\approx 1.822\ldots$ which is less than $2$. $e^{.7}\approx 2.013\ldots$ which is larger than $2$. So try $.65$: $e^{.65}\approx 1.915\ldots$. That's too small so try half way between $0.65$ and $0.7$, $0.675$: $e^{.675}\approx 1.964\ldots$. That's still too small so try half way between $0.675$ and $0.67$, $0.6725$: $e^{.6725}\approx 1.959\ldots$. Continue like that to desired accuracy.
Here's one for base 10, instead of base $e$:
$2^{10} = 1024 \approx 1000 $, so $10 \log 2 \approx 3 $ or $\log 2 \approx .3 $.
I'm assuming that "the MacLaurin series" refers to the one for $\ln2$. This method is based on the Maclaurin series for $\ln0.98=\ln(1-0.02)$, which converges pretty fast and is easy to calculate, along with five similar but faster-converging series which are no harder to calculate to the same accuracy. However, I'll target better precision than three decimal places.
The aim is, using only pencil and paper, to calculate $\ln2$ in the decimal system while minimizing division and strictly avoiding long division. Employing addition, subtraction, and multiplication, with division only by the integers $2$ to $9$ (of course, division by $10$ isn't an issue) at most once in each series, we can achieve an error $<4\times 10^{-19}$ with a tolerable amount of work. If division by $11$ or $12$ is allowed, the error drops to $<2\times10^{-22}$.
The idea is to select integers that have prime-power factorization involving only the first six primes and are close (within $2$%) to a power of ten—either $100$, $1000$, or$10,000$. For convenience, let us write the logarithms of the corresponding ratios as $$a:=\ln1.014,\;\, b:=\ln1.001,\;\,c:=\ln0.9984,\;\, d:=\ln0.99,\;\, e:=\ln0.98,\;\, f:=\ln1.008,$$ which are readily computed, in order to determine the (unknown) logarithms of the first six primes (of which only $\ln2$ needs to be obtained for the present question), which we will write as $$t:=\ln2,\quad u:=\ln3,\quad v:=\ln5,\quad x:=\ln7,\quad y:=\ln11,\quad z:=\ln13.$$
The following system of linear equations is not hard to verify: $$\begin{array}{ll}-2t+u-3v\quad\qquad\;+2z&=a,\\ -3t\qquad-3v+x+y+z&=b,\\ \;\;\,4t\,+u\,-4v\qquad\quad\;\,+z&=c,\\ -2t+2u-2v\quad\;\;+y&=d,\\ -t\qquad\;\;\,-2v+2x&=e,\\ \quad t\,+2u-3v\,+x&=f.\end{array}$$ By elimination of all unknowns except $t$ ($=\ln2$), we end up with $$t=-4a+16b-6c-16d-19e+22f.$$