# how can I get the right derivatives in this Sum?

I want to get the derivatives of $q_i$ of the following function Q in Mathematica: $$Q=\sum _{i=1}^N q_i$$, Using the command of $$\frac{\partial Q}{\partial q_i}$$, the software give me an answer of $$N$$, but what I really want is $$1$$, can any genius help me with it? I am working on my diploma articles, thx a lot.

The Mathematica screen is this: • To help you, we need to see the actual code that you are entering into Mathematica, not typeset mathematics. Please edit your post by clicking the grey edit button below your post, and add this extra information, properly formatted in code blocks with correct Mathematica syntax. For formatting help, click the grey question mark on the right side of the editing toolbar. Jul 20, 2016 at 15:33
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Jul 20, 2016 at 16:23
• Do not use N as variable in Mathematica, it is special symbol. Jul 21, 2016 at 6:54

When you sum it over there is no free variable. If you use the same index, Mathematica is converting the derivative of a sum to a sum of derivatives which give you n. Choose a number j such that 1<j<n and you will see your answer. For example
D[Sum[q[i], {i, 10}], q]