Let f:E→Rf:E\to\mathbb{R} (or C\mathbb{C}) with E⊆RE\subseteq\mathbb{R}, and let a∈Ea\in E. If aa is a of E∩(a,∞)E\cap(a,\infty), the right derivative of ff at aa is

f+′(a):=lim⁡h↓0f(a+h)−f(a)h,f'_+(a):=\lim_{h\downarrow 0}\frac{f(a+h)-f(a)}{h},

provided the limit exists as a finite number; the limit is taken only over increments with a+h∈Ea+h\in E. If aa is a limit point of E∩(−∞,a)E\cap(-\infty,a), the left derivative is

f−′(a):=lim⁡h↑0f(a+h)−f(a)h,f'_-(a):=\lim_{h\uparrow 0}\frac{f(a+h)-f(a)}{h},

provided the limit exists as a finite number; the limit is taken only over increments with a+h∈Ea+h\in E.

Relation to differentiability

If both one-sided derivatives exist and are equal, then ff is differentiable at aa and f′(a)=f+′(a)=f−′(a)f'(a)=f'_+(a)=f'_-(a).

Examples
  • For f(x)=∣x∣f(x)=|x|, one has f+′(0)=1f'_+(0)=1 and f−′(0)=−1f'_-(0)=-1, so f′(0)f'(0) does not exist.
  • For f(x)=x2f(x)=x^2, f+′(a)=f−′(a)=2af'_+(a)=f'_-(a)=2a for all aa.
  • For the 1[0,∞)\mathbf{1}_{[0,\infty)}, the right derivative at 00 is 00. From the left, the is 1/h→−∞1/h\to-\infty, so no finite left derivative exists.