Can anyone help me with how to get the Taylor series of a function(for example sinx)?
Furthur how to get a value for sin(for example pi/4) with an particular error?
or in summation notation:
For the error estimate I will refer you here as I have forgotten which one is "standard" (if any.)
So as an example, let and let us expand the series about the point .
So the Taylor series to 4 terms looks like:
Yes, you could use the Maclaurin expansion (the Taylor series expansion about the point x = 0), but note that is not particularly close to 0. The further x is from 0, the greater the error in the approximation.
On the other hand using 3 terms in the expansion I get
which is only off by %, which is pretty close by most people's judgment.
Theorem: Let be an infinitely differenciable function on (with ). Let represent the -th degree Taylor polynomial around the origin for the point (with ). And let be the remainder term. Then there exists a number strictly between and so that,
So given let us work on the interval where and . This function is infinitely differenciable so the above results apply. You can to approximate . Now by the theorem we know that,
for some .
Notice that is one of these: . Thus, . And also notice that thus, .
This approximation might be greatly improved all I did was place an approximation that works and furthermore converges rapidply.
Remark) The theorem applys in more general to -differentiable functions but there was no need to use it here.