from sympy import * x = Symbol(‘x‘) y = Symbol(‘y‘) print solve([2* x - y -3,3* x + y -7],[x, y])
代码中的oo就代表无穷。
from sympy import * n = Symbol(‘n‘) s = ((n+3)/(n+2))**n print limit(s, n, oo)
integrate函数用于积分问题。
from sympy import * t = Symbol(‘t‘) x = Symbol(‘x‘) m = integrate(sin(t)/(pi-t),(t, 0, x)) n = integrate(m, (x, 0, pi)) print n
原文地址:http://tinagao.blog.51cto.com/9923373/1927313