1

Taking the factorial function $x!$

I wonder if there is a method to find the first derivative of this function without making any use of the Gamma function (or related integral representations of the factorial). Maybe something like that

$$ \begin{align} \frac{\text{d}}{\text{d} x}\ x! & = \frac{\text{d}}{\text{d} x}\ (x\cdot (x-1)\cdot (x-2)\cdot \cdots) \\\\ & = ((x-1)\cdot (x-2)\cdots) + x\cdot ((x-3)\cdot (x-4)\cdots) + x\cdot ((x-2)\cdot (x-4)\cdots) + \cdots \\\\ & = (x-1)! + x\cdot N(x) \end{align} $$

What I'm missing is a suitable $N(x)$ to express the remaining terms.

Does such a function exist?

I thought about this, observing term by term:

$$N(x) = \left(\prod_{k = 3}^{n} (x-k)\right) + \left((x-2)\prod_{k = 4}^n (x-k)\right) + \left((x-2)\cdot(x-3)\prod_{k = 5}^n (x-k)\right) + \cdots$$

But still it seems quite messy, isn't it?

Travis Willse
  • 99,363
Enrico M.
  • 26,114
  • 3
    Notice that a derivative is actually a limit: $f'(a)=\lim_{x\to a}\frac{f(a)-f(x)}{a-x}$. In case of $x!$, you cannot take such limit, thus, taking the derivative doesn't really make sense. –  Jan 30 '16 at 11:27
  • Ohh you're right!! It's also not a continuous function! – Enrico M. Jan 30 '16 at 11:39
  • 2
    The factorial, defined as $x! := x (x - 1) \cdots (2)(1)$, is continuous---the issue is that it is only defined at isolated points, so its derivative doesn't exist anywhere. – Travis Willse Jan 30 '16 at 11:41

5 Answers5

4

If subtracting $1$ successively from a number $x$ eventually gives $1$, then $x$ must be an integer, too, and so the definition $$x! := x (x - 1) \cdots (2) (1)$$ is only defined for positive integers $x$. (We can extend this by defining $0!$ to be the value $1$ of the empty product; this is a good choice in the sense that the identity $x! = x (x - 1)!$ then holds for $x = 1$, too.)

In particular, so defined the factorial is a function $\Bbb N \to \Bbb N$, and in particular, its derivative doesn't exist at any point: By definition, if a (real) function $f$ is differentiable at a point $a$ in its domain, $f$ must be defined on some open interval $(a - \epsilon, a + \epsilon)$ (sometimes, and depending on application, we'll allow a half-open interval with $a$ at its endpoint, which is enough to compute a left- or right-hand limit of the difference quotient).

In short, if we want to make sense of $ \frac{d}{dx}(x!$) we must extend $x!$ to some (differentiable) function, like $\Gamma(x + 1)$. (This extension is not arbitrary, by the way, it is the unique extension of $x!$ to $(-1, \infty)$ that satisfies certain natural properties.)

Travis Willse
  • 99,363
3

According to your approach regarding $N(x)$ it seems you have a function $x!:\mathbb{R}\rightarrow\mathbb{R}$

\begin{align*} x!:=\prod_{k=0}^{n-1}(x-k) \end{align*}

consisting of $n$ factors $x-k$ in mind. If so, we can write the function using the Pochhammer symbol $$(x)_n=x(x-1)(x-2)\cdots (x-n+1)$$ which can be written as polynomial in $x$ using the Stirling Numbers of the first kind $\begin{bmatrix}n\\k \end{bmatrix}$ \begin{align*} (x)_n=\prod_{k=0}^{n-1}(x-k)=\sum_{k=0}^n\begin{bmatrix}n\\k \end{bmatrix}x^k \end{align*} We can so find a representation for the derivative \begin{align*} \frac{d}{dx}&x(x-1)(x-2)\cdots (x-n+1)=\frac{d}{dx}(x)_n\\ &=\frac{d}{dx}\sum_{k=0}^n\begin{bmatrix}n\\k \end{bmatrix}x^k\\ &=\sum_{k=1}^nk\begin{bmatrix}n\\k \end{bmatrix}x^{k-1}\\ \end{align*}

Alternatively, if you consider generalisations of the factorial function different to the Gamma function you should consider according to @Travis answer which properties a generalisation should have and then analysing the properties regarding derivatives.

A nice page providing interesting alternatives to the standard definition of $x!$ is Is the Gamma function mis-defined by P. Luschny.

Markus Scheuer
  • 108,315
2

Expanding on Lucian's answer (or perhaps making it more clear)

$$f(x):=\frac{d}{dx}\ln(x!)=\frac{\left(\frac{d}{dx}x!\right)}{x!}\tag0$$

$$\frac{d}{dx}\ln(x!)=\frac{d}{dx}\ln(1\cdot2\cdot3\dots x)=\frac{d}{dx}\ln(1)+\ln(2)+\ln(3)+\dots\ln(x)$$

$$f(x)=\frac{d}{dx}\sum_{n=1}^x\ln(n)$$

A discrete representation nonetheless, but we will make do with it.

$$F(x)=\int_1^xf(t)dt+c=\sum_{n=1}^x\ln(n)$$

$$\implies F(x)=\ln(x)+F(x-1)\tag1$$

$$\implies\frac{d}{dx}F(x)=\frac{d}{dx}\ln(x)+F(x-1)$$

$$f(x)=\frac1x+f(x-1)$$

$$f(x)-C=\sum_{n=1}^x\frac1n\tag{backwards $(1)$}$$

$$f(x)=C+\sum_{n=1}^x\frac1n$$

$$\frac{d}{dx}x!=x!\left(C+\sum_{n=1}^x\frac1n\right)$$

where $c$ and $C$ are constants. If we sneak in with the Gamma function, we find the exact value of the constant:

$$\frac{d}{dx}x!=x!\left(-\gamma+\sum_{n=1}^x\frac1n\right)$$

where $\gamma$ is the Euler-Mascheroni constant.


$(0)$ - chain rule/logarithmic differentiation.

$(1)$ - if $F(x):=\sum_{n=1}^xg(n)$, then it comes naturally that $F(x)=g(x)+F(x-1)$ from it's definition. The converse is not true, however, and that is why we get extra constants in $(\text{backwards }(1))$.

1

Differentiate the natural logarithm of $(n+1)!=(n+1)~n!~$ You'll get $f(n+1)-f(n)=$

$=\dfrac1{n+1},~$ where $f(n)=\Big[\ln(n!)\Big]'=\dfrac{(n!)'}{n!}.~$ At the same time, we know that $H_{n+1}-H_n$

$=\dfrac1{n+1},~$ where $H_n=\displaystyle\sum_{k=1}^n\dfrac1k~$ is the n-th harmonic number. So $f(n)-f(0)=H_n.~$ But

$f(0)=(n!)'_{n=0},~$ since $0!=1.~$ So all that's left to do now is evaluating the latter. :-$)$

Lucian
  • 48,334
  • 2
  • 83
  • 154
0

You can try defining a function $F(x)=\prod_{k=0}^{\lfloor x-1\rfloor} (x-k)$, where $\lfloor\cdot\rfloor$ means the floor function. For any integer $n$, the function $F(n)=n!$, but it is also defined for $x\in\mathbb{R}^+$. It is continuous, and differentiable for $x\notin\mathbb{N}$. It will be interesting to try to differentiate it in a neighborhood of a point $x\notin\mathbb{N}$.