Double delta function value I have a question from a past paper of a university physics course.

"Calculate $\int_{-\infty}^{\infty}\delta(y-x)\delta(y-z)dy$"

We believe the answer is $1$ only if $x=z$, otherwise the function evaluates to $0$, but is this true? How do we deal with double delta functions in a single dimension?

Let
$$\hat f(x,z) = \int \mathrm dy  \ \delta(y-x) \delta(y-z)$$
Given some arbitrary smooth, compactly-supported test function $G(x)$, we can see how $\hat f$ behaves under an integral sign:
$$\int \mathrm dx \ G(x) \hat f(x,z) = \int \mathrm dx \int \mathrm dy\ G(x) \delta(y-x)\delta(y-z)= \int \mathrm dy \ G(y) \delta(y-z) = G(z)$$
So in summary, $\int \mathrm dx \ G(x) \hat f(x,z) = G(z)$ for every suitably well-behaved function $G$. Can you think of a simpler way to write the object $\hat f(x,z)$ which has this property?
