I am new to Mathematica. I would like to calculate the partial derivative of the product, $\frac{\partial}{\partial x_{j}} y \prod _{i=1}^{n}x_{i}^3=\frac{3}{x_j} y \prod_{i=1}^nx_i^3$, where $1 < j < n$, and $\frac{\partial}{\partial y} y \prod _{i=1}^{n}x_{i}^3= \prod_{i=1}^nx_i^3$ .
I have try the code D[Product[y*Subscript[x, i]^3, {i, 1, n}],Subscript[x,j]] and Carl Woll's solution, but get 0. And the halirutan's method works but not neat one with piecewise production.
How to use Mathematica 12.0 to calculate derivatives and get a nice and exact result?
Product[y*Subscript[x, i]^3, {i, 1, n}]*Sum[(3*KroneckerDelta[i, j])/Subscript[x, i], {i, 1, n}]in M12.0.1 using my answer. Have you tried from a fresh kernel? Also, it might work better if you usex[i]instead ofSubscript[x, i]. – Carl Woll Sep 22 '21 at 16:26