Derivation of a non-continuous function with distribution theory Consider the following function:
$$f(x,t) = \left\{\begin{array}{ll} 1 & x \in [0, t] \\ 0 & x \not\in [0,t] \end{array}\right.$$
What can I say about the derivative of $f$ with respect to $t$ using the distribution theory?
Is it true that
$$\frac{\partial f}{\partial t} = \delta(x - t)$$
where $\delta$ is the Dirac Delta ?
In general, given a set $E(t) \subseteq \mathbb{R}$ and the function
$$f(x,t) = \left\{\begin{array}{ll} 1 & x \in E(t) \\ 0 & x \not\in E(t) \end{array}\right.$$
what can I say about the derivative of $f$ with respect to $t$?
 A: For a sufficiently nice test function $\phi$ (say, smooth with bounded support), you can say that
$$
\int \partial_t f(x,t)\phi(t)dt =-\int \phi'(t)f(x,t)dt=-\int_{x}^{\infty}\phi'(t)dt=\phi'(x)=\int\phi'(t)\delta(t-x)dt\\=\int \left(-\delta'(t-x)\right)\phi(t)dt
$$
for any $x\ge 0$, and of course $f(x,t)=0$ for $x<0$.  So in the sense of distributions, $\partial_t f(x,t)=-\delta'(t-x)\theta(x)$.
A: With regards to $f(x,t)$,remember that the integral is understood to be a Lebesgue integral.  So for a fixed $t$ we will break up $E(t)$ into two parts:  let $N$ be the subset of $E(t)$ such that $E(t)$ is not dense in $\mathbb R$, and $M$, the subset of $E(t)$ such that $E(t)$ is dense $\mathbb R$. So 
$$ \frac{\partial f(x,t)}{\partial x} = -\left < f, \phi_x \right > =\int \left ( -\int_{N(t)}f(x,t)\phi_x(x,t)dx-\int_{M(t)}f(x,t)\phi_x(x,t)dx \right )dt $$
$f(x,t)=0$ on $N(t)$ since we take the integral in an a.e. sense and $N(t)$ would have measure zero.  For the opposite reason, $f(x,t)=1$ on $M(t)$
$$ \frac{\partial f(x,t)}{\partial x}  =\int \left ( -\int_{M(t)}\phi_x(x,t)dx \right )dt $$
So you can see we will get a similar result as before, yet one that depends on $M(t)$ as it varies.  If $M(t)$ were made up of intervals, you would get $\delta$ at the beginning of each interval and $-\delta$ centered on the end of each interval. 
