[6.3] Piecewise Functions Piecewise Functions

[6.3] Piecewise Functions
Alg2/Trig
Review of [6.3], [6.5], [6.6]
Piecewise Functions
Definition: A piecewise function is a function whose definition changes over different parts of its domain.
EX:
2
if x < 0
 x
y= 2
− x − 1 if x ≥ 0
Notice that the break in the domain happens when x=0. For values of x smaller than 0
we will graph y = x 2 . For values of x greater than 0 we will graph y =
− x 2 − 1 . When
x actually equals 0 we plot the point on the side with y =
− x 2 − 1 because the domain
on that side has an inequality that includes the endpoint. Always be sure to check that
your graph passes a vertical line test where the break in the domain happens. In other
words, we can’t have closed circles at the ends of both branches since that would fail
the vertical line test.
EX:
− x − 2 if x < −1

=
y x
if − 1 ≤ x < 1
2 x
if x ≥ 1

This example has 3 distinct definitions since the domain is divided into 3
sections. This means there are 2 break points in the domain. Be sure each
of these two break points passes a vertical line test. Notice that when x=-1,
the two piece meet. When this happens, you do not need to show an open
circle for the x<-1 section since that circle is exactly filled in by the adjacent
piece.
EX:
−2 if x ≤ −1

=
y  x if − 1 < x < 1
2 if x ≥ 1

This function is not continuous at x=-1 or at x=1 even though the
function is defined for all values of the domain.
Domain: All real numbers
Range: y=-2, y=2, and −1 ≤ y ≤ 1
Greatest Integer Functions
Definition: The greatest integer function, denoted by x , represents the greatest integer less than or equal to x.
Another name for the greatest integer function is the “floor” function. You might see this name on a graphing calculator
or an online graphing calculator like Desmos.
EX:
Parent Graph: y = x 
Remember that integer values of x return y-values that
are the same integer. Non-integer values of x always
return with the integer to the left of x on the number
line. This is true for both positive and negative values.
The function has open circles to the right of each line
segment and closed circles to the left.
EX:
y = 2 x 
This can be thought of as a horizontal compression by a factor of ½.
When evaluating, be sure to multiply by 2 first. If the result is an
integer, then that is the output. If the result is a non-integer, then
take the greatest integer less than the result. Notice from the graph
that the length of each segment is only half of a unit.
EX:
y = 2 x 
This can be thought of as a vertical stretch by a factor of 2. When
evaluating, be sure to take the greatest integer of x first. Then,
multiply the result by 2. Notice from the table that the y-values
are jumping up by 2.
EX:
y = − x 
This can be thought of as a flip over the x-axis.
EX:
y=
− x 
This can be thought of as a flip over the y-axis. Notice that the open circles are to
the left and the closed circles are to the right.
[6.5] Operations with Functions
Function notation for adding, subtracting, multiplying and dividing is introduced in this section.
Adding Functions:
f ( x ) + g ( x ) can be written as ( f + g )( x )
Subtracting Functions:
f ( x ) − g ( x ) can be written as ( f − g )( x )
Multiplying Functions:
f ( x ) ⋅ g ( x ) can be written as ( fg )( x )
Dividing Functions:
f ( x)
 f 
can be written as   ( x )
g ( x)
g
EX:
=
f ( x)
a)
x
=
g ( x ) 4 x2
1− x
Find ( f + g )( x ) .
(f
+ g )( x )
= f ( x) + g ( x)
x
=
+ 4x2
1− x
4 x 2 (1 − x )
x
=
+
1− x
1− x
2
x + 4 x − 4 x3
=
1− x
( f + g )( 2 )
( f + g )( 2 )
= f ( 2) + g ( 2)
b) Find
2
2
+ 4 ( 2)
1− 2
2
=
+ 16
−1
=−2 + 16
= 14
=
c) Find
( f + g )( 2 ) by plugging in to part a.
x + 4 x 2 − 4 x3
( f + g )( x ) =
1− x
2 + 4 ( 2) − 4 ( 2)
( f + g )( 2 ) =
1− 2
2 + 16 − 32
=
−1
= 14
2
3
EX:
f ( x=
) 3x 2 g ( x=)
( x + 2)
a) Find ( f ⋅ g )( x ) .
( f ⋅ g )( x )
= f ( x) ⋅ g ( x)
= 3 x 2 ⋅ ( x + 2)
= 3x3 + 6 x 2
( f ⋅ g )( −3)
f ( −3) ⋅ g ( −3)
2
3 ( −3) ⋅ (−3 + 2)
27 ⋅ ( −1)
b) Find
=
=
=
( f ⋅ g )( −3) by plugging in to part a.
3x3 + 6 x 2
( f ⋅ g )( x ) =
3
2
( f ⋅ g )( −3) = 3 ( −3) + 6 ( −3)
c) Find
= −27
=
−81 + 54
= −27
EX:
Sketch the sum of the functions:
− x2 + 1
f ( x ) =+
x 1 g ( x) =
( f + g )( x )
=− x 2 + x + 2
EX:
Sketch the sum of the functions by looking at the graph.
[6.6] Functions and Their Inverses
Definition: An equation represents a function if it passes the vertical line test.
Definition: A function is one-to-one if it passes the horizontal line test (in addition to the vertical line test).
To find an inverse algebraically, switch x and y and solve for the new y. This means the domain of f ( x ) becomes the
−1
−1
range of f ( x ) . Also the range of f ( x ) becomes the domain of f ( x ) .
To find an inverse graphically, reflect f ( x ) across the line y = x to find f −1 ( x ) . Or… you can plot some points on
f ( x ) and reverse the coordinates to plot points on f −1 ( x ) .
Note: If we want f −1 ( x ) to be a function, then we may need to restrict the domain of f ( x ) to be sure it passes a
horizontal line test.
EX: A parabola opening sideways has a parabola opening up as its inverse. If you start with half a parabola, you end up
with half a parabola. Recall that f ( x ) = − 2 x is the lower half of a parabola that opens sideways.
−1
Question: Given f ( x ) = − 2 x . Find the inverse of f ( x ) algebraically. Then graph f ( x ) and f ( x ) .
Inverse :
x = − 2y
−x = 2 y
(−x)
2
2y
=
Notice that f ( x ) is one-to-one and both are functions.
1 2
x =y
2
1
f −1 ( x ) = x 2
2
EX: The inverse of an exponential function is a logarithmic function.
y
Recall how to change formats between
the two. x a=
=
becomes y log b x .
Recall the two parent graphs:
y = 2x
y = log 2 x
Question: Given y = 103 x . Find the inverse of f ( x ) algebraically. Then graph f ( x ) and f −1 ( x ) .
Inverse:
x = 103 y
log x = 3 y
1
log x = y
3
1
f −1 ( x ) = log x
3
Problems 1-6: Graph the following functions on graph paper. Be sure you give extra thought to where open circles are
and where closed circles are. Remember you can check your answers on the Desmos website or with a graphing
calculator.
1.
3 x if x < 0

y = 1
 3 x if x ≥ 0
2.
e if x ≤ 1
y=
ln x if x > 1
3.
 x + 5 if x ≤ −2

y = − x if − 2 < x < 4
 x − 4 if x ≥ 4

x
4.
y = − 2 x 
5.
=
y 4 − x 
y 2 x − 3
6.=
Problems 7-8: Given the graphs of f ( x ) and g ( x ) , graph the following.
7.
( f + g )( x )
8.
( f − g )( x )
f ( x)
f ( x)
g ( x)
g ( x)
Problems 9-10: Given the graphs of f ( x ) and g ( x ) , graph the following.
9.
( f + g )( x )
10.
( f − g )( x )
f ( x)
f ( x)
g ( x)
g ( x)
Problems 11-12: Given the graph of f ( x ) , draw the graph of f −1 ( x ) .
11.
12.
k ( x ) 2 3 x − 1
Problems 13-20: Use the following functions. f ( x=
) x 2 − 4 g ( x )= 5 − x 2 h ( x )= x − 2 =
( f + g )( x )
13.
)( 3)
1
2
7
20. k  
2
 f 
( x)
h
19. k  
14. 
15. ( g ⋅ h )( x )
16.
18. ( g − f
( f ⋅ h )(1)
 f 
 ( 2)
h
17. 
Problems 21-26: Given f ( x ) , find f −1 ( x ) . Determine whether the inverse is a function and state the domain and
range of the inverse.
21. f ( x=
) x2 + 2
3
22. f ( x ) = 2 x
2
23. f ( x ) = ln x
24. f ( x ) = 3
25. f ( x=
)
1
x
2
4 − x2
− x 2 − 1 for the domain x ≤ 0.
26. f ( x ) =
Problems 27-30: More practice.
27.
28.
29.
30.