2
$\begingroup$

I'm looking to bound the error for the Taylor series of $\tan(x)$ so that I will know how many terms I need to go out to get a desired precision. I've already searched and came across this, but the bound provided in that answer doesn't make much sense.

In particular, for $f(x):=\tan(x)$, I want to first expand around $x=0$ then approximate $\tan(1)$ to a precision of $N$ digits (note that $\tan$ is analytic for $x\in (-\pi/2,\pi/2)$). After using the Lagrange error bound from elementary calculus I have $R_n=\frac{f^{(n+1)}(c)}{(n+1)!}(1-0)^{n+1}$ for $c\in (0,1)$. We want $|R_n|\leq 10^{-N}$. The problem is that I can't find a good way to bound the term $f^{(n+1)}(c)$, as higher-order derivatives of $\tan$ are polynomials in $\tan(x)$ and have a very nasty closed form.

The first answer in the link I referred to had some $\frac{c}{(n+1)!}$ bound on it, but because of the way $c$ is defined, after using Mathematica I see that $\frac{c}{(n+1)!}\rightarrow \infty$ for $n\rightarrow \infty$, which doesn't make sense since increasing the number of terms should decrease the error.

In the above, $R_n\rightarrow \infty$ as $n\rightarrow \infty$ as well. I'm not sure if I'm just overlooking something--am I just doing something wrong? Could anybody give me any suggestions?

This is on a complex analysis assignment by the way, but it seems that complex-analytic methods aren't required here.

  • 0
    $\tan^{(n+1)}$ denotes the $n+1$-st derivative, and not power, of $\tan$...2012-10-03

1 Answers 1

3

There is a good reason this is on a complex analysis assignment rather than a calculus one. The easiest way to bound the derivative term is to use $ f^{(n)}(z) = \frac{n!}{2\pi i} \int_{\gamma_r} \frac{ f(t) }{(t-z)^{n+1}} dt $

which comes from differentiating Cauchy's Integral formula. Here $\gamma_r$ is the circle of radius $r$ centered at $z.$


Don't evaluate the integral exactly, just make rough bounds. We have $z\in (0,1)$ and $\gamma_r$ is the circle of radius $r$ around $z.$ $ | f^{(n)} (z)| = \frac{n!}{2\pi} \int_{\gamma_r} \frac{ |\tan t|}{|t-z|^{n+1}} dt \leq \frac{n!M_r}{r^n} $

where $M_r$ is the maximum of $|\tan z|$ on the contour.

  • 0
    Hi Ragib, thanks for your update. This is the same as using Cauchy's estimate, which I tried before. In particular, with the bound above, we have $|R_n|\leq \frac{M_r}{r^{n+1}}$. But since $\tan$ is only analytic on $(-\pi/2,\pi/2)$ and $z\in (0,1)$, if we take z>\pi/2-1 we will have |r|<1, as the largest circle around $z$ must be contained in the strip of convergence. In that case, since |r|<1, it appears that $|R_n|\rightarrow \infty$ as $n\rightarrow \infty$, which is puzzling because $n\rightarrow \infty$ should make the approximation better.2012-10-03