Taylor series for sine or sinus

Taylor series are great approximations of complicated functions using polynomials. This is done by replacing the actual function with polynomials that have the same derivatives as the original function. As the number of derivatives that a polynomial has in common with a specific function increases, so does the accuracy of the representation. Here I look at a very popular use of a Taylor series: the approximation of sine or sinus. All of the regular calculus functions can be approximated this way around the point x=0. For sine, we can get a fairly accurate representation of the actual function by using a polynomial at the 7th power of x for the range between -π/2 to π/2. The picture of the function covers the entire picture of sine, so by moving and/or mirroring the values by multiples of π, we can calculate sine for any value.


The Taylor series for sine looks like this: Y = X - X3/ 3! + X5/ 5! - ... + (-1)(n+1) * X(2*n-1)/ (2n-1)!
Where n is any natural number. The higher you go- that more accurate the representation becomes- as we shall see in the following diagrams.


x

Y = X
Here we see the sine function in black, and the line Y = X in red. This line is the Taylor series for sine to a factor of 1, because the slope of sin(x) at x=0 is 1 and therefore it's derivative is also 1 at the same point. This approximation is actually not so bad for values where x is very close to 0 and accuracy is secondary to the ability to calculate quickly (think physics exams).


x - x^3/3!

Y = X - X3/ 3!
In this image we have the Taylor series show to a power of 3. Note that there is no Taylor series powers for even numbers for sine. The graph shows that the approximation is already accurate beyond π/4.


x - x^3/3! + x^5/5!

Y = X - X3/ 3! + X5/ 5!
At the fifth power, the Taylor series for sine is accurate up to π/2.


x - x^3/3! + x^5/5! - x^7/7!

Y = X - X3/ 3! + X5/ 5! - X7/ 7!
The seventh power of the Taylor series for sine is considered to be accurate enough to calculate any value of sine. The graph depicted here shows no difference between the functions for the entire range between -π/2 to π/2.


x - x^3/3! + x^5/5! - x^7/7! + x^9/9!

Y = X - X3/ 3! + X5/ 5! - X7/ 7! + X9/ 9!
For accurately calculating sine very close to π/2 the ninth power of the Taylor series is sometimes preferred over the seventh.


x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - x^11/11!

Y = X - X3/ 3! + X5/ 5! - X7/ 7! + X9/ 9! - X11/ 11!
The 11th power of the Taylor series is accurate even beyond π. This saves some work for those who prefer derivatives over mirroring functions!


x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - x^11/11! + x^13/13!

Y = X - X3/ 3! + X5/ 5! - X7/ 7! + X9/ 9! - X11/ 11! + X13/ 13!
The 13th power has no real advantages over the 11th power, and has little significance.


x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - x^11/11! + x^13/13! - x^15/15!

Y = X - X3/ 3! + X5/ 5! - X7/ 7! + X9/ 9! - X11/ 11! + X13/ 13! - X15/ 15!
The 15th power gets over the π*3/2 hump, but that doesn't really contribute anything useful.


x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - x^11/11! + x^13/13! - x^15/15! + x^17/17!

Y = X - X3/ 3! + X5/ 5! - X7/ 7! + X9/ 9! - X11/ 11! + X13/ 13! - X15/ 15! + X17/ 17!
The 17th power comes very close to covering sine's entire cycle of 2*π.


x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - x^11/11! + x^13/13! - x^15/15! + x^17/17! - x^19/19!

Y = X - X3/ 3! + X5/ 5! - X7/ 7! + X9/ 9! - X11/ 11! + X13/ 13! - X15/ 15! + X17/ 17! - X19/ 19!
As does the 19th power.


x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - x^11/11! + x^13/13! - x^15/15! + x^17/17! - x^19/19! + x^21/  21!

Y = X - X3/ 3! + X5/ 5! - X7/ 7! + X9/ 9! - X11/ 11! + X13/ 13! - X15/ 15! + X17/ 17! - X19/ 19! + X21/ 21!
The 21st power of the Taylor series for sine covers the entire cycle of 2*π. Anybody who wants to study this further, be my guest. I'm going to go break my fingers on a nice tall Pascal triangle now.

All images adapted from WIMS Function Calculator and edited using GPL-licensed tools.



 


sine, sinus, taylor, calculus, graphs Diagrams of the Taylor series for sine (sinus) from the first power until the 17th power. sine, sinus, taylor, calculus, graphs
[email protected] [email protected] [email protected] [email protected] [email protected]

eXTReMe Tracker