Algebra 2 Lesson 2.7 – Piecewise Functions
In real life problems, functions can be represented by a combination of equations, each corresponding to a part of the domain. Such functions are called piecewise functions. For example,
2x-1, if x 1f(x)=
3x+1, if x>1
Example 1: Evaluate f(x) when
a. x=0
b. x=2
c. x=4
x+2, if x<2
f(x)=
2x+1, if x 2
a. x=0
b. x=2
c. x=4
f(0)=0+2=2
f(2)=2(2)+1=5
f(4)=2(4)+1=9
Evaluate f(x) when
a. x=-4
b. x=-2
c. x=0
d. x=5 5x-1, if x<-2
f(x)=
x-9, if x -2
a. x=-4
b. x=-2
c. x=0
d. x=5
f(-4)=5(-4)-1=-21
f(-2)=-2-9=-11
f(0)=0-9=-9
f(5)=5-9=-4
You try page 117, #21 & 25
x y
1 2
2 4
3 6
21. 2x if x>=1 -x+3 if x <1
x y
1 2
0 3
-1 4
x y
4 -2
3 -5
0 -14
25. 3x-14 if x<4 -2x+6 if >4
x y
4 -2
5 -4
6 -6
Write the equation for the piecewise function
whose graph is shown below.
f(x)=
5 11, if 3
4 4x x
2 1, if 3
7 7x x
f(x)=
Write the equation for the piecewise function
whose graph is shown below.
5, if 1x x
2 2, if 1x x
f(x)=
Write the equation for the piecewise function
whose graph is shown below.
6 4, if 4
5 5x x
4, if - 4 3x
3 11, if 4
5 5x x
f(x)=
Write the equation for the piecewise function
whose graph is shown below.
2 8, if 2
3 3x x
4, if 2 9x
3 23, if 9x x
Greatest Integer Function
For every real number x, f(x) is the greatest integer less
than or equal to x.
Example 5
a. Write and graph a piecewise function for the
parking charges shown on a sign
b. What are the domain and range of the
function?
Garage Rates (weekends)
$3 per half hour
$8 maximum for 12 hours3, if 0<t<=0.5
a. f(x) = 6, if 0.5<t<=18, if 1<t<=12
b. Domain is 0<t<=12, and the
range consists of 3, 6, 8
Example 6
You have a summer job that pays time and a half
for overtime. That is, if you work more than 40 hours
per week, your hourly wage for the extra hours is
1.5 times your normal hourly wage of $7.
a. Write and graph a piecewise function that gives
your weekly pay P in terms of the number h of
hours you work.
7(40)+1.5(7)(h-40) =10.5h-140
Piecewise function
7h, if 0<=h<=40
P(h)=10.5h-140 if h>40