We say a function y=f(x) is defined for x=a when f(a) is a real number. [We will talk about (6)–(11) in more detail in Chapter 3. If you have no prior knowledge about them, you may skip them.]

1.f(x)=xm where m is any positive integer is defined for every value of x.

2. f(x)=1x is defined for every value of x except x=0, since 10 cannot be calculated.

3.f(x)=x is defined for x0 [because for x<0, x  is imaginary].

4. f(x)=xn where n is an even integer is defined for x0 [because xn for x<0 is imaginary].

5.f(x)=xm where m is an odd integer is defined for every value of x.

6. f(x)=logax where a>0 is defined only for x>0. For negative values of x, this function does not exist [in fact, it becomes imaginary].

7. f(x)=ax where a>0; that is, the exponent is a variable and the number a being a constant. This function is defined for every value of x.

8.f(x)=sinx or f(x)=cosx is defined for every value of x.

9. f(x)=tanx is defined for every value of x except x=(2n+1)π2 where n is any integer.Recall that tanx=sinxcosx. Because cos((2n+1)π2)=0, and division by zero is not allowed, these values must be excluded here. 

10. f(x)=arcsinx or f(x)=arccosx is defined only for 1x1.Because sines and cosines cannot exceed +1 or become less than –1, it follows that these functions are defined for all values of x ranging from –1 to +1 inclusive, but not for other values. 

11.f(x)=arctanx or f(x)=arccot x is defined for every value of x.

When we talk about “the function y=f(x)” and the domain of the function is not specified, the domain is then assumed to be the set of all real numbers for which f(x) is defined; that is, f(x) is real. This set is sometimes called the natural domain of f and is denoted by Dom(f)

The set of all real numbers for which f(x) is real is called the natural domain or simply the domain of the function.
  • If we want to restrict the domain of a function, we must specify so. For example, we must write “f(x)=x2,x>0”, to restrict the domain of f to positive numbers. If we do not add “x>0”, the domain of f is understood to be the entire set of real numbers.
Example 1
Determine the natural domains of the following functions:

 (a)f(x)=x24x
 (b)g(x)=x1
 (c)h(x)=2x
 (d)F(x)=x26x
 (e)G(x)=4x2
 (f)H(x)=x1+2x
 (g)u(x)=1x23x
 (h)v(x)=log(x2)

Solution
(a) For all x, f(x)=x24x is a real number. Thus Dom(f)=(,)=R.

(b)We recall that a is real when a0. Thus g(x) is defined when x10 or x1. That is, Dom(g)={x| x1}=[1,).

(c)h(x) is defined when 2x0 or x2. Thus Dom(h)={x| x2}=(,2].

(d) Since x26x or x(x6) must not be negative, x and x6 must always have the same signs (see the following sign table). F(x) is defined for every value of x except those between 0 and 6; that is Dom(F)={x| x0,x6}. We can rewrite the domain of F as (,0][6,).

(e) Since 4x2=(2x)(2+x) must not be negative, G(x) is defined where 2x and 2+x have the same signs (see the following sign table). Therefore, G(x) is defined for 2x2, or Dom(G)={x| 2x2}=[2,2].

(f) For x1 to be real, we must have x10 or x1. For 2x to be real, we must have 2x0 or x2. Thus, H(x) is real, if we have both x1 and x2; that is, the domain of H is Dom(H)={x| 1x2}=[1,2].

(g) Because u(x)=1x23x=1x(x3), u(x) is defined for all values of x except x=0 and x=3. When x=0 or x=3, the divisor becomes zero and division by zero is not allowed. Thus Dom(u)={x| x0, x3}. The domain of u can also be represented by R{0,3} or (,0)(0,3)(3,).

(h) Because the logarithm of a nonpositive number is not real, we must have x2>0 or x>2. Thus Dom(v)={x| x>2}=(2,).

Another important set that is associated with every function is the range of a function. The range of a function f is the set of all values taken by the function (or equivalently by the dependent variable) when the independent variable varies over the domain. In other words, all possible outputs of a function make up its range. The range of f is denoted by Rng(f).

If f:AB, the range of f is
Rng(f)={f(x)| xA}.
  • Note that the range of f is a subset of its co-domain B
    Rng(f)B.
  • The difference between domain, codomain and the range of a function is depicted in Figure 3.
Figure 3. Domain, co-domain and range of a function f
Example 2
Let f:RR and f(x)=x2. Find the range of f.
Solution

The range of f consists of all possible outputs of f. Any y0 is a possible output of f, because we can find a value of x such that y=x2 (we just need to set x=y or x=x). Thus, the range of f is {y| y0}=[0,).

In elementary calculus, we will learn more powerful methods for determining the ranges of functions.