March 4th, 2012, 3:19 pm
Here's a cute way to calculate exp(5). Use Stirling's formula: 5! ~ 5^5 * exp(-5) * sqrt(2*pi * 5)We get exp(5) ~ 625*sqrt(10 pi) / 24Now, one can argue that: 1. this calculation is hard to do by hand, and 2. it's a rough approximation anyway. 1. It so happens that this calculation is easy for someone who does math finance. We all know the ATM call price approximation, which has a factor of 1/sqrt(2pi), and which we happily replace with 0.4. The square root of 5 can be done in a few seconds using the babylonian approximation: start with the initial guess of 2, and the next iteration is (2+5/2)/2=2.25 As for 625/24, we know that 625 = 25^2, so 625-1 = 24*26. We have the following 3 approximations: - sqrt(2*pi) ~ 2.5 (actual is 2.50663)- sqrt(5) ~ 2.25 (actual is 2.23607)- 625/24 ~ 26 (actual is 26.0417) Result is 146.25. And one could argue that this can be done with pen and paper, or even without. The actual value of 625*sqrt(10 pi) / 24 is 145.963. 2. How about the argument that Stirling's approximation may be too rough? We can take the next 1 or 2 terms in the Stirling series. They are 1/12*n and 1/288*n^2. In our case 1/60 and 1/7200. Here's how 5! is approximated: - no correction: 118.019- first correction: 119.986- second correction: 120.003Here's how exp(5) gets resolved (actual value 148.413):- no corrrection: 145.963- first correction: 148.396- second correction: 148.416Back to 1. Can we improve our result using only pen and paper, or only mental calculations? You bet. Here's how: - the next babylonian iteration for sqrt(5) is (2.25+5/2.25)/2. We need first 5/2.25 = 20/9 = 2.22222... The mid point between 2.22 and 2.25 is 2.235, which is quite decent (actual value is 2.23607)- next babylonian iteration for sqrt(2*pi) is (2.5 + 2*pi/2.5)/2. The fraction 2*pi/2.5 is the same as 8*pi/10, and if we use the humble approximation of pi~3.14 we get (2.5 + 2.512)/2 ~ 2.506 (actual is 2.40663). - we can use the improved 625/24 = 26 + 1/24 ~ 26 + 1/25 = 26.04 (actual value is 26.04167). - and finally we use only the first Stirling correctionWe get exp(5) ~ 148.27Best,V.
Last edited by
Costeanu on March 4th, 2012, 11:00 pm, edited 1 time in total.