Piecewise and Step Functions
Evaluating, graphing, and modeling functions with intervals
Piecewise and Step Functions
Evaluating, graphing, and modeling functions with intervals
Math - Grade 9-12
- 1
Let f(x) = 2x + 1 for x < 0; f(x) = x^2 for 0 <= x <= 3; f(x) = 7 for x > 3. Find f(-2), f(0), f(3), and f(5).
Start by deciding which interval each input belongs to.
The values are f(-2) = -3, f(0) = 0, f(3) = 9, and f(5) = 7. Each input uses the rule for the interval that contains that input. - 2
Let g(x) = x + 4 for x < 2 and g(x) = 3x - 2 for x >= 2. Determine whether g is continuous at x = 2.
Compare the value coming from the left side with the actual value at x = 2.
The function is not continuous at x = 2. The left-hand value approaches 6, but g(2) = 4, so there is a jump at x = 2. - 3
Let h(x) = -1 for x < -2; h(x) = x + 1 for -2 <= x < 3; h(x) = 5 for x >= 3. State the domain and range of h.
The domain is all real numbers because every x-value is included in one of the intervals. The range is [-1, 4) union {5} because the middle rule gives values from -1 up to but not including 4, and the last rule gives 5. - 4
Describe the graph of p(x) = -2 for x <= 1 and p(x) = x + 1 for x > 1. Include open and closed circles.
A closed circle is used when the endpoint is included, and an open circle is used when it is not included.
The graph has a horizontal line at y = -2 for x <= 1 with a closed circle at (1, -2). It also has the line y = x + 1 for x > 1 with an open circle at (1, 2). - 5
Let s(x) = floor(x), where floor(x) means the greatest integer less than or equal to x. Find s(-1.2), s(0), s(2.9), and s(4).
The values are s(-1.2) = -2, s(0) = 0, s(2.9) = 2, and s(4) = 4. The floor function rounds down to the greatest integer that is not greater than the input. - 6
A shipping company charges $4 for a package with weight 0 < w <= 1 pound, $7 for 1 < w <= 3 pounds, and $10 for 3 < w <= 5 pounds. Write a piecewise function C(w) for the shipping cost.
Use the weight intervals as the conditions for each cost.
A correct piecewise function is C(w) = 4 for 0 < w <= 1; C(w) = 7 for 1 < w <= 3; and C(w) = 10 for 3 < w <= 5. The domain is package weights greater than 0 and up to 5 pounds. - 7
Let f(x) = x + 2 for x < 1; f(x) = 5 for 1 <= x < 4; f(x) = 2x - 3 for x >= 4. Solve f(x) = 5.
The solution set is 1 <= x <= 4. The middle rule equals 5 for every x from 1 up to but not including 4, and the last rule also gives 5 when x = 4. - 8
A graph is described as follows: y = 2 for x < 0 with an open circle at (0, 2); y = x + 1 for 0 <= x <= 2 with closed circles at both endpoints; y = 4 for x > 2 with an open circle at (2, 4). Write a piecewise rule for the graph.
A correct rule is y = 2 for x < 0; y = x + 1 for 0 <= x <= 2; and y = 4 for x > 2. The endpoint symbols in the description determine which inequalities are included. - 9
A taxi charges $5 for the first mile or any part of the first mile. It then charges $2 for each additional mile or part of a mile. Write a step function for the cost T(d) when 0 < d <= 4, and find T(2.3).
A partial mile counts as the next whole mile in this pricing model.
For 0 < d <= 4, the step function is T(d) = 5 for 0 < d <= 1; T(d) = 7 for 1 < d <= 2; T(d) = 9 for 2 < d <= 3; and T(d) = 11 for 3 < d <= 4. Since 2.3 is in the interval 2 < d <= 3, T(2.3) = 9 dollars. - 10
Find the value of k that makes f continuous at x = 2 if f(x) = 3x + k for x < 2 and f(x) = x^2 - 1 for x >= 2.
Set the two rules equal at the boundary x = 2.
The value is k = -3. For continuity at x = 2, the left side 3(2) + k must equal the right-side value 2^2 - 1, so 6 + k = 3 and k = -3. - 11
A movie theater charges $8 for ages 0 through 12, $12 for ages 13 through 64, and $6 for ages 65 and older. Write a step function M(a) for the ticket price based on age a.
A correct step function is M(a) = 8 for 0 <= a <= 12; M(a) = 12 for 13 <= a <= 64; and M(a) = 6 for a >= 65. The function has constant prices over different age intervals. - 12
Let q(x) = (x^2 - 4)/(x - 2) for x < 2; q(x) = 1 for x = 2; q(x) = 3x - 2 for x > 2. Find the left-hand limit, the right-hand limit, the two-sided limit, and identify the type of discontinuity at x = 2.
The left-hand limit is 4 because (x^2 - 4)/(x - 2) simplifies to x + 2 when x is not 2. The right-hand limit is 4 because 3(2) - 2 = 4. The two-sided limit is 4, but q(2) = 1, so the function has a removable discontinuity at x = 2.