Showing $\int_{-\infty}^x\delta(a)da = \theta(x)$ for $x\neq0$ 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!
 A: By definition, for any $\varphi$ continuous at $y=0$, $\int_{\Bbb R} \varphi(y)\,\delta_0(\mathrm d y) = \varphi(0)$. In this case, notice that since $x\neq 0$, $\theta(x-y) = \mathbf{1}_{(-\infty,x]}(y)$ is indeed continuous at $y=0$, hence
$$
\int_{-\infty}^x \delta_0(\mathrm d y) = \int_{\Bbb R} \theta(x-y)\, \delta_0(\mathrm d y) = \theta(x)
$$
since $\theta(x-y) = \theta(x)$ when $y=0$.

Edit: About your edit about what happens at $x=0$, there is no clear meaning to this. See e.g. What is the value of the integral $\int_{-\infty}^a \delta(x - a) dx$ and related integrals? if you want my opinion on this.
A: 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.
