- #1
Hiero
- 322
- 68
The famous Stirling’s approximation is ##N! \approx \sqrt{2\pi N}(N/e)^N## which becomes more accurate for larger N. (Although it’s surprisingly accurate for small values!)
I have found a nice derivation of the formula, but there is one detail which bothers me. The derivation can be found here:
https://www.physics.harvard.edu/uploads/files/undergrad/probweek/sol56.pdf
In equation 3, we make the following approximation:
##N\ln x-x \approx N\ln N -N-\frac{(x-N)^2}{2N}##
Which is the truncated Taylor expansion of ##N\ln x-x## about it’s maximum at x = N.
I can’t seem to understand why this approximation should work. Truncated Taylor polynomials are typically used when the variation (x-N) is small. That is the condition for better accuracy. However in this situation, x is going to vary from zero (which is far from N for large N) all the way up to infinity! That is the bounds of the factorial integral.
So why should this approximation be accurate? How can we be confident beforehand that it should give accurate results?
This is an otherwise wonderful derivation! I really love it! But that one detail does not sit right with me. I would have never found this derivation, because even if it crossed my mind, I would have dismissed the accuracy of that Taylor approximation over the range that we use it.
Any insight (as to why the Taylor quadratic is accurate despite integrating it infinitely far from the point of expansion) will be much appreciated!
I have found a nice derivation of the formula, but there is one detail which bothers me. The derivation can be found here:
https://www.physics.harvard.edu/uploads/files/undergrad/probweek/sol56.pdf
In equation 3, we make the following approximation:
##N\ln x-x \approx N\ln N -N-\frac{(x-N)^2}{2N}##
Which is the truncated Taylor expansion of ##N\ln x-x## about it’s maximum at x = N.
I can’t seem to understand why this approximation should work. Truncated Taylor polynomials are typically used when the variation (x-N) is small. That is the condition for better accuracy. However in this situation, x is going to vary from zero (which is far from N for large N) all the way up to infinity! That is the bounds of the factorial integral.
So why should this approximation be accurate? How can we be confident beforehand that it should give accurate results?
This is an otherwise wonderful derivation! I really love it! But that one detail does not sit right with me. I would have never found this derivation, because even if it crossed my mind, I would have dismissed the accuracy of that Taylor approximation over the range that we use it.
Any insight (as to why the Taylor quadratic is accurate despite integrating it infinitely far from the point of expansion) will be much appreciated!