Chuyển đến nội dung
Skillpedia
Lập trình chung48k · #5916

sympy

Skill này làm gì

Công cụ này giúp thực hiện các phép tính toán học chính xác bằng ký hiệu, như trong một cuốn sổ toán, thay vì chỉ dùng số. Nó có thể giải phương trình, tính đạo hàm, tích phân và hơn thế nữa.

Khi nào nên dùng

  • ✓Giải phương trình phức tạp mà không làm tròn số.
  • ✓Tính đạo hàm hoặc tích phân của hàm số.
  • ✓Làm việc với ma trận một cách chính xác.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/sympy/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Giải phương trình x^2 - 4 = 0 để tìm x.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn cho tôi biết bài toán cần giải, và tôi dùng thư viện đặc biệt SymPy để tìm đáp án chính xác. Nó hiểu các ký hiệu như “x” và “y” để thực hiện phép tính.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.
Câu hỏi thường gặp

“Tính toán ký hiệu” là gì?

Đó là làm toán bằng chữ và ký hiệu (như “x”, “y”, căn bậc hai của 2) thay vì chỉ dùng số gần đúng (như 1,414 cho căn bậc hai của 2). Nhờ vậy đáp án chính xác.

Tôi có thể dùng nó cho mọi loại toán không?

Nó rất tốt cho đại số, giải tích, đại số tuyến tính và một số lĩnh vực của vật lý và lý thuyết số. Nó không dùng cho thống kê phức tạp hay học máy.

Tôi có cần biết lập trình Python không?

Không, bạn chỉ cần nói điều mình muốn bằng ngôn ngữ thông thường. Tôi sẽ xử lý phần kỹ thuật khi dùng SymPy.

Chi tiết

Mô tả gốc của tác giả

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

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5916
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự