4

I'm trying to formally differentiate an expression. (I am aware of how to differentiate formally?, but am unable to generalize the idea)

For example:

tmp1 = Sum[Product[MyVal[i, j]^(1/n), {j, 1, n}], {i, 1, n}]

I would like to take the derivative with respect to some i in 1...n and j in 1...n . I thought I could specify something like

MyVal /: D[MyVal[i_, j_], MyVal[k_, l_], NonConstants -> {MyVal}] :=
     KroneckerDelta[i, k]*KroneckerDelta[j, l]

Then take the derivative

D[tmp1, MyVal[i, j]]

But this turns out not to work as expected. Any help in the right direction is appreciated. Thanks.

Rob Richmond
  • 143
  • 3

1 Answers1

1

Unfortunately, I think formal differentiation of Product only works if you specify a numerical value for the limit n:

For example,

tmp = With[{n = 3},
   Sum[Product[MyVal[i, j]^(1/n), {j, 1, n}], {i, 1, n}]];

FullSimplify[D[tmp, MyVal[i1, j1], NonConstants -> {MyVal}]]

output

Jens
  • 97,245
  • 7
  • 213
  • 499