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

Passing function to derivative results in zero #1085

Open
kapple19 opened this issue Mar 7, 2024 · 1 comment
Open

Passing function to derivative results in zero #1085

kapple19 opened this issue Mar 7, 2024 · 1 comment

Comments

@kapple19
Copy link

kapple19 commented Mar 7, 2024

Not sure if this is a bug, but I think this should either throw an error or be fixed.

Setup:

using Symbolics: derivative
f(x) = x^2
@variables x

and then

derivative(f, x)

gives 0,

derivative(f(x), x)

gives Num(2x).

The former should error or be fixed, right?

@ChrisRackauckas
Copy link
Member

Yes, we should make it error on non-Num or BasicSymbolic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants