Alan Smith

Answered

2021-12-20

What is $\frac{\partial}{\partial {x}_{i}}({x}_{i}!)$ where $x}_{i$ is a discrete variable?

Do you consider$({x}_{i}!)=\left({x}_{i}\right)({x}_{i}-1)\cdots 1$ and do product rule on each term, or something else?

Do you consider

Answer & Explanation

Mary Herrera

Expert

2021-12-21Added 37 answers

Step 1

The derivative of a function of a discrete variable doesn't really make sense in the typical calculus setting. However, there is a continuous variant of the factorial function called the$\mathrm{\Gamma}$ function, for which you can take derivatives and evaluate the derivative at integer values.

In particular, since$n\ne \mathrm{\Gamma}(n+1)$ , there is a nice formula for $\mathrm{\Gamma}}^{\prime$ at integer values:

${\mathrm{\Gamma}}^{\prime}(n+1)=n!(-\gamma +\sum _{k=1}^{n}\frac{1}{k})$

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

Step 2

As has been mentioned, the Gamma function$\mathrm{\Gamma}\left(x\right)$ is the way to go.

Integration by parts yields

$\mathrm{\Gamma}\left(x\right)={\int}_{0}^{\mathrm{\infty}}{e}^{-t}{t}^{x-1}dt$

$=(x-1){\int}_{0}^{\mathrm{\infty}}{e}^{-t}{t}^{x-2}dt$

$=(x-1)\mathrm{\Gamma}(x-1)$

Taking the derivative of the logarithm of$\mathrm{\Gamma}\left(x\right)$ gives

$\frac{{\mathrm{\Gamma}}^{\prime}\left(x\right)}{\mathrm{\Gamma}\left(x\right)}=\frac{1}{x-1}+\frac{{\mathrm{\Gamma}}^{\prime}(x-1)}{\mathrm{\Gamma}(x-1)}$

Because$\mathrm{\Gamma}\left(x\right)$ is log-connvex and

$\underset{x\Rightarrow \mathrm{\infty}}{lim}\frac{{\mathrm{\Gamma}}^{\prime}\left(x\right)}{\mathrm{\Gamma}\left(x\right)}-\mathrm{log}\left(x\right)=0$

we get that

$\frac{{\mathrm{\Gamma}}^{\prime}\left(x\right)}{\mathrm{\Gamma}\left(x\right)}=-\gamma +\sum _{k=1}^{\mathrm{\infty}}(\frac{1}{k}-\frac{1}{k+x-1})$

For integer$n,\text{}n\ne \mathrm{\Gamma}(n+1)$ , so the derivative is

$\mathrm{\Gamma}(n+1)=\mathrm{\Gamma}(n+1)(-\gamma +\sum _{k=1}^{\mathrm{\infty}}\frac{n}{k(k+n)})$

$=n!(-\gamma +{H}_{n})$

where$H}_{n$ is the $n}^{th$ Harmonic Number (with the convention that ${H}_{0}=0$ )

The derivative of a function of a discrete variable doesn't really make sense in the typical calculus setting. However, there is a continuous variant of the factorial function called the

In particular, since

where

Step 2

As has been mentioned, the Gamma function

Integration by parts yields

Taking the derivative of the logarithm of

Because

we get that

For integer

where

Debbie Moore

Expert

2021-12-22Added 43 answers

Step 1

Start from

$x\ne x(x-1)!$

$x{!}^{\prime}=x(x-1){!}^{\prime}+(x-1)!$

So we are looking for a function that satisfies

$f\left(x\right)=xf(x-1)+(x-1)!$

Replacing we have

$f\left(x\right)=x((x-1)f(x-2)+(x-2)!)+(x-1)!$

Again

$f\left(x\right)=x((x-1)((x-2)f(x-3)+(x-3)!)+(x-2)!)+(x-1)!$

Notice that we have at this stage

$f\left(x\right)=x(x-1)(x-2)f(x-3)+x(x-1)(x-3)!+x(x-2)!+(x-1)!$

So we can extend

$f\left(x\right)=x(x-1)(x-2)\cdots (x-(k-1))f(x-k)+$

$x(x-1)\cdots (x-(k-2))(x-k)!+\cdots +x(x-1)(x-3)!+$

$x(x-2)!+(x-1)!$

or

$f\left(x\right)=x(x-1)(x-2)\cdots (x-(k-1))f(x-k)+\sum _{m=x}^{x-(k-1)}\frac{x!}{m}$

Step 2

Taking$k=x$ and x integer we have

$f\left(x\right)=x!f\left(0\right)+\sum _{m=x}^{1}\frac{x!}{m}$

Notice that this must be completely valid no matter what extension of factorial we take. And we could essentially stop here.

Still, since we can, it all now comes to defining$f\left(0\right)$ which is $0{!}^{\prime}$ , first derivative of factorial at 0.

What is the value of$0!\prime$ ?

Well$f\left(0\right)$ is a constant so there is no harm of replacing it with $f\left(0\right)=-\gamma +c$ (We use $\gamma$ so we could argue about the asymptotic evaluation as it is obviosly needed to reach $\mathrm{ln}\left(x\right)$ )

Start from

So we are looking for a function that satisfies

Replacing we have

Again

Notice that we have at this stage

So we can extend

or

Step 2

Taking

Notice that this must be completely valid no matter what extension of factorial we take. And we could essentially stop here.

Still, since we can, it all now comes to defining

What is the value of

Well

nick1337

Expert

2021-12-28Added 573 answers

Step 1

It's probably best to use an analytic continuation of the factorial function, rather than the factorial itself. Consider the gamma function:

Obviously,

So,

Most Popular Questions