How do you calculate e? i used to know how, but i forgot. I remember it was some type of sequence though..
Thanks!
Printable View
How do you calculate e? i used to know how, but i forgot. I remember it was some type of sequence though..
Thanks!
e^x is the limit of the following series.
1 + x/1! + x^2/2! + x^1/3! . . . +x^n/n!
For x = 1, the limit is e. Hence
e = Limit[ 1 + 1 + 1/2! + 1/3! . . . +1/n! ]
Do not use the above to approximate e^x for large x. Instead, determine a reasonable u*v = x, where v is an integer. Then compute as follows.
e^x = (e^u)^v
If u is less than one, the series converges fast.
2, 4, 8, 16, et cetera are good choices for v because repeated squaring can be used to calculate the final result.
I think it might be better to compute e^ -x or e^ -1 and take the reciprocal. The series with alternating signs converges faster.
The functions used by C++, VB, et cetera to approximate functions like e^x & sin(x) use various techniques to determine coefficients for approximating polynomials of fixed order. If you are interested, you can look for a mathematics text which describes Tchebychev and/or Legendre polynomials. I am not sure of the spelling of these names.
For example, the polynomial coefficients used for computing e^x are close to but not precisely the reciprocals of factorials.
Another way to find e is to use the function (1+1/x)^x the limit is e.
Thanks for the help guys. I will try that out later today. I still do not understand mathematically how it calculates e though.
I don not understand this one either. In Java class, we used a sequence like this to calculate pi (could be somewhat wrong):
Hmmm, that probaby is wrong, but, oh well...Code:1/x+2/x-3/x+4/x...
So, is there any somewhat simple reason why these sequences work? Or is that going to get into page long proofs?
Anyway, thanks for the help guys! :D
Consider the following.
1/2 + 1/4 + 1/8 + 1/16 + 1/32 + 1/64 . . .
As you add more terms the sum gets closer to one. Similarly, the sum of the following two series get closer to e and 1/e, respectively.
e = limit[ 1 + 1/1! + 1/2! + 1/3! + 1/4! + 1/5! . . . ]
1/e = Limit[1 - 1/1! + 1/2! - 1/3! + 1/4! - 1/5! . . . ]
I hope you know what factorials are. For example, 5! (five factorial) is 5*4*3*2*1 or 120. For large numbers, the factorial function gets huge.
If you use the sum of the first 18 to 20 terms of the above series, you have a value which is precise to more than 15 decimal digits. This is as precise as you can get using VB Double variables. For all practical purposes the sum of the first 18 to 20 terms is the value of e or 1/e for the second series.
Cool, thanks for all the help! ;)