I Found Out How to Differentiate Factorials!
I Found Out How to Differentiate Factorials!

I was trying to calculate the derivative of $x!$ but i ran into a large amount of numbers. Is it even possible to calculate it? Because in an app called GRAPHER when i type in $(x!)’$ it returnes the graph of this function. Here it is:

  • 1$\begingroup$ To define $x!$ you need the Gamma function: en.wikipedia.org/wiki/Gamma_function $\endgroup$ Feb 5, 2017 at 14:53
  • $\begingroup$ That was helpful thanks $\endgroup$– XygoFeb 5, 2017 at 15:04

5 Answers

The function $ f(x) = x! $ is well defined only for $ x \in \mathbb{N} \cup \{ 0 \} $. The derivatives of such a function do not exist; it’n not even a continuous function! An extention of $f$ for $ x \in \mathbb{R} $ is the Gamma Function; and it’s got derivatives.

  • $\begingroup$ Just to nitpick — as $\Bbb{N}\cup\{0\}$ is a discrete space, the factorial function is continuous. The problem is that it’s not defined on $\Bbb{R}$. $\endgroup$– NealFeb 5, 2017 at 15:00

Gamma function, the most well-known generalization of factorial, is given by the formula below:

$\Gamma(x) = \int_0^\infty t^{x-1}e^{-t}dt$ $(x>0)$

It is straightforward from the definition that $\Gamma(1)=1$ and $\Gamma(x+1)=x\Gamma(x)$, so for a positive integer $n$, $\Gamma(n)=(n-1)!$ holds.

Then we get $\Gamma'(x)=\int_0^\infty t^{x-1}e^{-t}\ln tdt$.

Wikipedia https://en.wikipedia.org/wiki/Gamma_function gives the derivative of the Gamma function:

$\Gamma'(m+1) = m! \left( – \gamma + \sum_{k=1}^m\frac{1}{k} \right)\,.$

Note that what you are looking to derive is $z!$. This means that you have to extend the factorial function over the reals. So basically we want a function $f(x)$ such that $$f(x+1)=(x+1)f(x)$$ Fortunately, Wikipedia contatins some information on extending the factorial function. One such extension is called the Gamma function, which is defined as $$z!=\Gamma (z+1)=\int_{0}^{\infty} x^{z}e^{-x} \mathrm{d}x$$ We can check that the Gamma function satisfies $$\Gamma(z+1)=z\Gamma(z)$$$$\Gamma(1)=1$$ As proved here. However, you are curious about it’s derivative. We also need to know what the digamma function is to learn about that. Note that the digamma function is defined as $$\psi (x)=\frac{\mathrm{d}}{\mathrm{d}x}\ln\left(\Gamma(x)\right)=\frac{\Gamma'(x)}{\Gamma(x)}$$ So the derivative of $\Gamma (x)$ is $\Gamma (x) \psi(x)$.

The function $x\mapsto x! = x(x-1)(x-2)\cdots 3\cdot 2\cdot 1$ only makes sense when $x$ is a nonnegative integer ($0,1,2,3,\ldots$). It is not defined for all real numbers. That’s a problem when you try to find its derivative — remember, from the definition of a derivative, it’s $$ f'(x) = \lim_{h\to 0} \frac{f(x+h) – f(x)}{h} $$ So to differentiate the factorial function we’d have to be able to figure out what $(x+h)!$ is for very small $h$. For example, to find the derivative of the factorial function at $6$ we’d have to be able to find $6.003!$

So the question is, what is a good way to extend the factorial function? In other words, is there a new function we can come up with, that is defined on all the real numbers and is also equal to the factorial function on the nonnegative integers?

The answer is: Yes. As other answers point out, the natural extension is the Gamma function $$ \Gamma(x) = \int_0^\infty t^{x-1}e^{-t}\ dt $$ The reason it’s a natural extension of the factorial function involves integration by parts, and is a good exercise in a second calculus class. When people talk about the derivative of the factorial function, they’re talking about the derivative of the Gamma function.

  • $\begingroup$ Simple and clear. I appreciate your answer @Neal $\endgroup$– XygoFeb 5, 2017 at 15:26

You are watching: The derivative of $x!$. Info created by Bút Chì Xanh selection and synthesis along with other related topics.