Is there a way, using sympy
, to figure out (some) properties of a function, thought of as a real function?
For example, if
>>> x = Symbol('x', real=True)
>>> f = Lambda(x, sqrt((x-2)/(x+2)))
then something like
>>> 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
Some of this is implemented in Wolfram Alpha.