### Domain of functions

A **function** $f$ is a *procedure* or *process* which
converts *input* to *output* in some way. A traditional
mathematics name for the input is *argument*, but this certainly
is confusing when compared with ordinary English usage.

The collection of all ‘legal’ ‘reasonable’ or ‘sensible’ inputs is
called the **domain** of the function. The collection of all
possible outputs is the **range**. (Contrary to the impression some
books might give, it can be very difficult to figure out all possible
outputs!)

The question ‘What's the domain of this function?’ is usually not what
it appears to be. For one thing, if we are being formal, then
a function hasn't even been *described* if its *domain*
hasn't been described!

What is really meant, usually, is something far less
mysterious. The question usually *really* is **‘What numbers
can be used as inputs to this function without anything bad
happening?’**.

For our purposes, ‘something bad happening’ just refers to one of

- trying to take the square root of a negative number,
- trying to take a logarithm of a negative number,
- trying to divide by zero, or
- trying to find
*arc-cosine*or*arc-sine*of a number bigger than $1$ or less than $-1$.

Of course, dividing by zero is the worst of these, but as
long as we insist that everything be *real* numbers (rather than
*complex* numbers) we can't do the other things either.

For example, what is the domain of the function $$f(x)= \sqrt{x^2-1} \hbox {?}$$ Well, what could go wrong here? No division is indicated at all, so there is no risk of dividing by $0$. But we are taking a square root, so we must insist that $x^2-1\ge 0$ to avoid having complex numbers come up. That is, a preliminary description of the ‘domain’ of this function is that it is the set of real numbers $x$ so that $x^2-1\ge 0$.

But we can be clearer than this: we know how to solve such
inequalities. Often it's simplest to see what to *exclude* rather
than *include*: here we want to *exclude* from the domain any
numbers $x$ so that $x^2-1<0$ from the domain.

We recognize that we can factor $$x^2-1=(x-1)(x+1)=(x-1)\;(x-(-1)).$$ This is negative exactly on the interval $(-1,1)$, so this is the interval we must prohibit in order to have just the domain of the function. That is, the domain is the union of two intervals: $$(-\infty,-1] \cup [1,+\infty)$$

#### Exercises

- Find the domain of the function $$f(x)={ x-2 \over x^2+x-2 }.$$ That is, find the largest subset of the real line on which this formula can be evaluated meaningfully.
- Find the domain of the function $$f(x)={ x-2 \over \sqrt{x^2+x-2 }}.$$
- Find the domain of the function $$f(x)=\sqrt{x(x-1)(x+1)}.$$

#### Thread navigation

##### Calculus Refresher

- Previous: Polynomial inequalities
- Next: Lines (and other items in Analytic Geometry)