Take differentiation within summation?



Dear all,

I have a question about taking differentiation within a summation
expression. I defined the objective function as a summation of periodic
functions and tried to take the differentiation of the objective
function with respect to a variable in a specific period, 
c[t].

objf: sum (A^t*(log(c[t])+B*log(1-n[t])), t, 0, inf);
diff(objf, c[t]);


It didn't take differentiation. I don't know why is this happening. Can
I take differentiation within summation at all? Thanks for your help.


Jinhu Li