加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

python – 查找实际函数的属性

发布时间:2020-12-16 22:47:38 所属栏目:Python 来源:网络整理
导读:有没有办法,使用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 r

有没有办法,使用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中实现的.

最佳答案
其中一些是在sympy.calculus.utilsympy.calculus.singularities中实现的,虽然它们尚未从sympy import *导出,因此您必须手动导入它们.其中一些功能仍然有限,所以你可能还没有得到答案.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读