Closed-form expression of the $n$-th derivative of $f_k(x)=e^{-cx}(c(x_u-x))^k$

We have a function $$f_k(x)=e^{-cx}(c(x_u-x))^k,$$ that is defined for all $x\in[0,x_u]$. We know that $k\in\mathbb{N}^+$ and $c>0$ is a given constant.

We are interested in having a closed-form expression (if possible!) of the $n$-th derivative of $f_k(x)$.

So far I started from $n=1$ to see if there's any pattern and I was thinking maybe we can formulate it as a series but I was not successful. I also tried using Mathematica but again, I'm not sure how to use the output there.

Can anyone please give me a hint?


Solution 1:

We differentiate once and get

$$\frac{df_k(x)}{dx}=(-c)e^{-cx}(c(x_u-x))^k - ke^{-cx}(c(x_u-x))^{k-1} = -cf_k(x)-kf_{k-1}(x)$$

We need to investigate the base cases too, which means $f_0(x) = ce^{-cx}$. We have $f'_0(x) = (-c)f_0(x)$.

Therefore to compute the $n$'th derivative of $f_k(x)$, we need to know the relative values of $n$ and $k$. By repetitive use of the recursive formula we obtained above, we get (we define $[k]_m = k(k-1)\cdots(k-m)$ for convenience in notations, also $[k]_0 = 1$ and $[k]_1 = k$). $$\begin{align} & \text{when}\quad n\le k: \frac{d^nf_k(x)}{dx^n} = (-1)^n\sum_{i=0}^{n} \binom n i (c)^{n-i}[k]_if_{k-i}(x) \\ \end{align}$$

I leave the case $n > k$ to you to generalize. It's quite simple, use above fomula and differentiate once more and it becomes obvious.