Finding Domain and Range

Learning Objectives

Introduction

Functions are a correspondence between two sets, called the domainThe set of all possible input values for the variable in a function. and the rangeThe set of all possible outputs in a function. Also the difference between the greatest value of a data set and the least value.. When defining a function, you usually state what kind of numbers the domain (`x`) and range (`f(x)`) values can be. But even if you say they are real numbers, that doesn’t mean that all real numbers can be used for `x`. It also doesn’t mean that all real numbers can be function values, `f(x)`. There may be restrictions on the domain and range. The restrictions partly depend on the type of function.

In this topic, all functions will be restricted to real number values. That is, only real numbers can be used in the domain, and only real numbers can be in the range.

Restricting the Domain

There are two main reasons why domains are restricted.

In what kind of functions would these two issues occur?

Division by `0` could happen whenever the function has a variable in the denominator of a rational expression. That is, it’s something to look for in rational functions. Look at these examples, and note that “division by `0`” doesn’t necessarily mean that `x` is `0`!

Function

Notes

`f(x)=1/x`

If `x = 0`, you would be dividing by `0`, so `x!=0`.

`f(x)=(2+x)/(x-3)`

If `x = 3`, you would be dividing by `0`, so `x!=3`.

`f(x)=(2(x-1))/(x-1)`

Although you can simplify this function to `f(x)=2`, when `x=1` the original function would include division by `0`. So `x!=1`.

`f(x)=(x+1)/(x^2-1)`

Both `x = 1` and `x = -1` would make the denominator `0`. Again, this function can be simplified to `f(x)=1/(x-1)`, but when `x = 1` or `x = -1` the original function would include division by `0`, so  `x!=1` and `x!=-1`.

`f(x)=(2(x-1))/(x^2+1)`

This is an example with no domain restrictions, even though there is a variable in the denominator. Since `x^2>=0` , `x^2 + 1` can never be `0`. The least it can be is `1`, so there is no danger of division by `0`.

Square roots of negative numbers could happen whenever the function has a variable under a radical with an even root. Look at these examples, and note that “square root of a negative variable” doesn’t necessarily mean that the value under the radical sign is negative! For example, if `x = -4`, then `-x = -(-4) = 4`, a positive number.

Function

Restrictions to the Domain

`f(x)=sqrtx`

If `x<0`, you would be taking the square root of a negative number, so `x>=0`.

`f(x)=sqrt(x+10)`

If `x<-10`, you would be taking the square root of a negative number, so `x>=-10`.

`f(x)=sqrt(-x)`

When is `-x` negative? Only when `x` is positive. (For example, if `x = -3`, then `-x = 3`. If `x = 1`, then `-x = -1`.) This means `x<=0`.

`f(x)=sqrt(x^2-1)`

`x^2 - 1` must be positive, `x^2 - 1>0`. So `x^2>1`. This happens only when `x` is greater than `1` or less than `-1``x<=-1` or `x>=1`.

`f(x)=sqrt(x^2+10)`

There are no domain restrictions, even though there is a variable under the radical. Since `x^2>=0`,  `x^2+10` can never be negative. The least it can be is `10`, so there is no danger of taking the square root of a negative number.

 

Domains can be restricted if:

 

  •  the function is a rational function and the denominator is `0` for some value or values of `x`
  •  the function is a radical function with an even index (such as a square root), and the radicand can be negative for some value or values of `x`.

 

Range

Remember, here the range is restricted to all real numbers. The range is also determined by the function and the domain. Consider these graphs, and think about what values of `y` are possible, and what values (if any) are not. In each case, the functions are real-valued: that is, `x` and `f(x)` can only be real numbers.

Quadratic function, `f(x) = x^2 - 2x - 3`

On a coordinate plane, a parabola of the given quadratic function opens upward. It goes through (negative 2, 5), crosses the x-axis at (negative 1, 0), has a vertex at (1, negative 4), crosses the x-axis at (3, 0), and goes through (4, 5). While the graph only displays the portion of the parabola running from negative 3 to 3 on the x-axis and from negative 4 to 10 on the y-axis, the parabola continues upward indefinitely.

Remember the basic quadratic function: `f(x) = x^2` must always be positive, so `f(x)>=0` in that case. In general, quadratic functions always have a point with a maximum or greatest value (if it opens down) or a minimum or least value (it if opens up, like the one above). That means the range of a quadratic function will always be restricted to being above the minimum value or below the maximum value. For the function above, the range is `f(x)>=-4`.

Other polynomial functions with even degrees will have similar range restrictions. Polynomial functions with odd degrees, like `f(x) = x^3`, will not have restrictions.

Radical function, `f(x)=-sqrtx-2`

On a coordinate plane, a curve of the given radical function opens facing up and to the right in quadrant 4. It starts at (0, negative 2), curves down, and goes near (4, negative 4) and (9, negative 5). While the graph only displays the portion of the curve running from zero to 11 on the x-axis and from negative 2 to about negative 5 on the y-axis, the curve continues downward and to the right indefinitely.

Square root functions look like half of a parabola, turned on its side. The fact that the square root portion must always be positive restricts the range of the basic function, `f(x)=sqrtx`, to only positive values. Changes to that function, such as the negative in front of the radical or the subtraction of `2`, can change the range. The range of the function above is `f(x)<=-2`.

Rational function, `f(x)=x/(x-6)`

A coordinate plane shows the given rational function as a curve with two branches. A vertical asymptote is at X equal 6 and a horizontal asymptote is at Y equals 1. The first branch opens left and down in quadrants 2 and 4 and passes through the origin. As it moves left from the origin, it approaches the horizontal asymptote at Y equals 1. As it moves right from the origin, it approaches the vertical asymptote at X equals 6. The second branch opens up and right in quadrant 1 and passes through the point (8, 4). As it moves left from (8, 4), it approaches the vertical asymptote at X equals 6. As it moves right from (8, 4), it approaches the horizontal asymptote at Y equals 1.

Rational functions may seem tricky. There is nothing in the function that obviously restricts the range. However, rational functions have asymptotesA line that a graph of a function will come close to, but not cross or even touch.: lines that the graph will get close to, but never cross or even touch. In the graph above, the domain restriction provides one asymptote, `x = 6`. The other is the line `y = 1`, which provides a restriction to the range. In this case, there are no values of `x` for which `f(x) = 1`. So, the range for this function is all real numbers except `1`.

Determining Domain and Range

Finding the domain and range of different functions is often a matter of asking yourself, what values can this function not have?

Example

Problem

What are the domain and range of the real-valued function `f(x) = x + 3`?

This is a linear function. Remember that linear functions are lines that continue forever in each direction.

 

A coordinate plane shows a straight line with a positive slope that crosses the x-axis at (negative 3, zero) and the y-axis at (zero, 3).

 

Any real number can be substituted for `x` and get a meaningful output. For any real number, you can always find an `x` value that gives you that number for the output. Unless a linear function is a constant, such as `f(x) = 2`, there is no restriction on the range.

Answer

The domain and range are all real numbers.

 

Example

Problem

What are the domain and range of the real-valued function `f(x) = -3x^2 + 6x + 1`?

This is a quadratic function. There are no rational or radical expressions, so there is nothing that will restrict the domain. Any real number can be used for `x` to get a meaningful output.

 

Because the coefficient of `x^2` is negative, it will open downward. With quadratic functions, remember that there is either a maximum (greatest) value, or a minimum (least) value. In this case, there is a maximum value.

 

On a coordinate plane, a parabola opens downward. It goes through (negative 1, 8), has a vertex at (1, 4) and goes through (3, negative 8). While the graph only displays the portion of the parabola running from negative 1 to 3 on the x-axis and from positive 4 to negative 10 on the y-axis, the parabola continues downward indefinitely.

The vertexA turning point in a graph. Also the endpoint of the two rays that form an angle., or turning point, is at `(1, 4)`. From the graph, you can see that `f(x)<=4`.

Answer

The domain is all real numbers, and the range is all real numbers `f(x)` such that `f(x)<=4`.

You can check that the vertex is indeed at `(1, 4)`. Since a quadratic function has two mirror image halves, the line of reflection has to be in the middle of two points with the same `y` value. The vertex must lie on the line of reflection, because it’s the only point that does not have a mirror image!

In the previous example, notice that when `x = 2` and when `x = 0`, the function value is `1`. (You can verify this by evaluating `f(2)` and `f(0)`.) That is, both `(2, 1)` and `(0, 1)` are on the graph. The line of reflection here is `x = 1`, so the vertex must be at the point `(1,f(1))`. Evaluating `f(1)` gives `f(1) = 4`, so the vertex is at `(1, 4)`.

Example

Problem

What are the domain and range of the real-valued function `f(x)=-2+sqrt(x+5)`?

This is a radical function. The domain of a radical function is any `x` value for which the radicand (the value under the radical sign) is not negative. That means `x + 5>=0`, so `x>=-5`.

 

Since the square root must always be positive or `0`, `sqrt(x+5)>=0`. That means `-2+sqrt(x+5)>=-2`.

 

On a coordinate plane, a curve opens down and to the right. The curve starts in quadrant 3 at the point (negative 5, negative 2), crosses the x-axis at (negative 1, 0), and passes through point (4, 1).

 

Answer

The domain is all real numbers `x` where `x>=-5`, and the range is all real numbers `f(x)` such that `f(x)>=-2`.

 

Example

Problem

What are the domain and range of the real-valued function `f(x)=(3x)/(x+2)`?

This is a rational function. The domain of a rational function is restricted where the denominator is `0`. In this case, `x + 2` is the denominator, and this is `0` only when `x = -2`.

 

For the range, create a graph using a graphing utility and look for asymptotes:

 

A coordinate plane shows a curve with two branches. The first branch opens left and up in quadrant 2 and passes through the point (negative 4, 6). As it moves left from (negative 4, 6), it appears to approach a horizontal asymptote at Y equals 3. As it moves right from (negative 4, 6), it appears to approach a vertical asymptote at X equals negative 2. The second branch opens down and right in quadrants 1 and 3 and passes through the origin. As it moves left from the origin, it appears to approach a vertical asymptote at X equals negative 1. As it moves right from the origin, it appears to approach a horizontal asymptote at Y equals 3.

 

One asymptote, a vertical asymptote, is at `x=-2`, as you should expect from the domain restriction. The other, a horizontal asymptote, appears to be around `y = 3`. (In fact, it is `y=3`.)

 

A coordinate plane shows the same curve with two branches with the asymptotes highlighted at X equals negative 2 and Y equals 3. The first branch opens left and up in quadrant 2 and passes through the point (negative 4, 6). As it moves left from (negative 4, 6), it approaches a horizontal asymptote at Y equals 3. As it moves right from (negative 4, 6), it approaches a vertical asymptote at X equals negative 2. The second branch opens down and right in quadrants 1 and 3 and passes through the origin. As it moves left from the origin, it approaches a vertical asymptote at X equals negative 1. As it moves right from the origin, it approaches a horizontal asymptote at Y equals 3.

 

Answer

The domain is all real numbers except `-2`, and the range is all real numbers except `3`.

You can check the horizontal asymptote, `y = 3`. Is it possible for `(3x)/(x+2)`  to be equal to `3`? Write an equation and try to solve it.

`(3x)/(x+2)=3`

`(x+2)(3x)/(x+2)=(x+2)3`

`3x=3x+6`

`0=6`

Since the attempt to solve ends with a false statement, `0` cannot be equal to `6`, the equation has no solution. There is no value of `x` for which `(3x)/(x+2)=3`, so this proves that the range is restricted.

Find the domain and range of the real-valued function `f(x) = x^2 + 7`.

 

A) The domain is all real numbers and the range is all real numbers `f(x)` such that `f(x)>=7`.

 

B) The domain is all real numbers `x` such that `x>=0` and the range is all real numbers `f(x)` such that `f(x)>=7`.

 

C) The domain is all real numbers `x` such that `x>=0` and the range is all real numbers.

 

D) The domain and range are all real numbers.

 

 

Summary

Although a function may be given as “real valued,” it may be that the function has restrictions to its domain and range. There may be some real numbers that can’t be part of the domain or part of the range. This is particularly true with rational and radical functions, which can have restrictions to domain, range, or both. Other functions, such as quadratic functions and polynomial functions of even degree, also can have restrictions to their range.