I'm trying to show that $\int_{-\infty}^x\delta(a)da= \theta(x)$ for $x\neq0$, where $\delta(x)$ is the dirac delta function, and $\theta(x)$ is the step function , which equal to $0$ for $x\leq0$ and $1$ when $x>0$.
By intuition, this integral makes sense to me. However, to evaluate this integral, we will need to find the anti-derivative of $\delta(x)$, and I saw in some definitions this is just $\theta(x)$. How can I evaluate this integral? Also, how can we take care of the case where $x = 0$? Thanks!
As a measure, and using the Riemann-Stieltjes integral, we can write for $x\ne0$
$$\begin{align} \int_{-\infty}^x \,d\{\delta(x)\}&=\int_{-\infty}^x \,d\theta(a)\\\\ &=\theta(x) \end{align}$$
And we are done!
As a distribution, $\delta$ has compact support on $\{0\}$. As such, we can write for any compactly supported $\phi$ that is continuous at $0$
$$\langle \delta_0,\phi \rangle=\phi(0)$$
So, for $\phi(a)=\theta(x-a)$ we find that for $x\ne0$
$$\langle \delta_0, \theta_x\rangle=\theta(x)$$
And we are done!
Response to "How can we take care of the case where $x=0$?
Note that the distribution $\langle \delta_0,\theta_0\rangle$, sometimes written $\int_{-\infty}^\infty \delta(x)\theta(x)\,dx=\int_0^\infty \delta(x)\,dx$, is meaningless as shown in THIS ANSWER.