# question on integration of $f(x)\delta(g(x))$

I am learning integration with dirac delta. I do not understand this result by Maple Dirac

When I work it by hand, using known relation (here is an image of the page)

Therefore

$$\int_{0}^{\pi}f\left( x\right) \delta\left( g\left( x\right) \right) dx=\sum_{x_{0}}\frac{f\left( x_{0}\right) }{\left\vert g^{\prime}\left( x_{0}\right) \right\vert }$$

Where the sum is over all zeros of $$g\left( x\right)$$ in the integration interval, which is $$\left\{ 0,\pi\right\}$$ since $$\sin\left( x\right)$$ is zero at these points, and since $$g^{\prime}\left( x\right) =\cos\left( x\right)$$, and $$f\left( x\right) =\frac{1}{x}$$, then I get

\begin{align*} \int_{0}^{\pi}f\left( x\right) \delta\left( g\left( x\right) \right) dx & =\lim_{x\rightarrow0}\frac{\frac{1}{x}}{\left\vert \cos\left( x\right) \right\vert }+\lim_{x\rightarrow\pi}\frac{\frac{1}{x}}{\left\vert \cos\left( x\right) \right\vert }\\ & =\infty \end{align*}

So I am doing something wrong or not using the above result correctly. Is it ok to use the zeros of $$g(x)$$ if they located at the ends of the interval as in this case? or do the zeros of $$g(x)$$ have to be inside the interval (i.e. not including end points)? As there are no other zeros inside the interval.

Does this mean if there are no zeros of $$g(x)$$ in the interval of integration, the integral is therefore zero, since nothing to sum?

How did Maple obtain zero for the above?

Update

To answer comment, here is what Maple gives for the two different lower limits

• What's maples output when you change the interval from $(0,\pi)$ to say either $(0.1,\pi)$ or $(-0.1,\pi)$? – snulty Mar 15 at 16:17
• @snulty I've updated my question with the new limits you asked for. Thanks – Nasser Mar 15 at 17:43
• The main problem is that $\delta(\sin x)$ has its support on the integral end points. Therefore you must specify whether the end points should be included. – md2perpe Mar 17 at 15:16

My guess is that it (Maple) isn't taking into account the endpoints since the integral

$$\int_{0.1}^\pi \frac{1}{2x} \delta(\sin(x))dx=0$$

On the other hand, I think there is a way to try and take into account the endpoints by using one of the definitions of the delta function

$$\int_0^b f(x)\delta(x)dx:=\lim_{\epsilon\to 0^+}\int_0^b \frac{1}{\pi}\frac{\epsilon}{x^2+\epsilon^2} f(x)dx$$

and making a substitution $$x=\epsilon y$$

$$\lim_{\epsilon\to 0^+}\int_0^{b/\epsilon}\frac{1}{\pi}\frac{\epsilon}{\epsilon^2y^2+\epsilon^2} f(\epsilon y)\epsilon dy= \frac{1}{\pi}\lim_{\epsilon\to 0^+}\int_0^{b/\epsilon}\frac{1}{y^2+1} f(\epsilon y) dy\to\frac{f(0)}{\pi}\int_0^\infty\frac{dy}{1+y^2}=\frac{f(0)}{2}$$

So I think one way you could define it would be half the value of the function at the endpoint.