/usr/share/doc/maxima-sage-doc/html/maxima_83.html is in maxima-sage-doc 5.39.0+ds-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on May, 8 2017 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>
-->
<head>
<title>Maxima 5.39.0 Manual: 83. stirling</title>
<meta name="description" content="Maxima 5.39.0 Manual: 83. stirling">
<meta name="keywords" content="Maxima 5.39.0 Manual: 83. stirling">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
body {color: black; background: white; margin-left: 8%; margin-right: 13%;
font-family: "FreeSans", sans-serif}
h1 {font-size: 150%; font-family: "FreeSans", sans-serif}
h2 {font-size: 125%; font-family: "FreeSans", sans-serif}
h3 {font-size: 100%; font-family: "FreeSans", sans-serif}
a[href] {color: rgb(0,0,255); text-decoration: none;}
a[href]:hover {background: rgb(220,220,220);}
div.textbox {border: solid; border-width: thin; padding-top: 1em;
padding-bottom: 1em; padding-left: 2em; padding-right: 2em}
div.titlebox {border: none; padding-top: 1em; padding-bottom: 1em;
padding-left: 2em; padding-right: 2em; background: rgb(200,255,255);
font-family: sans-serif}
div.synopsisbox {
border: none; padding-top: 1em; padding-bottom: 1em; padding-left: 2em;
padding-right: 2em; background: rgb(255,220,255);}
pre.example {border: 1px solid rgb(180,180,180); padding-top: 1em;
padding-bottom: 1em; padding-left: 1em; padding-right: 1em;
background-color: rgb(238,238,255)}
div.spacerbox {border: none; padding-top: 2em; padding-bottom: 2em}
div.image {margin: 0; padding: 1em; text-align: center}
div.categorybox {border: 1px solid gray; padding-top: 0px; padding-bottom: 0px;
padding-left: 1em; padding-right: 1em; background: rgb(247,242,220)}
img {max-width:80%; max-height: 80%}
-->
</style>
<link rel="icon" href="figures/favicon.ico"/>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="stirling_002dpkg"></a>
<a name="SEC385"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_82.html#SEC384" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC386" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_84.html#SEC387" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_89.html#SEC425" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 83. stirling </h1>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC386">83.1 Functions and Variables for stirling</a></td><td> </td><td align="left" valign="top">
</td></tr>
</table>
<p><a name="Item_003a-Functions-and-Variables-for-stirling"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-stirling"></a>
<a name="SEC386"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC385" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="maxima_84.html#SEC387" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC385" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC385" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_84.html#SEC387" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_89.html#SEC425" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 83.1 Functions and Variables for stirling </h2>
<p><a name="Item_003a-stirling"></a>
</p><dl>
<dt><u>Function:</u> <b>stirling</b><i> <br> <tt>stirling</tt> (<var>z</var>,<var>n</var>) <br> <tt>stirling</tt> (<var>z</var>,<var>n</var>,<var>pred</var>)</i>
<a name="IDX2433"></a>
</dt>
<dd><p>Replace <code>gamma(x)</code> with the <em>O(1/x^(2n-1))</em> Stirling formula. when <var>n</var> isn't
a nonnegative integer, signal an error. With the optional third argument <code>pred</code>,
the Stirling formula is applied only when <code>pred</code> is true.
</p>
<p>Reference: Abramowitz & Stegun, " Handbook of mathematical functions", 6.1.40.
</p>
<p>Examples:
</p><pre class="example">(%i1) load (stirling)$
(%i2) stirling(gamma(%alpha+x)/gamma(x),1);
1/2 - x x + %alpha - 1/2
(%o2) x (x + %alpha)
1 1
--------------- - ---- - %alpha
12 (x + %alpha) 12 x
%e
(%i3) taylor(%,x,inf,1);
%alpha 2 %alpha
%alpha x %alpha - x %alpha
(%o3)/T/ x + -------------------------------- + . . .
2 x
(%i4) map('factor,%);
%alpha - 1
%alpha (%alpha - 1) %alpha x
(%o4) x + -------------------------------
2
</pre>
<p>The function <code>stirling</code> knows the difference between the variable 'gamma' and
the function gamma:
</p>
<pre class="example">(%i5) stirling(gamma + gamma(x),0);
x - 1/2 - x
(%o5) gamma + sqrt(2) sqrt(%pi) x %e
(%i6) stirling(gamma(y) + gamma(x),0);
y - 1/2 - y
(%o6) sqrt(2) sqrt(%pi) y %e
x - 1/2 - x
+ sqrt(2) sqrt(%pi) x %e
</pre>
<p>To apply the Stirling formula only to terms that involve the variable <code>k</code>,
use an optional third argument; for example
</p><pre class="example">(%i7) makegamma(pochhammer(a,k)/pochhammer(b,k));
(%o7) (gamma(b)*gamma(k+a))/(gamma(a)*gamma(k+b))
(%i8) stirling(%,1, lambda([s], not(freeof(k,s))));
(%o8) (%e^(b-a)*gamma(b)*(k+a)^(k+a-1/2)*(k+b)^(-k-b+1/2))/gamma(a)
</pre><p>The terms <code>gamma(a)</code> and <code>gamma(b)</code> are free of <code>k</code>, so the Stirling formula
was not applied to these two terms.
</p>
<p>To use this function write first <code>load("stirling")</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_105.html#Category_003a-Gamma-and-factorial-functions">Gamma and factorial functions</a> ·
<a href="maxima_105.html#Category_003a-Share-packages">Share packages</a> ·
<a href="maxima_105.html#Category_003a-Package-stirling">Package stirling</a>
</div>
</p>
</dd></dl>
<p><a name="Item_003a-stringproc_002dpkg"></a>
</p><hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC385" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima_84.html#SEC387" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_89.html#SEC425" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
<font size="-1">
This document was generated by <em>Build Daemon user</em> on <em>May, 8 2017</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
</font>
<br>
</p>
</body>
</html>
|