D[x1Com,x[1,i]]
will give zero, since there is no x[1,i]
any more in x1Com
. There is only x[1,1]
and x[1,2]
and so on.
One way could be
ClearAll[x1Com, x, m];
x1Com = HoldForm@Sum[HoldForm@(Sum[(m[1, i]*x[1, i]), {i, 1, 6}]/HoldForm@Sum[m[1Sum[m[1, i], {i, 1, 6}])
Now make a function to differentiate w.r.t. to specific x[1,i]
diff[x1Com_, x_] := D[ReleaseHold@x1Com, x];
Now use it
diff[x1Com, x[1, 1]]
diff[x1Com, x[1, 2]]
And so on.