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
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:
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?
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 */