Pull Request #460 introduced support for a handy abuse of notation, however it disregarded the convention for constructing `Subs(Derivative(...))` objects causing serious inconsistencies:
- this does not work anymore: ``` In [1]: f(g(x)).diff(x).subs(g, Lambda(x, 2*x)) Error ``` - these results are inconsistent: ``` In [6]: Derivative(f(x), x).subs(x, 2*x) Out[6]: Subs(Derivative(f(_x), _x), (_x,), (2*x,)) In [7]: Derivative(f(x), x).subs(x, sin(x)) Out[7]: Derivative(f(sin(x)), sin(x)) ``` These are fixed in the present commit. There was also a conflicting definition of "derivation wrt function" in the docstring that was partially removed. The main source of the inconsistency was the confusion in calling `f(x)` a function when only `f` is a function. This does not permit a real distinction between `f(x)` and `2*x` which was claimed in the docstring. You can merge this Pull Request by running: git pull https://github.com/Krastanov/sympy headache Or you can view, comment on it, or merge it online at: https://github.com/sympy/sympy/pull/1383 -- Commit Summary -- * Fix the way that Derivatives are produced when using abuse of notation. -- File Changes -- M sympy/core/function.py (20) M sympy/core/tests/test_functions.py (15) -- Patch Links -- https://github.com/sympy/sympy/pull/1383.patch https://github.com/sympy/sympy/pull/1383.diff --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1383 -- You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to sympy-patches@googlegroups.com. To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en.