SymPy is an open source Python library for symbolic mathematics.
SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. SymPy is written entirely in Python and does not require any external libraries.
Some examples of usage can be found here.
SymPy
includes features ranging from basic symbolic
arithmetic to calculus, algebra, discrete mathematics, quantum physics. It is capable of formatting the result of the computations as LaTeX code.
Some Core capabilities:
- Basic arithmetic: *, /, +, -, **
- Simplification
- Expansion
- Functions: trigonometric, hyperbolic, exponential, roots, logarithms, absolute value, spherical harmonics, factorials and gamma functions, zeta functions, polynomials, hypergeometric, special functions, ...
- Substitution
- Arbitrary precision integers, rational and floats
- Non-commutative symbols
- Pattern matching
- Polynomials
- Basic arithmetic: division, gcd, ...
- Factorization
- Square-free factorization
- Calculus
- Limits
- Differentiation
- Pretty-printing: ASCII/Unicode pretty-printing, LaTeX
- Code generation: C, Fortran, Python