Find the Perfect Value of n for Calculating e Accurately - Proven Method

  • Thread starter Projector
  • Start date
In summary, A value of n for which (1+ 1/n)^n gives the value of "e" correct to 9 decimal places is n = 1016. This can be achieved by using an extended precision package or approaching it analytically. The error in the calculation can also be minimized by using a Taylor series, with the 9th digit of e being 8.
  • #1
Projector
2
0
Question regarding "e"

I've been stumped by this question for a while now:

Find a value of n for which (1+ 1/n)^n gives the value of "e" correct to 9 decimal places.
 
Mathematics news on Phys.org
  • #2
Have you tried any values of n?
 
  • #3
Looks like a straightforward calculation problem to me!
 
  • #4
lol, look up e on wikipedia and you'll know why we're giggling over here
 
  • #5
Trick question? 9 significant digits or 9 digits after the decimal point?
 
  • #6
It is a trick question in a sense. Just throwing numbers at a typical computer implementation of [itex](1+1/n)^n[/itex] won't work. The problem lies in how computers represent real numbers.

Suppose one uses a program like Excel or writes a simple program to calculate [itex](1+1/n)^n[/itex] (I did just this with Excel, perl, and C on a Mac and on a Linux box.) The error shrinks as [itex]n[/itex] increases up until [itex]n=10^7[/itex] or so. At this point the error stops shrinking. The problem is that the computer performs the calculation [itex](1+1/n)^n[/itex] as [itex]\exp(n*\log(1+1/n))[/tex]. For large n, [itex]log(1+1/n)\approx(1+1/n)-1[/itex], and this will err from [itex]1/n[/itex] using off-the-shelf double-precision numbers. For sufficiently large n (1016 or so), [itex](1+1/n)-1=0[/itex] using off-the-shelf double-precision numbers!

A brute-force way to overcome this problem is to program using an extended precision package. An even better way to overcome the problem is to approach it analytically. A simple error analysis of [itex](1+1/n)^n-e[/itex] yields a value of n above which the error will be smaller than 1e-9. I am not revealing this value in the chance that this thread is asking us to solve a homework problem.

Since I have a "https://www.physicsforums.com/showthread.php?t=206096"", I of course had to double-check this limit using an extended precision math package. Ta-da, it works as predicted.
 
Last edited by a moderator:
  • #7
i had a homework assignment in 1960 to use the taylor series to calculate e to 9 digits, and found it too tedious.

In 2006 I felt professionally embarrassed after telling the story to my calc class so sat down and did it by hand, using a small $10 calculator for some arithmetic. (It took about 14 terms, but your sequence will have a different error term from the taylor series, so i doubt if i am giving away the answer.)

My former calc prof was still working in texas so i sent him the homework with an apology for being over 40 years late. he kindly wrote back his appreciation. maybe you too will eventually get credit for this one.
 
  • #8
Psst, the 9th digit is...8! :smile:

Two point 7, two times Ibsen, 459045.
 
  • #9
Ibsen, or Verne, or Schubert... (google for the win).
 

FAQ: Find the Perfect Value of n for Calculating e Accurately - Proven Method

What is "e" in mathematics?

"e" is a mathematical constant approximately equal to 2.71828. It is the base of the natural logarithm and has many important applications in calculus, statistics, and other areas of mathematics.

Where does the value of "e" come from?

The value of "e" was first discovered by the Swiss mathematician Leonhard Euler in the 18th century. He used the concept of compound interest to define "e" as the limit of (1 + 1/n)^n as n approaches infinity.

How is "e" used in calculus?

"e" is used in calculus to represent continuous growth or decay. It is the base of the exponential function, which is often used to model natural phenomena such as population growth, radioactive decay, and compound interest.

Why is "e" considered a fundamental constant?

"e" is considered a fundamental constant because it appears in many important mathematical equations and has numerous real-world applications. It is also a transcendental number, meaning it cannot be expressed as a finite algebraic expression.

How is "e" related to the natural logarithm?

The natural logarithm, denoted as "ln", is the inverse function of the exponential function with a base of "e". In other words, if y = e^x, then x = ln(y). This relationship is useful in solving equations and evaluating integrals involving exponential functions.

Similar threads

Replies
11
Views
2K
Replies
10
Views
722
Replies
1
Views
943
Replies
7
Views
1K
Replies
4
Views
1K
Replies
1
Views
2K
Back
Top