How to determine the domain and range of a function? I know what domain and range are, at least I think I do, but recently I took a test in which they asked me to determine the domain and range of a function I remember only very faintly now. In the test, I answered what seemed logical to me, however, later on I found that the answer was completely wrong when I looked at a graph of the function. My question is: is there a way to determine the domain and range of a function without looking at its graph?
 A: Unless explicitly stated, the domain of a function $f(x)$ is all possible values of $x$ for which $f(x)$ is defined. For example the function
$$f(x)=\frac{1}{x}$$
is defined for
$$\{x\in\mathbb{R}\,|\,x\neq 0\}$$
The range of a function can be determined by finding the absolute maxima or minima. In this case $f(x)$ has no absolute maxima or minima, so the range of $f(x)$ is the entire real number line $\mathbb{R}$. For another function
$$g(x)=x^2-4$$
note that the first derivative is
$$g^\prime(x)=2x$$
which equals $0$ at $x=0$. Thus this is a minimum or maximum. The second derivative at this point is
\begin{gather}
g^{\prime\prime}(x)=2\\
g^{\prime\prime}(0)=2
\end{gather}
Because the second derivative is positive, $x=0$ is a local minimum. Note that $g(x)$ at this point is equal to $g(0)=-4$. Because the limits
\begin{gather}
\lim_{x\to\infty}x^2-4=\infty\\
\lim_{x\to -\infty}x^2-4=\infty
\end{gather}
are both $>-4$, no value of $g(x)$ can be lower than $-4$. Thus it is an absolute maximum and the range of $g(x)$ is
$$\{x\in\mathbb{R}\,|\,-4\leq x\}$$
