Solving a difficult equation involves both factorial and non-square root

45 Views Asked by At

I need to solve the following equation:

$((a-x)!)^{1/2x}=1$

Or at least, I need to find the asymptotic growth of $x$ as a function of $a$.

The best I got is, by Stirling's approximation, we have $2^{\frac{(a-x)\log(a-x)}{2x}}=1$. Thus ${\frac{(a-x)\log(a-x)}{2x}}=0$, so $(a-x)\log(a-x)=0$, so $a=x$ or $a=x+1$. But I it seems wrong to me...

1

There are 1 best solutions below

2
On BEST ANSWER

You have

$$((a-x)!)^{\frac{1}{2x}}=1 \tag{1}\label{eq1A}$$

Taking both sides to the power of $2x$ gives

$$(a-x)! = 1 \tag{2}\label{eq2A}$$

Even if you define $(r-1)! = \Gamma(r)$ for handling real values $r$, where $\Gamma(r)$ is the gamma function, you still have only $0! = 1$ and $1! = 1$ for positive values of the gamma function argument. However, the gamma function can also be $1$ for various negative values of $r$, e.g., at $2$ values between $-3$ and $-4$. Assuming you are only dealing with positive $r$, or just the standard factorial function, you thus get

$$a - x = 0 \; \text{ or } \; a - x = 1 \implies a = x \; \text{ or } \; a = x + 1 \tag{3}\label{eq3A}$$

This matches what you got. When you wrote it "seems wrong to me", were you referring to the method you used, your result, both of these, or something else?

Update: Regarding using Stirling's approximation, it seems you're using the form given by

$$\log_2 n! = n\log_2 n - n\log_2 e + O(\log_2 n) \tag{4}\label{eq4A}$$

but using only the first term on the right. Then taking this as a power of $2$, you get

$$n! \approx 2^{n\log_2 n} \tag{5}\label{eq5A}$$

Replacing $n$ with $a - x$ and taking both sides to the power of $\frac{1}{2x}$ leads to your statement of

$$2^{\frac{(a-x)\log(a-x)}{2x}} = 1 \tag{6}\label{eq6A}$$

Although it worked in your case, it's basically only because $n$ ending up being $0$ so your approximation matched. As the diagram at the right in the Wikipedia article shows, the full approximation does actually match the actual value quite closely for $n \ge 1$. However, especially for larger $n$, you usually can't just ignore the second & third terms in \eqref{eq4A}. Depending on how large $n$ is and how relatively accurate you want the result, you may wish to use the more precise formula given by

$$n! \sim {\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n} \tag{7}\label{eq7A}$$

Your approximation in \eqref{eq5A} simplifies instead to

$$n! \approx n^n \tag{8}\label{eq8A}$$

which is quite different for any larger values of $n$.

In general, if you can solve a factorial type problem exactly relatively easily, you should do that. Only if you can't, then consider using Stirling's approximation and, if used, do it with a form which gives you at least sufficient accuracy, with the most precise version in \eqref{eq7A} being ideal if it's possible & not too much effort to use.