# Mathematica incorrectly giving zero for partial derivative

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

• Even stranger: D[SymmetricPolynomial[3, {x1, y, x2, z}], x1] but D[SymmetricPolynomial[3, {x1, x2, y, z}], x1] does not, even though FullForm[SymmetricPolynomial[3, {x1, x2, y, z}]] and FullForm[SymmetricPolynomial[3, {x1, y, x2, z}]] look the same. Mar 9 '17 at 18:37
• Mar 9 '17 at 18:40
• This is a bug that will be fixed in the upcoming 11.1 release. Mar 9 '17 at 19:26
• Which versions are affected? Mathematica 7.0.1 gives the correct result. Mar 9 '17 at 19:31
• @QuantumDot SymmetricPolynomial 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 give True. Mar 13 '17 at 15:54