史特靈公式

n增加时,(ln n!)与o (n ln nn)之比趋于1
階乘與史特靈公式
(藍色)、(橘色),數字越大會越趨近。但在負值則會因為出現虛數而無法使用

史特靈公式(英語:Stirling's formula)是一條用來取n階乘近似值數學公式。一般來說,當n很大的時候,n階乘的計算量十分大,所以史特靈公式十分好用,而且,即使在n很小的時候,史特靈公式的取值已經十分準確。這個公式以詹姆斯·史特靈英语James Stirling (mathematician)的名字命名,雖然亞伯拉罕·棣美弗早於史特靈提出了一個類似的公式,但結果較不精確。[1][2][3]

史特靈公式为:

这就是说,对于足够大的整数n,这两个数互为近似值。更加精确地:

历史

这个公式是亚伯拉罕·棣莫弗首先发现的,形式为:

,其中c為常數。

斯特林英语James_Stirling_(mathematician)证明了公式中,約為2.506628274631。更加精确的形式是雅克·比内发现的。

推导

方法一

这个公式,以及误差的估计,可以推导如下。首先不直接估计n!,而是考虑它的自然对数

即:

这个方程的右面是积分的近似值(利用梯形法则),而它的误差欧拉-麦克劳林公式给出:

其中Bk伯努利数Rm,n是欧拉-麦克劳林公式中的余项。取极限,可得:

把这个极限记为y。由于欧拉-麦克劳林公式中的余项Rm,n满足:

其中用到了大O符号,与以上的方程结合,便得出对数形式的近似公式:

两边取指数,并选择任何正整数m,便得到了一个含有未知数ey的公式。当m=1时,公式为:

将上述表达式代入沃利斯乘积公式,并令n趋于无穷,便可以得出ey)。因此,我们便得出斯特林公式:

这个公式也可以反复使用分部积分法来得出,首项可以通过最速下降法得到。把以下的和

用积分近似代替,可以得出不含的因子的斯特林公式(这个因子通常在实际应用中无关):

方法二

考虑如下近似关系:

以及阶乘的积分形式(Γ函数):

其中被积函数取对数后求导结果可写成:

因此被积函数只有在附近才趋于平稳,现令,并改写成如下形式:

于是有:

因此可以得到:

两边同时作指数函数运算,变成:

代入到阶乘的积分表示形式,得到:

约等号后侧得到的是高斯积分的形式,计算该积分得出斯特林公式:

收敛速率和误差估计

y轴表示截断的斯特林级数的相对误差,x轴表示所使用的项数。

更加精确的近似公式为:

其中:

斯特林公式实际上是以下级数(现在称为斯特林级数)的第一个近似值:

时,截断级数的误差等于第一个省略掉的项。这是渐近展开式的一个例子。它不是一个收敛级数;对于任何特殊值n,级数的准确性只在取有限个项时达到最大,如果再取更多的项,则准确性将变得越来越差。

阶乘的对数的渐近展开式也称为斯特林级数:

在这种情况下,级数的误差总是与第一个省略掉的项异号,且最多同大小。

伽玛函数的斯特林公式

对于所有正整数,有:

然而,伽玛函数与阶乘不一样,它对于所有复数都有定义。尽管如此,斯特林公式仍然适用。如果,那么:

反复使用分部积分法,可得以下渐近展开式:

其中Bn是第n个伯努利数。当,其中ε是正数时,这个公式对于绝对值足够大的z是适用的,当使用了最初m个项时,误差项为。对应的近似值可以写为:

斯特林公式的收敛形式

欲得出斯特林公式的一个收敛形式,我们必须计算:

一种方法是利用含有上升阶乘幂的级数。如果,那么:

其中:

从中可以得出斯特林级数的一个收敛形式:

它在时收敛。

适用于计算器的形式

以下的近似值

可以通过把斯特林公式整理,并注意到它的幂级数与双曲正弦函数的泰勒级数展开式的相似性来得出。当z的实数部分大于8时,这个近似值精确到小数点后8位。2002年,Robert H. Windschitl建议计算器用这个公式来计算伽玛函数。

Gergő Nemes在2007年提出了一个近似公式,它的精确度与Windschitl的公式相等,但更加简单:

参考文献

  1. ^ Dutka, Jacques, The early history of the factorial function, Archive for History of Exact Sciences, 1991, 43 (3): 225–249, doi:10.1007/BF00389433 
  2. ^ Le Cam, L., The central limit theorem around 1935, Statistical Science, 1986, 1 (1): 78–96, JSTOR 2245503, MR 0833276, doi:10.1214/ss/1177013818 ; 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. ^ Pearson, Karl, Historical note on the origin of the normal curve of errors, Biometrika, 1924, 16 (3/4): 402–404 [p. 403], JSTOR 2331714, doi:10.2307/2331714, I consider that the fact that Stirling showed that De Moivre's arithmetical constant was does not entitle him to claim the theorem, [...] 

Read other articles:

Labor DayParata del Labor Day, Union Square, New York 1882 (Litografia)Nome originaleLabor Day Tiponazionale Dataprimo lunedì di settembre Celebrata in Stati Uniti Ricorrenze correlateFesta del lavoro Tradizioni profaneParata Tradizioni culinarieBarbecue Data d'istituzione1894 Labor Day (in italiano Festa del lavoro o Festa dei lavoratori) è una festività nazionale federale degli Stati Uniti d'America che si celebra il primo lunedì di settembre. Si tratta di una variante particolare ...

 

Masjid Malmö Koordinat: 55°34′29″LU 13°03′7″BT / 55,57472°LU 13,05194°BT / 55.57472; 13.05194 Masjid Malmö (bahasa Swedia: Malmö moské) adalah masjid tertua kedua di Swedia. Terletak di Jägersro villastad, sebuah pemukiman di Husie, Malmö. Diresmikan pada tanggal 20 April 1984 dan dikelola oleh organisasi Pusat Islami(Islamic Center).[1] Di sebelah masjid terdapat sebuah sekolah swadaya, yang juga dijalankan oleh Islamic Center. Terdapat beberapa penyerangan terh...

 

NASA mission, launched in 2010 to SE-L1 Solar Dynamics ObservatorySolar Dynamics Observatory satelliteNamesSDOMission typeSolar research[1]OperatorNASA GSFC[2]COSPAR ID2010-005A SATCAT no.36395Websitehttp://sdo.gsfc.nasa.govMission duration5 years (planned)14 years, 1 month, 24 days (elapsed) Spacecraft propertiesSpacecraft typeSolar Dynamics ObservatoryManufacturerGoddard Space Flight CenterLaunch mass3,100 kg (6,800 lb)Dry mass1,700 kg (3,700...

Yuri Gagarin manusia pertama yang berhasil ke luar angkasa pada misi Vostok 1 Misi luar angkasa berawak adalah penjelajahan angkasa dengan awak manusia. Misi luar angkasa berawak yang pertama adalah Vostok 1 yang diluncurkan pada 12 April 1961. Awaknya adalah Yuri Gagarin. Pada 2005 misi ini telah dijalankan oleh Uni Soviet (Rusia), Amerika Serikat, dan Republik Rakyat Tiongkok. Wahana antariksa dan pelabuhan angkasa yang digunakan: International Space Station (memiliki sebuah Soyuz TMA sebag...

 

Parade welcoming the Marquis de Lafayette to Philadelphia Lafayette Welcoming ParadeThe Marquis de Lafayette enters Philadelphia in 1824.DateSeptember 28, 1824 (1824-09-28)LocationPhiladelphia, Pennsylvania, United StatesTypeparadeOrganized byCity of PhiladelphiaParticipantsMarquis de Lafayette The Lafayette Welcoming Parade of 1824 was a parade held in Philadelphia in September 1824 to welcome the arrival of the Marquis de Lafayette on the occasion of his visit to the United S...

 

Transformation of raw ingredients into a food like product, or of food into other forms Not to be confused with Food processor. Industrial cheese production Food processing is the transformation of agricultural products into food, or of one form of food into other forms. Food processing takes many forms, from grinding grain into raw flour, home cooking, and complex industrial methods used in the making of convenience foods. Some food processing methods play important roles in reducing food wa...

Type of interactive fiction video game Not to be confused with Graphic novel or Light novel. Part of a series onAdventure games Subgenres Presentation Interactive fiction Interactive film Visual novel Graphic adventure Walking simulator Gameplay Immersive sim Escape room Action-adventure Topics Interactive Fiction Competition Interactive storytelling Syntax guessing Text parser Companies The Adventure Company Adventure International AnimePlay Arxel Tribe Capcom Cing Cryo Interactive C's Ware ...

 

Pour les articles homonymes, voir Haynes. Cet article est une ébauche concernant un musicien ou chanteur de rock et un chanteur américain. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Warren HaynesWarren Haynes, 2017BiographieNaissance 6 avril 1960 (64 ans)AshevilleNationalité américaineFormation Asheville High School (en)Activités Guitariste, compositeur, parolier, chanteur de rock, auteur-composit...

 

У этого термина существуют и другие значения, см. Театральная. «Театральная» Замоскворецкая линияМосковский метрополитен Перронный зал станции, 2018 год. Выявленный объект культурного наследия № 2957029№ 2957029 Район Тверской Округ Центральный Дата открытия 11 сентября 1938 �...

Civil wars involving the states and peoples of Europe Duke Siemowit negotiating ceasefire with Queen Jadwiga, dated 12 December 1385 The Greater Poland Civil War (Polish: Wojna domowa w Wielkopolsce) refers to the conflict that took place during 1382–1385[note 1] in the Greater Poland province of the Kingdom of Poland during the interregnum period following the transition of power between the Piast dynasty, Angevin dynasty and the Jagiellon dynasty. Another name for the conflict is ...

 

Brand of tequila produced in Mexico Don JulioTypePremium tequilaManufacturerDiageoCountry of origin MexicoIntroduced1942Proof (US)80VariantsBlanco, Reposado, Añejo, 1942, Real, 70 Tequila Don Julio, S.A. de C.V.Company typePrivateIndustryDistilled beveragesFoundedAtotonilco El Alto, Jalisco, Mexico (1942)Key peopleDon Julio Gonzalez Estrada, founderProductsTequilaWebsitewww.donjulio.com Don Julio is a brand of tequila produced in Mexico. It is the largest brand in value and eighth large...

 

Peta persebaran Bogomilisme Bogomilisme adalah nama sebuah aliran yang muncul sekitar abad ke-8.[1] Bogomil merupakan sekte dari Abad Pertengahan yang coraknya dualistis dan doketis.[2] Cukup lama aliran ini mendapat dukungan di Bizantium.[2] Bogomilisme berasal dari kata bogomil.[2] Dalam bahasa Slavia artinya “Berkenan kepada Allah”.[1] Pendiri dari aliran ini diduga bernama Yeremias yang berasal dan Bulgaria dan seorang bernama Teofilus.[2 ...

Soviet physicist (1927–2021) For Russan politician, see Yury Trutnev. Yuri TrutnevЮрий ТрутневTrutnev in 2013Born(1927-11-02)2 November 1927Moscow, Russian Soviet Federative Socialist RepublicDied6 August 2021(2021-08-06) (aged 93)Sarov, RussiaNationalityRussianCitizenship RussiaAlma materLeningrad State UniversityKnown forSoviet atomic bomb projectAwardsSee honorsScientific careerFieldsPhysicsInstitutions VNIIEF National Research Nuclear University MEPhI Yuri...

 

2010 single by M.I.A.Tell Me WhySingle by M.I.A.from the album Maya Released6 July 2010 (2010-07-06)Recorded10 November 2009 (2009-11-10)Genre Avant-pop industrial Length4:10LabelN.E.E.T.XLInterscopeSongwriter(s) Maya Arulpragasam Thomas Pentz Producer(s)DiploM.I.A. singles chronology Teqkilla (2010) Tell Me Why (2010) It Takes a Muscle (2010) Tell Me Why is a song by British recording artist M.I.A. from her third studio album, Maya (2010). It was written by May...

 

Sailboat class C&C 25 Mk IC&C 25 Mk IDevelopmentDesignerRobert W. Ball, C&C DesignLocationCanadaYear1973Builder(s)C&C YachtsNameC&C 25 Mk IBoatDisplacement4,300 lb (1,950 kg)Draft3.75 ft (1.14 m)HullTypeMonohullConstructionFiberglassLOA25.16 ft (7.67 m)LWL20.67 ft (6.30 m)Beam8.58 ft (2.62 m)Engine typeInboard, saildrive or outboard motorHull appendagesKeel/board typefin keelBallast1,900 lb (862 kg)Rudder(s)trans...

دوشان تاديتش (بالصربية: Dušan Tadić)‏  معلومات شخصية الاسم الكامل دوشان تاديتش[1] الميلاد 20 نوفمبر 1988 (العمر 35 سنة)باتشكا توبولا، جمهورية يوغوسلافيا الاشتراكية الاتحادية الطول 1.81 م (5 قدم 11 1⁄2 بوصة)‏[2] مركز اللعب وسط هجومي الجنسية صربيا  معلومات الناد�...

 

Disambiguazione – Se stai cercando l'omonimo tipo di comandi nascosti in un programma informatico, vedi Easter egg. Due classiche uova pasquali decorate. Un uovo di Pasqua, chiamato anche uovo pasquale, è un uovo che viene decorato per la festa cristiana della Pasqua, che celebra la risurrezione di Gesù. Pertanto, le uova di Pasqua sono comuni durante il periodo pasquale. Sebbene le uova, in generale, fossero un simbolo tradizionale di fertilità e rinascita, nel cristianesimo, per la ce...

 

Prem'er-Liga 2015-2016 Competizione Prem'er-Liga Sport Calcio Edizione 24ª Organizzatore RFS Date dal 17 luglio 2015al 21 maggio 2016 Luogo  Russia Partecipanti 16 Formula Girone all'italiana Risultati Vincitore CSKA Mosca(6º titolo) Retrocessioni Kuban'Dinamo MoscaMordovija Statistiche Miglior marcatore Smolov (20) Incontri disputati 240 Gol segnati 589 (2,45 per incontro) Cronologia della competizione 2014-2015 2016-2017 Manuale Amkar Perm' Anži CSKADinamoLokomoti...

Tommaso Padoa-SchioppaPadoa-Schioppa nel 2008 Ministro dell'economia e delle finanzeDurata mandato17 maggio 2006 –8 maggio 2008 Capo del governoRomano Prodi PredecessoreGiulio Tremonti SuccessoreGiulio Tremonti Membro del Comitato esecutivo della Banca Centrale EuropeaDurata mandato1º giugno 1998 –31 maggio 2005 PresidenteWim DuisenbergJean-Claude Trichet PredecessoreCarica creata SuccessoreLorenzo Bini Smaghi Presidente della CONSOBDurata mandato1997...

 

Catholic Church canon of Bible books The prologue of the Gospel of John, Sixto-Clementine Vulgate, 1922 edition Part of a series on theCatholic ChurchSt. Peter's Basilica, Vatican City Overview Pope: Francis Hierarchy History (timeline) Theology Liturgy Sacraments Mary Background Jesus Crucifixion Resurrection Ascension Early Christianity Peter Paul Fathers History of the Catholic Church History of the papacy Ecumenical councils Magisterium Four Marks of the Church One true church Apostolic s...