What problem does it solve?
Enable exact symbolic reasoning and manipulation of mathematical expressions so users obtain analytic results, proofs, and reproducible code instead of floating-point approximations or ad hoc numerical workarounds.
Core Features & Use Cases
- Symbolic algebra & simplification: create symbols, expand, factor, collect, and simplify complex expressions with assumptions.
- Calculus & series: compute derivatives, integrals, limits, and series expansions symbolically and evaluate to arbitrary precision when needed.
- Equation solving: solve algebraic systems, nonlinear systems, and differential equations with exact representations and verification patterns.
- Matrices & linear algebra: build symbolic matrices, compute determinants, eigenvalues, diagonalization, and solve linear systems.
- Physics, geometry, and number theory: apply mechanics, vector analysis, quantum operators, geometry constructions, prime factorization, modular arithmetic, and Diophantine solving.
- Code generation & output: convert symbolic expressions to NumPy functions, C/Fortran code, LaTeX, MathML, and optimized routines using lambdify, codegen, autowrap, and ufuncify.
- Use Case Example: derive a symbolic integral, simplify the result under assumptions, produce LaTeX for publication, and generate a fast NumPy function to evaluate the result numerically.
Quick Start
Use the sympy skill to symbolically solve an equation, simplify the result with appropriate assumptions, and return both an exact analytic derivation and an optional runnable NumPy function.