1 | initial version |
I may not understand your question. As long as you declare the variable whith respect to which you differentiate, there should not be any problem, for example:
sage: f(x,y) = x*y
sage: f
(x, y) |--> x*y
sage: f.differentiate(x)
(x, y) |--> y
Here, you differentiate whith respect to x
, so y
is considered as a constant. Also:
sage: f(x) = pi*x
sage: f
x |--> pi*x
sage: f.differentiate(x)
x |--> pi
But Sage also protect you from differentiating whith respect to a constant:
sage: f.differentiate(pi)
TypeError: argument symb must be a symbol