1

When I write the expression for the partial derivative of a function, diff(f(x_1,x_2),x_1,1), for a function f created with funmake(f,[x_1,x_2]), the returned output is

enter image description here

However, when copying and pasting the output of the partial derivative, what I get instead is 'diff(f(x_1,x_2)), which stands for the total derivative of the function f instead of the partial derivative:

enter image description here

Since total and partial derivatives are not the same thing, this is inappropriate. What is the reason for this behavior? How could it be fixed?

User1234321
  • 321
  • 1
  • 10
  • 1
    This is a bug in wxMaxima. My advice is to report it to the wxMaxima issue tracker: https://github.com/wxMaxima-developers/wxmaxima/issues I looked at the wxMaxima code for copying cells but I wasn't able to see what exactly is the problem or how to fix it. – Robert Dodier Jul 08 '21 at 08:11

1 Answers1

1

As Robert Dodier wrote in the comments, this is a bug in wxMaxima. It is caused by the code that handles subscripts. (In your case, _1 and _2). Subscript cells don't implement a function that is supposed to serialize the variable of differentiation.

To work around the issue, you can avoid using subscripts. Changing x_1 and x_2 to x1 and x2 works:

(%i1) diff(f(x1,x2),x1,1);     /* OK */
(%i2) diff(f(x_1,x_2),x_1,1);  /* NOT OK */

output of the code

Cem
  • 1,276
  • 4
  • 17