Why does $\sqrt{3x} \left(\dfrac {x}{2} \right)^x$ approximate $x!$ pretty well?

129 Views Asked by At

I was just messing around and trying out things in the desmos calculator and found that $\sqrt{3x} \left(\dfrac {x}{2} \right)^x$ is pretty close to $x!$ most of the time, here is a graph.

Why does this happen?

5

There are 5 best solutions below

0
On BEST ANSWER

Using the fact that $n!\sim_{\infty }\sqrt{2\pi n}\left(\frac{n}{e}\right)^n$,

$$\lim_{n\to\infty }\frac{n!}{\sqrt{3n}\left(\frac{n}{2}\right)^n}=\lim_{n\to\infty }\frac{\sqrt{2\pi n}\left(\frac{n}{e}\right)^n}{\sqrt{3n}\left(\frac{n}{2}\right)^n}=\lim_{n\to\infty }\sqrt{\frac{2\pi}{3}}\underbrace{\left(\frac{2}{e}\right)^n}_{\to 0}=0$$ and thus $\sqrt{3n}\left(\frac{n}{2}\right)^n$ doesn't approximate $n!$.

0
On

It doesn't look that close to me... but if you want to compare them, consider the asymptotic behavior of their logarithms. First, $$ \log x! = x \log x - x + O(\log x) $$ by Stirling's approximation, and second, $$ \log\left(\sqrt{3x}\left(\frac{x}{2}\right)^x\right) = x \log x - x \log 2 + O(\log x). $$ So the ratio between the two functions grows as $(e/2)^{x}$... much more slowly than either function grows, to be sure, but still they're not especially similar functions.

2
On

The correct constants are twice the value of $\pi=3.1415\ldots$ and $e=2.718281828459045\ldots$, not $3$ and $2$. That's why it might seem close, that is, $$n!\sim n^n e^{-n} \sqrt{2\pi n}$$

0
On

Stirling's formula says the ratio of $$ \sqrt{2\pi x\,{}} \, \frac{x^x}{e^x} $$ to $x!$ approaches $1$ as $x\to\infty$. You seem to have a crude approximation of Stirling's formula.

(I think Stirling's contribution to this may have been the value of the constant factor. de Moivre earlier showed that the ratio of $\sqrt{x}\ \dfrac{x^x}{e^x}$ to $x!$ approaches a constant that he could evaluate numerically, and then he communicated that to Stirling, unless maybe I'm confused about those events.)

1
On

To calculate n!, you multiply n numbers from 1 to n. N^n multiplies the same number n every time so that is obviously too large. (N/2)^n multiplies n/2 each time. If you rearrange the multiplications in n! as (1 x n) (2x (n-1)) … (n/2)((n+1)/2) then you find that using n/2 each time is still too large, so you would divide each n by something slightly larger. With a bit of maths you find e = 2.71738.. is the best divisor.

So (n/e)^n or n^n e^-n is a reasonably good approximation. Other post mention the Stirling formula which is significantly better.