The Piecewise Repair Bill
A small fabrication shop models the cost of a rush job with a piecewise function. For a job requiring x hours of machine time (0 ≤ x ≤ 10), the quoted price in dollars is
f(x) = (x² − 4x + 7) for 0 ≤ x < 3, f(x) = (A·x + B) for 3 ≤ x ≤ 10.
The shop owner insists the price curve must be continuous at x = 3 so that customers aren't surprised by a jump at the boundary. She also wants the curve to have a finite, well-defined slope from the right at x = 3, and she claims that if the two pieces meet at x = 3, the whole function is automatically differentiable there. A customer is quoted a price for exactly 3 hours of machine time and separately for 3.001 hours; the owner is worried the two quotes will disagree.
1. Using the continuity requirement, find the relationship between A and B. Then determine whether the owner's claim (that meeting at x = 3 guarantees differentiability) is correct, computing the left- and right-hand derivatives at x = 3.
Read the worked answer
Continuity at x = 3. The left limit is (3)² − 4(3) + 7 = 9 − 12 + 7 = 4. The right value is 3A + B. Setting equal: 3A + B = 4, so B = 4 − 3A.
Left derivative. For the quadratic piece, f′(x) = 2x − 4, so the left-hand slope at 3 is 2(3) − 4 = 2.
Right derivative. The linear piece has slope A everywhere.
So differentiability at x = 3 requires A = 2 (and then B = 4 − 6 = −2). Continuity alone gives only 3A + B = 4; it does not force A = 2. The owner's claim is false: continuity is necessary but not sufficient. Unless A = 2, the curve has a corner at x = 3 with different one-sided slopes.
2. The owner wants the quote at exactly 3 hours to match the limiting quote as hours approach 3 from the right, and she wants no corner. State the values of A and B that achieve this, and explain what goes wrong for the customer's two quotes (3 hours vs. 3.001 hours) if instead A = 5.
Read the worked answer
Required values: A = 2, B = −2. Then f(3) = 2(3) − 2 = 4, matching the left limit, and both one-sided slopes equal 2, so f is differentiable at 3.
If A = 5: continuity forces B = 4 − 15 = −11. Then f(3) = 4 (still continuous), but the right-hand slope is 5 while the left-hand slope is 2. Near x = 3 the price rises about 5 dollars per hour on the right and 2 dollars per hour on the left. The quotes themselves do not jump - f(3) = 4 and f(3.001) ≈ 4 + 5(0.001) = 4.005 - but the rate changes abruptly, so a marginal-cost estimate taken just below 3 hours (≈ $2/hr) badly understates the actual right-side rate (≈ $5/hr). The corner is the problem, not a discontinuity.