有没有一种方法,使用sympy
,来找出一个函数的(一些)属性,被认为是一个实函数?你知道吗
例如,如果
>>> x = Symbol('x', real=True)
>>> f = Lambda(x, sqrt((x-2)/(x+2)))
然后像
>>> f.domain()
(-oo, -2) U [2, oo)
>>> f.image() # there is "imageset", but it is not expanding on the set of reals
[0, 1) U (1, oo)
>>> f.is_injective()
True
>>> f.is_bounded()
False
>>> f.is_even # currently returns None
False
其中一些是在Wolfram Alpha中实现的。你知道吗
其中一些是在^{} 和^{} 中实现的,尽管它们还没有导出到
from sympy import *
,所以您必须手动导入它们。其中一些功能仍然有限,因此您可能还没有得到答案。你知道吗相关问题 更多 >
编程相关推荐