sympyEasy Examples

Symbolic mathematics: algebra, calculus, equation solving

Getting started with sympy

Installation and basic usage of sympy.

python
from sympy import symbols, solve, diff, integrate, sqrt

x = symbols("x")
expr = x**2 + 2*x - 3
print(f"Expression: {expr}")
print(f"Roots: {solve(expr, x)}")
print(f"Derivative: {diff(expr, x)}")
print(f"Integral: {integrate(expr, x)}")

sympy is a third-party package. Symbolic mathematics: algebra, calculus, equation solving. Install with: pip install sympy

Common sympy operations

Frequently used features of sympy.

python
import sympy
print(f"sympy is ready to use")
print(f"Available: {dir(sympy)[:10]}")

These are the most commonly used features of sympy in everyday development.

Want to try these examples interactively?

Open Easy Playground