GithubHelp home page GithubHelp logo

Comments (3)

jverzani avatar jverzani commented on May 27, 2024 1
  • I think you would need to define your own equation type within Julia for this. There would be no hope of using = to define an equation, but you could use some Unicode operation if you wanted. As far as I know, SymEngine doesn't have facilities for solving equations at this point.

  • as for symbolic derivatives, you have SymFunction objects, so maybe you are looking for something like:

@vars x
F = SymFunction("F")
diff(F(x), x)

from symengine.jl.

mforets avatar mforets commented on May 27, 2024

Thank you. Yes, SymFunction and the Derivative(F(x), x) is what i was looking for 😄

For ODEs and assignments i don't really need SymEngine to solve them, just to represent them and maybe ask for values of some coefficients, to take derivatives, etc. But as you suggest, a custom type may do the trick.

from symengine.jl.

mforets avatar mforets commented on May 27, 2024

Closing as the issue was answered by @jverzani's comment. Moreover, with the current version one gets an error message instead of a segfault (which is way better):

julia> convert(Basic, :(y = x+1)) # error
ERROR: Base.Meta.ParseError("y = x + 1")
Stacktrace:
 [1] throw_if_error at /Users/mforets/.julia/packages/SymEngine/zSUGO/src/exceptions.jl:5 [inlined]
 [2] convert(::Type{Basic}, ::String) at /Users/mforets/.julia/packages/SymEngine/zSUGO/src/types.jl:51
 [3] Type at /Users/mforets/.julia/packages/SymEngine/zSUGO/src/types.jl:93 [inlined]
 [4] convert(::Type{Basic}, ::Expr) at /Users/mforets/.julia/packages/SymEngine/zSUGO/src/types.jl:57
 [5] top-level scope at REPL[11]:1

from symengine.jl.

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.