I type the following command line
Table[D[#1,varx[[i]]] &,{i,3}]
where varx
is a vector of dummy variables
varx = {x1, x2, x3}
According to this link NonCommutativeMultiply, I want to obtain a vector like this
$\left\{\frac{\partial }{\partial \text{x1}},\frac{\partial}{\partial \text{x2}},\frac{\partial}{\partial \text{x3}}\right\}$
But I got this
It seems like the index i
in the command Table
does not work. I don't know why this happens. I try not to use the placeholder '#1' like this
Table[D[2 x1^2 + 4 x2^3 + x3^4, varb[[i]]], {i, n}]
And this works all fine
{4 x1, 12 x2^2, 4 x3^3}
If I want to keep the placeholder, what should I do?