17
$\begingroup$

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
$\endgroup$
9
  • 3
    $\begingroup$ 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. $\endgroup$
    – bill s
    Mar 9, 2017 at 18:37
  • $\begingroup$ Almost certainly a bug. $\endgroup$
    – march
    Mar 9, 2017 at 18:40
  • 3
    $\begingroup$ This is a bug that will be fixed in the upcoming 11.1 release. $\endgroup$
    – ilian
    Mar 9, 2017 at 19:26
  • $\begingroup$ Which versions are affected? Mathematica 7.0.1 gives the correct result. $\endgroup$
    – innaiz
    Mar 9, 2017 at 19:31
  • 3
    $\begingroup$ @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. $\endgroup$
    – ilian
    Mar 13, 2017 at 15:54

1 Answer 1

8
$\begingroup$

According to ilian in a comment to the OP:

This is a bug that will be fixed in the upcoming 11.1 release.

  • Versions where the bug is present: 9.0.1, 10.0.1, v11.0.1

  • Versions where the bug is not present: 7.0.1, 8.0.4

$\endgroup$
1
  • $\begingroup$ Has been fixed in 11.1 as released. $\endgroup$
    – murray
    Mar 17, 2017 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.