When do we call two functions equal? For example, are f(x)=x and g(x)=x2/x equal? We should note that f(0)=0, but because division by zero is not allowed, g(0) does not exist. In other words, 0Dom(f) but 0Dom(g). The graphs of f and g are shown in Figure 1. As we can see the point (0,0) has been excluded from the graph of y=g(x).

(a): Graph of y=x (b) Graph of y=x2/x

Figure 1

 

Two functions f and g are equal (or identical) if and only if

  1. f and g have the same domain, i.e. Dom(f)=Dom(g),
  2. f(x)=g(x) for every x in their domains

If two functions f and g are equal, then

  •  the graphs of f and g are identical
  • f and g have the same range, i.e. Rng(f)=Rng(g).
Example(1)

Determine whether or not f(x)=x and g(x)=x2 are equal functions.

Solution
f is defined for all values of x; that is, its domain is the entire set of real numbers Dom(f)=R. The domain of g is also the entire set of real numbers because x2 is always nonnegative. Therefore the first condition for equality of two functions is satisfied:
Dom(f)=Dom(g). However, we know x2=|x| (see Properties of the nth root in Section1.7). Therefore,
g(x)=x2=|x|={xif x0xif x<0. Because f(x)g(x) when x is negative, these two functions are not equal. Graphs of f and g are illustrated in Figure 2(a,b).

(a) Graph of f(x)=x (b) Graph of g(x)=x2

Figure 2

 

Example(2)
Determine whether or not f(x)=2lnx and g(x)=lnx2 are equal functions.
Solution
Recall that the only numbers that we can plug into a logarithm are positive numbers (plugging negative numbers will give imaginary results).Therefore, the function f is defined for x>0; that is, Dom(f)={x| x>0}=(0,).
Because always x2>0 except when x=0, the domain of g is Dom(g)={x| x0}=(,0)(0,), which can also be rewritten as R{0}. Note that ln(0) is not defined.
Because
Dom(f)Dom(g), these two functions are not equal. However, the two functions will become equal if we restrict the domain of g to positive numbers.
That is,
2lnx=lnx2when x>0. Graphs of fand g are depicted in Figure 3.

(a): Graph of f(x)=2lnx (b) Graph of g(x)=lnx2

Figure 3