What is the $m^{th}$ derivative of $-e^{-\alpha\sum_{k=0}^Kv_kx^k}$ $$\huge-e^{-\alpha\sum_{k=0}^Kv_kx^k}$$
My attempt:
$$\large(-e^{-\alpha\sum_{k=0}^Kv_kx^k})^{(m)}=(-e^{-\alpha\sum_{k=0}^Kv_kx^k})(\sum_{k=1}^Kv_kk(k-1)\cdots(k-m+1)x^{k-m})$$
Is this correct? Because it seems to me that the constant term should've vanish but how should I write it in a compact form? (Need this because I'm putting it into Python)
 A: The resulting expression is somewhat more complicated since we have to consider the $m$-th derivative of the composition of a function $g(t)=-e^t$ with a polynomial $t(x)=-\alpha\sum_{k=0}^Kv_kx^k$.

We apply the following variant of the generalized chain rule. It is stated as identity (3.56) in H.W. Gould's Tables of Combinatorial Identities, Vol. I and called:
Hoppe Form of Generalized Chain Rule
Let $D_x$ represent differentiation with respect to $x$ and $t=t(x)$. Hence $D^m_x g(t)$ is the $m$-th derivative of $g$ with respect to $x$. The following holds true
  \begin{align*}
\color{blue}{D_x^m g(t)=\sum_{l=0}^mD_t^lg(t)\frac{(-1)^l}{l!}\sum_{j=0}^l(-1)^j\binom{l}{j}t^{l-j}D_x^mt^j}\tag{1}
\end{align*}

In the current situation with $g(t)=-e^t$ and $t=t(x)=-\alpha\sum_{k=0}^Kv_kx^k$
we have
\begin{align*}
D_t^lg(t)=D_t^l \left(-e^t\right)=-e^t
\end{align*}

We apply the multinomial theorem to 
  \begin{align*}
(t(x))^j=\left(-\alpha \sum_{k=0}^Kv_kx^k\right)^j\tag{2}
\end{align*}
  and obtain
\begin{align*}
D_x^m(t(x))^j&
=D_x^m\left(\left(-\alpha \sum_{k=0}^Kv_kx^k\right)^j\right)\\
&=(-\alpha)^jD_x^m\left(\sum_{k_0+k_1+\cdots+k_K=j}\binom{j}{k_0,k_1,\ldots,k_K}
\prod_{q=0}^K\left(v_qx^q\right)^{k_q}\right)\\
&=(-\alpha)^jD_x^m\left(\sum_{k_0+k_1+\cdots+k_K=j}\binom{j}{k_0,k_1,\ldots,k_K}
\left(\prod_{q=0}^Nv_q^{k_q}\right)x^{\sum_{i=1}^Ki\cdot k_i}\right)\\
&=\sum_{k_0+k_1+\cdots+k_K=j}\binom{j}{k_0,k_1,\ldots,k_K}
\prod_{q=0}^Kv_q^{k_q}\left(\sum_{q=1}^Kq k_q\right)^{\underline{m}}x^{\left(\sum_{i=1}^Ki\cdot k_i\right)-m}\tag{3}\\
\end{align*}

Comment:


*

*In (3) we differentiate $m$ times. We use the notation $z^{\underline{m}}=z(z-1)\cdots(z-m+1)$.



We obtain from (1) using (2) and (3)
  \begin{align*}
\color{blue}{D_x^m}&\color{blue}{\left(-e^{-\alpha\sum_{k=0}^k v_k x^k}\right)}\\
&=\sum_{l=0}^mD_t^l\left(-e^t\right)\frac{(-1)^l}{l!}\sum_{j=0}^l(-1)^j\binom{l}{j}
\left(-\alpha \sum_{k=0}^Kv_kx^k\right)^{l-j}\\
&\qquad\cdot D_x^m\left(\left(-\alpha \sum_{k=0}^Kv_kx^k\right)^{j}\right)\\
&=\sum_{l=0}^m\left(-e^{t(x)}\right)\frac{(-1)^l}{l!}\sum_{j=0}^l(-1)^j\binom{l}{j}
\left(-\alpha \sum_{k=0}^Kv_kx^k\right)^{l-j}\\
&\qquad\cdot
\sum_{k_0+k_1+\cdots+k_K=j}\binom{j}{k_0,k_1,\ldots,k_K}
(-\alpha)^j\prod_{q=0}^Kv_q^{k_q}\left(\sum_{q=1}^K q k_q\right)^{\underline{m}}x^{\left(\sum_{i=1}^Ki\cdot k_i\right)-m}\\
&\color{blue}{=e^{-\alpha\sum_{k=0}^k v_k x^k}\sum_{l=0}^m\frac{\alpha^l}{l!}\sum_{j=0}^l(-1)^{j+1}\binom{l}{j}
\left(\sum_{k=0}^Kv_kx^k\right)^{l-j}}\\
&\qquad\color{blue}{\cdot
\sum_{k_0+k_1+\cdots+k_K=j}\binom{j}{k_0,k_1,\ldots,k_K}
\prod_{q=0}^Kv_q^{k_q}\left(\sum_{q=1}^K q k_q\right)^{\underline{m}}x^{\left(\sum_{i=1}^Ki\cdot k_i\right)-m}}\\
\end{align*}

A: Let $X = \sum_{0}^{k}v_{k}x^{k}$
$K = -e^{{-\alpha}X}$
$X^{(m)} = \prod_{i=1}^{m}iv_m + \prod_{i=2}^{m+1}iv_{m+1}x +\prod_{i=3}^{m+2}iv_{m+2}x^2+ \prod_{i=4}^{m+3}iv_{m+3}x^{3}+\cdots
+\prod_{i=m}^{k}iv_{k}x^{k-m}$
$$K^{(m)} = \sum_{l=1}^{m}(-\alpha)^{m-l}(m-l)e^{-\alpha.X}.{X^{(l)}}^{(m-l-1)}.X^{(m-l)}$$
A: If you do not need the full expression but just the numerical evaluation of the derivative, you can employ the arithmetic of truncated Taylor series. If $u(x)$ is given via its Taylor expansion $u(x)=u_0+u_1x+u_2x^2+…$, then the Taylor series of $v(x)=e^{u(x)}$ can be computed via $v'(x)=v(x)u'(x)$ which comparing coefficients results in $v_0=e^{u_0}$,
$$
mv_m=\sum_{j=0}^{m-1}v_j(m-j)u_{m-j}
$$
where the right side only uses the previously computed values $u_0,…,u_{m-1}$ in the computation of $u_m$.
Finally, $v^{(m)}(0)=m!v_m$.
