Why Parameters Must Match in Two Ways
A piecewise formula can use one rule to the left of a point and another rule to its right. If the formulas contain unknown parameters, those parameters may be chosen to make the two pieces fit smoothly at the join.
There are two separate requirements. First, the function values must meet: otherwise there is a break in the graph. Second, the one-sided slopes must agree: otherwise the graph may have a corner. To make the function differentiable at the join, both requirements must be satisfied.
The equations for these requirements are often simple to write but easy to confuse. In particular, equating slopes does not automatically ensure that the function is continuous.
Continuity and Slope Matching
Consider a function defined by \(f(x)=g(x)\) for \(x<c\) and \(f(x)=r(x)\) for \(x\ge c\). In this convention, the value at the join is \(f(c)=r(c)\). The general continuity condition is that the left-hand limit equals the value at the join:
The right-hand limit must also equal \(f(c)\). If \(r\) is continuous from the right at \(c\), then \(\lim_{x\to c^+}r(x)=r(c)=f(c)\) already holds. If \(g\) is continuous at \(c\) as a branch formula, then the left condition reduces to \(g(c)=r(c)\). Without that continuity assumption, simply equating the branch formulas at \(c\) is not enough.
For differentiability, the left and right difference quotients at \(c\) must have finite, equal limits:
When the branch formulas extend continuously and differentiably to \(c\), and their values match there, these limits are their one-sided slopes \(g'(c)\) and \(r'(c)\). In that common setting, the practical equations are:
A Derivation from the Difference Quotient
The two matching conditions are not arbitrary. They follow directly from the definition of the derivative. Suppose the branch formulas extend to \(c\), are differentiable there, and \(f(c)=r(c)\). If the left branch also has \(g(c)=r(c)\), then for \(x<c\),
As \(x\to c^-\), this quotient approaches \(g'(c)\). For \(x>c\),
which approaches \(r'(c)\) as \(x\to c^+\). The two-sided derivative exists precisely when these one-sided limits are finite and equal. Thus value matching makes the quotients measure the branch slopes at the same function value, and slope matching makes their limits agree.
Worked Example: Solve for a Unique Pair of Parameters
Worked Example: Solve for a Unique Pair of Parameters
Find \(a\) and \(b\) so that the function below is differentiable at \(x=1\):
Step 1: Match the values. The right branch gives \(f(1)=1^2+1=2\). The left branch approaches \(a+b\) as \(x\to1^-\). Continuity requires
Step 2: Match the slopes. For the left branch, its difference quotient at \(1\) is
Its left-hand limit is therefore \(a\). For the right branch, the difference quotient is
As \(x\to1^+\), this approaches \(2\). Slope matching gives \(a=2\).
Step 3: Solve. Substitute \(a=2\) into \(a+b=2\):
Check: At \(x=1\), the function value from the right is \(2\), and the left branch tends to \(2(1)+0=2\). The left difference quotient is \(2\), and the right difference quotient tends to \(2\). Therefore \(f'(1)=2\), so the function is differentiable at the join.
Worked Example: A Family of Valid Parameters
Worked Example: A Family of Valid Parameters
For which values of \(a\) and \(b\) is the following function differentiable at \(x=2\)?
Step 1: Match the values. The left-hand value approaches \(2a\). At the join, the right branch gives
Thus continuity requires \(2a=8+2b\).
Step 2: Match the slopes using difference quotients. The left branch has slope \(a\), since \(\frac{ax-a(2)}{x-2}=a\). For the right branch, the difference quotient at \(2\) is
As \(x\to2^+\), the right-hand slope approaches \(4+b\). Hence slope matching requires \(a=4+b\).
Step 3: Solve the system. The value equation is \(2a=8+2b\), or \(a=4+b\). This is exactly the slope equation. Therefore there is not a unique pair: every pair satisfying \(a=4+b\) works.
Check with one choice: Let \(b=1\), so \(a=5\). Both branch values at the join are \(10\): the left limit is \(5(2)=10\), and the right value is \(4+2+4=10\). The left slope is \(5\), and the right difference quotient approaches \(4+1=5\). Thus this choice is differentiable at \(x=2\), with derivative \(5\).
Worked Example: When No Parameters Can Work
Worked Example: When No Parameters Can Work
Determine whether any values of \(a\) and \(b\) make this function differentiable at \(x=2\):
Step 1: Write the value condition. The left limit at \(2\) is \(2a+1\). The function value from the right branch is \(4+2b+4=8+2b\). Continuity requires
Step 2: Write the slope condition. The left branch has slope \(a\). The right difference quotient is
so its limit at \(2\) is \(4+b\). Slope matching requires \(a=4+b\).
Step 3: Test whether the equations are compatible. Substituting \(a=4+b\) into the value equation gives
This is impossible. Therefore no choices of \(a\) and \(b\) make the function differentiable at \(x=2\). The contradiction shows that even though parameters can be chosen to match slopes, the value requirement cannot be met at the same time.
Check: The failed equation \(9=8\) does not depend on the parameter values, so there is no exceptional choice left to test.
A Common Mistake: Matching Slopes but Not Values
Consider \(f(x)=x\) for \(x<0\) and \(f(x)=x+1\) for \(x\ge0\). Both branches have slope \(1\). A mistaken argument might say, “The slopes agree, so the function is differentiable at \(0\).” But the left-hand limit is \(0\), while \(f(0)=1\). The function is not continuous at \(0\), and therefore it is not differentiable there.
The correction is to check the value condition before concluding differentiability. Equal one-sided slopes are not sufficient when the function has a jump at the join.
A Reliable Procedure for Choosing Parameters
For the convention \(x<c\) and \(x\ge c\), the right branch determines \(f(c)\). Use limits to check the other side.
Set the left-hand limit equal to \(f(c)\); also ensure the right-hand limit equals \(f(c)\).
Use the difference quotient at the join, or the branch derivative when the branch is differentiable there.
Combine it with the value equation. The system may have one solution, many solutions, or no solution.
Substitute the parameter values into the function values and the one-sided slope limits.
Why the Method Matters
Parameter conditions turn a visual idea—two pieces meeting smoothly—into a precise algebra problem. The value equation controls whether the graph joins continuously. The slope equation controls whether its local rates of change agree. Solving both gives a reliable test rather than a guess based on the appearance of a graph.
Always state what the equations mean and check the resulting parameters in the original piecewise definition. A system may be inconsistent, as in the third example, or dependent, as in the second. Either outcome is mathematically meaningful.
Check Your Understanding
For each question, distinguish the value condition from the slope condition.
- For \(f(x)=ax+1\) when \(x<1\), and \(f(x)=x^2+b\) when \(x\ge1\), write the equations required for differentiability at \(x=1\).
- Why is \(g(c)=r(c)\) not, by itself, the general continuity condition for a piecewise join?
- Can two branches have equal one-sided slopes while the piecewise function is not differentiable? Explain with a value mismatch.
- What does it mean if the value and slope equations reduce to the same equation?
- What must be checked after solving parameter equations?