SymPy vs. SageMath: symbolic computation and automatic differentiation in Python

Automatic differentiation

Symbolic computation

SymPy vs. SageMath

Differences between SymPy and SageMath on sympy’s wiki


Try SymPy in your browser (live shell on every page, wow!).

pip install sympy

See this interesting Jupyter notebook!

SymPy vs. SageMath

SymPy can do better symbolic differentiation than SageMath (ex. derivatives by array). It has symbolic matrices, unlike SageMath. But SageMath has many more libraries, and may be better at factoring expressions, I guess.

The Matrix Cookbook

What none of these libraries cannot do though, is symbolic matrix differentiation. But it is an ongoing issue on their GitHub.

It made me learn the existence of The Matrix Cookbook, which is a great reference!!


Try it on CoCalc (formerly SageMathCloud).

You can download this SageMath worksheet (logreg.sagews) to load it there.

Also: Suffix trees and arrays?!


But unlike Wolfram Alpha, they cannot output a Pikachu curve :/