1

In the 6th edition of Edwards & Penney's Calculus, in the chapter on transcendental functions, there is an interesting question about a special limit that leads to the famous Euler's number

$$\lim_{x\to\infty} \left( 1 + \frac{1}{x} \right)^x \approx 2.718281828 $$

However, if you raise variable $x$ to the higher power, say $10$, the graph literally goes crazy as $x \to \infty$ and the kills of to $1$. Here is the graph of this situation:

Graph

This special limit states that: the further you go with $x$ the closer you approach $\exp(1)$. So, as you see the limit fails at higher powers. Please, help me to to understand this situation. I suppose it has something to do with the capability of computer systems to calculate.

akkab
  • 141

3 Answers3

11

You're experiencing floating point precision errors. They kill. The limit does not fail, but your computer does because it is using 64 bit floats behind the scenes, which have 53 digits available, which means they can only store numbers up to around $2^{53}\approx40^{10}$ so that's why your graph looks weird at that point. The weird behavior immediately before that point is caused by rounding to the nearest possible float, and when $x$ is too large $\frac{1}{x^{10}}$ gets rounded to $0$, so $\left(1+\frac{1}{x^{10}}\right)^{x^{10}}$ gets rounded to $1$.

Sophie
  • 3,508
1

The flat part of the graph is an error caused by underflow. To the computer, $10^{-10}=0$, so you have $(1+0)^{10^{10}}$.

The crazy part is probably caused by floating point error.

In short, both of these problems are probably caused by the finite precision allowed by computers.

AlgorithmsX
  • 4,624
0

In Mathematica, you may set WorkingPrecision to get an answer which is guaranteed to be correct to as many decimal places as are given in the output:

Plot[(1 + 1/x^10)^(x^10), {x, 0, 60}, WorkingPrecision -> 10]