I'm practicing Taylor's series and i found some old task.
Calculate value of function $f(x) = e^x + e^{-x}$ at point $x = \frac{1}{\sqrt 2}$ with error not greater than $d=\frac{1}{20}$
So here's my approach
We know taylor's series (it is Mac Laurin's series, cause $x_0=0$) for $e^x$ and $e^{-x}$ $$e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} +\dots$$ $$e^{-x} = 1 -x + \frac{x^2}{2!} - \frac{x^3}{3!} +\dots$$ adding them together gives us $$e^x + e^{-x} = 2(1+\frac{x^2}{2!} + \frac{x^4}{4!} + \frac{x^6}{6!} + \dots)$$ So i started to apply our value
First term $2$, second term $\frac12$, third term $\frac{1}{48}$, fourth term $\frac{1}{2880}$ and i thought it's over i just have to sum it up and here is our answer. But later, checking with wolframalpha the remaining sum was greater than $\frac{1}{20}$
Here i'm with my question: From there, can we easily calculate the remaining sum for Mac laurin's series? I know there is Lagrange's remainder, but i really don't want to use it, cause it involves calculating $(n+1)$th deriverative.
Thanks for any suggestions or help!
We look at a more general problem. We want to estimate the "tail" of the series. If we cut off just after the term in $x^{2n-2}$, the tail is twice $$\frac{x^{2n}}{(2n)!}+ \frac{x^{2n+2}}{(2n+2)!}+\frac{x^{2n+4}}{(2n+4)!}+\cdots,\tag{1}$$ so we estimate (1). Here $x=\frac{1}{\sqrt{2}}$, but we will only assume that $|x|\lt 1$. Note that the series (1) is term by term less than or equal to the geometric series $$\frac{x^{2n}}{(2n)!}+ \frac{x^{2n+2}}{(2n)!}+\frac{x^{2n+4}}{(2n)!}+\cdots,\tag{2}$$ which for $|x|\lt 1$ has sum $$\frac{x^{2n}}{(2n)!}\left(\frac{1}{1-x^2}\right).$$ For the original series, multiply by $2$. So if $E(x)$ is the error made if we truncate just after the term in $x^{2n-2}$, then $$E(x)\le \frac{2x^{2n}}{(2n)!}\left(\frac{1}{1-x^2}\right).$$ This tail estimate is easier get at and handle than the general Lagrange expression for the error.