Why Check Both Sides?
A derivative at a point describes the limiting rate of change as the input approaches that point. When the point lies inside the domain, inputs can approach from both below and above. It is therefore necessary to check that the difference quotient has the same finite limit from each side.
The one-sided derivative test makes this requirement precise. It separates the two approaches, lets us calculate each limit using the appropriate formula, and then gives a criterion for combining them into an ordinary derivative.
One-Sided Difference Quotient Limits
Let \(f\) be defined on an open interval containing \(a\). For a nonzero increment \(h\) sufficiently close to \(0\), the increment form of the difference quotient is
For \(h<0\), the input \(a+h\) approaches \(a\) from the left. For \(h>0\), it approaches from the right. When the corresponding limits exist as finite real numbers, define
Here \(D_-(a)\) is the left-hand derivative limit and \(D_+(a)\) is the right-hand derivative limit. These names refer to the direction from which the input approaches \(a\), not to the sign of the limit itself.
The condition that \(a\) is inside an open interval matters here: it ensures that the function is defined for inputs on both sides sufficiently close to \(a\). At an interior point, differentiability requires both one-sided limits to exist finitely and to agree.
The One-Sided Derivative Test
This test includes two separate requirements. First, neither one-sided limit may fail to exist as a finite real number. Second, the two limits must have the same value. A limit on only one side is not enough to establish the two-sided derivative.
Why the Test Works
The argument follows from the definition of a two-sided limit. A two-sided limit exists precisely when the expression approaches the same finite value from both directions. Here the expression is the difference quotient, so its left- and right-hand limits must both exist and agree.
If the difference quotient has a finite two-sided limit \(L\) as \(h\to 0\), then restricting \(h\) to negative values or to positive values preserves that limit. Thus both one-sided limits exist and equal \(L\).
Suppose the left- and right-hand limits both equal the finite number \(L\). For increments sufficiently close to zero, the quotient is then close to \(L\) on either side. Hence it is close to \(L\) for all sufficiently small nonzero \(h\), which is the definition of the two-sided limit.
The two-sided difference quotient limit is \(L\), so the definition gives \(f'(a)=L\).
For completeness, in the second step, let \(\varepsilon>0\). Since the left-hand limit is \(L\), there is a \(\delta_->0\) such that \(0<|h|<\delta_-\) and \(h<0\) imply that the quotient differs from \(L\) by less than \(\varepsilon\). The right-hand limit gives a \(\delta_+>0\) with the same property when \(0<h<\delta_+\). Set \(\delta=\min(\delta_-,\delta_+)\). Every \(h\) satisfying \(0<|h|<\delta\) is either negative or positive, so in either case the quotient differs from \(L\) by less than \(\varepsilon\). This proves the two-sided limit is \(L\).
Worked Example: A Piecewise Function with Matching One-Sided Limits
Worked Example: A Piecewise Function with Matching One-Sided Limits
Consider
Determine whether \(f\) is differentiable at \(a=1\).
First, \(f(1)=1^2=1\). For the left-hand limit, take \(h<0\). Then \(1+h\le 1\), so the first formula applies:
Therefore,
For the right-hand limit, take \(h>0\). Then \(1+h>1\), so the second formula applies. Substituting and simplifying gives
Thus \(D_+(1)=\lim_{h\to0^+}(2+h)=2\). Both limits are finite and equal, so the test gives \(f'(1)=2\). Checking the two calculations, each one-sided quotient simplifies to \(2+h\), and each tends to \(2\) in its stated direction.
Worked Example: Testing a Rational Function at an Interior Point
Worked Example: Testing a Rational Function at an Interior Point
Let \(f(x)=1/x\), and test differentiability at \(a=2\). The function is defined in an open interval around \(2\), and \(f(2)=1/2\). For nonzero \(h\) close enough to \(0\),
The last expression is defined for \(h\) near \(0\), since \(2+h\ne0\) there. Its left- and right-hand limits are both
Both one-sided limits exist finitely and agree. Therefore \(f'(2)=-1/4\). As a check, the simplified quotient approaches \(-1/(2\cdot2)=-1/4\) from either side.
Worked Example: When One One-Sided Limit Is Not Finite
Worked Example: When One One-Sided Limit Is Not Finite
Define
Test differentiability at \(a=0\). Since \(f(0)=0\), for \(h<0\) the quotient is
Consequently, \(D_-(0)=\lim_{h\to0^-}h=0\). For \(h>0\), the quotient instead is
This right-hand quotient has no finite real limit. For example, if \(h=1/n^2\) for a positive integer \(n\), then \(h>0\), \(h\to0\) as \(n\to\infty\), and the quotient equals \(n\), which is unbounded. The right-hand limit therefore fails to exist as a finite real number. The one-sided derivative test shows that \(f'(0)\) does not exist. The left-hand limit \(0\) alone cannot determine a two-sided derivative.
A Common Mistake: Using Only One Side
A frequent error is to calculate whichever one-sided quotient is simpler and treat its limit as the derivative. In the preceding example, the left-hand calculation gives
It would be incorrect to conclude from this calculation alone that \(f'(0)=0\). This computes \(D_-(0)\), not the two-sided derivative. On the right, the quotient is \(1/\sqrt{h}\), which has no finite limit. The correction is to calculate both one-sided limits and apply the test only after checking that each exists finitely and that their values agree.
How to Apply the Test Reliably
When formulas change at a point or the difference quotient behaves differently on either side, use a fixed sequence of steps. The sign of \(h\) determines which nearby inputs and which formula must be used.
Evaluate \(f(a)\), because it appears in both difference quotients.
Use \(h<0\) and the formula valid for inputs \(a+h<a\). Simplify before taking the limit when possible.
Use \(h>0\) and the formula valid for inputs \(a+h>a\).
If either limit does not exist as a finite real number, or if the two finite limits differ, the derivative does not exist. If both are finite and equal, their common value is \(f'(a)\).
Why the Test Matters
The test turns the definition of the derivative into a practical decision procedure. It is especially useful when a function has different formulas on opposite sides of a point: each formula can be substituted into the quotient on the side where it applies. It also makes clear why simplifying an expression for only one sign of \(h\) cannot settle a two-sided question.
The test is local: it concerns the difference quotient for inputs arbitrarily close to \(a\), not the behavior of the function far away. At the same time, every condition matters. Both one-sided limits must be defined by valid nearby inputs, finite, and equal. Omitting any of these checks can lead to an unjustified claim of differentiability.
Check Your Understanding
For each question, use the difference quotient and the one-sided derivative test where appropriate.
- State the two conditions on \(D_-(a)\) and \(D_+(a)\) that are necessary and sufficient for differentiability at an interior point.
- For \(f(x)=x^2\) when \(x\le 2\) and \(f(x)=(x-2)^2+4x-4\) when \(x>2\), find both one-sided derivative limits at \(2\) and decide whether \(f'(2)\) exists.
- For \(f(x)=1/x\) at \(a=1\), simplify the difference quotient and compare its left- and right-hand limits.
- If the left-hand difference quotient has a finite limit but the right-hand one does not, can the ordinary derivative exist at that interior point? Explain using the test.
- Why does a finite two-sided limit of the difference quotient imply that both one-sided limits exist and have the same value?