-
Notifications
You must be signed in to change notification settings - Fork 15
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
Incorrect derivatives when one of the variables is a function of the differential variable #156
Labels
bug
Something isn't working
Comments
Reopening as unresolved, seems to only happen if the differential variable is combined with another parameter. Works fine for d/dx(y)=20 |
Seems to be a side effect of Sympy's sub behavior with derivatives: In [1]: import sympy as sp
In [2]: sp.__version__
Out[2]: '1.11.1'
In [3]: x,y,z = sp.symbols('x,y,z')
In [4]: sp.Derivative(x*y, x)
Out[4]: Derivative(x*y, x)
In [5]: test = sp.Derivative(x*y, x)
In [6]: test.subs(y, 20*x)
Out[6]: Subs(Derivative(x*y, x), y, 20*x)
In [7]: test2 = sp.Derivative(y, x)
In [8]: test2.subs(y, 20*x)
Out[8]: Derivative(20*x, x) |
Closed
mgreminger
added a commit
that referenced
this issue
Mar 4, 2024
mgreminger
added a commit
that referenced
this issue
Mar 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See this example sheet that reproduces the issue.
The text was updated successfully, but these errors were encountered: