MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

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? 



  • Prev by Date: Re: How to create {{x1,y1}, ..., {xn,yn}} data from{x1,...,xn} and {y1, ..., yn}
  • Next by Date: Re: Plot PDF of a Discrete Random Variable
  • Previous by thread: Re: How to create {{x1,y1}, ..., {xn,yn}} data from{x1,...,xn} and {y1, ..., yn}
  • Next by thread: Re: Differentiating sums