Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Calculus with formal functions: substitution?

If I enter

var('f,x,y')
y = function('y',x)
f = function('f',x,y)

then

f.diff(x)

returns

D[1](f)(x, y(x))*D[0](y)(x) + D[0](f)(x, y(x))

In order to perform more computations later on, I want to rewrite this, using substitutions, so it looks something like

Fy*yx + Fx

But I've got no idea how to do this. In Maxima I'd just use 'diff(f,x) as the expression to substitute for, but even trying to use dummy_diff doesn't seem to work:

from sage.calculus.calculus import dummy_diff
dummy_diff(f,x)

produces the same result as f.diff(x) above.

Does anybody know how I can use substitutions to express the results of a formal differentiation with other symbols?