Skip to content
Skills Library
Science & research · Analysis

math-computation

/math-computation

Mathematical computation including symbolic math, numerical methods, linear algebra, calculus, differential equations, optimization, and mathematical modeling. Uses Python with SymPy, NumPy, SciPy. Use when user asks to solve equations, compute integrals/derivatives, do matrix operations, solve ODEs/PDEs, optimize functions, or build mathematical models. Triggers on "solve equation", "integral", "derivative", "matrix", "eigenvalue", "differential equation", "optimization", "linear algebra", "symbolic math", "proof".

Repository
scienceclaw ↗
Licence
MIT
Last repository change
07.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 07.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Mathematical computation including symbolic math, numerical methods, linear algebra, calculus, differential equations, optimization, and mathematical modeling. Uses Python with SymPy, NumPy, SciPy. Use when user asks to solve equations, compute integrals/derivatives, do matrix operations, solve ODEs/PDEs, optimize functions, or build mathematical models. Triggers on "solve equation", "integral", "derivative", "matrix", "eigenvalue", "differential equation", "optimization", "linear algebra", "symbolic math", "proof".

Triggers from the description

solve equationintegralderivativematrixeigenvaluedifferential equationoptimizationlinear algebra
Original author description

Mathematical computation including symbolic math, numerical methods, linear algebra, calculus, differential equations, optimization, and mathematical modeling. Uses Python with SymPy, NumPy, SciPy. Use when user asks to solve equations, compute integrals/derivatives, do matrix operations, solve ODEs/PDEs, optimize functions, or build mathematical models. Triggers on "solve equation", "integral", "derivative", "matrix", "eigenvalue", "differential equation", "optimization", "linear algebra", "symbolic math", "proof".

How it works

  1. Symbolic Math (SymPy)
  2. Numerical Methods (SciPy)
  3. Linear Algebra
  4. Mathematical Modeling Workflow
  5. Common Models
  6. Tips
Original SKILL.md headings · 120 lines, 438 words
SKILL.md preview
---
name: math-computation
description: Mathematical computation including symbolic math, numerical methods, linear algebra, calculus, differential equations, optimization, and mathematical modeling. Uses Python with SymPy, NumPy, SciPy. Use when user asks to solve equations, compute integrals/derivatives, do matrix operations, solve ODEs/PDEs, optimize functions, or build mathematical models. Triggers on "solve equation", "integral", "derivative", "matrix", "eigenvalue", "differential equation", "optimization", "linear algebra", "symbolic math", "proof".
---

# Mathematical Computation

Symbolic and numerical mathematics. Venv: `source /Users/zhangmingda/clawd/.venv/bin/activate`

## Symbolic Math (SymPy)

```python
from sympy import *
x, y, z, t = symbols('x y z t')
a, b, c = symbols('a b c', real=True)
n, k = symbols('n k', integer=True, positive=True)

# Solve equations
solve(x**2 - 5*x + 6, x)  # [2, 3]
solve([x + y - 5, x - y - 1], [x, y])  # {x: 3, y: 2}

# Calculus
diff(sin(x)*exp(x), x)           # derivative
integrate(x**2 * exp(-x), (x, 0, oo))  # definite integral
limit(sin(x)/x, x, 0)            # limit
series(exp(x), x, 0, 5)          # Taylor series

# Linear algebra
M = Matrix([[1, 2], [3, 4]])
M.eigenvals()    # eigenvalues
M.eigenvects()   # eigenvectors
M.det()          # determinant
M.inv()          # inverse

# Differential equations
f = Function('f')
dsolve(f(x).diff(x, 2) + f(x), f(x))  # y'' + y = 0

# Simplification
simplify(sin(x)**2 + cos(x)**2)  # 1
trigsimp(expr)
factor(expr)
expand(expr)

# LaTeX output
latex(expr)  # for paper-ready equations
```

## Numerical Methods (SciPy)

```python
from scipy import optimize, integrate, linalg, interpolate
import numpy as np

# Root finding
root = optimize.brentq(lambda x: x**3 - 2*x - 5, 2, 3)

# Optimization
result = optimize.minimize(lambda x: (x[0]-1)**2 + (x[1]-2.5)**2,
                          x0=[0, 0], method='Nelder-Mead')

# Constrained optimization
from scipy.optimize import linprog, minimize
result = minimize(objective, x0, constraints=constraints, bounds=bounds)

# Numerical integration
val, err = integrate.quad(lambda x: np.exp(-x**2), -np.inf, np.inf)  # √π

# ODE solving
from scipy.integrate import solve_ivp
def lorenz(t, state, sigma=10, rho=28, beta=8/3):
    x, y, z = state
    return [sigma*(y-x), x*(rho-z)-y, x*y-beta*z]
sol = solve_ivp(lorenz, [0, 50], [1, 1, 1], dense_output=True, max_step=0.01)

# Interpolation
f_interp = interpolate.interp1d(x_data, y_data, kind='cubic')

# FFT
from scipy.fft import fft, fftfreq
yf = fft(signal)
xf = fftfreq(N, 1/sample_rate)
```

## Linear Algebra

```python
# NumPy
A = np.array([[1, 2], [3, 4]])
np.linalg.eig(A)        # eigendecomposition
np.linalg.svd(A)        # SVD
np.linalg.solve(A, b)   # solve Ax = b
np.linalg.norm(A)       # matrix norm
np.linalg.matrix_rank(A)

# Sparse matrices (SciPy)
from scipy.sparse import csr_matrix, linalg as sparse_linalg
```

## Mathematical Modeling Workflow

1. **Define** the system and variables
2. **Formulate** equations (conservation laws, constitutive relations)
3. **Non-dimensionalize** if appropriate
4. **Solve** analytically (SymPy) or numerically (SciPy)
5. **Validate** against known solutions or data
6. **Sensitivity analysis** on parameters
7. **Visualize** results

## Common Models

- **Population dynamics**: Lotka-Volterra, SIR/SEIR epidemiological
- **Diffusion**: Heat equation, Fick's law
- **Mechanics**: Newton's laws, Lagrangian/Hamiltonian
- **Economics**: Supply-demand, game theory, optimal control
- **Networks**: Graph theory, flow optimization

## Tips
- Use SymPy for exact solutions, SciPy for numerical
- Always verify numerical solutions against analytical when possible
- Check units and dimensional consistency
- Use `latex()` to generate paper-ready equations
- For large systems, consider sparse matrix methods

Versions

The database has no other skills named math-computation.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 98f5b67fda77 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 98sympy-symbolic-math
    Symbolic math in Python: exact algebra, calculus (derivatives, integrals, limits), equation solving, symbolic matrices, ODEs, code gen (lambdify, C/Fortran). Use for exact symbolic results. For numerical use numpy/scipy; for stats use statsmodels.
  • 100sympy-math
    Symbolic mathematics via SymPy. Use when: user asks for algebraic manipulation, calculus, equation solving, or mathematical proofs. NOT for: numerical computation (use scipy) or statistical analysis.
  • 95sympy
    Use when you need exact symbolic math in Python — algebra, calculus, equation solving, symbolic linear algebra, or code generation via lambdify/LaTeX. Prefer NumPy or SciPy when floating-point approximations are sufficient.
  • 100symbolic-computation-sympy
    Use computer algebra for mathematics: SymPy symbolic algebra, calculus, equation solving, series, matrices, ODEs, simplification, LaTeX output, and verification of hand derivations. Includes a Python helper script. Use whenever exact symbolic results or verification of algebra is needed.
  • 90math-tools
    Deterministic mathematical computation using SymPy. Use for ANY math operation requiring exact/verified results - basic arithmetic, algebra (simplify, expand, factor, solve equations), calculus (derivatives, integrals, limits, series), linear algebra (matrices, determinants,…
  • 100sympy
    Performs exact symbolic mathematics with SymPy for algebra, calculus, equation solving, symbolic linear algebra, physics, and lambdify or LaTeX code generation. Use when a task needs symbolic results, explicit assumptions, or exact arithmetic; use NumPy or SciPy for purely numerical workloads.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.