.MCAD 308000000 \  docDocumentMmcObject[ÿÿÿÿ   d2_graph_format graphData% axisFormat)L)Ltrace2D&&&&&&&&& & & & & &&& dim_formatTmasslengthtimecharge temperature luminosity substance8€NumericalFormatQdii shpRectV?B€ mcDocumentObjectState\ð´ mcPageModelKš™™?œ?š™™?š™™?mcHeaderFooterI@I CHeaderFooterJ@J@J@Jü©ñÒMbP?ü©ñÒMbP? TextState? TextStyle>@ ArialSerial_ParPropDefaultW?Normalÿÿÿÿÿÿÿÿ€font_style_listO font_stylePðÿÿÿóÿÿÿ ÿÿÿÿ VariablesTimes New Roman@Pðÿÿÿóÿÿÿ ÿÿÿÿ ConstantsTimes New Roman@Póÿÿÿöÿÿÿ ÿÿÿÿTextArial@Póÿÿÿöÿÿÿ ÿÿÿÿGreek VariablesSymbol@Póÿÿÿöÿÿÿ ÿÿÿÿUser^1Arial@Póÿÿÿöÿÿÿ ÿÿÿÿUser^2 Courier New@Póÿÿÿóÿÿÿ ÿÿÿÿUser^3System@Póÿÿÿóÿÿÿ ÿÿÿÿUser^4Script@Póÿÿÿóÿÿÿ ÿÿÿÿUser^5Roman@Póÿÿÿöÿÿÿ ÿÿÿÿÿUser^6Modern@Póÿÿÿöÿÿÿ ÿÿÿÿUser^7Times New Roman@Pðÿÿÿóÿÿÿ ÿÿÿÿSymbolsSymbol@Póÿÿÿóÿÿÿ ÿÿÿÿCurrent Selection FontArial@Póÿÿÿóÿÿÿ ÿÿÿÿUndefined Font@Póÿÿÿóÿÿÿ Ö„OgHeaderArial@Póÿÿÿóÿÿÿ Ö„OgFooterArial@Pðÿÿÿóÿÿÿ ÿÿÿÿRotated Math FontTimes New Roman TextRegion* docRegionGshpBoxU;ºQ;;¸;¸ CharacterMap-RangeMap;C¯ Statistical Physics Computer Lab. #1 Tutorial, Gamma Function, and the Stirling Approximation We start by learning how to do simple computations with MathCad. (1) Type: 4*6= The answer is: 24.  (2) Type 42-53= The answer is -11.   (3) Type: \5= (this is square root of 3). The answer is 2.24.  (4) Type 3.2^5.4= (this is 3.2 to the power 5.4). The answer is 534.33  Next we study a special function that appears frequently in statistical physics problems: the gamma function. It is defined as an integral:  The integral is performed from zero to infinity. To type infinity hit control shift z. We calculate a few values for gama function: which is :    One can show that for any natural number n: gamma(n) = (n-1)!. Mathcad has the gamma function wired. To get it type the greek letter capital G. We graph next the Gamma function G(z) versus z.  ChrPropMap7®¯ RangeElem<  ChrPropData8 RangeData=~ 0,0,128 < 8l 0,0,128 <] 8l MathSoftText 128,0,128 <8lArial Rounded MT Bold0,0,128 <8|Century Gothic0,0,128<@8l MathSoftText0,0,128<8l  MathSoftText0,0,128<"8n MathSoftText0,0,128<8~0,0,128<8~0,0,0<80,64,128<8? <!8~0,0,0"<$#8l MathSoftText0,0,128 $<%8?"&<'8|Century Gothic0,0,128$(<)80,64,128&*<+8?(,<-8~0,0,128*.< /8l MathSoftText0,0,128,0<18l Arial0,0,128.2<238l MathSoftText0,0,12804<58| 0,0,12826<780,64,12848<98~0,0,1286:<;8?8<<=8~0,0,128:>@B<@C8?@@@D<@E8~0,0,128@B@F<Œ@G8n MathSoftText0,0,128@D@H<@I8~0,0,128@F@J<@K8?@H@L<@M8| 0,0,128@J@N<@O8~0,0,128@L@P@s8n MathSoftText0,0,128@p@t<@u8~0,0,128@r@vv@Ç@@ p@È@@ŒÁ€@Ç@É@@ü@@È@Ê@@t@É3.2@Ë@@´@É5.4@Ì@@–Ä€@È@Í@@+@@Ì@X@Î@@€@Ì@¸@Ï<@Ð26È@3@Ñ4@Ò@B@UÑÈOø1@Ó@@ p@Ô@@ Á€@Ó@Õ@@Î@@Ô@Ö@@d@Õgamma@×@@Žp€@Õ@Ø@@¤@×x@Ù@@%ù€@Ô@Ú@@ŸÁ@@Ù@Û@@t@Ú0@Ü@@¤@Ú\¥@Ý@@ŸÁ€@Ù@Þ@@d@Ýt@ß@@Ê€@Ý@à@@ü@@ß@á@@d@àe@â@@•K€@à@ã@@¤@ât@ä@@ü€@ß@å@@d@ät@æ@@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@4ðx88T8T-AIn the following graph we compare ln(G(z+1)) = ln(z!) to the Stirling approximation ln(z!) ~ zln(z)- z and to the improved Stirling approximation: ln(z!) ~ (z + 0.5)ln(z) - z + 0.5ln(2p). The Stirling approximation is valid for large values of z.7ß%BS<%BT8BRl MathSoftText0,0,128BU<BV8BR@ Symbol0,0,128BSBW<BX8BRl MathSoftText0,0,128BUBY<BZ8BRl Arial0,0,128BWB[<ŽB\8BRl MathSoftText0,0,128BYB]<%B^8BRl MathSoftText0,0,128B[B_<B`8BR@ Symbol0,0,128B]Ba<Bb8BRl MathSoftText0,64,128B_Bc<=Bd8BRl MathSoftText0,0,128BaBcBS9Be<Bf:@W?1Bg</Bh<Bi0ÿÿÿÿ@NormalArialÿÿÿ Bj@B@UARU PBk@@ pBl@@ Á€BkBm@@dBlzBn@@€BlBo@@tBn0Bp@@´Bn25Bq@B@UoH‡ pÿBr@@ pBs@@Á€BrBt@@ŸÁ@BsBu@@ŸÁ@BtBv@@ŸÁ@BuBw@@vBv 59.58796Bx@@•K‚BvBy@@´Bx1Bz@@ŸÁ€BuB{@@dBz _n_u_l_l_B|@@¤Bz _n_u_l_l_B}@@ ÀBtB~@@ Ã@B}B@@Î@B~B€@@dBlnB@@Žp€BB‚@@žŒ€BBƒ@@dB‚zB„@@ˆÇ€B~B…@@Ê@B„B†@@dB…zB‡@@΀B…Bˆ@@dB‡lnB‰@@Žp€B‡BŠ@@¤B‰zB‹@@¤B„zBŒ@@‰Ç€B}B@@ˆÇ@BŒBŽ@@Ê@BB@@Žp@BŽB@@‰Ç€BB‘@@dBzB’@@´B.5B“@@΀BŽB”@@dB“lnB•@@Žp€B“B–@@¤B•zB—@@¤BzB˜@@š{€BŒB™@@Ê€B˜Bš@@tB™2B›@@¤B™\pBœ@@ŸÁ€BsB@@ŸÁ@BœBž@@ŸÁ@BBŸ@@vBž25B @@´Bž1B¡@@ŸÁ€BB¢@@dB¡ _n_u_l_l_B£@@¤B¡ _n_u_l_l_B¤@@¤BœzB¥ 0 )L)L&&&&&&&&&& & & & & &&&B¦*@U— â   H» » -COPYRIGHT @MIRON KAUFMAN, 19997B§<B¨8B¦nArial9B©<Bª:@W?1B«</B¬<B­0ÿÿÿÿ@NormalArialÿÿÿ B®*@U¹ 8 È 88T8T-AWe now compute the fractional errors made by approximating ln(z!) with the Stirling approximation and the improved Stirling approximation and graph them versus z. You will note that for z > 20 the error made by using the Stirling approximation is less than 6%7B¯<B°8B®l MathSoftText0,0,1289B±<B²:@W?1B³</B´<Bµ0ÿÿÿÿ@NormalArialÿÿÿ B¶@B@U) Z= 8 B·@@ pB¸@@ Á€B·B¹@@dB¸zBº@@€B¸B»@@tBº1B¼@@´Bº150B½@B@U_ 3¨ ` B¾@@ pB¿@@Á€B¾BÀ@@ŸÁ@B¿BÁ@@ŸÁ@BÀBÂ@@ŸÁ@BÁBÃ@@tBÂ0.1BÄ@@Ê‚BÂBÅ@@tBÄ2.62328BÆ@@Ì€BÄBÇ@@tBÆ10BÈ@@•K€BÆBÉ@@´BÈ3BÊ@@ŸÁ€BÁBË@@dBÊ _n_u_l_l_BÌ@@¤BÊ _n_u_l_l_BÍ@@ ÀBÀBÎ@@û@BÍBÏ@@{@BÎBÐ@@ˆÇ€BÏBÑ@@ˆÇ@BÐBÒ@@Ê@BÑBÓ@@dBÒzBÔ@@΀BÒBÕ@@dBÔlnBÖ@@Žp€BÔB×@@¤BÖzBØ@@¤BÑzBÙ@@΀BÐBÚ@@dBÙlnBÛ@@Žp€BÙBÜ@@žŒ€BÛBÝ@@dBÜzBÞ@@΀BÎBß@@dBÞlnBà@@Žp€BÞBá@@žŒ€BàBâ@@dBázBã@@û€BÍBä@@{@BãBå@@ˆÇ€BäBæ@@Žp@BåBç@@‰Ç€BæBè@@ˆÇ@BçBé@@Ê@BèBê@@Žp@BéBë@@‰Ç€BêBì@@dBëzBí@@´Bë.5Bî@@΀BéBï@@dBîlnBð@@Žp€BîBñ@@¤BðzBò@@¤BèzBó@@š{€BçBô@@Ê€BóBõ@@tBô2Bö@@¤Bô\pB÷@@΀BåBø@@dB÷lnBù@@Žp€B÷Bú@@žŒ€BùBû@@dBúzBü@@΀BãBý@@dBülnBþ@@Žp€BüBÿ@@žŒ€BþC@@dBÿzC@@ŸÁ€B¿C@@ŸÁ@CC@@ŸÁ@CC@@vC150C@@´C1C@@ŸÁ€CC@@dC _n_u_l_l_C@@¤C _n_u_l_l_C @@¤CzC %B )N)N&&&&&&&&& & & & & &&&C *@UÎ ¿Û Ø ûH¿ ¿ -COPYRIGHT @MIRON KAUFMAN, 19997C <C 8C nArial9C<C:@W?1C</C<C0ÿÿÿÿ@NormalArialÿÿÿ