Question: How to Partial Derivatives of Functions / Variables with Subscripts and Summations?

Can anyone tell me how i can compute the correct partial derivatis of this function? I need to compute the partial derivative with respect to Pj,k but since I am summing over 'j', it does not compute the chain rule properly. 

v:=(alpha,DiE,P,beta)->alpha[i, k]*(DiE[k]/P[i, k])^(-beta[i, k])/(sum(alpha[j, k]*(DiE[k]/P[j, k])^(-beta[j, k]), j = 1 .. 3))

Even if i define v as a variable instead of a function as follows:

v:=(-(sum(alpha[j, k]*(DiE[k]/P[j, k])^beta[j, k]/beta[j, k], j)))^(-1)

it still wont compute the partial derivative of P correctly. 

Even if i use the "unapply" command - it wont work properly. 

I hope someone has an answer to this.

Thanks

Please Wait...