Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support derivate like d(f(x))/d(2*x) (Chain Rule) #11573

Closed
latot opened this issue Sep 1, 2016 · 1 comment
Closed

Support derivate like d(f(x))/d(2*x) (Chain Rule) #11573

latot opened this issue Sep 1, 2016 · 1 comment
Labels

Comments

@latot
Copy link
Contributor

latot commented Sep 1, 2016

Hi all, well i think can be good idea implement this, basically is this:

>>> b=sympy.S("x")
>>> b.diff(2*b)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/sympy/core/expr.py", line 2881, in diff
    return Derivative(self, *new_symbols, **assumptions)
  File "/usr/lib64/python2.7/site-packages/sympy/core/function.py", line 1112, in __new__
    Can\'t calculate %s%s derivative wrt %s.''' % (count, ordinal, v)))
ValueError: 
Can't calculate 1st derivative wrt 2*x.

i this case should be:

d(b)/d(2*x)=(d(b)/d(x))/(d(2*x)/d(x))

Thx. Cya.

@smichr
Copy link
Member

smichr commented Aug 19, 2018

The reasons for not supporting differentiation wrt expressions is given in the docstring of Derivative.

@smichr smichr closed this as completed Aug 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants