本文へスキップ
Skillpedia
一般的なプログラミング48k · #5916

sympy

できること

このツールは、数字だけでなく記号を使って、数学のノートに書くような厳密な計算を行うのに役立ちます。方程式を解いたり、微分や積分などを求めたりできます。

使う場面

  • ✓近似値を使わずに、複雑な方程式を解きたいとき。
  • ✓関数の微分や積分を計算したいとき。
  • ✓行列を厳密に扱いたいとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/sympy/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/sympy/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“方程式 x^2 - 4 = 0 を x について解いてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

解きたい数学の問題を教えてもらうと、SymPyという専用のライブラリを使って厳密な答えを求めます。「x」や「y」のような記号を理解して計算します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

SymPy - Symbolic Mathematics in Python

Detailed Guide

Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.

When to Use This Skill

Use this skill when:

  • Solving equations symbolically (algebraic, differential, systems of equations)
  • Performing calculus operations (derivatives, integrals, limits, series)
  • Manipulating and simplifying algebraic expressions
  • Working with matrices and linear algebra symbolically
  • Doing physics calculations (mechanics, quantum mechanics, vector analysis)
  • Number theory computations (primes, factorization, modular arithmetic)
  • Geometric calculations (2D/3D geometry, analytic geometry)
  • Converting mathematical expressions to executable code (Python, C, Fortran)
  • Generating LaTeX or other formatted mathematical output
  • Needing exact mathematical results (e.g., sqrt(2) not 1.414...)

Getting Started Examples

Example 1: Solve Quadratic Equation

from sympy import symbols, solve, sqrt
x = symbols('x')
solution = solve(x**2 - 5*x + 6, x)
# [2, 3]

Example 2: Calculate Derivative

from sympy import symbols, diff, sin
x = symbols('x')
f = sin(x**2)
df_dx = diff(f, x)
# 2*x*cos(x**2)

Example 3: Evaluate Integral

from sympy import symbols, integrate, exp
x = symbols('x')
integral = integrate(x * exp(-x**2), (x, 0, oo))
# 1/2

Example 4: Matrix Eigenvalues

from sympy import Matrix
M = Matrix([[1, 2], [2, 1]])
eigenvals = M.eigenvals()
# {3: 1, -1: 1}

Example 5: Generate Python Function

from sympy import symbols, lambdify
import numpy as np
x = symbols('x')
expr = x**2 + 2*x + 1
f = lambdify(x, expr, 'numpy')
f(np.array([1, 2, 3]))
# array([ 4,  9, 16])

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
よくある質問

「記号計算」とは何ですか?

「x」「y」「sqrt(2)」のように、文字や記号を使って数学を計算することです。おおよその数値(たとえば2の平方根を1.414とする)ではなく、正確な答えが得られます。

どんな数学にも使えますか?

代数、微積分、線形代数や、物理学・整数論の一部の分野に向いています。複雑な統計や機械学習向けではありません。

Pythonのコーディングができる必要がありますか?

いいえ。やりたいことを普通の言葉で伝えてもらえれば十分です。SymPyを使う技術的な部分は、こちらで処理します。

詳細

作者による元の説明

SymPy is a Python library for symbolic mathematics that enables exact computation using mathematical symbols rather than numerical approximations.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#5916
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル