✖

Domain of a function

The domain of a function is the set of all allowed values that we can substitute for the input x in the function f(x) so that the function makes sense.

What is the domain of a function

A simple example is the function f(x) = 1/x. The domain is the set of all allowed values which, when we substitute them into 1/x, give a valid expression.

To know what a “valid expression” is, we need to know the properties of functions and operations. In our function we divide by the variable x, so x is in the denominator of the fraction. What can we divide by? Anything except zero. We can’t divide by zero, so zero must not appear in the denominator of a fraction. Division has no other restriction.

So we can substitute any real number for x except zero. The domain is therefore ℝ ∖ {0}, that is, all real numbers apart from 0. We usually describe the domain in words: “the domain of f is …”.

At this point we have found the largest possible domain. But because we defined the domain as the set of values that we can substitute for x, any subset of the domain is again a domain. Sometimes it is useful to restrict a function to certain values of x only. For example, in sequences we restrict ourselves to the natural numbers, and in trigonometry we often work only on the interval [0, 2π].

However, if a question asks you to find the domain of a function, you are normally expected to find the largest possible domain.

We can also read the domain off the graph of a function. As an example, take the graph of the previous function f(x) = 1/x.

Graph of the function f(x)=1/x

If you project the graph onto the x-axis, you get the domain. If a point x is not in the domain, then a vertical line through that point, perpendicular to the x-axis, does not meet any point of the graph. We can see that only zero satisfies this condition – it has no point of the graph “above or below it”. All the other values do.

Finding the domain

To find the domain of a composite function, you must know the domains of all the functions it is built from. There’s no way round it. If I asked you to find the domain of f(x) = one(x) + two(x), you would get nowhere, because you don’t know how the functions one and two are defined. Here are the domains of some elementary functions:

If you are given only one function, it’s very simple. We find out what domain that function has, look at the input, and substitute it into the equation or inequality. For example, find the domain of log(3x + 2). The input of a logarithm must be positive, so we need 3x + 2 > 0. This is a linear inequality, which we can easily solve:

3x+2>03x>−2x>−23

The domain is all the values of x that satisfy this inequality, so the domain is (−2/3, ∞).

Find the domain of 2x+8.

There can’t be a negative number under the square root, so we solve the inequality 2x + 8 ≥ 0, which gives:

2x+8≥02x≥−8x≥−4

So the domain is [−4, ∞).

Find the domain of 1/x2.

The denominator can’t be zero, so we solve x2 ≠ 0. This holds when x ≠ 0, so the domain is ℝ ∖ {0}.

Splitting composite functions into parts

With composite functions the situation is a little more complicated, because we have to take into account several functions that affect each other and gradually shrink the domain. Take this example:

f(x)=1x

Two conditions must hold here. The expression under the square root must be greater than or equal to zero – it can’t be negative. So x ≥ 0. But the square root is in the denominator of a fraction, so the root must not come out as zero, otherwise the fraction would again make no sense. So we strengthen the previous statement to x > 0.

We follow a similar approach in other examples. What matters is to work out the order of the nested functions – we have to find which function is the inner one and which is the outer one. In the previous example it was obvious – the inner function was the square root and the outer one was the fraction. If we wanted to evaluate that expression by hand, we would first take the square root of the input x and only then work out the fraction. This is a pretty good tip – the innermost function is the one you would start with if you were working it out by hand. Another example:

f(x)=(ln⁡(tan(x)))35

Now we can take the opposite approach and look for the outer functions. An outer function “wraps” the inner functions. Here the fifth root clearly wraps all the remaining functions. Next, the cube wraps the result of the logarithm, the logarithm wraps the tangent, and finally the tangent wraps the variable x. Easy. Using the earlier method, we can look at it like this: when we know the value of x, we first apply the tangent to it, so the tangent is the innermost function. We apply the logarithm to that result – so it is the second innermost function. We then cube that result and finally take the fifth root.

Split the composite function into its parts:

f(x)=sin⁡42ln⁡(102x+3)

We start with the outer function, which is the sine. Next comes the fraction, then the logarithm, then the exponential function (imagine this substitution: 10a) and finally the linear function 2x + 3.

Split the composite function into its parts:

f(x)=213x

The outer function is the exponential function 2a. Next comes the fraction, then the square root in the denominator of the fraction, and finally the linear function 3x.

Domain of composite functions

If you can split functions into outer and inner functions, finding the domain is no problem at all. Let’s go straight to an example:

f(x)=47sin⁡(x)−1

We start with the fraction. Its denominator must not be zero. Let’s write that down:

sin⁡(x)−1≠0sin⁡(x)≠+1

From the properties of the sine function we know that it reaches the value 1 at x = π/2. Because it is a periodic function, we get the set M = {π/2 + 2kπ}; k ∈ ℤ. This is the set of values for which the denominator comes out as zero. We can’t substitute these values of x into our function.

But that’s not everything – we still have to look at the domain of the sine function. Luckily, that is ℝ, so it doesn’t restrict us in any way. The only restriction comes from the denominator of the fraction. So the domain is ℝ ∖ {π/2 + 2kπ}; k ∈ ℤ.