# Estimate $\sqrt{e}$ with the error smaller than $10^{-5}$

Estimate $\sqrt{e}$ with the error smaller than $10^{-5}$

My idea to solve this is to use the Maclaurin series around $x=0$ to get this:
$$e^{\frac 1 2} = 1 + \frac 1 2+ \frac{1}{2! \cdot 4}+ \frac{1}{3! \cdot 8} + \dots + \frac{1}{n! \cdot 2^n}$$
The problem is that I don't know when to stop adding things - namely, when my approximation hits the allowed error. Could you help me to estimate the remainder of this function? Is it possible to do this without integrals?

• You're missing the error term $f^{(n+1)}(c)/(2^{n+1}(n+1)!)$ for some $c\in(0,1/2)$ at the tail of RHS. Can you try finding a a bound for the $n+1$-th derivative? Btw, you are quite tolerant to error $10^5$! – GNUSupporter 8964民主女神 地下教會 Dec 10 '17 at 22:12
• What about this: $$\frac{e^c}{(n+1)! \cdot 2^{n+1}} < \frac{3}{(n+1)! \cdot 2^{n+1}}$$ Does it work? If yes, how do I estimate this? "Manually"? – Aemilius Dec 10 '17 at 22:17
• Related: math.stackexchange.com/questions/2532308/… You can exploit: $$\sqrt{e}=\left[1;1,\color{blue}{1,1,5},\color{green}{1,1,9},\color{purple}{1,1,13},\color{red}{1,1,17},\color{orange}{1,1,21},\ldots\right]$$ for instance. It leads to $\frac{582}{353}$ being an approximation fulfilling the wanted constraint. – Jack D'Aurizio Dec 10 '17 at 22:20
• @Aemilius At that point it is basically a manual problem, yes. It's useful to have some rough ideas of the growth rates of factorials and the relative growth rates of different exponentials. For example, it's useful to know that $9!>3 \cdot 10^5$ because it follows that $n!>3 \cdot 10^{n-4}$ for $n \geq 9$ (in fact this bound is true for all $n$). That can be used to get decent estimates for factorials in these kinds of problems. – Ian Dec 11 '17 at 1:07
• As a practical matter, the terms in your sum are getting small fast. Once you add in one that is smaller than $10^{-5}$ the rest will not add up to that much and you are done. To really justify that you need Ian's error term or somehow to prove that the ignored terms add to less than the last one you added. – Ross Millikan Jan 9 at 17:52

The Maclaurin series comes with the Lagrange remainder, which for $e^x$ is given by $\frac{e^\xi x^{n+1}}{(n+1)!}$ where $\xi$ is between $0$ and $x$. If you can come up with an upper bound bound for $|e^\xi|$ then you can finish your problem.

A very interesting approach to the problem is that you can approximate $\sqrt{e}$ with great accuracy using Newton's method on the function $f(x)=x^2-e=0$, which uses the iterative process

$$a_{n+1}=a_n-\begin{bmatrix}\textbf{D}f(a_{n})\end{bmatrix}^{-1}f(a_n)$$ which applied to our $f(x)$ is equal to $$a_{n+1}=a_n-\frac{1}{2a_n}(a_n^2-e)=\frac{1}{2}\begin{pmatrix}a_n+\frac{e}{a_n}\end{pmatrix}$$ Choose an $a_0$ that is less than $e$, suppose 2. Then, we know that this sequence is bounded below, implying that it converges, implying that ${a_n}$ will converge to $\sqrt{e}$: $$a=\lim_{n\to\infty}a_{n+1}=\lim_{n\to\infty}\frac{1}{2}\begin{pmatrix}a_n+\frac{e}{a_n}\end{pmatrix}=\frac{1}{2}\begin{pmatrix}a+\frac{e}{a}\end{pmatrix},\;\;\;\;\text{i.e.,}\;\;\;a=\sqrt{e}$$

You can keep iterating this sequence, which will end up being very few iterations, until you get a decimal $1.64872(...error...)$ where the $10^{-5}$ place of the decimal does not change after another iteration.

Newton's method is very neat to approximate the $n$th root of any number with significant accuracy relatively quickly.

Hope you find this useful.

• This requires you to already have $e$ which is actually harder to compute using the Maclaurin series than $\sqrt{e}$ is. – Ian Dec 10 '17 at 22:57