It may be the order of evaluation:
coor = {x, y, z};
list = {#1, #2, #3};
e[i_, j_] :> ((D[Evaluate[u[i] @@ list], coor[[j]]] +
D[Evaluate[u[j] @@ list], coor[[i]]])/2 &)
you can see that coor
and list
are not inserted into the rule. If you use With
the values will be injected:
With[{coor = {x, y, z},
list = {#1, #2, #3}},
e[i_, j_] :> ((D[Evaluate[u[i] @@ list], coor[[j]]] +
D[Evaluate[u[j] @@ list], coor[[i]]])/2 &)]
Another approach:
sost[n_Integer] :=
e[i_, j_] :>
Function[
Evaluate[((Derivative @@ UnitVector[n, j])[u[i]] @@
Array[Slot, n] + (Derivative @@ UnitVector[n, i])[u[j]] @@
Array[Slot, n])/2]];
e[1, 2][x, y, z] /. sost[3]
D[e[1, 2][x, y, z], y] /. sost[3]