I have an integral of this form:
$$v = \int_{x=-\infty}^\infty g(x) \delta \big(f(x, y_1) - f(x, y_2)\big) dx.$$
I know that if $y_1 \neq y_2$, a closed form solution can be found, namely $$ v = \frac{g(\hat{x})}{\left|\frac{\partial f }{\partial x}(\hat{x}, y_1) - \frac{\partial f }{\partial x}(\hat{x}, y_2) \right|},$$ with $\hat{x}$ the solution of $f(x, y_1) - f(x, y_2)=0$ (supposed unique).
My question may seem weird, but I am wondering what happen when $y_1=y_2$ ? The integral diverges, I know, but can we actually still say something on its solution? For example, is there a way to "normalize" the solution by infinity ? I don't know if it even makes sense and, if it does, I don't know how to formalize this idea. Any help would be appreciated, thank you.
Edit: thank you for the comments/answers, it cleared things up. I had a specific case where the first equation is actually used to define a linear operator, and I realize now that the question cannot be separated from this context. After further investigations, things actually check out without an infinity term appearing.
You know that
$$\int_{-\infty}^{+\infty} g(x)\delta(x)\ \text{d}x = g(0)$$
In the sense of distributions. But if you put $\delta(0)$ into the integrand, then this stop making sense for
$$\int_{-\infty}^{+\infty} g(x)\delta(0) \ \text{d}x = \delta(0)\int_{-\infty}^{+\infty} g(x)\ \text{d}x$$
The integral could diverge, and besides this, $\delta(0) = ??$
Defining $\delta(0)=\infty$ is not at all right, because it has to equal $\infty$ in just the "right way". You can define this as a distribution, which ignoring all technicalities, just means that it is an "evaluation linear map". I.e, given an appropriate vector space $V$ of functions $\Bbb{R}^n\to\Bbb{C}$, we consider $\delta_a:V\to\Bbb{C}$ defined as $\delta_a(f):= f(a)$. In other words, $\delta_a$ is an object which takes a function as input and gives out the value of the function a the point $a$.
When we write $$\int_{\Bbb{R}^n}\delta_a(x)f(x)\,dx=\int_{\Bbb{R}^n}\delta(x-a)f(x)\,dx=f(a)$$
we literally mean that $\delta_a$ is an object such that whenever we plug in a function $f$, we get out its value at $a$. Of course, writing it in this way inside an integral is a priori just nonsense, because there is no function $\delta_a:\Bbb{R}^n\to\Bbb{C}$ for which the above equality can hold true.
Trying to give a sense to $\delta(0)$ is neither easy nor meaningful, for what I know. The same problem appears in realtivistic quantum mechanics when, before passing to the second quantisation, you obtain that the total energy of a quantum field is a sum of dirac delta in zero, that is ill-posed and ill-defined.
I am answering by heart so I will perhaps add some details later.
I also leave you this, for possible interest: https://core.ac.uk/download/pdf/82055462.pdf