# advice on using Taylor Series for function approximation

I've recently covered the Taylor Series in my studies and have read through several of the posts here which deal almost exclusively with specific problems and proofs but none seem to be answering a question I have:

How do I pick the point "a" around which the series is centered for fastest and most accurate results (at least in theory)?

For example if I wanted to calculate Sin(1) - radians - wouldn't it be best to pick a = 1, or maybe pi/4? Almost all the problems I have seen would just use the TS around 0. Maybe using 0 just reduces the arithmetic and gets you there just as fast but from what I've read, using the TS around 1 would be more accurate.

Now, in ensuring that my approximation is within an error epsilon, I know I have to look at the remainder term, but if I center the TS around "a" this only slightly complicates the algebra in calculating the value N to ensure my error bound.

Granted this could depend on the radius of convergence also and possibly how far the "a" is from this boundary but in the case of Sin, the ROC is infinite, right?

Thank you, Chris

• If your goal is to compute $\sin(1)$, then it would be ideal to center your Taylor series at $1$ if you could do that; however, this would require you to know the value of $\sin(1)$. – littleO Jul 20 '15 at 22:56
• thanks - looking at the solution given in another reply, it's now obvious that I need to pick an "a" point that I know the sin of e.g. pi/3. – Chris Crawford Jul 21 '15 at 16:19

If what you know are the values of $\sin$ and $\cos$ that most students are supposed to know, you might choose $a = \pi/3$ which is quite close to $1$. Then e.g. $4$ terms of the series produces $$\sin \left( \pi/3 \right) +\cos \left( \pi/3 \right) \left( x-\pi/3 \right) -\dfrac{1}{2}\,\sin \left( \pi/3 \right) \left( x-\pi/3 \right) ^{2}- \dfrac{1}{6}\,\cos \left( \pi/3 \right) \left( x-\pi/3 \right) ^{3} \approx 0.8414708068$$ which is quite close to the correct value of $0.8414709848$.
To do this well with the series centred at $0$, you would need to go up to the $x^9$ term. However, this is the fifth nonzero term, so it's not really much of a saving.
Things would be quite different, however, if you wanted something like $\sin(10)$. Then for the series around $x=0$ you'd need to go up to the $x^{37}$ term to get the same level of accuracy. It would be much better to try, say, $a = 3\pi$ or maybe $19 \pi/6$.
Picking the right point is a trade off between finding a place where it is easy to calculate the values of the derivatives and being close to the area of interest. Generally, we use Taylor series approximations not because we cannot calculate the value of a function like $\sin x$, but because this function is part of a larger problem, like a differential equation, which is more easily solved with a linear, quadratic, or cubic approximation. In this case we would use only the first few terms of the Taylor series which are centered on the point we care about.