5
$\begingroup$

All of the following three lines should produce the same output, but the third variant produces an error on output.

{Derivative[{1, 0}][f][x], Derivative[{0, 1}][f][x]}
(Derivative[#][f][x] &) /@ {{1, 0}, {0, 1}}
(Derivative[#][f][x] &) /@ (IdentityMatrix@2)

third line produces error

The tooltip for the resulting red boxes says

"An unknown box name {BoxForm`MakeDerivativeBoxes} was sent as the BoxForm for the expression. Check the format rules for the expression."

I don't understand why the third variant should not work or what that error indicates.

Maybe the following helps in diagnosing the problem: Copy-pasting that last line as Plain Text gives

{BoxForm`MakeDerivativeBoxes[
  Derivative[{1, 0}][$CellContext`f][$CellContext`x], StandardForm], 
 BoxForm`MakeDerivativeBoxes[
  Derivative[{0, 1}][$CellContext`f][$CellContext`x], StandardForm]}

and BoxForm`MakeDerivativeBoxes is rendered in blue, indicating that it is undefined.

This is Mathematica 10.2 on Windows 8.1 x64.

$\endgroup$
  • 1
    $\begingroup$ Same on 10.0.2, win 10, 64 bit, and DiagonalMatrix[{1, 1}] exhibits the buggy behaviour too $\endgroup$ – Coolwater Jun 22 '16 at 14:25
  • 1
    $\begingroup$ Almost certainly a bug. If you Trace the last two expressions, it's basically doing identical things, but in the last case, it outputs the red boxes. This workaround works: (Derivative[## ][f][x] &) @@@ IdentityMatrix[2]. $\endgroup$ – march Jun 22 '16 at 15:59
  • $\begingroup$ I had no problem executing this in Mathematica 9, but I have the same problem in 10.4. $\endgroup$ – mikado Jun 22 '16 at 19:44
  • 1
    $\begingroup$ The error even happens with this simple case: Derivative/@(IdentityMatrix@1). It also happens for (Inactive[Derivative[#]]&)/@(IdentityMatrix@1) but not for Inactive[Derivative]/@(IdentityMatrix@1)... $\endgroup$ – Jens Jun 22 '16 at 20:20
1
$\begingroup$

This has been filed and officially accepted as an issue:

Thank you for contacting Wolfram Technical Support. I was able to reproduce the issue, and consequently, I filed a report with our development team raising the issues and also shared your contact information with them so you can be notified once the issue is resolved. Thank you again for taking the time and bringing this issue to our attention and helping us improve Mathematica.

| improve this answer | |
$\endgroup$

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.