Understanding a proof that $\delta(x-x') = \mathrm{d}/\mathrm{d}x\, \theta(x-x')$ A solution to an exercise in Principles of Quantum Mechanics:



My question concerns the leap



This is apparently an application of Integration by Parts; however, it seems to me it is conflating
$$
\int g(x)\,\mathrm{d}\theta(x-x')
$$
with
$$
\int g(x) \theta'(x-x')\,\mathrm{d}x
$$
which is the form required for us to able to apply Integration by Parts.
Is this not the case?
 A: Riemann-Stieltjes integral
Definition. The Riemann–Stieltjes integral of a real-valued function $f$ of a real variable on the interval $[a,b]$ with respect to another real-to-real function $\alpha$ is denoted by
$$\int_a^b f(x) \, \mathrm{d}\alpha(x).$$
The definition of the Riemann–Stieltjes integral can be found here.
Lemma 1. Given an $\alpha(x)$ which is continuously differentiable over $\mathbb{R}$. Then
$$\int_a^b f(x) \, \mathrm{d}\alpha(x) = \int_a^b f(x)\alpha'(x) \, \mathrm{d}x.$$
Lemma 2. Let $f$ be a Riemann-Stieltjes integrable function with respect to $\alpha$ on the interval $[a,b]$. Then $\alpha$ be a Riemann-Stieltjes integrable function with respect to $f$ on the interval $[a,b]$ and
$$\int_a^b f(x) \, \mathrm{d}\alpha(x)=\left[\alpha(x)f(x)\right]_{a}^{b}-\int_a^b \alpha(x) \, \mathrm{d}f(x).$$
A proof of this theorem can be found here.
Analyzing the leap
Choose $f(x) =g(x)$ and $\alpha(x)=\Theta(x-x')$. By Lemma 2,
$$\begin{align}\int_{-\infty}^{\infty} g(x) \, \mathrm{d}\Theta(x-x') &= \left[\Theta(x-x')g(x)\right]_{-\infty}^{+\infty}-\int_{-\infty}^\infty \Theta(x-x') \, \mathrm{d}g(x).
\end{align}$$
If we let $g(x)$ be continuously differentiable over $\mathbb{R}$, by Lemma 1 we get
$$\begin{align}\int_{-\infty}^\infty g(x) \, \mathrm{d}\Theta(x-x') &= \left[\Theta(x-x')g(x)\right]_{-\infty}^{+\infty}-\int_{-\infty}^{\infty} \Theta(x-x')g'(x) \, \mathrm{d}x.
\end{align}$$
A: Okay well in terms of understanding why this is the case, visualising it graphically, $\theta(x-x')$ is going to be a step from $0$ to $1$ at the point $x=x'$. Now clearly this is a discontinuity but we can visualise this as a vertical line i.e. infinite gradient at the point $x=x'$. Now if we are to plot the gradient of $\theta$ we would see that it is clearly $0$ everywhere other than at this point as it is a constant function over the two domains. As for the integral you mentioned, it is completely fine to use it in that form. the dirac delta is commonly defined as:
$$\int_{-\infty}^\infty g(x)\delta(x-x')dx=g(x')$$
so bearing this in mind:
$$\int_{-\infty}^\infty g(x)d\theta(x-x')=\int_{-\infty}^\infty g(x)\frac{d\theta(x-x')}{dx}dx$$
$$=\int_{-\infty}^\infty g(x)\delta(x-x')dx=g(x')$$
which is effectively what this is proving
