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

  • Context: Undergrad 
  • Thread starter Thread starter Projector
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around finding a value of n for which the expression (1 + 1/n)^n accurately approximates the mathematical constant e to nine decimal places. The conversation touches on computational methods, numerical precision, and historical approaches to calculating e.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related
  • Debate/contested

Main Points Raised

  • One participant questions the specific requirement of "9 significant digits" versus "9 digits after the decimal point."
  • Another participant discusses the limitations of standard computer representations of real numbers when calculating (1 + 1/n)^n, noting that errors can arise for large n due to precision issues.
  • A participant shares their experience with using various programming languages and software to calculate e, indicating that the error decreases with increasing n up to a certain point, after which it stabilizes.
  • There is mention of using an extended precision package as a solution to overcome computational errors in approximating e.
  • A historical anecdote is shared about a homework assignment from 1960 that involved using the Taylor series to calculate e, with a participant reflecting on their experience and the challenges faced.
  • One participant humorously hints at the ninth digit of e, suggesting a playful engagement with the topic.
  • Another participant references literary figures in a light-hearted manner, contributing to the informal tone of the discussion.

Areas of Agreement / Disagreement

Participants express differing views on the computational challenges of calculating e accurately, with some emphasizing the importance of numerical precision and others sharing personal anecdotes. There is no consensus on the best approach or the specific value of n needed for the calculation.

Contextual Notes

The discussion highlights limitations related to numerical precision in standard computing environments and the potential for different interpretations of the problem's requirements. The historical context provided by participants adds depth but does not resolve the main question.

Who May Find This Useful

This discussion may be of interest to those studying numerical methods, computational mathematics, or the history of mathematical calculations, as well as individuals seeking to understand the challenges of approximating mathematical constants.

Projector
Messages
2
Reaction score
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.
 
Physics news on Phys.org
Have you tried any values of n?
 
Looks like a straightforward calculation problem to me!
 
lol, look up e on wikipedia and you'll know why we're giggling over here
 
Trick question? 9 significant digits or 9 digits after the decimal point?
 
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 (10<sup>16</sup> or so), [itex](1+1/n)-1=0[/itex] using off-the-shelf double-precision numbers!<br /> <br /> 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.<br /> <br /> Since I have a "<a href="https://www.physicsforums.com/showthread.php?t=206096"" class="link link--internal">https://www.physicsforums.com/showthread.php?t=206096"</a>", I of course had to double-check this limit using an extended precision math package. Ta-da, it works as predicted.[/itex]
 
Last edited by a moderator:
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.
 
Psst, the 9th digit is...8! :smile:

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

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 24 ·
Replies
24
Views
7K