
Symbolic Maths in Python (2017) - vyuh
https://alexandrugris.github.io/maths/2017/04/30/symbolic-maths-python.html
======
timkpaine
For those interested, with sympy's lambdify you can do some cool stuff. Here I
create a lazy-evaluated version of pricing a third order greek:
[https://github.com/timkpaine/tributary/blob/master/examples/...](https://github.com/timkpaine/tributary/blob/master/examples/lazy_sympy_blackscholes.ipynb)

------
xvilka
Maxima[1] is also a very cool symbolic math system. They should migrate to
GitHub or GitLab though for a better visibility and lower barrier for external
contributions.

[1] [http://maxima.sourceforge.net/](http://maxima.sourceforge.net/)

~~~
equalunique
When I temporarily gave up trying to apply myself towards my math coursework
during high school, I used Maxima to breeze through an online Algebra 2 class.
Not a great story, but I can attest that it works.

------
ivan_ah
The SymPy online REPL is very good:
[https://live.sympy.org/](https://live.sympy.org/) You can test out commands
w/o installing. It also has a very useful feature to turn a session into a
URL:
[https://live.sympy.org/?evaluate=factor(x**2%20-%20y**2)%0A%...](https://live.sympy.org/?evaluate=factor\(x**2%20-%20y**2\)%0A%23--%0A)
(e.g to share the solution to a math problem)

For more info on SymPy, check out this short tutorial that I wrote:
[https://minireference.com/static/tutorials/sympy_tutorial.pd...](https://minireference.com/static/tutorials/sympy_tutorial.pdf)

And for even more details, the official tutorial docs are here:
[https://docs.sympy.org/latest/tutorial/index.html](https://docs.sympy.org/latest/tutorial/index.html)

------
boofgod
just use sagemath

~~~
b0rsuk
What are sagemath's advantages over sympy? What are sympy's?

~~~
knappa
Sagemath includes a lot more math, esp. number theoretic stuff, and is a quite
large. (~1.6G compressed) Sympy is _much_ smaller and integrates more easily
into python code that isn't solely mathematical.

