sympy
使用 SymPy 解决符号数学问题
Também disponível em: K-Dense-AI
需要精确的数学结果而非数值近似。本技能提供使用 SymPy 进行符号计算的全面指导,包括代数、微积分、矩阵、物理和代码生成。非常适合需要精确符号解的工程师、科学家和研究人员。
Baixar o ZIP da skill
Upload no Claude
Vá em Configurações → Capacidades → Skills → Upload skill
Ative e comece a usar
Testar
A utilizar "sympy". Solve x squared minus 4 equals 0 and find the derivative of x to the power of 3
Resultado esperado:
- 方程 x² - 4 = 0
- 解: x = 2, x = -2
- x³ 关于 x 的导数:
- d/dx (x³) = 3x²
- 提示: 使用 simplify() 验证结果,使用 factor() 进行多项式因式分解。
Auditoria de Segurança
SeguroThis is a pure documentation skill containing only markdown files with SymPy guidance and Python code examples. No executable scripts, network calls, file system access, or environment variable usage. The skill provides educational content about using the SymPy library for symbolic mathematics. All 498 static findings are FALSE POSITIVES - patterns detected are markdown code formatting, mathematical documentation references, and legitimate educational content about Python programming.
Fatores de risco
⚡ Contém scripts (10)
⚙️ Comandos externos (452)
📁 Acesso ao sistema de arquivos (6)
🌐 Acesso à rede (5)
Pontuação de qualidade
O Que Você Pode Construir
物理问题求解
使用符号方法设置和求解力学问题、量子计算和向量分析。
数学公式推导
以符号方式推导公式,然后将其转换为数值代码以用于生产流程。
数学学习工具
通过精确的符号计算和逐步解决方案来探索数学概念。
Tente Estes Prompts
使用 SymPy 求解方程 x 的平方减 5x 加 6 等于 0。向我展示逐步解决方案。
使用 SymPy 求 sin(x) 的平方关于 x 的导数。然后求二阶导数。
在 SymPy 中创建一个 3x3 矩阵,并计算其特征值、特征向量和行列式。
使用 lambdify 将表达式 x 的平方加 2x 加 1 转换为 NumPy 函数。展示如何将其与数组一起使用。
Melhores Práticas
- 始终在使用前使用 symbols() 定义符号以避免 NameError
- 使用 Rational() 或 S() 而非浮点数以获得精确算术结果
- 对符号应用假设条件(positive=True、integer=True)以获得更简洁的结果
- 使用 lambdify 转换为 NumPy 函数以在数值循环中获得更好性能
Evitar
- 使用浮点数如 0.5 而非 Rational(1, 2) 来获得精确结果
- 在循环中反复调用 subs() 和 evalf() 而非使用 lambdify()
- 忘记在使用前定义符号
- 在奇点处使用 subs() 而非 limit() 进行正确处理
Perguntas Frequentes
哪些平台支持此技能?
结果的精度如何?
可以与 NumPy 和 SciPy 集成吗?
使用此技能时我的数据安全吗?
为什么我的计算很慢?
这与 Mathematica 或 MATLAB 相比如何?
Detalhes do Desenvolvedor
Autor
davila7Licença
MIT
Repositório
https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/scientific/sympyReferência
main
Estrutura de arquivos