# Evaluating $\lim_\limits{x\to 3}\left(\frac{\left(x!-2x\right)}{x-3}\right)$

$$\lim_\limits{x\to 3}\left(\frac{\left(x!-2x\right)}{x-3}\right)$$

I tried substituting $$x(x-1)$$ in place for $$x!$$ as the limit approaches $$3$$, giving the limit $$3$$ by factorization.
But while plotting graph on Desmos calculator, it showed a weird gamma function graph, giving the answer around 5.5 like this
But when I plotted graph substituting $$x(x-1)$$ in place for $$x!$$, the graph was a straight line and gave limit $$3$$. like this

• How would you define $x!$ without the gamma function? Keeping in mind that the function needs to be defined for all $x$ in an interval like $(2.99,3.01)$? Anyway, looks like the derivative of gamma should come out. Either by l'Hospital (if allowed) or possibly by using the functional equation of gamma. – Jyrki Lahtonen May 5 '20 at 4:19
• How did you get your original answer by factorisation? You still get an indeterminate form. Better check your working. You need an extension of the factorial valid for non-integers for this, and the most commonly used one is the gamma function. – Deepak May 5 '20 at 4:47
• I tried substituting x(x−1) in place for x!, giving x^2-x – Aatmaj May 5 '20 at 5:00

I believe the first answer is correct. Mathematica gives the answer as $$9 - 6\gamma$$, where $$\gamma$$ is the Euler-Mascheroni constant. The reason for this has to do with the fact that the (generalized) factorial can be expressed in terms the Gamma function \begin{align*} \Gamma(z) = \int_0^\infty x^{z-1}e^{-x}dx, \end{align*} when $$\Re z > 0$$. This function has the property that $$\Gamma(n) = (n-1)!$$ for all positive integers $$n$$ and so it is the natural extension of the factorial. Using this, we can replace $$x! = \Gamma(x+1) = \int_0^\infty y^{x}e^{-y}dy$$. The Wikipedia page for the gamma function presents a nice form for its derivative when $$x$$ is an integer:

\begin{align*} \Gamma'(x+1) =x!\left(-\gamma+\sum_{k=1}^x\frac{1}{k}\right) \end{align*}

Now applying L'Hopital's rule and use the above formula for the derivative we get: \begin{align*} \lim_{x \rightarrow 3} \frac{x!-2x}{x-3} &= \lim_{x \rightarrow 3} \frac{\Gamma(x+1)-2x}{x-3} = \lim_{x \rightarrow 3} \Gamma'(x+1)-2 = \Gamma'(4) - 2\\ &= 3!\left(-\gamma + 1 + \frac{1}{2} + \frac{1}{3}\right) - 2 = 9-6\gamma \approx 5.5. \end{align*}

Not sure why you're using $$x(x-1)$$ in place of $$x!$$. It is much easier to consider the gamma function $$\Gamma$$ and, its "logarithmic derivative", the digamma function $$\psi$$. In particular, the property

$$\psi(x) = \frac{\Gamma'(x)}{\Gamma(x)},$$

holds. This gives us the quite handy identity that

$$\Gamma'(x) = \Gamma(x) \psi(x).$$

Let the limit be denoted as $$L$$. Then,

$$L = \lim_{x \to 3} \frac{\Gamma(x+1) - 2x}{x - 3}.$$

This has a $$0/0$$ indeterminate form, so you can use L'Hopital's rule to obtain

$$L = \lim_{x \to 3} (\Gamma'(x+1) - 2),$$

with which we have

$$L = \lim_{x \to 3} (\psi(x+1) \Gamma(x+1) - 2) = \psi(4)\Gamma(4) - 2.$$

Here, $$\Gamma(4) = 3! = 6$$. The digamma function is given by

$$\psi(x) = -\gamma + \sum_{n=1}^{x-1} \frac1n$$

for integers $$x$$. The constant $$\gamma$$ is the Euler-Mascheroni constant so $$\psi(4) = 1 + 1/2 + 1/3 - \gamma$$. Thus

$$L = 9 - \gamma.$$

$$\lim_\limits{x\to 3}\left(\frac{\left(x!-2x\right)}{x-3}\right)=\lim_\limits{y\to 0}\left(\frac{\Gamma (y+4)-2 (y+3)}{y}\right)$$ $$\Gamma (y+4)=6+(11-6 \gamma ) y+\frac{1}{2} \left(12-22 \gamma +6 \gamma ^2+\pi ^2\right) y^2+O\left(y^3\right)$$ $$\frac{\Gamma (y+4)-2 (y+3)}{y}=(9-6 \gamma )+\frac{1}{2} \left(12-22 \gamma +6 \gamma ^2+\pi ^2\right) y+O\left(y^2\right)$$ which shows the limit and how it is approached.
Using this for $$x=\pi$$ would give $$6.32750$$ while the exact value would be $$6.39085$$