| When have you ever used the Taylor series of sine and cosine for anything (outside school) ? When you approximate functions by polynomials, including the trigonometric functions, the Taylor series are never used, because they are inefficient (too much computation for a given error). Other kinds of polynomials are used for function approximations. The Taylor series are a tool used in some symbolic computations, e.g. for symbolic derivation or symbolic integration, but even in that case it is extremely unlikely for the Taylor series of the trigonometric functions to be ever used. What may be used are the derivative formulas for trigonometric functions, in order to expand an input function into its Taylor series. The Taylor series of arbitrary functions (more precisely, the first few terms) may be used in the conception of various numeric algorithms, but here there are also no opportunities to need the Taylor series of specific functions, like the trigonometric functions. The Taylor series obviously have uses, but the specific Taylor series for the trigonometric functions do not have practical applications, even if they are interesting in mathematical theory. |
Can you point me to some implementation of sin that’s not actually using Taylor expansion in some form? Because most that I am aware of do in fact use Taylor series (others are just table lookup). See glibc for example:
https://github.com/bminor/glibc/blob/release/2.34/master/sys...
And here is musl
https://git.musl-libc.org/cgit/musl/tree/src/math/__sin.c
(The constants are easily checked to be -1/3!, 1/5! Etc)
This might have something to do with the Taylor’s theorem. You know, that the Taylor’s polynomial of the order n is the only polynomial of order n that satisfies |f(x)-T(x)|/(x-a)^(n+1) -> 0 as x -> a. In other words, the Taylor polynomial of order n is the unique polynomial approximation to f around a to the order n+1. This means you cannot get any better than Taylor close to the origin of the expansion. This causes implementers to focus on argument reductions instead of selecting polynomials.