1
$\begingroup$

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.

$\endgroup$
5
  • $\begingroup$ D[W, c[y, s, b]]/.{x->y,t+a->s,a->b} ??? $\endgroup$
    – Bill
    Commented Jun 7 at 16:32
  • $\begingroup$ No, this does not work. It gives $$ \sum_{y=1}^{N}\sum_{b=0}^{J-1}\sum_{t=0}^{\infty}u^{(1,0)}(c(y,s,b),l(y,s,b)) $$. I guess it's because x, a, and t in my expression are just indexes. $\endgroup$
    – Marco
    Commented Jun 7 at 20:07
  • $\begingroup$ Using N for your own definition can get you into trouble, look up N 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$
    – Bill
    Commented Jun 7 at 20:59
  • $\begingroup$ Is it clearer now? $\endgroup$
    – Marco
    Commented Jun 7 at 21:26
  • $\begingroup$ Does this answer your question: dwc = D[W, c[y, s, b]] and then Assuming[{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$ Commented Jun 8 at 11:56

1 Answer 1

0
$\begingroup$
dwc = D[W, c[y, s, b]]


Assuming[
{
y \[Element] Integers,
    s \[Element] Integers,
    b \[Element] Integers
},
     FullSimplify[dwc]
]
$\endgroup$
1
  • 1
    $\begingroup$ Thanks! Indeed it works :) $\endgroup$
    – Marco
    Commented Jun 10 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.