0
$\begingroup$

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:

The Mathematica screen is this:

$\endgroup$
3
  • 3
    $\begingroup$ 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. $\endgroup$ – march Jul 20 '16 at 15:33
  • $\begingroup$ 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! $\endgroup$ – Michael E2 Jul 20 '16 at 16:23
  • 1
    $\begingroup$ Do not use N as variable in Mathematica, it is special symbol. $\endgroup$ – Nasser Jul 21 '16 at 6:54
1
$\begingroup$

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[3]]

1

I am not sure if there is a straightforward way to do it symbolically,

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.