Tutorials › AP Calculus › One-Sided Derivatives and the Two-Sided Criterion

Differentiability and Continuity · Tutorial 105 of 999

One-Sided Derivatives and the Two-Sided Criterion

Use one-sided difference-quotient limits to test whether a finite two-sided derivative exists at a point.

Beginner 10 min read

What You'll Learn

  • Define left- and right-hand derivatives using increments approaching zero from opposite sides
  • Calculate one-sided derivatives directly from the difference quotient
  • State the conditions required for one-sided and two-sided derivatives
  • Prove that a two-sided derivative exists exactly when both finite one-sided derivatives exist and agree
  • Distinguish unequal one-sided values from a valid two-sided derivative
  • Check derivative calculations by simplifying the quotient before taking its limit

Why One-Sided Derivatives Matter

A derivative at a point describes the limit of nearby difference quotients. When the point lies inside the function’s domain, nearby inputs can approach from either side. The derivative exists only if those approaches produce one common, finite value.

Separating the left-hand and right-hand limits makes this test precise. It also prevents an important mistake: calculating a limit from one side and treating it as if it automatically describes the behavior from both sides.

Definitions

Let \(f\) be defined at \(a\), and suppose its domain contains points arbitrarily close to \(a\) on the left. For \(x\ne a\), the difference quotient at \(a\) is \(\frac{f(x)-f(a)}{x-a}\). If its limit as \(x\) approaches \(a\) from the left exists as a finite real number, that limit is the left-hand derivative.

$$ f'_-(a)=\lim_{x\to a^-}\frac{f(x)-f(a)}{x-a}. $$

Equivalently, using the increment \(h=x-a\), approaching \(a\) from the left means \(h\to 0^-\):

$$ f'_-(a)=\lim_{h\to 0^-}\frac{f(a+h)-f(a)}{h}. $$

For the right-hand derivative, the domain must contain points arbitrarily close to \(a\) on the right, and the increment approaches zero through positive values:

$$ f'_+(a)=\lim_{x\to a^+}\frac{f(x)-f(a)}{x-a} = \lim_{h\to 0^+}\frac{f(a+h)-f(a)}{h}. $$
Definition: The two-sided derivative \(f'(a)\) exists if the difference quotient has a finite limit as \(x\to a\), with \(x\) approaching from both sides. If it exists, its value is that limit.

These definitions require the function value \(f(a)\). They also require the relevant nearby domain points: a left-hand derivative requires points in the domain to the left, while a right-hand derivative requires points in the domain to the right. For an ordinary two-sided derivative, points from both sides are needed.

Worked Example: Both One-Sided Derivatives of a Quadratic

Worked Example: A Two-Sided Derivative at \(a=2\)

Let \(f(x)=x^2\). Calculate the left- and right-hand derivatives at \(a=2\), then decide whether \(f'(2)\) exists.

First, \(f(2)=2^2=4\). The difference quotient is

$$ \frac{f(2+h)-f(2)}{h} = \frac{(2+h)^2-4}{h} = \frac{4+4h+h^2-4}{h} = \frac{4h+h^2}{h} = 4+h, \qquad h\ne 0. $$

For the left-hand limit, let \(h\to0^-\). Since \(4+h\to4\),

$$ f'_-(2)=\lim_{h\to0^-}(4+h)=4. $$

For the right-hand limit, let \(h\to0^+\). The same simplified expression tends to the same value:

$$ f'_+(2)=\lim_{h\to0^+}(4+h)=4. $$

Both one-sided derivatives are finite and equal. Therefore the two-sided derivative exists and \(f'(2)=4\). As a check, both calculations used the original quotient with \(f(2)=4\); after cancellation its value is \(4+h\), which approaches \(4\) from either side.

The Two-Sided Criterion

Theorem: Suppose \(f(a)\) is defined and \(f\) is defined at points in some interval on both sides of \(a\). The two-sided derivative \(f'(a)\) exists as a finite real number if and only if both \(f'_-(a)\) and \(f'_+(a)\) exist as finite real numbers and are equal. When they are equal, \(f'(a)=f'_-(a)=f'_+(a)\).

The reason is the corresponding criterion for ordinary two-sided limits. A difference quotient has a finite two-sided limit exactly when its left-hand and right-hand limits both exist as finite numbers and agree. Here the expression whose limits are compared is \(\frac{f(x)-f(a)}{x-a}\).

1
Start with the quotient.
For \(x\ne a\), define \(Q(x)=\frac{f(x)-f(a)}{x-a}\). The derivative is the limit of \(Q(x)\) as \(x\to a\).
2
Separate the approaches.
Values of \(x\) near \(a\) are either to its left or to its right. Thus a two-sided limit must agree with the limits of \(Q(x)\) on both sides.
3
Compare the two finite limits.
If the left-hand and right-hand limits both equal the same finite number \(L\), then \(Q(x)\to L\) from either side, so \(f'(a)=L\). If either limit fails to exist as a finite number, or if they differ, there is no finite two-sided limit.

Why the Criterion Works

Here is a direct justification using the definition of a limit. Suppose the left-hand and right-hand derivatives both exist and equal \(L\). Given any \(\varepsilon>0\), the left-hand limit gives a distance \(\delta_1>0\) such that

$$ 0<a-x<\delta_1 \quad\Longrightarrow\quad \left|\frac{f(x)-f(a)}{x-a}-L\right|<\varepsilon. $$

The right-hand limit gives a distance \(\delta_2>0\) such that

$$ 0<x-a<\delta_2 \quad\Longrightarrow\quad \left|\frac{f(x)-f(a)}{x-a}-L\right|<\varepsilon. $$

Choose \(\delta=\min(\delta_1,\delta_2)\). If \(0<|x-a|<\delta\), then either \(x<a\) or \(x>a\). In the first case the left-hand condition applies; in the second case the right-hand condition applies. In both cases the quotient differs from \(L\) by less than \(\varepsilon\). Therefore its two-sided limit is \(L\), so \(f'(a)=L\).

Conversely, suppose the two-sided derivative exists and equals \(L\). By the definition of a two-sided limit, the quotient approaches \(L\) whenever \(x\) approaches \(a\) with \(x\ne a\). Restricting that same condition to \(x<a\) gives the left-hand limit \(L\); restricting it to \(x>a\) gives the right-hand limit \(L\). Thus both one-sided derivatives exist, are finite, and equal the two-sided derivative. This proves both directions of the criterion.

Worked Example: Matching One-Sided Derivatives

Worked Example: Two Formulas with the Same Derivative at the Join

Define \(f\) by \(f(x)=x^2\) for \(x\le2\), and \(f(x)=x^2+(x-2)^2\) for \(x>2\). Find both one-sided derivatives at \(a=2\).

At the point, the first rule gives \(f(2)=2^2=4\). For \(h<0\), \(2+h<2\), so the left-hand quotient uses \(f(2+h)=(2+h)^2\):

$$ \frac{f(2+h)-f(2)}{h} = \frac{(2+h)^2-4}{h} = \frac{4+4h+h^2-4}{h} = 4+h. $$

Therefore \(f'_-(2)=\lim_{h\to0^-}(4+h)=4\).

For \(h>0\), \(2+h>2\), so the second rule applies. Substituting into it gives

$$ f(2+h)=(2+h)^2+\big((2+h)-2\big)^2 =(2+h)^2+h^2 =4+4h+2h^2. $$

Consequently, the right-hand quotient is

$$ \frac{f(2+h)-f(2)}{h} = \frac{4+4h+2h^2-4}{h} = \frac{4h+2h^2}{h} = 4+2h. $$

Thus \(f'_+(2)=\lim_{h\to0^+}(4+2h)=4\). The two finite one-sided values agree, so \(f'(2)=4\). Checking the result directly, the left-hand quotient tends to \(4\), and the right-hand quotient also tends to \(4\), as required.

Worked Example: Unequal One-Sided Derivatives

Worked Example: The Two-Sided Derivative Does Not Exist

Let \(g(x)=x^2\) for \(x\le0\), and \(g(x)=2x^2+x\) for \(x>0\). Determine whether \(g'(0)\) exists.

First, \(g(0)=0^2=0\). If \(h<0\), then \(g(h)=h^2\), so

$$ \frac{g(0+h)-g(0)}{h} = \frac{h^2-0}{h} = h. $$

Taking the left-hand limit gives \(g'_-(0)=\lim_{h\to0^-}h=0\).

If \(h>0\), then \(g(h)=2h^2+h\). The quotient is

$$ \frac{g(0+h)-g(0)}{h} = \frac{2h^2+h-0}{h} = 2h+1. $$

Taking the right-hand limit gives \(g'_+(0)=\lim_{h\to0^+}(2h+1)=1\). Both one-sided derivatives are finite, but \(0\ne1\). By the criterion, \(g'(0)\) does not exist. Checking the conclusion against the two quotients confirms the mismatch: the left quotient tends to \(0\), while the right quotient tends to \(1\).

Common Mistake: Ignoring the Direction of Approach

A common error is to calculate one one-sided limit and label it as the derivative without checking the other side. For the function \(g\) in the preceding example, the calculation \(\lim_{h\to0^-}h=0\) correctly gives \(g'_-(0)=0\). It does not establish \(g'(0)=0\), because it says nothing about positive \(h\). The right-hand quotient is \(2h+1\), whose limit is \(1\). Since the two limits differ, the two-sided derivative does not exist.

Another error is to substitute \(h=0\) into the difference quotient before simplifying. The quotient has denominator \(h\), so direct substitution produces division by zero. Instead, simplify the quotient for \(h\ne0\), then take the appropriate one-sided limit.

Key takeaway: Calculate each one-sided limit from the correct side. An ordinary derivative exists only when both limits are finite and equal.

Check Your Understanding

For each question, use the difference quotient and state whether the two-sided derivative exists when requested.

  1. For \(f(x)=x^2\), write the difference quotient at \(a=3\) using \(h\), then find \(f'_-(3)\) and \(f'_+(3)\).
  2. A function has \(f'_-(a)=5\) and \(f'_+(a)=5\). What is \(f'(a)\), assuming it is defined on both sides of \(a\)?
  3. A function has \(f'_-(a)=-2\) and \(f'_+(a)=4\). Does its two-sided derivative exist?
  4. In the definition of \(f'_+(a)\), should \(h\) approach zero through positive or negative values?
  5. Why does calculating only \(f'_-(a)\) not establish that \(f'(a)\) exists?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon
Clinical Biostats