GithubHelp home page GithubHelp logo

Comments (4)

oscarbenjamin avatar oscarbenjamin commented on July 22, 2024

I would have expected both to be True.

from sympy.

smichr avatar smichr commented on July 22, 2024

While the integration symbol is truly a dummy symbol during definite integration, the symbol of differentiation is not. One must introspect to see if the symbol will survive differentiation. When the function being differentiated does not have the symbol of differentiation, t, the result clearly will be independent of t. That's why it makes sense that there is no t in the free symbols.

But if the function had t in a linear form then perhaps it is debatable whether the t should be reported as a free symbol or not, just like any other object, e.g. y=x**2 +2*x - (x + 1)**2 as written contains x, but after expansion, will not.

So the answer could be True or False for the OP expressions, but they should be consistent, and documentation should be clear for Derivative to indicate when a symbol will be considered free or not.

from sympy.

asmeurer avatar asmeurer commented on July 22, 2024

I don't think free symbols should try to do any sort of mathematical constant detection. It should be a fast structural check only, along the lines of ==. If the symbol appears in an expression in a place where it is free it should be considered a free variable.

Also, consider that if t is not free in expr, then that means that you should be able to replace any free symbol in expr with t and get an equivalent expression. But Derivative(f(x), t).subs(x, t) is not the same thing anymore. So from that point of view, even mathematically constant expressions should not be considered to be free of a given symbol if they still contain it literally somewhere.

from sympy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.