# Weak derivative

In mathematics, a weak derivative is a generalization of the concept of the derivative of a function (strong derivative) for functions not assumed differentiable, but only integrable, i.e., to lie in the Lp space ${\displaystyle L^{1}([a,b])}$.

The method of integration by parts holds that for differentiable functions ${\displaystyle u}$ and ${\displaystyle \varphi }$ we have

{\displaystyle {\begin{aligned}\int _{a}^{b}u(x)\varphi '(x)\,dx&={\Big [}u(x)\varphi (x){\Big ]}_{a}^{b}-\int _{a}^{b}u'(x)\varphi (x)\,dx.\\[6pt]\end{aligned}}}

A function u' being the weak derivative of u is essentially defined by the requirement that this equation must hold for all infinitely differentiable functions φ vanishing at the boundary points (${\displaystyle \phi (a)=\phi (b)=0}$).

## Definition

Let ${\displaystyle u}$ be a function in the Lebesgue space ${\displaystyle L^{1}([a,b])}$. We say that ${\displaystyle v}$ in ${\displaystyle L^{1}([a,b])}$ is a weak derivative of ${\displaystyle u}$ if

${\displaystyle \int _{a}^{b}u(t)\varphi '(t)\,dt=-\int _{a}^{b}v(t)\varphi (t)\,dt}$

for all infinitely differentiable functions ${\displaystyle \varphi }$ with ${\displaystyle \varphi (a)=\varphi (b)=0}$.

Generalizing to ${\displaystyle n}$ dimensions, if ${\displaystyle u}$ and ${\displaystyle v}$ are in the space ${\displaystyle L_{\text{loc}}^{1}(U)}$ of locally integrable functions for some open set ${\displaystyle U\subset \mathbb {R} ^{n}}$, and if ${\displaystyle \alpha }$ is a multi-index, we say that ${\displaystyle v}$ is the ${\displaystyle \alpha ^{\text{th}}}$-weak derivative of ${\displaystyle u}$ if

${\displaystyle \int _{U}uD^{\alpha }\varphi =(-1)^{|\alpha |}\int _{U}v\varphi ,}$

for all ${\displaystyle \varphi \in C_{c}^{\infty }(U)}$, that is, for all infinitely differentiable functions ${\displaystyle \varphi }$ with compact support in ${\displaystyle U}$. Here ${\displaystyle D^{\alpha }\varphi }$ is defined as

${\displaystyle \qquad D^{\alpha }\varphi ={\frac {\partial ^{|\alpha |}\varphi }{\partial x_{1}^{\alpha _{1}}\cdots \partial x_{n}^{\alpha _{n}}}}.}$

If ${\displaystyle u}$ has a weak derivative, it is often written ${\displaystyle D^{\alpha }u}$ since weak derivatives are unique (at least, up to a set of measure zero, see below).

## Examples

• The absolute value function ${\displaystyle u:\mathbb {R} \rightarrow \mathbb {R} _{+},u(t)=|t|}$, which is not differentiable at ${\displaystyle t=0}$ has a weak derivative ${\displaystyle v:\mathbb {R} \rightarrow \mathbb {R} }$ known as the sign function, and given by
{\displaystyle {\begin{aligned}\\v(t)={\begin{cases}1&{\text{if }}t>0;\\[6pt]0&{\text{if }}t=0;\\[6pt]-1&{\text{if }}t<0.\end{cases}}\\\\\end{aligned}}}
This is not the only weak derivative for u: any w that is equal to v almost everywhere is also a weak derivative for u. (In particular, the definition of v(0) above is superfluous and can be replaced with any desired real number r.) Usually, this is not a problem, since in the theory of Lp spaces and Sobolev spaces, functions that are equal almost everywhere are identified.
• The characteristic function of the rational numbers ${\displaystyle 1_{\mathbb {Q} }}$ is nowhere differentiable yet has a weak derivative. Since the Lebesgue measure of the rational numbers is zero,
${\displaystyle \int 1_{\mathbb {Q} }(t)\varphi (t)\,dt=0.}$
Thus ${\displaystyle v(t)=0}$ is the weak derivative of ${\displaystyle 1_{\mathbb {Q} }}$. Note that this does agree with our intuition since when considered as a member of an Lp space, ${\displaystyle 1_{\mathbb {Q} }}$ is identified with the zero function.
• The Cantor function c does not have a weak derivative, despite being differentiable almost everywhere. This is because any weak derivative of c would have to be equal almost everywhere to the classical derivative of c, which is zero almost everywhere. But the zero function is not a weak derivative of c, as can be seen by comparing against an appropriate test function ${\displaystyle \varphi }$. More theoretically, c does not have a weak derivative because its distributional derivative, namely the Cantor distribution, is a singular measure and therefore cannot be represented by a function.

## Properties

If two functions are weak derivatives of the same function, they are equal except on a set with Lebesgue measure zero, i.e., they are equal almost everywhere. If we consider equivalence classes of functions such that two functions are equivalent if they are equal almost everywhere, then the weak derivative is unique.

Also, if u is differentiable in the conventional sense then its weak derivative is identical (in the sense given above) to its conventional (strong) derivative. Thus the weak derivative is a generalization of the strong one. Furthermore, the classical rules for derivatives of sums and products of functions also hold for the weak derivative.

## Extensions

This concept gives rise to the definition of weak solutions in Sobolev spaces, which are useful for problems of differential equations and in functional analysis.