How to Calculate Domain and Range in Math

When working with functions, you often need to provide x-values and y-values in your answer. In mathematics, the term domain is used for the set of x-values that fit in the problem, and range is used for the corresponding set of y-values. Formally, they are referred to as this:

Theory

Domain and Range

The set of all x-values that fit in a function f is called the domain of f and is written Df.

The set of all y-values determined by Df is called the range of f and is written Rf.

These are the most common examples:

  • For linear functions, the range is the set of all real numbers. You write Rf = .

  • For quadratic functions, the range is either all numbers from the minimum and upwards, or all numbers from the maximum and downwards. You then write either Rf = [a,) or Rf = (,a], where a is the y-value of the extremum.

  • For rational functions expressed as

    f(x) = ax + b cx + d,

    the range is all numbers except the y-value where the denominator is zero, that is, the horizontal asymptote. You can write it as

    Rf = {a c},

    since a c is the horizontal asymptote.

Example 1

Robert is on land and throws a rock into the water. The stone follows a path given by the function f(x), where x is the distance from Robert to the stone in the horizontal direction, and y is the height the stone has above the water at all times. You will learn that the height of the stone follows the function

f(x) = 0.1x2 + x + 2

Find the domain Df and the range Rf for the function so that the throw makes sense.

To find the domain Df you must find the smallest and largest value that x can have. You see that x must be greater than 0. If you allow x to be less than zero, Robert will end up throwing the stone further ashore and that does not match the exercise.

You must now find the largest value of x. The throw ends when the stone hits the water surface and that happens when y = 0. You must therefore solve the equation

f(x) = 0.

Since f(x) is a quadratic function you can use the quadratic formula to solve this equation. The solutions are therefore x1 = 1.71 and x2 = 11.71. Since the domain starts at 0, you can ignore x1 since x1 is negative. The stone will hit the water after 11.71 meters. The domain is therefore

Df = [0, 11.71] .

To find the range Rf, you need to find the smallest and largest value y can be from the x-values you found for Df. The smallest y-value is when the rock hits the water surface. This happens at y = 0— that is, at 0 meters above the water.

To find the largest y-value, you must find the y-value when the rock is at its greatest height above the water surface. This can be found by reading the y-value at the maximum of the function.

You can find the maximum by drawing the function or by using derivation. Regardless of the method you choose, the greatest height the stone will be is 4.5 m. The range is then

Rf = [0, 4.5] .

Theory

Asymptotes, Domain and Range

  • A vertical asymptote intersects the x-axis. The mathematical way of writing a vertical asymptote is x = a, where a is the number where the vertical asymptote intersects the x-axis. The domain of the function with a vertical asymptote does not contain a.

  • A horizontal asymptote intersects the y-axis. The mathematical way of writing a horizontal asymptote is y = a, where a is the number where the horizontal asymptote intersects the y-axis. The range of the function with a horizontal asymptote does not contain a.

Example 2

Find the domain and the range of f(x) = 2x + 3 x 1

You can find the domain Df by looking at the x-values where the function makes sense, that is, where you can insert an x-value and get an answer. You know that you can’t have zero in the denominator of a fraction. For this reason the function is not defined for the x-value that makes the denominator 0. Therefore you get

x 1 = 0 x = 1.

The domain is then all values of x except the x-value of the vertical asymptote, in this case x = 1. You write this mathematically

Df = {1} .

You find the range Rf by finding the horizontal asymptote. That is to say, the range is all real numbers except the horizontal asymptote. Since f describes a hyperbola (as you can see from the function), you find the horizontal asymptote using the formula

y = a c.

Then you get

y = 2 1 = 2.

The range is then: All real numbers except the y-value of the horizontal asymptote, in this case y = 2. You write this mathematically as

Rf = {2} .

Want to know more?Sign UpIt's free!