I am wondering if it is possible to get domain and codomain of a function in Mathematica (by using only built-in functions if possible). For example, I would like to give as input the function $tan(x)$ and to obtain the output "domain" $x \neq \frac{\pi}{2} + k \, \pi $ with $k$ integer, and "codomain" $R$.
Thank you so much for your willingness.