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.
Some of these are implemented in sympy.calculus.util
and sympy.calculus.singularities
, although they aren't exported to from sympy import *
yet, so you'd have to import them manually. The functionality for some of them is still limited, so you may not yet get an answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With