Symbolic mathematics is severely underexplored in undergraduate studies, and the little exposure I had was generally tied to proprietary software such as Mathematica and MATLAB. I learned to use it as an imperfect extension of pen-and-paper thinking, and source code for more advanced stuff gets shaky the deeper into abstraction one goes. For example, I work in a field of mathematics/engineering that requires heavy us…
For great justice, does anyone know of any applications (other than Maple) that support WYSIWYG typeset input (not output) like Maple does? As far as I know, Wolfram/Mathematica, LaTex, SymPy, Jupyter, Sage etc all rely on typewriter text for composing and inputting math. For this (and only this) reason, Maple is the only application that ever resonated with me, because input may be written in the same form it's writ…
SymPy: Symbolic Mathematics in Python
101–110 of 137 posts
Re: SymPy: Symbolic Mathematics in Python
#102As an aside - I have a bunch of logical expressions and I need to see if they are mutually exclusive. As in, if one is true given some combination of the variables, none of the other expressions must be true for the same combination. For example Country="US" and Type="Sales" is not exclusive with Type in ("Sales", "Purchase") What would be an approach to solving this?
You might, for example, create a new logical expression for each pair of your original expressions, joining each pair with AND, and then join those AND pairs with OR. Then ask the SMT solver to generate an unsatisfiability proof.
Re: SymPy: Symbolic Mathematics in Python
#103Re: SymPy: Symbolic Mathematics in Python
#104Working in the field of robotics, I often have to write big vectors ( usually computed as the result of 3D transformations ) and then compute their Jacobian ( their derivative with respect to several state-variables ), which quickly becomes very nasty equations. I use sympy to (i) compute these big vectors, expressed in a very declarative way, (ii) compute the jacobian and (iii) export the results in C-code, immediat…
Re: SymPy: Symbolic Mathematics in Python
#105There is a benchmark of Sympy vs Mathematica at https://www.12000.org/my_notes/CAS_integration_tests/reports... The results were Mathematica failed to solve 1,523 problems, Sympy failed to solve 48,529. So it has some catching up to do.
Although super interesting, the website you mention is only about integrals...
Re: SymPy: Symbolic Mathematics in Python
#106Earlier quoted context omitted.
Do you know why there's such a big difference ? For example, is the way sympy does its job fundamentally flawed ?
I mean, literally people with Math PhDs are being paid to work on the product, full-time. And they have a financial incentive to address feedback from customers and try to solve as many problems as possible. By comparison, open source projects are developed by people with a wide range of knowledge level and commitment, and you simply can't expect the quality to be the same. I find that discussions on HN often fail to…
Re: SymPy: Symbolic Mathematics in Python
#107Earlier quoted context omitted.
SymPy is open source, mathematica is not. Additionally, SageMath (which depends on SymPy) is the more comparable product (and is open source).
> SymPy is open source, mathematica is not. Why does that matter?
2) able to be around if a single CEO isn't around (Wolfram)
3) able to continue if the supporting company is not profitable anymore
4) possibility of greater oversight if popularity rises
5) extensible if one puts the effort into it
Re: SymPy: Symbolic Mathematics in Python
#108Working in the field of robotics, I often have to write big vectors ( usually computed as the result of 3D transformations ) and then compute their Jacobian ( their derivative with respect to several state-variables ), which quickly becomes very nasty equations. I use sympy to (i) compute these big vectors, expressed in a very declarative way, (ii) compute the jacobian and (iii) export the results in C-code, immediat…
Problem was that the symbolic results were way too complicated and the simplify function didn't help much. So, I got back to manual differentiation.
Re: SymPy: Symbolic Mathematics in Python
#109SymPy is awesome indeed! I've been using it as a teaching tool for many years. IMHO, it's the best option as compared to Mathematica/Maple/etc. because the API functions match exactly the verbs students use when learning math (solve, expand, factor, etc.). Here is a little tutorial for anyone looking to get started: https://minireference.com/static/tutorials/sympy_tutorial.pd... Also available in runnable notebook fo…
Re: SymPy: Symbolic Mathematics in Python
#110Earlier quoted context omitted.
> SymPy is open source, mathematica is not. Why does that matter?
1) free 2) able to be around if a single CEO isn't around (Wolfram) 3) able to continue if the supporting company is not profitable anymore 4) possibility of greater oversight if popularity rises 5) extensible if one puts the effort into it
This is like opining that the best "car" out there is a gokart you can get complete schematics on, for all of these reasons. I think most of us would accept the argument that the better cars are the ones that pass metrics aimed at cars. In this analogy, the better algebra system is the one that does the most algebra.