June 2007
Beginner to intermediate
950 pages
27h 8m
English
Elementary functions such sin(x), log(x) and exp(x) can be expressed as Maclaurin series:

In fact, we can approximate any smooth continuous single-valued function by a polynomial of sufficiently high degree. To see this in action, consider the graph of sin(x) against x in the range 0 < x < π (where x is an angle measured in radians):

x<-seq(0,pi,0.01) y<-sin(x) plot(x,y,type="l",ylab="sin(x)")
Up to about x = 0.3 the very crude approximation sin(x) = x works reasonably well. The first approximation, including a single extra term for −x3/3!, extends the reasonable fit up to about x = 0.8:
a1<-x-x^3/factorial(3) lines(x,a1,col="green")
Adding the term in x5/5! captures the first peak in sin(x) quite well. And so on.
a2<-x-x^3/factorial(3)+x^5/factorial(5) lines(x,a2,col="red")
Read now
Unlock full access