I need to take the derivative of $\sum_{x=1}^{M}\sum_{a=0}^{J-1}\sum_{t=0}^{\infty}u(c(x,t+a,a),l(x,t+a,a))$ for a generic $c(y,s,b)$, or in other words: $$\frac{\partial}{\partial c(y,s,b)} \sum_{x=1}^{M}\sum_{a=0}^{J-1}\sum_{t=0}^{\infty}u(c(x,t+a,a),l(x,t+a,a)).$$ If $y,s,b\in \mathbb{N}, 1\leq y\leq M,0\leq b\leq J-1,0\leq s$, this should give: $$u^{(1,0)}(c(y,s,b),l(y,s,b)). $$ To compute what I need I define:
W = Sum[u[c[x, t + a, a], l[x, t + a, a]], {x, 1, M}, {t, 0,
Infinity}, {a, 0, J - 1}]
and then proceed to compute:
D[W, c[y, s, b]]
With this I get $\sum_{x=1}^{M}\sum_{a=0}^{J-1}\sum_{t=0}^{\infty}\delta_{a,b}\delta_{s,a+t}\delta_{x,y}u^{(1,0)}(c(x,t+a,a),l(x,t+a,a))$ while I would like: $$u^{(1,0)}(c(y,s,b),l(y,s,b)) $$ I tried for example to do something like the following to get rid of the Kronecker deltas but without success:
FullSimplify[D[W, c[y, s, b]], 1 < y < M && y \[Element] Integers && 0 < s && s \[Element] Integers 0 < b < J - 1 && b \[Element] Integers]
But it gave me the same result. In other words I'd like Mathematica to get rid of the Kronecker deltas if I specify for example that y,s,b are integer and within the summation indexes.
D[W, c[y, s, b]]/.{x->y,t+a->s,a->b}
??? $\endgroup$N
for your own definition can get you into trouble, look upN
in the help system to see how MMA uses this. Now back to your actual problem. Can you edit your question? Think you are trying to explain it to someone who doesn't know anything about this or what you are really trying to accomplish? Imagine they will read your description and go off to complete all this correctly on their own without any more direction from you. How can you show them enough that they can do this exactly correctly? $\endgroup$dwc = D[W, c[y, s, b]]
and thenAssuming[{y \[Element] Integers, s \[Element] Integers, b \[Element] Integers}, FullSimplify[dwc]]
This produces additional conditions which are reasonable. If it does answer, I'll post it as an answer. $\endgroup$