sympy

Provide expert-level assistance for SymPy symbolic mathematics in Python.

19|2|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/tondevrel/scientific-agent-skills --skill sympy-tondevrel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sympy
Source: https://github.com/tondevrel/scientific-agent-skills/tree/main/skills/sympy
Command: npx skills add https://github.com/tondevrel/scientific-agent-skills --skill sympy-tondevrel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance for SymPy, enabling users to perform complex symbolic mathematics, calculus, equation solving, and more, directly within Python.

Core Features & Use Cases

  • Symbolic Computation: Define and manipulate symbolic expressions, variables, and functions.
  • Calculus: Compute derivatives, integrals, limits, and series expansions.
  • Equation Solving: Solve algebraic, differential, and systems of equations.
  • Linear Algebra: Perform symbolic matrix operations, decompositions, and solve linear systems.
  • Use Case: Solve a system of symbolic differential equations that describe a physical system, then generate C code for efficient numerical evaluation.

Quick Start

Use SymPy to define symbols x and y, create the expression (x+y)**2, expand it, and then substitute x=2, y=3.

Frequently Asked Questions about sympy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute symbolic derivatives and integrals in Python?

Symbolic derivatives and integrals are computed by defining symbolic variables and expressions, then applying calculus functions to return exact analytical results. This approach handles complex mathematical manipulation directly within Python.

Can I solve systems of differential equations symbolically?

Yes, systems of differential equations can be solved symbolically. The process involves defining the equations and using specialized solvers to return exact analytical solutions for algebraic, differential, and systems of equations.

What is the best way to perform symbolic matrix operations and linear algebra?

Symbolic matrix operations and linear algebra are best performed by constructing matrices with symbolic entries. This enables symbolic decompositions, manipulations, and solving linear systems to yield exact analytical mathematical results.

Does SymPy support generating C code from symbolic mathematical expressions?

Yes, SymPy supports code generation from symbolic mathematical expressions. You can derive analytical mathematical formulas and then automatically generate C code for efficient numerical evaluation in downstream applications.

How do I expand and substitute values in a symbolic math expression?

To expand and substitute values in a symbolic math expression, first define the symbolic variables, construct the expression, apply the expansion function, and then use substitution methods to evaluate it at specific numerical values.

When should I use symbolic math over numerical computation for equation solving?

Symbolic math should be used over numerical computation when you need exact analytical solutions, mathematical proofs, or symbolic manipulation tasks rather than approximate floating-point numerical results for your equation solving.