On Sep 8, 7:13 am, Golam Mortuza Hossain <gmhoss...@gmail.com> wrote: > However, it is done under an assumption (documented with examples) > that arguments of the function are independent for the purpose of > applying chain rule. > > An example situation where above assumption is violated, is > -------- > sage: f(x,x).diff(x) > -------- Isn't f(x,x) an expression? I would think E.diff(x) would mean "the derivative of x:-> E" with respect to x. If not enough of f is known to further expand it, one should just leave it unevaluated. so indeed, f(g(x),g(x)).diff(x) should not have the chain rule applied (suppose f: (x,y):->x+y or f: (x,y):-> x*y) but f(g(x),y).diff(x) can be expanded further.
The argument that x/x gets simplified to 1, which is valid if x is transcendent (i.e., a variable) but not if x=0 does not apply: in the expression f(x,x), the two parameters are already *known* to be dependent. This would amount to 0/0 simplifying to 1. Of course, if somebody asks for f(x,y).diff(x) and substitutes y=x afterwards, they're on their own. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---