2.7 Piecewise Functions
2.7 Piecewise Functions
What is a Piecewise Function?•A function that combines pieces of different equations.•Each piece is for a different domain (set of x values).• Example:
Why Are They Important?•In real life, lots of problems are modeled by piecewise functions.•Examples:▫Finding shipping costs▫Income taxes▫Ordering t-shirts
Examples:
Writing Piecewise Functions
•We know how to graph, now go backwards!
•First, find the domains (where the graph is cut)
•Then, find the slopes and y-intercepts.•Fill in the equation for each domain.•Example:
___ x + ___ , if x ______
___ x + ___ , if x ______
Example:
___ x + ___ , if x ______
___ x + ___ , if x ______
Your Turn!
___ x + ___ , if x ______
___ x + ___ , if x ______
Evaluating from a Graph•Move left/right to the x you need, then move up/down to find y.
•Example:•Evaluate f(x) for the function shown when:
•x = -3•x = -1•x = 2
Your Turn!•Evaluate f(x) for the function shown when:
•x = -1•x = 1•x = 2•x = 4
Evaluating Piecewise Functions•The domain tells you which equation to use.
•Evaluate f(x) when:a)x = 0b)x = 2c)x = 4
Your Turn!
•Evaluate f(x) when:•x = 0•x = 3•x = 6
Step Functions
Each piece of the function is a flat, horizontal line.