{{ 'ml-label-loading-course' | message }}

{{ tocSubheader }}

{{ 'ml-toc-proceed-mlc' | message }}

{{ 'ml-toc-proceed-tbs' | message }}

An error ocurred, try again later!

Chapter {{ article.chapter.number }}

{{ article.number }}. # {{ article.displayTitle }}

{{ article.intro.summary }}

Show less Show more Lesson Settings & Tools

| {{ 'ml-lesson-number-slides' | message : article.intro.bblockCount }} |

| {{ 'ml-lesson-number-exercises' | message : article.intro.exerciseCount }} |

| {{ 'ml-lesson-time-estimation' | message }} |

The aim of this lesson is to graph functions that are defined differently for different parts of their *domains*.
### Catch-Up and Review

**Here are a few recommended readings before getting started with this lesson.**

Challenge

Mark always likes to have cans of his favorite soft drink in the refrigerator so that he can enjoy a cold drink whenever he wants.

At the beginning of the week, he had $11$ cans in the fridge. Over the week, Mark wrote down each time cans were consumed or added.

- On Monday, Mark drank $1$ can.
- On Wednesday, Mark bought $2$ cans at a convenience store and put them into the fridge.
- On Friday, Mark had a party and a total of $10$ cans were consumed.
- On Saturday, Mark bought a $12-$pack of soda from a supermarket and put them away in the refrigerator.

a How can the number of cans in the fridge be written as a function?

b Graph the number of cans in the refrigerator over the week.

Discussion

A piecewise function is a function that is defined differently for different parts of its domain. These functions are commonly defined using intervals or inequalities. Consider the following example.

$f(x)={-x−2,2x+1, ifx<0ifx≥0 $

This function is defined as one linear function for values of $x$ less than $0,$ and a different linear function for values of $x$ that are at least zero. The graph of $f$ is obtained by graphing the two rays. It should be noted that both rays represent the same function. For every function, each input can correspond to only one output. Therefore, when two pieces of a piecewise function share a limit value, only one of the pieces can be defined for that value. It can be seen in the example function for $f$ that only the second piece is defined for $x=0.$ Additionally, it is possible for a piecewise function to be undefined for some intervals.Pop Quiz

A piecewise function $f$ is shown below. For every given value of $x,$ find the correct value of $f(x).$ Round the result to two decimal places, if necessary.

Discussion

When graphing a piecewise function, each piece must be considered separately. First, a piece is graphed for the values of its domain. Then an end — or ends — of the piece are marked with one of the following.

- A closed circle for an $x-$value for which the function is defined.
- An open circle for an $x-$value for which the function is undefined.

$f(x)={4x+6,-x+3, ifx≤-1ifx>-1 $

Now, each piece will be considered one at a time. Then, the graphs will be combined.
1

First Piece

The first piece is $f(x)=4x+6.$ This is a linear function written in slope-intercept form. The function can be graphed by using the $y-$intercept and the slope.

Now, since the function is limited to inputs less than or equal to $-1,$ the line will be graphed until it reaches $x=-1.$ Since the inequality $x≤-1$ is non-strict, the function is defined for $x=-1$ and the circle will be closed.

2

Second Piece

A similar process can be repeated to graph the second piece $f(x)=-x+3.$ First, the line will be graphed.

This piece is defined for values of $x$ greater than $-1.$ This means that the line will be drawn starting at $x=-1.$ Also, since the inequality is strict, the circle will be open.

3

Combining the Graphs

Finally, the pieces will be graphed together in the same coordinate plane to complete the graph. It is important to pay attention to the limit points, since each value of $x$ must be assigned to only one value of the function.

Example

On his summer vacation, Heichi often rides his bike to a nearby beach. Today he is going to meet a friend there.
### Answer

### Hint

### Solution

After leaving his house, Heichi bikes at $15$ miles per hour for one hour until he reaches the beach. He spends $5$ hours at the beach, then goes back to his house at $10$ miles per hour. He arrives at back home an hour and a half after leaving the beach.

a Write a piecewise function that describes Heichi's distance from home as a function of time.

b Graph the function written in Part A.

a $f(t)=⎩⎪⎪⎨⎪⎪⎧ 15t,15,-10t+75, if0≤t≤1if1<t≤6if6<t≤7.5 $

b

c The domain consists of the number of hours betweeen $0$ and $7.5$ hours. The range is all the possible distances between $0$ and $15$ miles from his house.

a Determine a function rule for each part of Heichi's trip.

b Graph each piece one at a time.

c Where does the function written in Part A start? Where does it end?

a To begin with, for the first hour, Heichi bikes at $15$ miles per hour. This speed can be used to write the first piece of the desired function. It is important to remember that the distance traveled is the product of the speed and the travel time.

$f(t)=⎩⎪⎪⎨⎪⎪⎧ 15t,? ? if0≤t≤1 $

Since Heichi was biking at $15$ miles per hour for one hour, he traveled $15$ miles in this interval. In the next piece, the value of the function is constant at $15$ for the values of $t$ between $1$ and $6$ because he is just hanging out at the beach for these $5$ hours.
$f(t)=⎩⎪⎪⎨⎪⎪⎧ 15t,15,? if0≤t≤1if1<t≤6 $

Finally, when Heichi goes home, he bikes at $10$ miles per hour. Since he is returning home, the distance from his house will decrease. Therefore, the distance traveled is written as the product of $-10$ and $t.$ $-10t $

Also, since Heichi arrives at home one and a half hours later, the final value of the last piece should be $7.5$ hours after the beginning of the trip. Therefore, the function needs to be translated $7.5$ units right by subtracting $7.5$ from $t$ before multiplying by $-10.$
$-10(t−7.5)=-10t+75 $

Finally, it is possible to write the complete function rule by adding this final piece.
$f(t)=⎩⎪⎪⎨⎪⎪⎧ 15t,15,-10t+75, if0≤t≤1if1<t≤6if6<t≤7.5 $

b To graph the obtained piecewise function, each piece will be graphed one at a time on the same coordinate plane. First, the graph of $15t$ from $0$ to $1$ can be drawn by using the slope $15$ and the $y-$intercept $0.$ Since the limit inequalities are non-strict, the border points will be closed.

The second piece of the function is the horizontal line $f(t)=15.$ Also, since the inequality is non-strict, the circle at $t=6$ will be filled.

Now, the $x-$intercept can be used to graph the third and final piece. From Part A, it is known that the $x-$intercept is $7.5.$

Finally, the graph of the piecewise function is completed.

c From Part A, it can be seen that the function is defined for times between $0$ and $7.5$ hours, inclusive. Therefore, the domain of the function consists of all the real numbers in that interval.

$Domain [0,7.5] $

The function's output represents how far Heichi is from his house. Looking at the graph, it can be seen that the minimum value of the function is $0,$ when Heichi is at his house, and the maximum value is $15,$ when Heichi is at the beach. While he is biking between his house and the beach, all distances from $0$ to $15$ are reached. $Range [0,15] $

Discussion

A step function is a piecewise function that is defined by a constant value on each part of its domain. As an example, consider the following function.

$f(x)=⎩⎪⎪⎪⎪⎨⎪⎪⎪⎪⎧ 0,2,4,6, if0≤x<1if1≤x<2if2≤x<3if3≤x<4 $

The graph of a step function consists of horizontal line segments, which can be interpreted as steps. The graph of the given function has four line segments. Example

As a summer activity, Tearrik participates in charity events for his community. He is volunteering for a food drive event this weekend.

He went to a shopping center multiple times over the week to collect boxes of food for the food drive. On each day, he collected the following number of boxes.

- $5$ boxes on Monday
- $3$ boxes on Tuesday
- $2$ boxes on Wednesday
- $3$ boxes on Thursday
- $4$ boxes on Friday

$f(x)=⎩⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎧ 0,5,8,10,13,17, if0≤x<1if1≤x<2if2≤x<3if3≤x<4if4≤x<5if5≤x<6 $

First, the domain of the function must be determined. The domain can be defined as the given days of the week, starting with the Sunday before Tearrik started collecting the boxes as $x=0.$ Since Tearrik makes his first pickup on Monday, he starts with zero boxes on Sunday $x=0.$

Finally, the function rule of the step function can be written based on the table.

$f(x)=0,if0≤x<1 $

On Monday, since one day has passed from Sunday, $x=1.$ On this day, Tearrik collected his first $5$ boxes. $f(x)=5,if1≤x<2 $

On the following days, Tearrik collected more boxes. The boxes picked up each day were added to the number of boxes collected previously. Using this information, the pieces can be written in a table. Day | Collected Boxes | Boxes in Total | $x$ | $f(x)$ |
---|---|---|---|---|

Sunday | - | $0$ | $0≤x<1$ | $0$ |

Monday | $5$ | $0+5=5$ | $1≤x<2$ | $5$ |

Tuesday | $3$ | $5+3=8$ | $2≤x<3$ | $8$ |

Wednesday | $2$ | $8+2=10$ | $3≤x<4$ | $10$ |

Thursday | $3$ | $10+3=13$ | $4≤x<5$ | $13$ |

Friday | $4$ | $13+4=17$ | $5≤x<6$ | $17$ |

$f(x)=⎩⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎧ 0,5,8,10,13,17, if0≤x<1if1≤x<2if2≤x<3if3≤x<4if4≤x<5if5≤x<6 $

Discussion

Since step functions are piecewise functions, to graph them, each piece must be considered separately. First, each piece is graphed in its domain as a part of a horizontal line. The end or ends are then marked with one of the following.

- A closed circle for an endpoint that is included in the function rule.
- An open circle for an endpoint that is not included in the function rule.

$f(x)=⎩⎪⎪⎨⎪⎪⎧ 1,3,5, if0≤x<2if2≤x<4if4≤x<6 $

For this example, one piece will be graphed in detail, then the other pieces will be graphed by following a similar process.
1

Graph a Horizontal Line

The first piece is defined over the interval $0≤x<2.$ This piece will be graphed by drawing a horizontal line at $y=1$ from $x=0$ to $x=2.$

2

Drawing Endpoints

It can be noted that $x=0$ is included in the domain of the first piece, but $x=2$ is not. Therefore, the left end of the segment will be marked with a closed circle and the right end with an open circle.

3

Graph the Other Pieces

Then, the same process is repeated for each piece of the function.

Example

Zain is working as a server in a restaurant for a week before their summer vacation ends.

Most of their payment comes from the tips they receive. Zain made note of how much they received in tips, starting from Monday and through their last day working on Saturday.

- $$49.50$ on Monday
- $$38.17$ on Tuesday
- $$41.45$ on Wednesday
- $$58.33$ on Thursday
- $$60.55$ on Friday
- $$57.00$ on Saturday

a Write a step function that describes the tips that Zain received during the week.

b Graph the function written in Part A.

a $f(x)=⎩⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎧ 0,49.50,87.67,129.12,187.45,248.00,305.00, if0≤x<1if1≤x<2if2≤x<3if3≤x<4if4≤x<5if5≤x<6if6≤x<7 $

b

a Determine the domain of the function.

b Graph each piece separately.

a The first thing to consider when writing a function is the domain. The domain of this function is defined as the days of the week, starting from the Sunday before Zain's week of work. This Sunday will be marked as $x=0.$ Each day of the week will correspond to the next consecutive integer.

$f(x)=0,if0≤x<1 $

This indicates that Zain received $$0$ in tips on Sunday before they start working. On Monday $x=1,$ Zain received $$49.50$ in tips. This defines the next piece of the function.
$f(x)=49.50,if1≤x<2 $

Since the function reflects the total amount of money Zain receives in tips, the value of each of the pieces can be determined by adding the new tip value to the total tip amount from the day before. Using this information, the pieces can be written in a table. Day | Tips Received | Total Tips | $x$ | $f(x)$ |
---|---|---|---|---|

Sunday | - | $0$ | $0≤x<1$ | $0$ |

Monday | $49.50$ | $0+49.50=49.50$ | $1≤x<2$ | $49.50$ |

Tuesday | $38.17$ | $49.50+38.17=87.67$ | $2≤x<3$ | $87.67$ |

Wednesday | $41.45$ | $87.67+41.45=129.12$ | $3≤x<4$ | $129.12$ |

Thursday | $58.33$ | $129.12+58.33=187.45$ | $4≤x<5$ | $187.45$ |

Friday | $60.55$ | $187.45+60.55=248.00$ | $5≤x<6$ | $248.00$ |

Saturday | $57.00$ | $248.00+57.00=305.00$ | $6≤x<7$ | $305.00$ |

$f(x)=⎩⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎧ 0,49.50,87.67,129.12,187.45,248.00,305.00, if0≤x<1if1≤x<2if2≤x<3if3≤x<4if4≤x<5if5≤x<6if6≤x<7 $

b To graph a step function, each piece should be graphed separately on the same coordinate plane. The first section is a horizontal line at $0,$ limited to $x=0$ and $x=1.$ The first circle will be closed and the second will be open.

The next piece is the horizontal segment at $49.50$ with a closed endpoint at $x=1$ and an open endpoint at $x=2.$

The remaining pieces can be added to the graph by following the same process.

Discussion

The greatest integer function, also known as the floor function, assigns the largest integer that is less than or equal to the value of $x.$ This function is usually written as $f(x)=⌊x⌋$ or $f(x)=∥x∥.$ Consider the following examples.

$⌊-2⌋⌊-1.5⌋⌊-0.01⌋⌊1⌋⌊1.25⌋ =-2=-2=-1=1=1 $

It can be noted that if $x$ is an integer, the function returns the same value. $⌊-2⌋=-2⌊0⌋=0⌊1⌋=1 $

Otherwise, it returns the closest integer at the left of $x$ in a number line.
Considering more values can help understand how to draw the graph of the function.

$x$ | $f(x)=⌊x⌋$ |
---|---|

$-1$ | $-1$ |

$-0.75$ | $-1$ |

$-0.5$ | $-1$ |

$-0.25$ | $-1$ |

$0$ | $0$ |

$0.5$ | $0$ |

$1$ | $1$ |

$1.25$ | $1$ |

$1.75$ | $1$ |

$1.99$ | $1$ |

$2$ | $2$ |

From the table above, it can be seen that the function only changes its value when a new integer is reached. It can be noted that the greatest integer function is a step function. Its graph is presented as follows.

The domain of the function is the set of all real numbers, but its range is the set of integers. A filled point indicates that the point is part of the graph, while an open point indicates that it is not.Example

Dominika is going to a movie at a local theater on her last day of vacation.

The cost to park in the theater lot is $$10$ for less than an hour. An additional $$2.50$ is charged for each hour of parking.

a Write the greatest integer function that describes the prices of the mall's parking lot.

b Graph the function obtained in Part A.

a

$f(x)=2.5⌊x⌋+10$

b

a If $$2.50$ is charged every hour, only the integer part of the number of hours determines parking charges.

b Start with the graph of the greatest integer function. Then, apply transformations to modify the graph.

a The first thing to notice to write the function is that $$2.50$ is charged for each hour of parking. This means that as soon as one hour is reached, $$2.50$ is added to the total cost of parking. At the two hour mark, the next $$2.50$ is charged. This can be written by multiplying $⌊x⌋$ by $2.5,$ where $x$ is the parking time in hours.

$f_{1}(x)=2.5⌊x⌋ $

Additionally, the lot requires an initial payment of $$10$ for the first $59$ minutes of parking. This information can be used to add $10$ to the value of the obtained function $f_{1}.$
$f(x)=2.5⌊x⌋+10 $

This completes the required function, as the price to enter is considered and $$2.50$ is added as each hour is reached.
b This function can be graphed by modifying the graph of the greatest integer function. Since only the positive values of $x$ are relevant, the graph will be considered only in the first quadrant. This graph is shown as follows.

Next, since the greatest integer function is multiplied by $2.5,$ each value of $y$ is multiplied by $2.5,$ vertically stretching the spaces between each horizontal segment.

Then, since $10$ is added to the product, each segment is translated vertically $10$ units up.

Finally, the scope of the coordinate plane will be adjusted so that more steps of the graph can be seen.

Example

During his summer vacation, Ignacio went to private math lessons. After learning about the greatest integer function, Ignacio was asked by his math tutor to graph the numbers $y$ greater than or equal to $⌊x⌋.$

Help Ignacio with his answer and graph the inequality $y≥⌊x⌋.$Graph the greatest integer function. Then, determine the solution set by shading the appropriate region.

The first step to graph an inequality is to graph the border function. The border function of the given inequality is given by the greatest integer function. This function is a step function whose output is the *greatest integer less than or equal* to the input $x.$ Note that the inequality is non-strict, so the horizontal lines are drawn as solid lines.

Finally, the following is the complete graph of the inequality that the teacher asked for.

Closure

At the beginning of this lesson, it was asked that a function for the number of soda cans in Mark's refrigerator be written. Mark starts the week with $11$ cans in the fridge and then does the following.

- On Monday, Mark drank $1$ can.
- On Wednesday, Mark bought $2$ cans at a convenience store and put them into the fridge.
- On Friday, Mark had a party and a total of $10$ cans were consumed.
- On Saturday, Mark bought a $12-$pack of soda from a supermarket and put them away in the refrigerator.

a How can the number of cans in the fridge be written as a function?

b Graph the number of cans in the refrigerator over the week.

a $f(x)=⎩⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎧ 11,10,12,2,14, if0≤x<1if1≤x<3if3≤x<5if5≤x<6if6≤x<7 $

b

a The first thing to do when writing a function is to determine its domain. In this case, the domain can be written as the number of days passed from the beginning of the week, starting from Sunday as $x=0.$ With the given information, it is possible to write the first part of the piecewise function.

$f(x)=11,if0≤x<1 $

Mark drank one can of soda on Monday. Therefore, he has now $11−1=10$ cans left in the fridge that day. Also, since he neither drank nor bought any soda on Tuesday, the function's output is still $10$ until Wednesday, when $x=3.$
$f(x)=10,if1≤x<3 $

Mark bought $2$ cans on Wednesday, meaning that there are $10+2=12$ cans of soda in the fridge that day. Since he neither bought nor drank any of the soda in the refrigerator on Thursday, he has $12$ cans until Friday.
$f(x)=12,if3≤x<5 $

At Friday's party, a total of $10$ cans were drunk. Therefore, he has $12−10=2$ cans left in the refrigerator for Saturday. Then, on Saturday, he bought a $12-$pack of soda cans, making it for $2+12=14$ cans in the refrigerator for that day. Because no more information was given, the whole function rule can now be written.
$f(x)=⎩⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎧ 11,10,12,2,14, if0≤x<1if1≤x<3if3≤x<5if5≤x<6if6≤x<7 $

b Since every part of this function is a constant value, this is a step function. The graph of a step function consists of horizontal lines limited to specific inputs. It is important to remember the values for which the inequality for $x$ is strict or non-strict.

Loading content