Integration by part of a dirac function : something I don't understand Consider the following integral :
$$ \int_{\tau'}^{\tau''} d\tau f(\tau) \frac{d}{dt}[\delta(t-\tau)] $$
We can put out of the integral the derivative with respect to time $t$ and thus we have :
$$ \int_{\tau'}^{\tau''} d\tau f(\tau) \frac{d}{dt}[\delta(t-\tau)]=\frac{d}{dt}[f(t)] $$
But I also have :
$$ \frac{d}{dt}[\delta(t-\tau)] = -\frac{d}{d \tau}[\delta(t-\tau)]$$
And if I plug this I have :
$$ \int_{\tau'}^{\tau''} d\tau f(\tau) \frac{d}{dt}[\delta(t-\tau)] = - \int_{\tau'}^{\tau''} d\tau f(\tau) \frac{d}{d\tau}[\delta(t-\tau)]$$
And after doing an integration by part I will have the same result as before plus a surface term.
So the two way of computing the integral don't give the same results.
Where is the problem in what I have done ?
 A: 
In THIS ANSWER and THIS ONE, I provided primers on the Dirac Delta.


The notation $\int_{\tau'}^{\tau''} f(\tau)\delta(\tau-t)\,d\tau$ is interpreted to mean the functional $\langle \delta_t, fp_{[\tau',\tau'']}\rangle$.  
Here, $p_{[\tau',\tau'']}$ is the "rectangular pulse" function, $p_{[\tau',\tau'']}(x)=u(x-\tau')-u(x-\tau'')$, and $u$ is the unit step (or Heaviside Function) where
$$u(x)=\begin{cases}1&,x>0\\\\0&,x<0\end{cases}$$


Note that there are various conventions for the value $u(0)$.


Therefore, we have
$$\begin{align}
\int_{\tau'}^{\tau''} f(\tau)\delta(\tau-t)\,d\tau&=\langle \delta_t,fp_{[\tau',\tau'']}\rangle\\\\
&=\begin{cases}f(t)&,t\in(\tau',\tau'')\\\\0&,t\notin [\tau',\tau'']\end{cases}\\\\
&=f(t)p_{[\tau',\tau'']}(t)\tag1
\end{align}$$
If $t=\tau'$ or if $t=\tau''$, then the value of the functional $\langle\delta_t, fp_{[\tau',\tau'']}\rangle$ is not well-defined.  That is to say that as a function of $t$, the functional is (jump) discontinuous at $t=\tau'$ and $t=\tau''$.


Note, if $g(\tau)=f(-\tau)$, then the notation $\int_{\tau'}^{\tau''} f(\tau)\delta(t-\tau)\,d\tau$ is interpreted to mean the functional $\langle \delta_{-t},gp_{[-\tau'',-\tau']}\rangle$, which by virtue of $(1)$ shows that $$\int_{\tau'}^{\tau''} f(\tau)\delta(t-\tau)\,d\tau=\int_{\tau'}^{\tau''} f(\tau)\delta(\tau-t)\,d\tau$$.


Next, we have the notation  
$$\begin{align}
\frac{d}{dt}\langle \delta_t ,fp_{[\tau',\tau'']}\rangle&=\langle \frac{d}{dt}\delta_t ,fp_{[\tau',\tau'']}\rangle\\\\
&=\int_{\tau'}^{\tau''}f(\tau)\frac{d}{dt}\delta(t-\tau)\,d\tau\\\\
& =\begin{cases}f'(t)&,t\in (\tau',\tau'')\\\\0&,t\notin [\tau',\tau'']\end{cases}\\\\
&=f'(t)(p_{[\tau',\tau'']})(t)
\end{align}$$
where the derivative is undefined at $t=\tau'$ and $t=\tau''$ due to the jump discontinuities.


If we interpret the derivative of the Heaviside function as the Dirac Delta distribution, then we can extend the definition of $\frac{d}{dt}\langle \delta_t ,fp_{[\tau',\tau'']}\rangle$ to include the jumps at $t=\tau'$ and $t=\tau''$.  We then have in distribution 
$$\langle \frac{d}{dt}\delta_t ,fp_{[\tau',\tau'']}\rangle=f'(t)p_{[\tau',\tau'']}(t)+f(\tau')\delta(t-\tau')-f(\tau'')\delta(t-\tau'')$$
which can be converted notationally to read
$$\bbox[5px,border:2px solid #C0A000]{\int_{\tau'}^{\tau''}f(\tau)\frac{d}{dt}\delta(t-\tau)\,d\tau=f'(t)p_{[\tau',\tau'']}(t)+f(\tau')\delta(t-\tau')-f(\tau'')\delta(t-\tau'')}\tag 2$$


Inasmuch as the distributional derivative is defined by 
$$\langle \delta'_{t},fp_{\tau',\tau''}\rangle =-\langle \delta_{t},\left(fp_{\tau',\tau''}\right)'\rangle $$
we see that in distribution 
$$\begin{align}
\langle -\delta'_{t},fp_{\tau',\tau''}\rangle&=\langle \delta_{t},\left(fp_{\tau',\tau''}\right)'\rangle\\\\
&=f'(t)p_{[\tau',\tau'']}(t)+f(t)\frac{d}{dt}p_{[\tau',\tau'']}(t)\\\\
&=f'(t)p_{[\tau',\tau'']}(t)+f(\tau')\delta(t-\tau')-f(\tau'')\delta(t-\tau'')
\end{align}$$

Hence, we have notationally 
$$\bbox[5px,border:2px solid #C0A000]{\int_{\tau'}^{\tau''}\left(-\frac{d}{d\tau}\right)\delta(t-\tau)f(\tau)\,d\tau=f'(t)p_{[\tau',\tau'']}(t)+f(\tau')\delta(t-\tau')-f(\tau'')\delta(t-\tau'')}\tag 3$$


Comparing $(2)$ and $(3)$, we arrive at the equality that 
$$\langle \frac{d}{dt}\delta_t ,fp_{[\tau',\tau'']}\rangle=\langle -\delta'_{t},fp_{\tau',\tau''}\rangle=f'(t)p_{[\tau',\tau'']}(t)+f(\tau')\delta(t-\tau')-f(\tau'')\delta(t-\tau'')$$
or using the alternative notation
$$\bbox[5px,border:2px solid #C0A000]{\int_{\tau'}^{\tau''} f(\tau)\left(-\frac{d}{d\tau}\right)\delta(t-\tau)\,d\tau=\int_{\tau'}^{\tau''}f(\tau)\frac{d}{dt}\delta(t-\tau)\,d\tau}$$
as was to be shown!
A: The "surface term" is 0 due to the delta. That is, the term from the integration by parts
$$
\left [ f(\tau) \delta(t - \tau) \right ]_{\tau'}^{\tau''}
= f(\tau'')\delta(t-\tau'') - f(\tau')\delta(t-\tau') = 0
$$
and you recover the expression obtained through the other method. In the case where $t=\tau''$ or $t=\tau'$, it depends on how you define the Dirac-delta, in a physics sense or in the sense of distributions. Often in physics one defines
$$
\int_0^a f(t) \delta(t) \mathrm{d}t = \frac{1}{2} f(0)
$$
for example, but then the concept of $\frac{\mathrm{d} \delta}{\mathrm{d} t}$ is another matter altogether.
