Tips (Utility, Computer Language, and etc.)
[python] sympy 사용기
Struggler J.
2019. 6. 20. 02:14
mathematica를 사용하여 symbolic계산을 할 수 있지만 python과 엮어서 numerical한 계산을 symbolic계산과 함께 더 본격적으로 해보고자했다.
사용한 패키지는 sympy.
1. install
$pip install sympy
2. solve, simplify, Symbol 등등 사용하기
http://scipy-lectures.org/packages/sympy.html
3.2. Sympy : Symbolic Mathematics in Python — Scipy lecture notes
3.2. Sympy : Symbolic Mathematics in Python Author: Fabian Pedregosa Objectives Evaluate expressions with arbitrary precision. Perform algebraic manipulations on symbolic expressions. Perform basic calculus tasks (limits, differentiation and integration) w
scipy-lectures.org
from sympy import solve, Symbol
f0 = Symbol('f0')
R = Symbol('R')
(중간계산) x 와 y는 f0와 R에 대한 함수임
sol = solve( (x, y), (f0, R)) #x=0, y=0을 만족하는 (f0, R) set을 찾아줌