I was trying to figure out what is the integral of $$\int_{-\infty}^{+\infty} H(t)\delta(t)dt,$$
where $H(t)$ is the Heaviside step and $\delta(t)$ is the Dirac delta.
A first approach: We observe that $\delta(t) = H'(t)$, and hence:
$$\int_{-\infty}^x H(t)\delta(t)dt = \int_{-\infty}^{+\infty} H(t)H'(t)dt = \left.\frac{1}{2}H^2(t)\right|_{t=-\infty}^{t = +\infty} = \frac{1}{2}(1-0) = \frac{1}{2}.$$
A second approach: Since $\int_{-\infty}^{+\infty} f(t)\delta(t)dt = f(0)$, then:
$$\int_{-\infty}^x H(t)\delta(t)dt = H(0) = 1.$$
What's wrong?