I've solved some Math assignments using SymPy on my sophomore year in uni. One time instead of writing them down to paper (the assignment was like “you have 24 hours to take these 20 integrals”), I've just shown the script I coded to my teacher and got an A. (And I have dropped out the very same year then :-)
You got an A for translating the problems into computer form? I'm glad you dropped out of that useless program.
SymPy makes math fun again
41–50 of 96 posts
Re: SymPy makes math fun again
#42I like sagemath. They have integration with sympy, and they also have many features making python simpler when you want to do mathematical things. There's latex display feature when in notebook. It looks good, can even have symbolical matrices and display them as you would've expected. It's on par with Wolfram notebook, but you get to program in python instead of some propietary language. If you got some really long…
As someone who does research with computer algebra systems (mainly Wolfram Mathematica) many hours a day, I think that SymPy is still far behind Mathematica. The fundamental design of Mathematica based on replacement rules and a style of functional programming is quite difficult to beat in terms of ease of use. A few weeks ago I gave SymPy another try, and tried to implement a nested sum of the type 1 <= a_1 < ... <…
Re: SymPy makes math fun again
#43Re: SymPy makes math fun again
#44Earlier quoted context omitted.
Just write: a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z = var('a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z') At the top of your Jupyter notebook, right after your import lines, and copy and paste it everywhere else. It's really not a big deal! You can always redefine these variables to other things later, if you need to. Mathematica costs $387 for the "home deskto…
Variable names are not arbitrary. They have meaning. Single-letter lower-case variables hardly cover all possible names. Mathematica, just like, real mathematics, allows you to have variable names with subscripts/superscripts/greek-letters etc. E.g. a_g is distinct from a_f (which are both rendered in rich text) My recommendation is not that everyone buy Mathematica, but that sympy figures out a way to allow every se…
Re: SymPy makes math fun again
#45Re: SymPy makes math fun again
#46Fun, free and full. No need to fork hundreds of dollars for a Mathematica license.
Re: SymPy makes math fun again
#47The fact that you have to declare every single variable makes it a non-starter for me. In Mathematica, I have written calculations that involve dozens of variables. In sympy that will be very annoying.
Just write: a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z = var('a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z') At the top of your Jupyter notebook, right after your import lines, and copy and paste it everywhere else. It's really not a big deal! You can always redefine these variables to other things later, if you need to. Mathematica costs $387 for the "home deskto…
Re: SymPy makes math fun again
#48The fact that you have to declare every single variable makes it a non-starter for me. In Mathematica, I have written calculations that involve dozens of variables. In sympy that will be very annoying.
You can start a REPL with `isympy -I`, which is an IPython REPL but with some preprocessing magic that wraps any unknown variable into a sympy symbol and any integer into a sympy integer, which makes it closer to Mathematica: In [1]: 22/7*foobar Out[1]: 22⋅fo̅o ────── 7
Re: SymPy makes math fun again
#49Earlier quoted context omitted.
Just write: a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z = var('a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z') At the top of your Jupyter notebook, right after your import lines, and copy and paste it everywhere else. It's really not a big deal! You can always redefine these variables to other things later, if you need to. Mathematica costs $387 for the "home deskto…
Variable names are not arbitrary. They have meaning. Single-letter lower-case variables hardly cover all possible names. Mathematica, just like, real mathematics, allows you to have variable names with subscripts/superscripts/greek-letters etc. E.g. a_g is distinct from a_f (which are both rendered in rich text) My recommendation is not that everyone buy Mathematica, but that sympy figures out a way to allow every se…
In your formulas you can have Greek letters in sympy. But you'll have to give the symbols valid python names.
Re: SymPy makes math fun again
#50Nice article. I totally agree about SymPy making math fun. I used Mathematica a lot in college, but stopped once it wasn’t free to me anymore. Here’s a blog post I made recently showing some fun SymPy calculations. https://www.swied.com/posts/make-a-ringtone-sound/make-a-rin...