# Left and right derivative

This function does not have a derivative at the marked point, as the function is not continuous there. However, it has a right derivative at all points, with $\partial_+f(a)$ constantly equal to 0.

In mathematics, the terms left derivative and right derivative are sometimes used to describe certain kinds of derivatives.

## Derivatives arising from one-sided limits

The most common use is to describe the one-sided limit of a function defined on a subset of the real line,[1] (see semi-differentiability). Under this notation, the right derivative is defined as

$\partial_+f(a):=\lim_{{\scriptstyle x\to a+\atop\scriptstyle x\in I}}\frac{f(x)-f(a)}{x-a}$

and the left derivative as

$\partial_-f(a):=\lim_{{\scriptstyle x\to a-\atop\scriptstyle x\in I}}\frac{f(x)-f(a)}{x-a}.$

### Application

If a real-valued, differentiable function f, defined on an interval I of the real line, has zero derivative everywhere, then it is constant, as an application of the mean value theorem shows. The assumption of differentiability can be weakened to continuity and one-sided differentiability of f. The version for right differentiable functions is given below, the version for left differentiable functions is analogous.

Theorem: Let f be a real-valued, continuous function, defined on an arbitrary interval I of the real line. If f is right differentiable at every point a ∈ I, which is not the supremum of the interval, and if this right derivative is always zero, then f is constant.

Proof: For a proof by contradiction, assume there exist a < b in I such that f(a) ≠ f(b). Then

$\varepsilon:=\frac{|f(b)-f(a)|}{2(b-a)}>0.$

Define c as the infimum of all those x in the interval (a,b] for which the difference quotient of f exceeds ε in absolute value, i.e.

$c=\inf\{\,x\in(a,b]\mid |f(x)-f(a)|>\varepsilon(x-a)\,\}.$

Due to the continuity of f, it follows that c < b and |f(c) – f(a)| = ε(c – a). At c the right derivative of f is zero by assumption, hence there exists d in the interval (c,b] with |f(x) – f(c)| ≤ ε(x – c) for all x in (c,d]. Hence, by the triangle inequality,

$|f(x)-f(a)|\le|f(x)-f(c)|+|f(c)-f(a)|\le\varepsilon(x-a)$

for all x in [c,d], which contradicts the definition of c.

## Differential operators acting to the left or the right

Another common use is to describe derivatives treated as binary operators in infix notation, in which the derivatives is to be applied either to the left or right operands. This is useful, for example, when defining generalizations of the Poisson bracket. For a pair of functions f and g, the left and right derivatives are respectively defined as

$f \stackrel{\leftarrow }{\partial }_x g = \frac{\partial f}{\partial x} \cdot g$
$f \stackrel{\rightarrow }{\partial }_x g = f \cdot \frac{\partial g}{\partial x}.$

In bra–ket notation, the derivative operator can act on the right operand as the regular derivative or on the left as the negative derivative.[2]