How can I compute the following derivative,
$$ \frac{\partial}{\partial \lambda_j} \prod_{i=1}^k (1+\lambda_i)e^{\lambda_i} \quad \text{for }\; 1\le j \le k $$
for some positive integer $k$ which is not known? Note that it is simple to compute the derivative by hand, but I just wonder how such equations can be input in Mathematica.
Edit:
After halirutan's answer, I decided to update the question. What I understand from his answer is that: there is no simple straight forward way to express such an example. Now, my question is that: is it possible to add some rewriting rules to Mathematica's built-in D and Simplify functions such that, running
Assuming[1<=j<=k&&j\[Element]Integers,
Simplify[D[Product[(1 + l[i]) Exp[l[i]], {i, k}], l[j]]]
]
Returns the desired output:
$$ \frac{2+\lambda_i}{1+\lambda_i}\prod_{i=1}^k (1+\lambda_i)e^{\lambda_i} $$
Sum[l[i], {i, k}]wrt somel[j]. To solve this you need to imagine the sum expanded and then you see that it's always 1. The step of imagination does not work in Mma because it needs to consider all possible cases. – halirutan Oct 11 '12 at 23:57Simplifydoes notHoldthe expression to simplify. This means, your expressionD[Product[(1 + l[i]) Exp[l[i]], {i, k}], l[j]]is first evaluated to 0 beforeSimplifycan do anything. – halirutan Oct 13 '12 at 02:13