I'm trying to solve the following problem:
Compute the value of $ \sqrt{e} $ with accuracy of 0.001 by using the Taylor Series of $ e^x $.
Computing the value without a given precision is no problem as I know that
$$ e^x = \sum_{i=0}^\infty \frac{x^n}{n!} $$
The remainder equals $ R_N(x)=\frac{f^{n+1}(c)}{(n+1)!}\cdot(x-x_0)^{n+1} $
As we don't know c we can't use this to estimate an absolute value for the error so we replace $ f^{n+1}(c) $ with M where M is the estimated max of our function.
I decided to choose $ M = 3 $ as $ e \approx 3 \land \sqrt{e} < e $
In the end I come up with $$ R_n(x)= \frac {M \cdot (x-x_0)^n}{(n+1)!} \Rightarrow R_n(0.5)=\frac{3\cdot 0.5^n}{(n+1)!} \Rightarrow \frac{3\cdot 0.5^n}{(n+1)!} < 0.001 $$
When I solve this by brute force I'm getting $ n \ge 5 $ but this gives me a precision of 3 decimal places.
$$ e^x = \sum_{i=0}^5 \frac{x^n}{n!} \Rightarrow f(x) = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \frac{x^5}{5!} \Rightarrow f(0.5)= 1.648698 $$
$$ e^{0.5} = 1.64872 $$
You can see that this is correct to 3 decimal places. By playing a bit around I found out that it should be enough to go up to n=3.
$$ e^x = \sum_{i=0}^3 \frac{x^n}{n!} \Rightarrow f(x) = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} \Rightarrow f(0.5)= 1.646 $$.
I'm feeling that I'm missing something simple but important but I can't find my mistake.
2026-03-29 13:40:52.1774791652