If Taylor polynomial for $\sin(x)$ is $\sum_{n=0}^{+\infty} \frac{(-1)^{n}}{(2n+1)!}x^{2n+1} $. What do I have to do to find what degree of Taylor polynomial I have to use so the error is not greater than $10^{-4}$ in approximation of $\sin(100)$?

  • $\begingroup$ It's true only around 0. $\endgroup$ – Archis Welankar Jan 26 '20 at 15:46
  • 2
    $\begingroup$ Well, since the series alternates, and decreases for sufficiently large terms, you could just use Sterling's approximation. But surely it is more efficient to use periodicity...$32\pi\approx 100.5309649$ helps. $\endgroup$ – lulu Jan 26 '20 at 15:48
  • 1
    $\begingroup$ Why using this series in practice is a really bad idea: the largest term in the alternating series is about $\approx 100^{100}/100! \approx 10^{42}$. Thus if you are to use the alternating series to compute it you would need to add about $300$ numbers that would be up to $47$ digits long (you also need $5$ decimal digits to get the desired precision). This would not even work on a computer unless you used arbitrary precision numbers. $\endgroup$ – Winther Jan 26 '20 at 16:03
  • 1
    $\begingroup$ Your remainder term is not correct. It needs a factor $x^n$ in it, which is huge and why Winther gets that you need so many terms $\endgroup$ – Ross Millikan Jan 26 '20 at 17:06
  • 1
    $\begingroup$ Without using the value of $\pi$, you can use angle reduction using the double-angle trigonometric identities. Set $x=100/2^6=1.5625$, then compute $\sin x$ and $\cos x$ with an error less than $10^{-8}$ using the Taylor expansions, and then reconstruct the wanted quantities using $\sin(2^{k+1}x)=2\sin(2^kx)\cos(2^kx)$ and $\cos(2^{k+1}x)=\cos^2(2^kx)-\sin^2(2^kx)$ or similar. $\endgroup$ – Lutz Lehmann Jan 26 '20 at 19:29

It is a(n eventually) converging alternating series, so the alternating series theorem applies. Find the first term after it starts decreasing that is less than $10^{-4}$ in magnitude and you are done.

Probably you are expected to look up the error term for the Taylor series. Note that all the derivatives of $\sin x$ are less than $1$ in magnitude, so you can ignore that.

As the comments point out, you will get there with many fewer terms if you are allowed to center the Taylor series at $32\pi$ instead of $0$.

  • $\begingroup$ If it's not mentioned where the Taylor series is centered at, what do I use as a default for this particular problem? $\endgroup$ – Exzone Jan 26 '20 at 16:02
  • $\begingroup$ The series you quote is centered at $0$. The closer you can center the series to the point of interest the better because all those $x^i$ terms in your series become $(x-c)^i$ where $c$ is the point you center at. As you can easily calculate trig functions of $32\pi$ that is a good place. $\endgroup$ – Ross Millikan Jan 26 '20 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.