# Evaluate $\frac{\partial^2}{\partial t^2} \left[ \prod_{j=1}^k (1+t+\dots+t^{d_j -1}) \right]$ at $t=1$

I need to find a "nice" formula for the evaluation of $\frac{\partial^2}{\partial t^2} \left[ \prod_{j=1}^k (1+t+\dots+t^{d_j -1}) \right]$ at t=1, where $d_j \in \mathbb{N}$.

I have already proved that $$\frac{\partial}{\partial t} \left[ \prod_{j=1}^k (1+t+\dots+t^{d_j -1}) \right]_{| t=1} =\frac{1}{2} \cdot \prod_{i=1}^k d_i \cdot \left[ \sum_{i=1}^k d_i -k \right]$$

and now I'm looking for a similar concise formula for the second derivative at t=1.

• How did you derive the formula for the first derivative? – Ali Caglayan Aug 3 '14 at 14:41
• The general Leibniz Rule may help. You'll need to generalize it to products of more than two terms, but it's not hard to see how that should work. – Semiclassical Aug 3 '14 at 14:48
• @Alizter I derived the formula for the first derivative in the following way:$$\frac{\partial}{\partial t} \left[ \prod_{j=1}^k (1+t+\dots+t^{d_j -1}) \right] =\sum_{i=1}^k \left[ \prod_{j\neq 1} (1+t+\dots+t^{d_j -1}) \right] (1+2t+\dots+(d_i-1) t^{d_i -2})$$ Evaluate at t=1 and you get $$\sum_{i=1}^k \left[ \left( \prod_{j \neq i} d_j \right) \frac{d_i(d_i -1)}{2} \right]= \prod_{i=1}^k d_i \cdot \left( \sum_{i=1}^k \frac{d_i -1}{2} \right) = \frac{1}{2} \cdot \prod_{i=1}^k d_i \cdot \left[ \sum_{i=1}^k d_i -k \right]$$ – Ella Smith Aug 3 '14 at 15:26
• @CarlaMascia Have you tried differentiating before evaluating at t=1? – Ali Caglayan Aug 3 '14 at 19:07
• @Alizter That is what I did. – Ella Smith Aug 3 '14 at 19:32

Let $$f_i(x)=\sum_{n=0}^{d_i-1}x^n=1+x+\cdots+x^{d_i-1}$$ and let $$\Psi=\prod_{j=1}^kf_j(t)$$ We have that $$\Phi=\frac\partial{\partial t}\Psi=\Psi\left(\sum^k_{j=1}\frac{f_j'(t)}{f_j(t)}\right)$$ Therefore $$\frac{\partial^2}{\partial t^2}\Psi=\frac\partial{\partial t}\Phi=\Psi'\left(\sum^k_{j=1}\frac{f_j'(t)}{f_j(t)}\right)+\Psi\left(\sum^k_{j=1}\frac{f_j'(t)}{f_j(t)}\right)=\Psi\left(\left(\sum^k_{j=1}\frac{f_j'(t)}{f_j(t)}\right)^2+\left(\sum^k_{j=1}\frac{f_j'(t)}{f_j(t)}\right)'\right)$$ Finally after simplification $$\Psi\left(\left(\sum^k_{j=1}\frac{f_j'(t)}{f_j(t)}\right)^2+\sum^k_{j=1}\frac{f_j(t)f_j''(t)-f_j'(t)^2}{f_j(t)^2}\right)$$ The rest is just computations of the derivative at of $f_j$ at $t=1$ which should simplify nicely in terms of $d_j$.

Further Calculations $$f_j(1)=d_j$$ $$f_j'(1)=\frac{d_j(d_j-1)}{2}$$ $$f_j''(1)=\frac{d_j(d_j-1)(d_j-2)}{3}$$ Thus you may finally plug and chug.

After the plug and chug I get $$\frac{\partial^2}{\partial t^2}\Psi=\left(\prod^k_{j=1}d_j\right)\left(\left(\sum^k_{j=1}\frac{d_j-1}2\right)^2-\sum^k_{j=1}\frac{(d_j-1)(d_j-5)}{2}\right)$$

• I tried and I have found $$\frac{1}{12} \prod_{i=1}^k d_i \left[ 3 (\sum_{j=1}^k d_j - k)^2 + \sum_{j=1}^k d_i^2 - 6 \sum_{j=1}^k d_i + 5k \right]$$ – Ella Smith Aug 3 '14 at 20:59
• I think you wanted to write $$\left(\prod^k_{j=1}d_j\right)\left(\left(\sum^k_{j=1}\frac{d_j-1}2\right)^2-\sum^k_{j=1}\frac{(d_j-1)(d_j-5)}{12}\right)$$ – Ella Smith Aug 3 '14 at 21:28
• Actually, I need also the third derivative. Now I try to follow the same argument. – Ella Smith Aug 3 '14 at 21:30

This is basically the same calculation as Alitzer gives, but more readily generalized. The Leibniz rule (generalized to multiple derivatives & factors [1]) states that

$$\bigg(\prod_{j=1}^k f_j\bigg)^{\!(n)}=\sum_{\substack{c_1,\ldots,c_k\ge 0\\ c_1+\cdots+c_m=n}}\binom{n}{c_1,\cdots, c_k}f_1^{(c_1)}\cdots f_k^{(c_k)}$$ where $\binom{n}{c_1,\cdots, c_k}=n!/(c_1!\cdots c_k!)$ is a multinomial coefficient.

For the case of $n=2$ and $f_j=\sum_{k=0}^{d_j-1}t^k$ as above, this gives

\begin{align} \frac{\partial^2}{\partial t^2} \left[ \prod_{j=1}^k (1+t+\dots+t^{d_j -1}) \right] &=\sum_{c_1+\cdots +c_m=2}\binom{2}{c_1,\cdots,c_m}f_1^{(c_1)}\cdots f_k^{(c_k)} \end{align}

Note that there are only two kinds of terms that show up in this sum: either exactly one of the $c's$ is 2, or some pair of them is 1 (with all others zero). So this simplifies to $$\sum_{i=1}^k\left( f_1\cdots f_i^{(2)}\cdots f_k\right)+\sum_{i<j}^k\left( f_1\cdots f_i^{(1)}\cdots f_j^{(1)}\cdots f_k\right)$$ which we now need to evaluate at $t=1$. Then

$$f_j|_{t=1}=d_j, \hspace{.5cm} f^{(1)}_j|_{t=1}=\sum_{k=0}^{d_j-1} k = \frac{d_j(d_j-1)}{2},\\ \hspace{.5cm} f^{(2)}_j|_{t=1}=\sum_{k=0}^{d_j-1} k(k-1) = \frac{d_j(d_j-1)(d_j-2)}{3}.$$ Plugging these in and factoring a bit gives the final result as $$\left(\prod_{j=1}^m d_j\right)\left[\sum_{i=1}^{k}\frac{(d_i-1)(d_i-2)}{3} +\sum_{i<j}\frac{(d_i-1)(d_j-1)}{4}\right]$$

• For comparison with your first answer, note that $\sum_{j=1}^{k}\frac{d_j-1}{2}=\frac{1}{2}\left[\sum_{j=1}^k d_j-k\right]$. (Also, please look for typos. I'm prone to them.) – Semiclassical Aug 3 '14 at 21:10

$$\frac{\partial ^2\left(\prod_j^k \sum _{d=0}^j t^d\right)}{\partial t^2}$$ at $t=1$ seems to equal
$$\frac{1}{144} (k-1) k (k+1) (9 k+22) (k+1)!$$
• What is $n$???? – Ali Caglayan Aug 3 '14 at 20:38
• @Carla Mascia: could you please elaborate what you intend by using the formulation $(1+t+\dots+t^{d_j -1})$ ? Is there a set of exponents d_j such that d_0 =0 and d_1 =1, but the d_i are not necessarily [0,1,..,j] ? – Wouter M. Aug 3 '14 at 21:08
• $d_j$ is some integer. $j$ has nothing to do with the amount of terms – Ali Caglayan Aug 3 '14 at 21:11