Why a Join Requires Care
A piecewise linear function follows one line on one side of a point and possibly a different line on the other side. At the point where the formulas meet, the difference quotient samples values from both branches, depending on the direction of approach.
The key is to keep track of that direction. A negative increment takes us to the left of the join; a positive increment takes us to the right. If the branches meet at the same function value, the difference quotient on each side simplifies exactly to the slope of the branch used there.
The Difference Quotient at a Join
Let \(c\) be the join point. For a nonzero increment \(h\), the difference quotient based at \(c\) is
When \(h<0\), the input \(c+h\) lies to the left of \(c\). When \(h>0\), it lies to the right. The one-sided limits are therefore computed with the left-branch formula and right-branch formula, respectively.
Suppose the function is given by two linear formulas, with the value at the join agreeing with both branches:
Here \(L=f(c)\), \(m_L\) is the slope on the left, and \(m_R\) is the slope on the right. The shared value \(L\) matters: it ensures that subtracting \(f(c)\) removes the constant part of either branch.
Why the Quotients Equal the Branch Slopes
The result follows directly from the definition of the difference quotient. On the left, \(h<0\), so \(c+h<c\) and the left formula applies. On the right, \(h>0\), so \(c+h>c\) and the right formula applies.
For \(h<0\), substitute \(c+h\) into the formula \(m_L(x-c)+L\), and use \(f(c)=L\).
The numerator becomes \(m_Lh\), so division by the nonzero increment \(h\) gives \(m_L\).
For \(h>0\), the same calculation with \(m_R\) gives the constant quotient \(m_R\).
In equations, the left-side calculation is
For the right side, the calculation is
These equalities hold for every allowed nonzero \(h\) on the indicated side, not just for increments close to zero. Since each quotient is constant on its side, taking the corresponding one-sided limit leaves that constant unchanged.
Worked Examples
Worked Example: Different Slopes at a Join
Consider
First find the function value at the join. The left formula gives \(f(2)=2(2)+1=5\). The right formula also gives \(-(2)+7=5\), so the branches meet at the value \(5\).
For \(h<0\), \(2+h<2\), so use the left formula:
Therefore the left-hand limit is \(2\). For \(h>0\), \(2+h>2\), so use the right formula:
Therefore the right-hand limit is \(-1\). As a check, the quotient identities hold for every negative \(h\) and every positive \(h\), respectively, and the resulting constants are exactly the slopes \(2\) and \(-1\) of the two branches.
Worked Example: A Join with Fractional Slopes
Let
At \(x=-2\), the left formula gives \(\frac{1}{2}(-2)+7=-1+7=6\). The right formula gives \(3(-2)+12=-6+12=6\). Hence \(f(-2)=6\).
For \(h<0\), the input \(-2+h\) is left of the join. Substitution gives
For \(h>0\), the right formula applies:
The left-hand limit is \(\frac{1}{2}\), and the right-hand limit is \(3\). Checking against the formulas, the left branch has slope \(\frac{1}{2}\) and the right branch has slope \(3\), as the quotient calculations show.
Worked Example: Finding the Join Value from the Formulas
Consider the function with join at \(x=1\):
The value at the join from the assigned left branch is \(f(1)=-3(1)+4=1\). The right-hand line also has value \(2(1)-1=1\), so both branches meet.
When \(h<0\), use the left formula at \(1+h\):
When \(h>0\), use the right formula:
Thus the left-hand limit is \(-3\) and the right-hand limit is \(2\). Substituting each result into the quotient identity verifies it for all nonzero \(h\) of the required sign; these are also the respective branch slopes.
A Common Mistake: Using the Wrong Branch
In the first example, if \(h<0\), then \(2+h<2\), so the left formula \(2x+1\) must be used. A common error is to use the right formula anyway, because it appears second in the piecewise definition. That would give
This is a valid simplification of the right-branch expression, but it is not the quotient for negative \(h\): the right formula only applies when the input is greater than \(2\). For \(h<0\), the correct calculation uses the left branch and gives \(2\). Always determine whether \(c+h\) lies to the left or right of \(c\) before substituting.
Why the Matching Value Matters
The slope calculation depends on subtracting the actual value \(f(c)\). If the two branches do not agree at the join, the numerator may contain a nonzero constant as well as a term proportional to \(h\). For example, define \(g(x)=x\) for \(x\le0\) and \(g(x)=x+1\) for \(x>0\). Then \(g(0)=0\), while for \(h>0\),
This is not simply the right-branch slope \(1\). The extra term comes from the difference between the right-hand branch value at the join and the assigned value \(g(0)\). Therefore, before using the slope conclusion, check that both formulas give the same value at the join.
What the Calculation Tells Us
For a continuously joined piecewise linear function, the side-specific difference quotient is not merely close to a slope: it equals that slope for every nonzero increment on the relevant side. The limits therefore record the two branch slopes directly. If the slopes happen to agree, the two one-sided quotient limits have the same value; if they differ, the limits retain that difference. The important task here is to compute each limit with the correct branch and the correct value at the join.
Check Your Understanding
For each question, identify the branch used on each side before simplifying the quotient.
- For \(f(x)=2x-1\) when \(x\le 3\), and \(f(x)=-x+8\) when \(x>3\), first verify the shared value at the join. What are the left- and right-hand difference-quotient limits there?
- Why does \(h<0\) imply that \(c+h<c\)?
- For a joined pair of linear branches with slopes \(m_L\) and \(m_R\), what expressions result for the quotient on the left and right, respectively?
- What feature of the branch values allows the constant terms to cancel in the slope calculation?
- In the example \(g(x)=x\) for \(x\le0\) and \(g(x)=x+1\) for \(x>0\), why is the right-hand quotient not equal to the right-branch slope?