什么人不适合吃榴莲| 突然耳朵聋是什么原因| 丙肝是什么| 吊是什么意思| 喝酒头疼吃什么药| 白细胞减少有什么症状| 农历10月24日是什么星座| 四不放过是什么| 慢性荨麻疹是什么原因引起的| 三点水一个希读什么| 什么口红好| 吃软不吃硬是什么生肖| 下午5点到7点是什么时辰| 梦见盗墓是什么意思| 喉咙干痒吃什么药| 肌酐高吃什么好| 什么是低保| 木木耳朵旁是什么字| 心血虚吃什么中成药| 什么是肝硬化| abo是什么血型| 浓鼻涕吃什么药| b型血和b型血生的孩子是什么血型| 甲功七项挂什么科| 切是什么偏旁| 有机磷是什么| 74是什么意思| 上海市委书记什么级别| 左眼老是跳是什么原因| 长春有什么好吃的| 洛阳有什么好吃的| 什么头什么耳| 发生火灾时的正确做法是什么| 1025是什么星座| 什么叫代谢| 萝卜炖什么好吃| 树木什么| 处方药是什么意思| 膘是什么意思| 卟啉症是什么病| 扬是什么生肖| 穷字代表什么生肖| 西米是什么东西做的| 造血干细胞是什么| 嗓子总有痰吃什么药| 八月十三号是什么星座| 自身免疫性胃炎是什么意思| thenorthface是什么牌子| xl是什么码| 肝血虚吃什么食物调理| 格格不入是什么意思| 汗蒸有什么好处和功效| 冲煞是什么意思| 无回声结节是什么意思| 一个月的小猫吃什么| 舌头上火吃什么药| 术后血压低什么原因| 青梅竹马什么意思| 上大厕拉出血是什么原因| 脾阳虚吃什么中成药| 结婚唱什么歌送给新人| 左腿发麻是什么原因| rog是什么牌子| 克山病是什么病| sk-ll是什么牌子| 准备要孩子需要注意什么| 26是什么意思| 20岁属什么的生肖| 早醒是什么原因造成的| 龙脉是什么意思| 山东古代叫什么| 知了吃了有什么好处| 正财透干是什么意思| 24k黄金是什么意思| 碳酸钠是什么东西| 胃怕凉怕冷是什么原因| 什么是臆想症| 甙是什么意思| 人言可畏是什么意思| 决明子和什么搭配最好| 吃什么补孕酮| 疾厄宫是什么意思| 梦到猫是什么意思| 圣诞节送女生什么礼物好| 中药什么时间喝效果最好| 蒲公英长什么样子| 下眼皮跳是什么原因| 眼痒痒是什么原因引起| 什么药治尿酸高最有效| 红小豆和赤小豆有什么区别| 两个人一个且念什么| 什么为笑| 威士忌是用什么酿造的| 检查血糖挂什么科| 湿气重吃什么药最有效| 双鱼和什么星座最配| 刷存在感是什么意思| 下巴下面长痘痘是什么原因| 什么是海藻糖| 右侧中耳乳突炎是什么意思| ex是什么| 为什么屁多是什么原因| 什么原因引起耳鸣| 入伏吃羊肉有什么好处| 晚上尿床是什么原因| 71年属什么生肖| 胸椎退行性变什么意思| 21三体高风险是什么意思| 逾期不候什么意思| 什么病不能吃松花粉| 本命年红内衣什么时候穿| ads是什么意思| 卡其色裙子配什么颜色上衣好看| 元春省亲为什么在晚上| 什么情况下要打狂犬疫苗| 大基数是什么意思| 河南有什么景点| psd是什么意思| 慢性萎缩性胃炎吃什么药| 501是什么意思| 黄豆酱做什么菜好吃| 9.22是什么星座| 痔疮吃什么药| 贴切的意思是什么| 红色和蓝色混合是什么颜色| 为什么月经迟迟不来又没怀孕| 木犀读什么| 大张伟的真名叫什么| 什么是人生| 什么人什么天| 病毒性感冒咳嗽吃什么药效果好| ppq是什么意思| t是什么火车| 手抖是什么毛病| 无创dna是检查什么的| 手为什么会脱皮| 肝内胆管结石有什么症状表现| 保鲜卡是什么原理纸片| 间断性是什么意思| 什么样的歌声| 三点水一个半读什么| 鳜鱼是什么鱼| 开口腔诊所需要什么条件| 最多是什么意思| 心脏属于什么组织| 恋爱脑什么意思| 主动脉壁钙化是什么意思| 原浆酒是什么意思| 幽门螺旋杆菌是什么意思| 脑梗复查挂什么科| 外科医生是做什么的| 肺部纤维化是什么意思| 竹马是什么意思| 小鱼吃什么| 为什么天天晚上做梦| 祈禳是什么意思| 番茄红素有什么作用| 1999年发生了什么| 世界上最大的动物是什么| 膝关节疼痛挂什么科| 右胳膊麻木是什么征兆| pro是什么氨基酸| 五月二十四是什么星座| 吃什么能减肥| 我想长胖点有什么办法| 鸡翅木是什么木头| 两个百字念什么| 学痞是什么意思| 只吐不拉是什么原因| 平板支撑有什么好处| 女人吃枸杞有什么好处| 123是什么意思| 明前茶什么意思| 结肠炎吃什么中成药| 白斑有什么症状图片| 十一月是什么星座| lh是什么意思啊| 照烧是什么意思| 十一月六号是什么星座| 黄毛什么意思| 4月20是什么星座| 死皮是什么| 便秘吃什么能马上排便| 手心痒是什么原因| 二月七号是什么星座| 什么叫生化流产| 12月12是什么星座| 为什么手比脸白那么多| who是什么组织| 中国的国宝是什么| 清明节吃什么好| 三分三是什么药| mnm是什么单位| 无花果和什么煲汤好| 蝉联的意思是什么| dna是什么| 消化腺包括什么| 叻叻猪是什么意思| 哺乳期妈妈感冒了可以吃什么药| 梦到杀人是什么意思| 拔完智齿第三天可以吃什么| 睾丸疼什么原因| 六月十八是什么星座| 火字旁的字有什么| 唐氏综合征是什么| 眉毛旁边长痘痘是什么原因| 慢性萎缩性胃炎伴糜烂吃什么药| 什么的礼物| 舒张压偏高是什么原因造成的| 丰衣足食是什么意思| 打hcg针有什么作用| 虾青素有什么作用| 精囊在什么位置| 农历12月是什么月| 美女胸部长什么样| 羊水多是什么原因造成的| 眼睛屈光不正是什么意思| 雾化器是干什么用的| 小鹅吃什么| 小儿厌食吃什么药最好| 为什么叫川普| wy是什么牌子| 2.7是什么星座| 卦是什么意思| 冥是什么意思| 什么是签注| 1978年属什么的| 什么是子宫腺肌症| 哆啦a梦的寓意是什么| 凭什么姐| 权志龙的团队叫什么| 绿豆什么时候收获| 医院规培是什么意思| 嗳气打嗝吃什么药| 孩子营养不良吃什么| 身体有湿气有什么症状| dodo是什么意思| 什么伐桂| 什么时候去西藏旅游最好| 蓁字五行属什么| 螃蟹吃什么食物| 区间放量是什么意思| 吃什么代谢快| 睡觉起来嘴巴苦是什么原因| 哪吒妈妈叫什么名字| 长期服用丙戊酸钠有什么副作用| 头晕头重昏昏沉沉是什么原因| 围绝经期是什么意思| 全身皮肤瘙痒是什么原因引起的| 心跳过快是什么原因引起的| 一什么水塔| 低血钾吃什么| 怀孕喝什么牛奶好| 检查耳朵挂什么科| 吃坏东西拉肚子吃什么药| 做梦买房子是什么预兆| 中途疲软吃什么药| 哺乳期是什么意思| 早射吃什么药| 户籍地填什么| 1978年属什么的| 骨盐量偏高代表什么| 卡路里什么意思| 阿托伐他汀钙片有什么副作用| 百度Jump to content

挂面是什么面

From Wikipedia, the free encyclopedia
Comparison of Stirling's approximation with the factorial
百度 钟楚红说,先前她到欧洲旅游,特别到27年前和张国荣拍电影待过的地方,静静怀念好友,并表示自己非常喜欢巴黎,除了天气好,有许多展览可看外,因没什么人会认出她,让她可以很自在做自己,偶尔还会随便乱穿上菜市场买菜。

In mathematics, Stirling's approximation (or Stirling's formula) is an asymptotic approximation for factorials. It is a good approximation, leading to accurate results even for small values of . It is named after James Stirling, though a related but less precise result was first stated by Abraham de Moivre.[1][2][3]

One way of stating the approximation involves the logarithm of the factorial: where the big O notation means that, for all sufficiently large values of , the difference between and will be at most proportional to the logarithm of . In computer science applications such as the worst-case lower bound for comparison sorting, it is convenient to instead use the binary logarithm, giving the equivalent form The error term in either base can be expressed more precisely as , corresponding to an approximate formula for the factorial itself, Here the sign means that the two quantities are asymptotic, that is, their ratio tends to 1 as tends to infinity.

History

[edit]

The formula was first discovered by Abraham de Moivre[2] in the form

De Moivre gave an approximate rational-number expression for the natural logarithm of the constant. Stirling's contribution consisted of showing that the constant is precisely .[3]

Derivation

[edit]

Roughly speaking, the simplest version of Stirling's formula can be quickly obtained by approximating the sum with an integral:

The full formula, together with precise estimates of its error, can be derived as follows. Instead of approximating , one considers its natural logarithm, as this is a slowly varying function:

The right-hand side of this equation minus is the approximation by the trapezoid rule of the integral

and the error in this approximation is given by the Euler–Maclaurin formula:

where is a Bernoulli number, and Rm,n is the remainder term in the Euler–Maclaurin formula. Take limits to find that

Denote this limit as . Because the remainder Rm,n in the Euler–Maclaurin formula satisfies

where big-O notation is used, combining the equations above yields the approximation formula in its logarithmic form:

Taking the exponential of both sides and choosing any positive integer , one obtains a formula involving an unknown quantity . For m = 1, the formula is

The quantity can be found by taking the limit on both sides as tends to infinity and using Wallis' product, which shows that . Therefore, one obtains Stirling's formula:

Alternative derivations

[edit]

An alternative formula for using the gamma function is (as can be seen by repeated integration by parts). Rewriting and changing variables x = ny, one obtains Applying Laplace's method one has which recovers Stirling's formula:

Higher orders

[edit]

In fact, further corrections can also be obtained using Laplace's method. From previous result, we know that , so we "peel off" this dominant term, then perform two changes of variables, to obtain:To verify this: .

Now the function is unimodal, with maximum value zero. Locally around zero, it looks like , which is why we are able to perform Laplace's method. In order to extend Laplace's method to higher orders, we perform another change of variables by . This equation cannot be solved in closed form, but it can be solved by serial expansion, which gives us . Now plug back to the equation to obtainnotice how we don't need to actually find , since it is cancelled out by the integral. Higher orders can be achieved by computing more terms in , which can be obtained programmatically.[note 1]

Thus we get Stirling's formula to two orders:

Complex-analytic version

[edit]

A complex-analysis version of this method[4] is to consider as a Taylor coefficient of the exponential function , computed by Cauchy's integral formula as

This line integral can then be approximated using the saddle-point method with an appropriate choice of contour radius . The dominant portion of the integral near the saddle point is then approximated by a real integral and Laplace's method, while the remaining portion of the integral can be bounded above to give an error term.

Using the Central Limit Theorem and the Poisson distribution

[edit]

An alternative version uses the fact that the Poisson distribution converges to a normal distribution by the Central Limit Theorem.[5]

Since the Poisson distribution with parameter converges to a normal distribution with mean and variance , their density functions will be approximately the same:

Evaluating this expression at the mean, at which the approximation is particularly accurate, simplifies this expression to:

Taking logs then results in:

which can easily be rearranged to give:

Evaluating at gives the usual, more precise form of Stirling's approximation.

Speed of convergence and error estimates

[edit]
The relative error in a truncated Stirling series vs. , for 0 to 5 terms. The kinks in the curves represent points where the truncated series coincides with Γ(n + 1).

Stirling's formula is in fact the first approximation to the following series (now called the Stirling series):[6]

An explicit formula for the coefficients in this series was given by G. Nemes.[7] Further terms are listed in the On-Line Encyclopedia of Integer Sequences as A001163 and A001164. The first graph in this section shows the relative error vs. , for 1 through all 5 terms listed above. (Bender and Orszag[8] p. 218) gives the asymptotic formula for the coefficients:which shows that it grows superexponentially, and that by the ratio test the radius of convergence is zero.

The relative error in a truncated Stirling series vs. the number of terms used

As n → ∞, the error in the truncated series is asymptotically equal to the first omitted term. This is an example of an asymptotic expansion. It is not a convergent series; for any particular value of there are only so many terms of the series that improve accuracy, after which accuracy worsens. This is shown in the next graph, which shows the relative error versus the number of terms in the series, for larger numbers of terms. More precisely, let S(n, t) be the Stirling series to terms evaluated at . The graphs show which, when small, is essentially the relative error.

Writing Stirling's series in the form it is known that the error in truncating the series is always of the opposite sign and at most the same magnitude as the first omitted term.[citation needed]

Other bounds, due to Robbins,[9] valid for all positive integers are This upper bound corresponds to stopping the above series for after the term. The lower bound is weaker than that obtained by stopping the series after the term. A looser version of this bound is that for all .

Stirling's formula for the gamma function

[edit]

For all positive integers, where Γ denotes the gamma function.

However, the gamma function, unlike the factorial, is more broadly defined for all complex numbers other than non-positive integers; nevertheless, Stirling's formula may still be applied. If Re(z) > 0, then

Repeated integration by parts gives

where is the th Bernoulli number (note that the limit of the sum as is not convergent, so this formula is just an asymptotic expansion). The formula is valid for large enough in absolute value, when |arg(z)| < π ? ε, where ε is positive, with an error term of O(z?2N+ 1). The corresponding approximation may now be written:

where the expansion is identical to that of Stirling's series above for , except that is replaced with z ? 1.[10]

A further application of this asymptotic expansion is for complex argument z with constant Re(z). See for example the Stirling formula applied in Im(z) = t of the Riemann–Siegel theta function on the straight line ?1/4? + it.

A convergent version of Stirling's formula

[edit]

Thomas Bayes showed, in a letter to John Canton published by the Royal Society in 1763, that Stirling's formula did not give a convergent series.[11] Obtaining a convergent version of Stirling's formula entails evaluating Binet's formula:

One way to do this is by means of a convergent series of inverted rising factorials. If then where where s(nk) denotes the Stirling numbers of the first kind. From this one obtains a version of Stirling's series which converges when Re(x) > 0. Stirling's formula may also be given in convergent form as[12] where

Versions suitable for calculators

[edit]

The approximation and its equivalent form can be obtained by rearranging Stirling's extended formula and observing a coincidence between the resultant power series and the Taylor series expansion of the hyperbolic sine function. This approximation is good to more than 8 decimal digits for z with a real part greater than 8. Robert H. Windschitl suggested it in 2002 for computing the gamma function with fair accuracy on calculators with limited program or register memory.[13]

Gerg? Nemes proposed in 2007 an approximation which gives the same number of exact digits as the Windschitl approximation but is much simpler:[14] or equivalently,

An alternative approximation for the gamma function stated by Srinivasa Ramanujan in Ramanujan's lost notebook[15] is for x ≥ 0. The equivalent approximation for ln n! has an asymptotic error of ?1/1400n3? and is given by

The approximation may be made precise by giving paired upper and lower bounds; one such inequality is[16][17][18][19]

See also

[edit]

References

[edit]
  1. ^ Dutka, Jacques (1991), "The early history of the factorial function", Archive for History of Exact Sciences, 43 (3): 225–249, doi:10.1007/BF00389433, S2CID 122237769
  2. ^ a b Le Cam, L. (1986), "The central limit theorem around 1935", Statistical Science, 1 (1): 78–96, doi:10.1214/ss/1177013818, JSTOR 2245503, MR 0833276; see p. 81, "The result, obtained using a formula originally proved by de Moivre but now called Stirling's formula, occurs in his 'Doctrine of Chances' of 1733."
  3. ^ a b Pearson, Karl (1924), "Historical note on the origin of the normal curve of errors", Biometrika, 16 (3/4): 402–404 [p. 403], doi:10.2307/2331714, JSTOR 2331714, I consider that the fact that Stirling showed that De Moivre's arithmetical constant was does not entitle him to claim the theorem, [...]
  4. ^ Flajolet, Philippe; Sedgewick, Robert (2009), Analytic Combinatorics, Cambridge, UK: Cambridge University Press, p. 555, doi:10.1017/CBO9780511801655, ISBN 978-0-521-89806-5, MR 2483235, S2CID 27509971
  5. ^ MacKay, David J. C. (2019). Information theory, inference, and learning algorithms (22nd printing ed.). Cambridge: Cambridge University Press. ISBN 978-0-521-64298-9.
  6. ^ Olver, F. W. J.; Olde Daalhuis, A. B.; Lozier, D. W.; Schneider, B. I.; Boisvert, R. F.; Clark, C. W.; Miller, B. R. & Saunders, B. V., "5.11 Gamma function properties: Asymptotic Expansions", NIST Digital Library of Mathematical Functions, Release 1.0.13 of 2025-08-07
  7. ^ Nemes, Gerg? (2010), "On the coefficients of the asymptotic expansion of ", Journal of Integer Sequences, 13 (6): 5
  8. ^ Bender, Carl M.; Orszag, Steven A. (2009). Advanced mathematical methods for scientists and engineers. 1: Asymptotic methods and perturbation theory (Nachdr. ed.). New York, NY: Springer. ISBN 978-0-387-98931-0.
  9. ^ Robbins, Herbert (1955), "A Remark on Stirling's Formula", The American Mathematical Monthly, 62 (1): 26–29, doi:10.2307/2308012, JSTOR 2308012
  10. ^ Spiegel, M. R. (1999), Mathematical handbook of formulas and tables, McGraw-Hill, p. 148
  11. ^ Bayes, Thomas (24 November 1763), "A letter from the late Reverend Mr. Thomas Bayes, F. R. S. to John Canton, M. A. and F. R. S." (PDF), Philosophical Transactions, 53: 269, Bibcode:1763RSPT...53..269B, archived (PDF) from the original on 2025-08-07, retrieved 2025-08-07
  12. ^ Artin, Emil (2015). The Gamma Function. Dover. p. 24.
  13. ^ Toth, V. T. Programmable Calculators: Calculators and the Gamma Function (2006) Archived 2025-08-07 at the Wayback Machine.
  14. ^ Nemes, Gerg? (2010), "New asymptotic expansion for the Gamma function", Archiv der Mathematik, 95 (2): 161–169, doi:10.1007/s00013-010-0146-9, S2CID 121820640
  15. ^ Ramanujan, Srinivasa (14 August 1920), Lost Notebook and Other Unpublished Papers, p. 339 – via Internet Archive
  16. ^ Karatsuba, Ekatherina A. (2001), "On the asymptotic representation of the Euler gamma function by Ramanujan", Journal of Computational and Applied Mathematics, 135 (2): 225–240, Bibcode:2001JCoAM.135..225K, doi:10.1016/S0377-0427(00)00586-0, MR 1850542
  17. ^ Mortici, Cristinel (2011), "Ramanujan's estimate for the gamma function via monotonicity arguments", Ramanujan J., 25 (2): 149–154, doi:10.1007/s11139-010-9265-y, S2CID 119530041
  18. ^ Mortici, Cristinel (2011), "Improved asymptotic formulas for the gamma function", Comput. Math. Appl., 61 (11): 3364–3369, doi:10.1016/j.camwa.2011.04.036.
  19. ^ Mortici, Cristinel (2011), "On Ramanujan's large argument formula for the gamma function", Ramanujan J., 26 (2): 185–192, doi:10.1007/s11139-010-9281-y, S2CID 120371952.

Further reading

[edit]
  1. ^ For example, a program in Mathematica:
    series = tau - tau^2/6 + tau^3/36 + tau^4*a + tau^5*b;
    (*pick the right a,b to make the series equal 0 at higher orders*)
    Series[tau^2/2 + 1 + t - Exp[t] /. t -> series, {tau, 0, 8}]
    
    (*now do the integral*)
    integral = Integrate[Exp[-x*tau^2/2] * D[series /. a -> 0 /. b -> 0, tau], {tau, -Infinity, Infinity}];
    Simplify[integral/Sqrt[2*Pi]*Sqrt[x]]
    
[edit]
鳑鲏吃什么 五脏六腑指的是什么 宫寒是什么意思 淋巴清扫是什么意思 状元郎是什么生肖
什么叫湿气 血糖高喝什么豆浆好 温碧泉适合什么年龄 遥祝是什么意思 户名是什么
早晨起床口苦是什么原因 腰间盘突出是什么症状 甲基苯丙胺是什么 女人耳鸣是什么前兆 肛瘘是什么病
什么叫微创手术 献出什么 不正常的人有什么表现 免贵姓是什么意思 马眼是什么意思
什么东西能戒酒hcv9jop5ns9r.cn 八字是指什么xinmaowt.com 牙龈肿痛是什么原因hcv9jop3ns4r.cn 田螺的血是什么颜色kuyehao.com 看什么看hcv9jop1ns7r.cn
洗脑是什么意思hcv8jop5ns9r.cn 屈原属什么生肖hcv9jop4ns2r.cn 贫血看什么指标1949doufunao.com 吃桂圆干有什么好处和坏处hcv8jop1ns2r.cn 吃什么增加卵泡aiwuzhiyu.com
什么是眩晕症hcv9jop0ns6r.cn 月经一直不干净是什么原因引起的imcecn.com 铁罗汉是什么茶hcv8jop8ns9r.cn 狗狗咳嗽吃什么药hcv7jop6ns1r.cn 甘胆酸偏高是什么原因hcv8jop4ns1r.cn
后背疼什么原因hcv7jop6ns1r.cn 舌头溃疡是什么原因造成的hcv9jop1ns9r.cn 商品下架是什么意思dajiketang.com 乔迁送什么礼物好hcv8jop4ns2r.cn 蛇屎是什么样子hcv8jop8ns3r.cn
百度