Bug in Sum on symbolic differentiation
- To: mathgroup at smc.vnet.net
- Subject: [mg30702] Bug in Sum on symbolic differentiation
- From: "ChiaMing Yu" <yucalf at yam.com>
- Date: Sat, 8 Sep 2001 02:23:16 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Dear Sir, Excuse me! When I want to differentiate through a Sum, such as (in LaTeX format): d (\Sum^n_{i=1} q_i) / d q_i The answer should be "1", because in the above equation, (d q_i) means differentiate respect to q_1, or q_2, or q_3, ..., etc, one and only one variable of the possible-variable set {q_i | i=1, .., n}. But when I excute following command, Mathematica give me the wrong answer "n", D[ Sum[q[i], {i,1,n}], q[i] ] It may because Mathematica first differentiate the inner expression of Sum[], that is q[i], respect to q[i] and get the result 1, then Mathematica Sum these 1 with n times, that is Sum[1, {i,1,n}], and return the output to be "n". When we assign a specific number to n, for example n=10, the operation will be fine, for example, D[Sum[x[i], {i, 1, 10}], x[5]] But when the variable n is Not assign any number, the situation described previously will appear. This may imply the limitation of Sum[] on symbolic operation, espetially differentiation opration. How can I refine the situation and get my right answer "1" from Mathematica? Thank you for any suggestion! Chia-Ming Yu, September 5, 2001 National Taipei University