SymPy (original) (raw)
This wiki is in the process of being archived due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies. Edits are discouraged.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.
SymPy is a symbolic manipulation package, written in pure Python. Its aim is to become a full featured CAS in Python, while keeping the code as simple as possible in order to be comprehensible and easily extensible.
Homepage: http://sympy.org/
Source Code: http://github.com/sympy/sympy
Mailing list: https://groups.google.com/forum/?fromgroups#!forum/sympy
Examples
from sympy import * x, y, z, t = symbols('x y z t') k, m, n = symbols('k m n', integer=True)
integrate(exp(x)*x**2, x) ⎛ 2 ⎞ x ⎝x - 2⋅x + 2⎠⋅ℯ
expand((x + y)**3) 3 2 2 3 x + 3⋅x ⋅y + 3⋅x⋅y + y factor(_) 3 (x + y)
Sum((-1)n*xn/factorial(n), (n, 0, oo)) ∞
╲ ╲ n n ╲ (-1) ⋅x ╱ ──────── ╱ n! ╱ ‾‾‾‾ n = 0
_.doit() -x ℯ