Differentiating sums
- To: mathgroup at smc.vnet.net
- Subject: [mg63770] Differentiating sums
- From: "Zvi Tarem" <zvi.tarem at cern.ch>
- Date: Sat, 14 Jan 2006 02:32:11 -0500 (EST)
- Organization: CERN - European Laboratory for Particle Physics
- Sender: owner-wri-mathgroup at wolfram.com
How can I use Mathematica to represent sums in a way that can be differentiated correctly? Here is a trivial example: If x and y are both vectors of length N then the derivative of the product of the vectors with respect to any element x[i] is simply y[i]. I cannot make Mathematica 'understand' the concept of indexing. Here is what I tried: prod = Sum[x[i] y[i], {i, N}] D[prod, x[j]] I get 0 D[prod, x[i]] I get Sum[y[i],{i,N}] which is wrong. The same for subscript notation. Then I tried Array[] and Part[], but they require constants as the limit and selectors. Can anyone help?
- Follow-Ups:
- Re: Differentiating sums
- From: Pratik Desai <pdesai1@umbc.edu>
- Re: Differentiating sums