How do you do an integral involving the derivative of a delta function? I got an integral in solving Schrodinger equation with delta function potential. It looks like 
$$\int \frac{y(x)}{x} \frac{\mathrm{d}\delta(x-x_0)}{\mathrm{d}x}$$
I'm trying to solve this by splitting it into two integrals
$$\int_{-\infty}^{x_0 - \epsilon} \frac{y(x)}{x} \frac{\mathrm{d}\delta(x-x_0)}{\mathrm{d}x} + \int_{x_0 + \epsilon}^{\infty} \frac{y(x)}{x} \frac{\mathrm{d}\delta(x-x_0)}{\mathrm{d}x}$$
and then do the limit $\epsilon\to 0$. Could you tell me how to solve this integral please? I used Mathematica, it gave out a weird result.
 A: The Dirac delta function is often defined as the following distribution:
$$\int_a^b \delta(x - x_0) F(x)\mathrm{d}x = \begin{cases}F(x_0), & a < x_0 < b \\ 0, & \text{otherwise}\end{cases}$$
where $F$ is a suitable test function. Its derivative is then defined as
$$\int_a^b \delta'(x - x_0) F(x)\mathrm{d}x = -\int_a^b \delta(x - x_0) F'(x)\mathrm{d}x$$
which is also the result one would get from naively applying integration by parts. You can use this result directly to calculate your integral by setting $F(x) = \frac{y(x)}{x}$ - no need to split the integral or take any limits.
A: So, the properties of the derivative of the delta function can be shown relatively quickly though the following ansatz:  Consider a function $\delta(x)$ such that $\delta(x) = \frac{1}{a^{2}}(x+a)$ if $-a<x<0$ and $\delta(x) = \frac{1}{a^{2}}(a-x)$ if $0<x<a$, and $\delta(x) = 0$ elsewhere.  It is easy to see that $\delta(x)$ has area 1 irrespective of the value of $a$, so we can consider $\delta(x)$ to be the dirac delta function in the limit $a\rightarrow0$.
Now, consider the derivative of our putative delta function.  It will be $\frac{1}{a^{2}}$ for $-a<x<0$ and $-\frac{1}{a^{2}}$ for $0<x<a$.  Let's integrate a function $f(x)$ against $\delta^{\prime}(x)$:
$\begin{align}
\int \delta^{\prime}(x)f(x)dx &= \int_{-a}^{0}\frac{f(x)}{a^{2}}dx - \int_{0}^{a}\frac{f(x)}{a^{2}}dx\\
&=\int_{0}^{a}\frac{f(-x)}{a^{2}}dx-\int_{0}^{a}\frac{f(x)}{a^{2}}dx\\
\end{align}$
Extracting the $a^{2}$ out of the integral, and taking the limit $a\rightarrow0$, we find, after applying L'Hopital's rule once, and then using the definition of the derivative:
$\int \delta^{\prime}(x)f(x) = -f'(0)$
A: The $\delta$ function is not continuous, so it's a priori not differentiable. In fact, it's not even well-defined as an ordinary real-valued function, but can be made so in terms of distributions - linear maps on a space of test functions given by $f\mapsto\int\delta f=f(a)$.
It's possible to sensibly define derivatives of distributions by looking at representations as limits of functions:
If $\delta_i$ is a family of functions so that $\lim_{i\rightarrow\infty}\int\delta_i(x) f(x)\mathrm dx=f(a)$ for any test function $f$, then it can be considered a representation of the Dirac delta. Now, if we take the family of derivatives $\frac{\mathrm d}{\mathrm dx}\delta_i$ we arrive at
$$
\int\left[\frac{\mathrm d}{\mathrm dx}\delta_i(x)\right]f(x)\mathrm dx=-\int\delta_i(x)\left[\frac{\mathrm d}{\mathrm dx}f(x)\right]\mathrm dx
$$
through integration by parts and using the fact that $f$ has by definition compact support (which makes the boundary term vanish).
As the derivative is linear as well, this defines another linear map $f\mapsto-\int\delta f'$ on the space of test functions, which we call the derivative of our distribution.
Symbolically,
$$
\left[\frac{\mathrm d}{\mathrm dx}\delta(x-a)\right]f(x)=-\delta(x-a)f'(x)
$$
which you can just plug in into your formula above without any need for actual computation as it holds true by definition.
A: As noted above, if $x_0$ a regular point of the integrand one calculates the value of the desired integral simply by substituting this point  in the derivative with appropriate choice of sign.  The interesting part is when the singularities of the integrand and the delta derivative coincide, i.e., where $x_0=0$. In order to compute the integral in this case we use the fact that $$\delta_0'=\lim_{\epsilon \to 0^+}\frac{\delta_\epsilon-\delta_{-\epsilon}}{2 \epsilon},$$
the limit being in the distributional sense.  A back-of-an-envelope calculation suggests that this is only defined if $y(0)=0$ and that the integral is then $\dfrac{y''(0)}2$. (Note that since the integrand is not a smooth function, the integral is not a priori defined).
