Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
beita6969 avatar

Math Computation

  • 17 installs
  • 869 repo stars
  • Updated June 8, 2026
  • beita6969/scienceclaw

math-computation is a Claude skill for symbolic and numerical mathematics using Python with SymPy, NumPy, and SciPy.

About

This skill provides Python recipes for symbolic and numerical mathematics using SymPy, NumPy, and SciPy. It covers solving equations, calculus, linear algebra, differential equations, optimization, and mathematical modeling. Developers use it when a task needs exact or numerical math with LaTeX output for papers.

  • Symbolic and numerical math with SymPy, NumPy, and SciPy
  • Solves equations, integrals, derivatives, ODEs/PDEs, and optimization
  • Includes a 7-step mathematical modeling workflow

Math Computation by the numbers

  • 17 all-time installs (skills.sh)
  • Ranked #1,286 of 2,065 Data Science & ML skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
At a glance

math-computation capabilities & compatibility

Free; requires Python with SymPy, NumPy, and SciPy installed.

Capabilities
ml pipeline · meta analysis · matplotlib viz
Use cases
data analysis · research
Pricing
Free
From the docs

What math-computation says it does

Mathematical computation including symbolic math, numerical methods, linear algebra, calculus, differential equations, optimization, and mathematical modeling.
SKILL.md
Use SymPy for exact solutions, SciPy for numerical
SKILL.md
Use `latex()` to generate paper-ready equations
SKILL.md
npx skills add https://github.com/beita6969/scienceclaw --skill math-computation

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs17
repo stars869
Last updatedJune 8, 2026
Repositorybeita6969/scienceclaw

What it does

Solve equations, compute integrals or derivatives, do matrix operations, and solve ODEs using SymPy, NumPy, and SciPy.

Who is it for?

Solving equations, computing integrals/derivatives, matrix operations, ODEs/PDEs, and optimization.

When should I use this skill?

A task needs symbolic math, numerical methods, linear algebra, calculus, or mathematical modeling.

What you get

Returns exact (SymPy) or numerical (SciPy) solutions plus paper-ready LaTeX equations.

  • Solved equations
  • LaTeX equations
  • Numerical solutions

By the numbers

  • 7-step mathematical modeling workflow
  • Covers 5 common model families

Files

SKILL.mdMarkdownGitHub ↗

Mathematical Computation

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

Symbolic Math (SymPy)

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)

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

# 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

Related skills

FAQ

Which libraries does it use?

Python with SymPy for symbolic math and NumPy/SciPy for numerical methods.

Can it produce paper-ready equations?

Yes, it uses latex() to generate paper-ready LaTeX from SymPy expressions.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.