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?
Thank You
The Taylor series for a function (at least I presume you are talking about a single variable function) to N + 1 terms about a point x = a has the form:
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 .
We have:
So the Taylor series to 4 terms looks like:
-Dan
I'll have to let someone else explain the remainder (I'm just not up on it myself, which is why I posted the link. )
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
Gives me
which is only off by %, which is pretty close by most people's judgment.
-Dan
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 means,
.
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.