7

During my study to Stirling approximation I find this formula $n! \approx \sqrt{2\pi n} n^{n}e^{-n} $ but we know that $ 0! =1 $ And in this formula if we replace every $ n $ with $ 0$ we will have $ 0^0$ which is undefined. My question is how we get $0! $ by using this formula? .. can anyone explain that for me. I'll appreciate that.. thanks

  • 2
    The formula is asymptotic, but converges very rapidly. – TravisJ Sep 04 '15 at 18:15
  • 3
    Stirling's approximation is an asymptotic as $n\to\infty$. We don't need to use asymptotics (usually) for small integers. – Clayton Sep 04 '15 at 18:15
  • 2
    Everybody knows that $\sum\limits_{n=0}^\infty\dfrac{z^n}{n!} = e^z$, but that won't work when $z=0$ unless $0^0=1$, since the first term is $\dfrac{0^0}{0!}$. The expression $0^0$ denotes a product of no numbers and is therefore equal to $1$. ${}\qquad{}$ – Michael Hardy Sep 04 '15 at 20:12
  • @Hardy: Actually, that's more of meaning $z^0 = 1$ rather than $0^0 = 1$. –  Sep 05 '15 at 04:21

3 Answers3

5

In general, mathematicians usually define $0^0=1$.

There are good arguments for doing so, explained here.

Also, you shouldn't use Stirling's approximation for such small $n$.

wythagoras
  • 25,026
3

The relation $n! \approx \sqrt{2\pi n}\ n^n e^{-n}$ means $\lim\limits_{n\to\infty} \dfrac{\sqrt{2\pi n}\ n^n e^{-n}}{n!} = 1\vphantom{\frac{\int}{\displaystyle\sum}}$. That means the ratio can be made as close to $1$ as desired by making $n$ big enough. So nothing depends on what happens with small values of $n$.

2

Stirling's Asymptotic Expansion

As shown in this answer, a more precise asymptotic expansion is $$ n!=\sqrt{2\pi n}n^ne^{-n}\left(1+\frac1{12n}+\frac1{288n^2}-\frac{139}{51840n^3}+O\left(\frac1{n^4}\right)\right) $$ To understand what an asymptotic expansion is, consider the term $O\left(\frac1{n^4}\right)$. This means that there is a fixed constant, $C$, so that $$ \left|\,n!-\sqrt{2\pi n}n^ne^{-n}\left(1+\frac1{12n}+\frac1{288n^2}-\frac{139}{51840n^3}\right)\,\right|\le\frac C{n^4} $$ As you can see, the error of this asymptotic expansion can be very big when $n\approx0$, so this asymptotic expansion is most useful when $n$ is big.


$\boldsymbol{0^0}$

$0^0$ is considered to be an indeterminate form when computing the limit $$ \lim\limits_{(x,y)\to(0,0)}x^y $$ However $0^0$ is usually defined to be $1$.

In the second half of this answer a number of reasons are given as to why $0^0$ is usually defined to be $1$.

  1. $a^b$ counts the number of functions from a set of size $b$ to a set of size $a$. Since there is one function from the empty set to the empty set (the empty function), in this case, $0^0=1$.

  2. Often, when we encounter an exponent of $0$, it is in a term like $x^0=1$ or in a term like $e^x$ where $x=0$. It the latter case, this is definitely, $1$. However, $x^0$ is continuous at $0$ if we define $0^0=1$. This turns out to be the most useful value to assign to $0^0$ in most cases we encounter; e.g. polynomials, power series, the Binomial Theorem, etc.

Because this definition fits most of the common cases, this definition is the one commonly used.

robjohn
  • 345,667
  • 1
    "We can define $0^0$ to be whatever we want" only if we want the relation $e^z=\sum\limits_{n\to\infty}\dfrac{z^n}{n!}$ to fail when $z=0$, since then the first term is $0^0/0!$. ${}\qquad{}$ – Michael Hardy Sep 04 '15 at 20:10
  • @MichaelHardy: That falls under my point 2. However, the problem for most people who think that $0^0$ is not defined is that it is an indeterminate form. Since $x^y$ can take on a lot of different values near $(0,0)$, we could choose any one. However, we choose the one that works in most common cases, such as power series, the binomial theorem, etc. – robjohn Sep 04 '15 at 20:19
  • The indeterminate nature of the expression matters only if taking limits matters. I was thinking of the $n$ in Stirling's formula as an integer. ${}\qquad{}$ – Michael Hardy Sep 04 '15 at 20:47
  • Yes. That is definitely what I was trying to say. Most cases are not looking at the limit. They are monomials $x^0$ where $x=0$. – robjohn Sep 04 '15 at 20:49