Different definitions of e (Part 12): Numerical computation

In this series of posts, we have seen that the number e can be thought about in three different ways.

1. e defines a region of area 1 under the hyperbola y = 1/x.logarea2. We have the limits

e = \displaystyle \lim_{h \to 0} (1+h)^{1/h} = \displaystyle \lim_{n \to \infty} \left(1 + \frac{1}{n} \right)^n.

These limits form the logical basis for the continuous compound interest formula.

3. We have also shown that \frac{d}{dx} \left(e^x \right) = e^x. From this derivative, the Taylor series expansion for e^x about x = 0 can be computed:

e^x = \displaystyle \sum_{n=0}^\infty \frac{x^n}{n!}

Therefore, we can let x = 1 to find e:

e = \displaystyle \sum_{n=0}^\infty \frac{1}{n!} = \displaystyle 1 + 1 + \frac{1}{2} + \frac{1}{6} + \frac{1}{24} + \dots

green line

In yesterday’s post, I showed that using the original definition (in terms of an area under a hyperbola) does not lend itself well to numerically approximating e. Let’s now look at the other two methods.

2. The limit e = \displaystyle \lim_{n \to \infty} \left(1 + \frac{1}{n} \right)^n gives a somewhat more tractable way of approximating e, at least with a modern calculator. However, you can probably imagine the fun of trying to use this formula without a calculator.

ecalculator3. The best way to compute e (or, in general, e^x) is with Taylor series. The fractions \frac{1}{n!} get very small very quickly, leading to rapid convergence. Indeed, with only terms up to 1/6!, this approximation beats the above approximation with n = 1000. Adding just two extra terms comes close to matching the accuracy of the above limit when n = 1,000,000.

ecalculator2

More about approximating e^x via Taylor series can be found in my previous post.

 

Leave a comment

2 Comments

  1. nebusresearch | Writing About E (Not By Me)
  2. Different definitions of e: Index | Mean Green Math

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: