Bug introduced in 9.0 and fixed in 11.1
Mathematica is incorrectly reporting that the partial derivative of a certain expression is zero.
I try to compute the following:
D[SymmetricPolynomial[3, {x1, x2, x3, x4}], x1]
and I get 0
. However, if I first calculate
SymmetricPolynomial[3, {x1, x2, x3, x4}]
= x1 x2 x3 + x1 x2 x4 + x1 x3 x4 + x2 x3 x4
and then
D[x1 x2 x3 + x1 x2 x4 + x1 x3 x4 + x2 x3 x4, x1]
I get the correct answer of
x2 x3 + x2 x4 + x3 x4
Any idea what is going on? Even weirder, if I use different variable names, I get the correct answer by calculating in the first way:
D[SymmetricPolynomial[3, {x, y, z, w}], x]
= w y + w z + y z
D[SymmetricPolynomial[3, {x1, y, x2, z}], x1]
butD[SymmetricPolynomial[3, {x1, x2, y, z}], x1]
does not, even thoughFullForm[SymmetricPolynomial[3, {x1, x2, y, z}]]
andFullForm[SymmetricPolynomial[3, {x1, y, x2, z}]]
look the same. $\endgroup$ – bill s Mar 9 '17 at 18:37SymmetricPolynomial
was not constructing the result expression correctly, so it would falsely appear to not contain any of the variables, e.g.FreeQ[SymmetricPolynomial[3, {x1, x2, x3, x4}], x1]
would giveTrue
. $\endgroup$ – ilian Mar 13 '17 at 15:54