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.