I wanted to differentiated u with respect to q(i) with the particular i.
The reason I used q(i) not q[i] is that it is necessary for integration.
And, on the other hand, q(i) becomes variable, for a particular i.
I wanted to differentiate u with that q(i).
Originally, I wanted to calculate this.
which shows an error message.
So, I modified this as
4*(Int(q(i)^2, i = 0 .. M)+q[k]^2)*q[k] (*)
appears. I don't like the expression of (Int(q(i)^2, i = 0 .. M)+q[k]^2) in the (*), and haven't been able to modify this to 4*(Int(q(i)^2, i = 0 .. M). And, with algsubs, q[k] which is in a expression outside of the original expression v, is modified, which is not good for me.
But, I think that my problem might have been settled down owing to you.
Thank you very much.