Lesson Objectives
  • Learn how to identify the absolute value function
  • Learn how to identify the greatest integer function
  • Learn how to evaluate a piecewise-defined function
  • Learn how to graph a piecewise-defined function

How to Graph and Evaluate a Piecewise-Defined Function


In this lesson, we will learn about the piecewise-defined function, which is also known as the split-definition function. This type of function is defined by different rules over different intervals of the domain. Let's begin with the absolute value function.

The Absolute Value Function

The absolute value function pairs every real number with its absolute value. $$f(x)=|x|$$ $$\text{domain}:(-\infty, \infty)$$ $$\text{range}: [0, \infty)$$ This function is continuous over its entire domain. absolute value function The absolute value function is an example of a piecewise-defined function. It has different rules across different intervals of the domain. For x-values that are non-negative (0 or some positive real number), we just get the number. In the case where x-values are negative, we get the opposite of the number. If you look at the graph above, we have the line y = x to the right of the y-axis and the line y = -x to the left of the y-axis. $$\ f(x)=|x|=\begin{cases}x & \text{if}\hspace{.2em}x ≥ 0 \\ -x & \text{if}\hspace{.2em}x < 0 \end{cases}$$

The Greatest Integer Function

The greatest integer function is another example of a piecewise-defined function. This function pairs every real number x with the greatest integer that is less than or equal to x. The greatest integer function is an example of a step function. $$f(x)=[x]$$ $$\text{domain}: (-\infty, \infty)$$ $$\text{range}: \{y | y ∈ \mathbb{Z}\}$$ The Z above is used for the set of integers. In other words, y can be any integer. The greatest integer function is also commonly known as the floor function. The notation for this function can vary quite a bit. You may also see this written as: $$f(x)=\lfloor x \rfloor$$ $$f(x)=[\![x]\!]$$ This function is discontinuous at all integer values. $$\text{for}\hspace{.2em}{-}2 ≤ x < -1, f(x)=-2$$ $$\text{for}\hspace{.2em}{-}1 ≤ x < 0, f(x)=-1$$ $$\text{for}\hspace{.2em}0 ≤ x < 1, f(x)=0$$ $$\text{for}\hspace{.2em}1 ≤ x < 2, f(x)=1$$ $$\text{for}\hspace{.2em}2 ≤ x < 3, f(x)=2$$ greatest integer function Note: The dots in purple are used to indicate that the graph continues indefinitely in the same pattern.

Evaluating a Piecewise-Defined Function

In some cases, we may be asked to evaluate a piecewise-defined function for a given value of the domain. Let's look at an example.
Example #1: Find f(-1) and f(3). $$\ f(x)=\begin{cases}4 - x^3 & \text{if}\hspace{.2em}x ≤ 2 \\ -6 & \text{if}\hspace{.2em}x > 2 \end{cases}$$ Let's begin with f(-1). To find f(-1), we think about the rule associated with an x-value of -1. $$\text{if}\hspace{.2em}x ≤ 2 :$$ $$f(x)=4 - x^3$$ So we want to plug in a -1 for x here: $$f(-1)=4 - (-1)^3$$ $$f(-1)=4 + 1=5$$ $$f(-1)=5$$ Our second task is to find f(3). Here, the process is a bit easier. When x is greater than 2, f(x) or the function's value is just -6. $$f(3)=-6$$

Graphing a Piecewise-Defined Function

Additionally, we may be asked to graph a piecewise-defined function. Let's look at an example.
Example #2: Sketch the graph of each function. $$\ f(x)=\begin{cases}(x + 4)^2 & \text{if}\hspace{.2em}x ≤ -3 \\ 2x + 4 & \text{if}\hspace{.2em}x > -3 \end{cases}$$ graphing our piecewise defined function To get the graph of f(x) = (x + 4)2, we can grab a few points such as: $$(-7, 9)$$ $$(-6, 4)$$ $$(-4, 0)$$ $$(-3, 1)$$ To get the graph of f(x) = 2x + 4, we can use the y-intercept: $$(0, 4)$$ And then use the slope of 2 to get additional points. One additional point would be: $$(2, 8)$$

Skills Check:

Example #1

Find f(-1) $$\ f(x)=\begin{cases}x^2 & \text{if}\hspace{.2em}x ≤ 0 \\ 2x - 4 & \text{if}\hspace{.2em}x > 0 \end{cases}$$

Please choose the best answer.

A
$$f(-1)=-6$$
B
$$f(-1)=1$$
C
$$f(-1)=-1$$
D
$$f(-1)=3$$
E
$$f(-1)=2$$

Example #2

Find f(3) $$\ f(x)=\begin{cases}x - 1 & \text{if}\hspace{.2em}x ≤ -3 \\ x + 4 & \text{if}\hspace{.2em}x > -3 \end{cases}$$

Please choose the best answer.

A
$$f(3)=7$$
B
$$f(3)=2$$
C
$$f(3)=-4$$
D
$$f(3)=1$$
E
$$f(3)=9$$

Example #3

Find f(-2) $$\ f(x)=\begin{cases}x^2 - 3 & \text{if}\hspace{.2em}x ≤ 3 \\ (x - 3)^2 & \text{if}\hspace{.2em}x > 3 \end{cases}$$

Please choose the best answer.

A
$$f(-2)=25$$
B
$$f(-2)=13$$
C
$$f(-2)=9$$
D
$$f(-2)=1$$
E
$$f(-2)=8$$
checkmark x-mark
checkmark x-mark
checkmark x-mark

Congrats, Your Score is 100%

Trophy, You Win!

Better Luck Next Time, Your Score is %

Try again?

retry Trophy, You Win!