Sympy是一个符号计算的Python库。
题目:
编程实现:
import sympy
from sympy import oo
a = sympy.Symbol('a')
# 定义变量
b = sympy.sin(a) / a
result = sympy.limit(b, a, 0)
# limit(函数,变量, 趋向值)
result
n = sympy.Symbol('n')
h = ((n+3) /(n+2)) ** n
y = sympy.limit(h, n, sympy.oo)
# oo:无穷
y