Question: Problematic differentiation of a sum

Suppose a sum of sines, each depending on a distinct variable x[i]:

>  S := sum(sin(x[i]),i=1..N);

Differentiating wrt to x[i]

> diff(S,x[i]);

should yield cos([x[i]) if i belongs to the interval 1..N, and zero otherwise, but Maple gives

> diff(S,x[i]);
                          N            
                        -----          
                         \             
                          )            
                         /    cos(x[i])
                        -----          
                        i = 1          

which is wrong of course.
 

 

Please Wait...