{{Short description|Property of a mathematical function}} In [[calculus]], the notions of '''one-sided differentiability''' and '''semi-differentiability''' of a [[real number|real]]-valued [[function (mathematics)|function]] ''f'' of a real variable are weaker than [[differentiability]]. Specifically, the function ''f'' is said to be '''right differentiable''' at a point ''a'' if, roughly speaking, a [[derivative (mathematics)|derivative]] can be defined as the function's argument ''x'' moves to ''a'' from the right, and '''left differentiable''' at ''a'' if the derivative can be defined as ''x'' moves to ''a'' from the left.

==One-dimensional case== [[File:Right-continuous.svg|thumb|right|This function does not have a derivative at the marked point, as the function is not [[continuous function|continuous]] there. However, it has a right derivative at all points, with <math>\partial_+f(a)</math> constantly equal to 0.]]

In [[mathematics]], a '''left derivative''' and a '''right derivative''' are [[derivative]]s (rates of change of a function) defined for movement in one direction only (left or right; that is, to lower or higher values) by the argument of a function.

===Definitions===

Let ''f'' denote a real-valued function defined on a subset ''I'' of the real numbers.

If {{math|''a''&nbsp;&isin;&nbsp;''I''}} is a [[limit point]] of {{math|''I''&nbsp;∩}}&nbsp;{{closed-open|''a'',∞}} and the [[one-sided limit]]

:<math>\partial_+f(a):=\lim_{{\scriptstyle x\to a^+\atop\scriptstyle x\in I}}\frac{f(x)-f(a)}{x-a}</math>

exists as a real number, then ''f'' is called '''right differentiable''' at ''a'' and the limit ''∂''<sub>+</sub>''f''(''a'') is called the '''right derivative''' of ''f'' at ''a''.

If {{math|''a''&nbsp;&isin;&nbsp;''I''}} is a limit point of {{math|''I''&nbsp;∩}}&nbsp;{{open-closed|–∞,''a''}} and the one-sided limit

:<math>\partial_-f(a):=\lim_{{\scriptstyle x\to a^-\atop\scriptstyle x\in I}}\frac{f(x)-f(a)}{x-a}</math>

exists as a real number, then ''f'' is called '''left differentiable''' at ''a'' and the limit ''∂''<sub>–</sub>''f''(''a'') is called the '''left derivative''' of ''f'' at ''a''.

If {{math|''a''&nbsp;&isin;&nbsp;''I''}} is a limit point of {{math|''I''&nbsp;∩}}&nbsp;{{closed-open|''a'',∞}} and {{math|''I''&nbsp;∩&nbsp;{{open-closed|–∞,''a''}}}} and if ''f'' is left and right differentiable at ''a'', then ''f'' is called '''semi-differentiable''' at ''a''.

If the left and right derivatives are equal, then they have the same value as the usual ("bidirectional") derivative. One can also define a [[symmetric derivative]], which equals the [[arithmetic mean]] of the left and right derivatives (when they both exist), so the symmetric derivative may exist when the usual derivative does not.<ref name="Mercer2014">{{cite book|author=Peter R. Mercer|title=More Calculus of a Single Variable|year=2014|publisher=Springer|isbn=978-1-4939-1926-0|page=173}}</ref>

===Remarks and examples===

* A function is [[derivative|differentiable]] at an [[interior point]] ''a'' of its [[domain of a function|domain]] if and only if it is semi-differentiable at ''a'' and the left derivative is equal to the right derivative. * An example of a semi-differentiable function, which is not differentiable, is the [[absolute value]] function <math> f(x)=|x| </math>, at ''a''&nbsp;=&nbsp;0. We find easily <math> \partial_-f(0)=-1, \partial_+f(0)=1. </math> * If a function is semi-differentiable at a point ''a'', it implies that it is continuous at ''a''. * The [[indicator function]] 1<sub><nowiki>[</nowiki>0,∞)</sub> is right differentiable at every real ''a'', but discontinuous at zero (note that this indicator function is not left differentiable at zero).

===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.

{{math theorem| Let ''f'' be a real-valued, [[continuous function]], defined on an arbitrary [[interval (mathematics)|interval]] ''I'' of the real line. If ''f'' is right differentiable at every point {{math|''a''&nbsp;&isin;&nbsp;''I''}}, which is not the [[supremum]] of the interval, and if this right derivative is always zero, then ''f'' is [[constant function|constant]].}}

{{math proof| For a [[proof by contradiction]], assume there exist {{math|''a''&nbsp;<&nbsp;''b''}} in ''I'' such that {{math|''f''(''a'')&nbsp;≠ ''f''(''b'')}}. Then

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

Define ''c'' as the [[infimum]] of all those ''x'' in the interval {{open-closed|''a'',''b''}} for which the [[difference quotient]] of ''f'' exceeds ''ε'' in absolute value, i.e.

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

Due to the continuity of ''f'', it follows that {{math|''c''&nbsp;<&nbsp;''b''}} and {{math|1={{abs|''f''(''c'')&nbsp;– ''f''(''a'')}}&nbsp;= ''ε''(''c''&nbsp;– ''a'')}}. At ''c'' the right derivative of ''f'' is zero by assumption, hence there exists ''d'' in the interval {{open-closed|''c'',''b''}} with {{math|1={{abs|''f''(''x'')&nbsp;– ''f''(''c'')}}&nbsp;≤ ''ε''(''x''&nbsp;– ''c'')}} for all ''x'' in {{open-closed|''c'',''d''}}. Hence, by the [[triangle inequality]],

:<math>|f(x)-f(a)|\le|f(x)-f(c)|+|f(c)-f(a)|\le\varepsilon(x-a)</math>

for all ''x'' in {{closed-open|''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 operator]]s in [[infix notation]], in which the derivatives is to be applied either to the left or right [[operand]]s. 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 :<math>f \stackrel{\leftarrow }{\partial_x} g = \frac{\partial f}{\partial x} \cdot g</math> :<math>f \stackrel{\rightarrow }{\partial_x} g = f \cdot \frac{\partial g}{\partial x}.</math>

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.<ref>{{cite book | isbn = 978-0198520115 | title = The Principles of Quantum Mechanics | last1 = Dirac | first1 = Paul | year = 1982 | orig-year = 1930 | publisher = Oxford University Press | location = USA }}</ref>

==Higher-dimensional case==

This above definition can be generalized to real-valued functions ''f'' defined on subsets of '''R'''<sup>''n''</sup> using a weaker version of the [[directional derivative]]. Let '''a''' be an interior point of the domain of ''f''. Then ''f'' is called ''semi-differentiable'' at the point '''a''' if for every direction '''u'''&nbsp;&isin;&nbsp;'''R'''<sup>''n''</sup> the limit

:<math>\partial_{\mathbf{u}}f(\mathbf{a})=\lim_{h\to 0^+}\frac{f(\mathbf{a}+h\mathbf{u})-f(\mathbf{a})}{h}</math>

exists as a real number, with ''h''&nbsp;&isin;&nbsp;'''R'''.

Semi-differentiability is thus weaker than [[Gateaux derivative|Gateaux differentiability]], for which one takes in the limit above ''h''&nbsp;→&nbsp;0 without restricting ''h'' to only positive values.

For example, the function <math>f(x, y) = \sqrt{x^2 + y^2}</math> is semi-differentiable at <math>(0, 0)</math>, but not Gateaux differentiable there. Indeed, <math> f(hx,hy)=|h|f(x,y) \text{ and for } h \geq 0, f(hx,hy)=h f(x,y), f(hx,hy)/h=f(x,y), </math> with <math>\mathbf{a}=(0,0), \mathbf{u}=(x,y) \text{ and } \partial_{\mathbf{u}}f(0,0)=f(x,y).</math>

(Note that this generalization is not equivalent to the original definition for ''n = 1'' since the concept of one-sided limit points is replaced with the stronger concept of interior points.)

==Properties==

* Any [[convex function]] on a convex [[open set|open subset]] of '''R'''<sup>''n''</sup> is semi-differentiable. * While every semi-differentiable function of one variable is continuous; this is no longer true for several variables.

==Generalization==

Instead of real-valued functions, one can consider functions taking values in '''R'''<sup>''n''</sup> or in a [[Banach space]].

==See also== * [[Directional derivative]] * [[Partial derivative]] * [[Gradient]] * [[Gateaux derivative]] * [[Fréchet derivative]] * [[Derivative (generalizations)]] * {{section link|Phase space formulation|Star product}} * [[Dini derivative]]s

==References== {{reflist}} * {{cite journal |last1=Preda |first1=V. |last2=Chiţescu |first2=I. |title=On Constraint Qualification in Multiobjective Optimization Problems: Semidifferentiable Case |journal=J. Optim. Theory Appl. |volume=100 |year=1999 |issue=2 |pages=417–433 |doi=10.1023/A:1021794505701 |s2cid=119868047 }}

[[Category:Real analysis]] [[Category:Differential calculus]] [[Category:Articles containing proofs]] [[Category:Functions and mappings]]