Math: The Taylor Series

November 30th, 2009 by jason Leave a reply »

In yesterday’s post Not-so Easy e, I briefly covered The Taylor Series and how it is applied to solving for the value of e^x, or for specifically finding the value of e. I didn’t spend a lot of time covering The Taylor Series, and skipped some steps on my path to deriving the value of e. I figured I should take some time to go back over Taylor, show why it was chosen, and how it fits in with e.

The Taylor Series has a rich history in mathematics, and it is used to solve a number of classic problems. The Taylor Series is defined in Taylor’s Theorem. If a function (we used f(x) = e^x yesterday) is differentiable n times on a closed interval [a,x] and n + 1 times over the open interval (a,x), and n \ge 0, the function can be precisely approximated by The Taylor Series.

f(a) + \dfrac{f'(a)}{1!}(x-a) + \dfrac{f''(a)}{2!}(x-a)^2 \cdot\cdot\cdot \dfrac{f^{(n)}(a)}{n!}(x-a)^n

Math note: The open interval (a,x) includes all values between a and x exclusively, and the closed interval [a,x] includes all values between a and x inclusively.

I am not going to go through the whole theorem here, but I will show in more detail how it is applied to e^x. Lets go through step by step.

#01 – Original equation: f(x) = e^x

#02 – First Derivative: f(x)' = e^x

#03 – Taylor: f(a) + \dfrac{f'(a)}{1!}(x-a) + \dfrac{f''(a)}{2!}(x-a)^2 \cdot\cdot\cdot \dfrac{f^{(n)}(a)}{n!}(x-a)^n

#04 – What value a should we use that is near x? We will use 0, which will produce a value of 1 when the function f(a) = e^a.

#05 – Substitute in e^x derivatives: 1 + \dfrac{1}{1!}(x-0) + \dfrac{1}{2!}(x-0)^2 \cdot\cdot\cdot \dfrac{1}{n!}(x-0)^n

#06 – Obvious: e^x = 1 + x + \dfrac{1}{2}x^2 \cdot\cdot\cdot \dfrac{1}{n!}x^n

#07 – Finished: e^x = \sum_{n=0}^{\infty}\dfrac{x^n}{n!}

I have stumbled over uses for The Taylor Series from time to time working as a software engineer. Its pretty easy to compute a value to an arbitrary precision using a loop. In the practical world an approximation is good enough, and even a loop that is run 100 times with most math should return almost immediately on modern hardware. Apparently this is how scientific calculators do a number of computations. Very cool.

No TweetBacks yet. (Be the first to Tweet this post)
Advertisement

Leave a Reply

You must be logged in to post a comment.