Let f:ERf:E\to\mathbb{R} (or C\mathbb{C}) with ERE\subseteq\mathbb{R}, and let aEa\in E. If aa is a of E(a,)E\cap(a,\infty), the right derivative of ff at aa is

f+(a):=limh0f(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+hEa+h\in E. If aa is a limit point of E(,a)E\cap(-\infty,a), the left derivative is

f(a):=limh0f(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+hEa+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)=xf(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/h1/h\to-\infty, so no finite left derivative exists.