Find the domain and range of piecewise functions calculator

Yuanxin (Amy) Yang Alcocer, Jennifer Beddoe

Learn what domain and range of piecewise functions are. Additionally, also see how to find the domain of a fraction that is a part of a piecewise function. Updated: 01/17/2022

All functions have a domain and range, including piecewise functions.

What is a Piecewise Function?

A piecewise function is a function that is split up into several parts. It may have gaps or abrupt changes at certain points.

Here is an example of a piecewise function:

A piecewise function

Find the domain and range of piecewise functions calculator

Note how this graph has gaps in certain places. Also, notice the open and closed circles at these gaps. A closed hole means that is the value of the graph at that point. An open hole means the graph does not have a value at that point. Looking at x = 1, the closed hole is at y = 2, so the value when x = 1 is y = 2 and not y = 1 since that is an open hole. What would be the value at x = 3? Look for the closed hole. The closed hole is at y = 5, so the value when x = 3 is y = 5 and y = 2.

What are Domain and Range?

The domain of a function is all the input or x-values for which the function is defined. This means that plugging in that value of x yields a resulting y-value. There are no undefined operations such as division by 0. The range of a function is the possible output or y-values of the function.

For a piecewise function, the domain and range can be one continuous range or can be split up into two or more ranges. Take a look at this piecewise function again:

A piecewise function

Find the domain and range of piecewise functions calculator

The range of this piecewise function depends on the domain. For the domain ranging from negative infinity and less than 1, the range is 1. For the domain greater than or equal to 2 and less than 3, the range is 2. And for the domain greater than or equal to 5, the range is 5. The range and domain are in pieces and are not continuous.

Piecewise Notation

The piecewise notation for a piecewise function includes several functions altogether. It is written with a curly bracket to show that all the functions together make up the piecewise function. For the above example, it is written like this:

{eq}f(x) = \left\{\begin{matrix} 1 ~~~~ if ~ x < 1 ~~~~~~~~\\ 2 ~~~ if ~ 1 \leq x < 3\\ 5 ~~~ if ~x \geq 3 ~~~~~~~~ \end{matrix}\right. {/eq}

This notation shows the three separate pieces of the function and when those pieces are valid. For example, reading this piecewise function, it says the function is 1 when x is less than 1. When x is greater than or equal to 3, then the function is 5. Instead of constant numbers, functions can also be included.

Master of Your Domain

Your domain can be defined as your circle of influence. It is the area where you are king, where you call the shots. Different people have different domains, and they can be large or small. It all depends on the person and their circumstances.

Mathematical functions also have domains or areas where they have influence. The domain of a function is the set of input, or x, values for which the function is defined. There are a couple of ways to determine the domain of a function; they will be described later.

Find the domain and range of piecewise functions calculator

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: How to Graph Piecewise Functions

 Replay

Your next lesson will play in 10 seconds

  • Video
  • Quiz
  • Course

How to Find the Domain of a Fraction

Take a look at this piecewise function that has a function in there with a fraction:

{eq}f(x) = \left\{\begin{matrix} \frac{-1}{x-2} ~~~~~~~ if ~ x < 1 ~~~~~~~~\\ x+1 ~~~ if ~ 1 \leq x < 3\\ 5 ~~~~~~~~~~~ if ~x \geq 3 ~~~~~~~~ \end{matrix}\right. {/eq}

To find the domain of this piecewise function, the domain of each function including the one with a fraction needs to be checked. Look at the domain of each function by itself.

The first function is a fractional function with the variable in the denominator. Because the variable is in the denominator, it will have a hole or a value where the function is undefined. This value is when the denominator is 0. So what value is x when the denominator is 0? Solving the denominator for 0, the x-value is 2 to make the denominator 0.

{eq}x - 2 = 0 \\ x = 2 {/eq}

This means this function has a domain of all real x except for x = 2. Writing the domain of this function using interval notation, the result is this:

{eq}dom (\frac{-1}{x-2}) = (-\infty, 2) \cup (2, \infty) {/eq}

Now look at the next function.

{eq}x + 1 {/eq}

This function is a linear function. There is no denominator with a variable in it. This means this function's domain is all real numbers.

{eq}dom (f) = \mathbb{R} {/eq}

Finally, look at the last function. It is a constant 5 with no variable. This means no matter what the value of x, the y-value is always 5. So the domain of this function is all real numbers.

{eq}dom (f) = \mathbb{R} {/eq}

Now, piece all of this together to find the domain of the piecewise function with all the functions combined.

Domain of a Piecewise Function

To find the domain of a piecewise function, all the pieces of the piecewise function have to be looked at together.

{eq}f(x) = \left\{\begin{matrix} \frac{-1}{x-2} ~~~~~~~ if ~ x < 1 ~~~~~~~~\\ x+1 ~~~ if ~ 1 \leq x < 3\\ 5 ~~~~~~~~~~~ if ~x \geq 3 ~~~~~~~~ \end{matrix}\right. {/eq}

Looking at this piecewise function, the question is whether there are any gaps in the possible x-values. With the domains of each function already figured out, the question here is whether any undefined areas are within the boundaries of each function of the piecewise function.

Looking at the first function, the one with the fraction, it has an undefined spot at x = 2. But the restriction in the piecewise function for this fraction is that it ends right before x = 1. It does not include 1 and does not ever reach x = 2. This means all x-values in the restricted area are valid.

Moving to the second function, the domain of that function by itself is all real x-values. This means this function is valid for all x-values within its restricted area.

Piecewise Functions

A piecewise function is a function that is broken into two or more pieces. Each of these pieces has its own parameters. Here is an example of a piecewise function:

Find the domain and range of piecewise functions calculator

Find the Domain of a Piecewise Function

As mentioned before, there is more than one way to find the domain of a piecewise function. The first way is by looking at the equations that make up the functions. There are three main things that you need to look for.

1. Look at the restrictions of the function. The restrictions are the x < or x > portions of the function.

Find the domain and range of piecewise functions calculator

In this example, the restrictions are x < 5 and x > 5. If there are any places where x is not defined, they are not included in the domain. In this example, x is not ever equal to 5, it is only less than or greater than 5, so the domain of f is all real numbers excluding 5. Written in interval notation, the domain is all real numbers less than or greater than 5.

Find the domain and range of piecewise functions calculator

2. Look at the denominator of any fractions. Since a function is undefined if the denominator of any of the fractions is zero, the domain of that function will exclude any numbers that make the denominator of a fraction zero. Check out this example.

Find the domain and range of piecewise functions calculator

The domain of this function is all real numbers excluding 0 because for the first part of the function, the denominator of the fraction cannot be 0. Since x is the denominator, x cannot equal 0 for this function.

Find the domain and range of piecewise functions calculator

3. Look at any radicals that are present. A function does not work if the number under the square root is negative. So, the domain of the function can not include any numbers that will make the number inside the radical symbol negative. Here is an example:

Find the domain and range of piecewise functions calculator

Master of Your Domain

Your domain can be defined as your circle of influence. It is the area where you are king, where you call the shots. Different people have different domains, and they can be large or small. It all depends on the person and their circumstances.

Mathematical functions also have domains or areas where they have influence. The domain of a function is the set of input, or x, values for which the function is defined. There are a couple of ways to determine the domain of a function; they will be described later.

Piecewise Functions

A piecewise function is a function that is broken into two or more pieces. Each of these pieces has its own parameters. Here is an example of a piecewise function:

Find the domain and range of piecewise functions calculator

Find the Domain of a Piecewise Function

As mentioned before, there is more than one way to find the domain of a piecewise function. The first way is by looking at the equations that make up the functions. There are three main things that you need to look for.

1. Look at the restrictions of the function. The restrictions are the x < or x > portions of the function.

Find the domain and range of piecewise functions calculator

In this example, the restrictions are x < 5 and x > 5. If there are any places where x is not defined, they are not included in the domain. In this example, x is not ever equal to 5, it is only less than or greater than 5, so the domain of f is all real numbers excluding 5. Written in interval notation, the domain is all real numbers less than or greater than 5.

Find the domain and range of piecewise functions calculator

2. Look at the denominator of any fractions. Since a function is undefined if the denominator of any of the fractions is zero, the domain of that function will exclude any numbers that make the denominator of a fraction zero. Check out this example.

Find the domain and range of piecewise functions calculator

The domain of this function is all real numbers excluding 0 because for the first part of the function, the denominator of the fraction cannot be 0. Since x is the denominator, x cannot equal 0 for this function.

Find the domain and range of piecewise functions calculator

3. Look at any radicals that are present. A function does not work if the number under the square root is negative. So, the domain of the function can not include any numbers that will make the number inside the radical symbol negative. Here is an example:

Find the domain and range of piecewise functions calculator

How does one find the domain and range of a piecewise function?

To find the domain of a piecewise function, first look at the domains of each function independently. Then check to see if any undefined areas are inside the restraints of the piecewise function. Then check for any other undefined areas. If no undefined areas are there, then the domain is all real x-values. The range is the possible y-values of the piecewise function.

What is the domain of a piecewise function?

The domain of a piecewise function is all the x-values for which the piecewise function is defined or has a value. This means the functions involved are calculable and will not produce an undefined error such as division by 0.

How does one find the domain and range of fractions?

For fractions, look for errors such as division by 0 or negative radicals. The domain will be all x-values except these points. For example, the fraction 1/x has a domain of all x-values except 0 since 0 results in division by 0, which is undefined.

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.

Become a Member

Already a member? Log In

 Back

Resources created by teachers for teachers

Over 30,000 video lessons & teaching resources‐all in one place.

Video lessons

Quizzes & Worksheets

Classroom Integration

Lesson Plans

I would definitely recommend Study.com to my colleagues. It’s like a teacher waved a magic wand and did the work for me. I feel like it’s a lifeline.

Back

Create an account to start this course today

Used by over 30 million students worldwide

Create an account

How do you find the domain of a piecewise function?

There are two methods to determine the domain of a piecewise function. The first is to look at the equations of the function, paying special attention to the restrictions, any denominators of fractions and any radicals. The second way to determine the domain is by looking at the graph of the function.