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

Substitution inside derivatives is inconsistent #216

Open
Gyoshi opened this issue Sep 11, 2020 · 0 comments
Open

Substitution inside derivatives is inconsistent #216

Gyoshi opened this issue Sep 11, 2020 · 0 comments

Comments

@Gyoshi
Copy link

Gyoshi commented Sep 11, 2020

There is an inconsistency when substituting things in an expression where they are being differentiated:

@vars x
@funs f, g
gee = diff(f(x), x)
diff(g(x), x)(g(x)=>1) # 0
diff(gee, x)(gee=>1) # f_xx

Here we can imagine that g = f', and so the last two lines should be equivalent. It makes sense that if an expression is constant its derivative becomes 0, so this should be the case also when the expression is itself a derivative. Though multivariate functions does make it a bit more complicated.

Of course, there are similar issues of substituting more complicated expressions such as

(3x + 3f(x))(x+f(x)=>1) # substitution does nothing

And this seems to me quite a bit harder to solve, so perhaps I should just accept that substituting anything more complicated than a single variable or function will not always work.

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

1 participant