Calculate the Dirac delta function integral

In summary, the conversation discusses a question regarding drawing a graph of a specific function. After some discussion and clarification, the conversation shifts to evaluating the integral of this function using the Dirac Delta function and a substitution. The conversation ends with a suggestion to split the integral and use a substitution.
  • #1
PRASHANT KUMAR
23
0
https://1drv.ms/w/s!Aip12L2Kz8zghV6Cnr8jPcRTpqTX
https://1drv.ms/w/s!Aip12L2Kz8zghV6Cnr8jPcRTpqTX
My question is in the above link
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
PRASHANT KUMAR said:
https://1drv.ms/w/s!Aip12L2Kz8zghV6Cnr8jPcRTpqTX

My question is in the above link

Can you draw a graph of ##\delta(x^2 -3x+2)##?
 
  • #3
https://1drv.ms/w/s!Aip12L2Kz8zghWCxSwKUHyOsZE-6
here is the the graph of this function
 
  • #4
PRASHANT KUMAR said:
https://1drv.ms/w/s!Aip12L2Kz8zghWCxSwKUHyOsZE-6
here is the the graph of this function
So, it has two spikes?
 
  • #5
yes it has
 
  • #6
PRASHANT KUMAR said:
yes it has

Okay, so does that not give you a clue as to how to evaluate the integral? Hint: trying splitting the integral.

Note: you'll also have to think about a substitution to get the ##\delta## function into a simpler format.
 
  • #7
https://1drv.ms/w/s!Aip12L2Kz8zghWJU31OqLM79se67
 
  • #8
PeroK said:
Okay, so does that not give you a clue as to how to evaluate the integral? Hint: trying splitting the integral.

Note: you'll also have to think about a substitution to get the ##\delta## function into a simpler format.
I did not get this Note: you'll also have to think about a substitution to get the ##\delta## function into a simpler format.[/QUOTE]
 
  • #9
PRASHANT KUMAR said:
I did not get this Note: you'll also have to think about a substitution to get the ##\delta## function into a simpler format.
[/QUOTE]

Think about how to calculate, for example:

##\int_{-\infty}^{+\infty} f(x)\delta(x^2)dx##
 
  • #10
it will be f(0)
 
  • #11
PRASHANT KUMAR said:
it will be f(0)

Try the substitution ##y = x^2##.

In fact, a simpler example to try first is:

##\int_{-\infty}^{+\infty} f(x)\delta(2x)dx##
 
  • #12
okay i got it
when y =2x then dy = 2 dx so the integral will be 1/2 f(0)
 
  • #13
is the discussion over?
 
  • #14
PRASHANT KUMAR said:
is the discussion over?

I was at the dentist!

So, you have to do something with that quadratic in the delta function.
 
  • #15
what is wrong if i do it like this

##\int_∞^1 (x^2+1) δ(x^2-3x+2) \, dx##+##\int_1^2(x^2+1) δ(x^2-3x+2) \, dx##+##\int_2^\infty(x^2+1) δ(x^2-3x+2) \, dx## (in the first integral the limits will be from - ∞ to 1)
= 0+2+5=7
since in the first integral the dirac delta function is zero and in the second and third it will be one
 
  • #16
PRASHANT KUMAR said:
what is wrong if i do it like this

##\int_∞^1 (x^2+1) δ(x^2-3x+2) \, dx##+##\int_1^2(x^2+1) δ(x^2-3x+2) \, dx##+##\int_2^\infty(x^2+1) δ(x^2-3x+2) \, dx## (in the first integral the limits will be from - ∞ to 1)
= 0+2+5=7
since in the first integral the dirac delta function is zero and in the second and third it will be one

You have the same problem that ##\delta(x^2 - 3x + 2) \ne \delta(x)##. That first function is not the Dirac Delta function, it's a composition function and doesn't have exactly the same properties as the Dirac Delta function.
 
  • #17
so now if i consider ##x^2-3x+2 = y## then it will give me (2x-3)dx=dy and if i substitute dx=##\frac{dy}{2x-3}##
x will become ##\frac{3\pm\sqrt{1+y}}{2}## and ##x^2##= ##\frac{(10+y)\pm6\sqrt{1+y}}{4}##then my integral will look like
##\int_{-\infty}^{+\infty}\frac{(\frac{(10+y)\pm6\sqrt{1+y}}{4}+1)δ(y)}{\pm\sqrt{1+y}}\,dy##
here if we take + signs into account then the answer comes out to be 5 and if we consider - signs then the answer is -2 which is not appropriate because the integral of dirac delta function should be a unit step function and which is one if y is greater than or equal to zero and everywhere else it is zero so the positive 5 should be considered as correct answer . i think so
is this correct?
 
  • #18
PeroK said:
You have the same problem that ##\delta(x^2 - 3x + 2) \ne \delta(x)##. That first function is not the Dirac Delta function, it's a composition function and doesn't have exactly the same properties as the Dirac Delta function.
##δ(x^2-3x+2)≠δ(x)## because δ(x) has only one spike at zero while ##δ(x^2-3x+2)## has two spikes at 1 and 2 .
But i have a doubt what is the need of equating these two?
 
  • #19
PRASHANT KUMAR said:
what is wrong if i do it like this

##\int_∞^1 (x^2+1) δ(x^2-3x+2) \, dx##+##\int_1^2(x^2+1) δ(x^2-3x+2) \, dx##+##\int_2^\infty(x^2+1) δ(x^2-3x+2) \, dx## (in the first integral the limits will be from - ∞ to 1)
= 0+2+5=7
since in the first integral the dirac delta function is zero and in the second and third it will be one

This was better. You need to split the integral before you look at substitutions. I would do the first integral from ##0## to ##3/2## and the second from ##3/2## to ##3##, say. That seems a lot neater.

Then you can use the ##y## substitution. Although, there is also a trick to leave the x-function as it is. Since you are not going to integrate it, it won't change. This is what I mean:

With ##y = x^2 - 3x + 2 = (x - 3/2)^2 - 1/4## and ##dy = (2x - 3)dx##

##\int_0^{3/2}(x^2 + 1) \delta(x^2 - 3x + 2)dx = \int_2^{-1/4} \frac{x^2 +1}{2x-3} \delta(y) dy = -\int_{-1/4}^2 \frac{x^2 +1}{2x-3} \delta(y) dy = -\frac{x^2 +1}{2x-3}|_{y=0} = -\frac{x^2 +1}{2x-3}|_{x=1} = 2##

Notice that because ##2x-3 = -1## you get same answer,. This is a coincidence. If you change the quadratic it won't be the same.
 
  • #20
PeroK said:
This was better. You need to split the integral before you look at substitutions. I would do the first integral from ##0## to ##3/2## and the second from ##3/2## to ##3##, say. That seems a lot neater.

Then you can use the ##y## substitution. Although, there is also a trick to leave the x-function as it is. Since you are not going to integrate it, it won't change. This is what I mean:

With ##y = x^2 - 3x + 2 = (x - 3/2)^2 - 1/4## and ##dy = (2x - 3)dx##

##\int_0^{3/2}(x^2 + 1) \delta(x^2 - 3x + 2)dx = \int_2^{-1/4} \frac{x^2 +1}{2x-3} \delta(y) dy = -\int_{-1/4}^2 \frac{x^2 +1}{2x-3} \delta(y) dy = -\frac{x^2 +1}{2x-3}|_{y=0} = -\frac{x^2 +1}{2x-3}|_{x=1} = 2##

Notice that because ##2x-3 = -1## you get same answer,. This is a coincidence. If you change the quadratic it won't be the same.
how did you chose the limits of integration from 0 to 3/2 and 3/2 to3
 
  • #21
PRASHANT KUMAR said:
how did you chose the limits of integration from 0 to 3/2 and 3/2 to3

They can be anything, as long as they cover the two zeroes of the quadratic. ##0.9 - 1.1## and ##1.9 - 2.1## would have done just as well.

Can you see the problem trying to do the quadratic substitution across the whole range? And why you should split the integral first?
 
  • #22
PeroK said:
This was better. You need to split the integral before you look at substitutions. I would do the first integral from ##0## to ##3/2## and the second from ##3/2## to ##3##, say. That seems a lot neater.

Then you can use the ##y## substitution. Although, there is also a trick to leave the x-function as it is. Since you are not going to integrate it, it won't change. This is what I mean:

With ##y = x^2 - 3x + 2 = (x - 3/2)^2 - 1/4## and ##dy = (2x - 3)dx##

##\int_0^{3/2}(x^2 + 1) \delta(x^2 - 3x + 2)dx = \int_2^{-1/4} \frac{x^2 +1}{2x-3} \delta(y) dy = -\int_{-1/4}^2 \frac{x^2 +1}{2x-3} \delta(y) dy = -\frac{x^2 +1}{2x-3}|_{y=0} = -\frac{x^2 +1}{2x-3}|_{x=1} = 2##

Notice that because ##2x-3 = -1## you get same answer,. This is a coincidence. If you change the quadratic it won't be the same.
##-\int_{-1/4}^2 \frac{x^2 +1}{2x-3} \delta(y) dy## why did you put a negative sign here?
 
  • #23
PeroK said:
They can be anything, as long as they cover the two zeroes of the quadratic. ##0.9 - 1.1## and ##1.9 - 2.1## would have done just as well.

Can you see the problem trying to do the quadratic substitution across the whole range? And why you should split the integral first?
yes i think the problem in this case arises because of the two spikes of the function so there is a need to split the integral so that we can solve it separately for each one.
 
  • #24
PRASHANT KUMAR said:
##-\int_{-1/4}^2 \frac{x^2 +1}{2x-3} \delta(y) dy## why did you put a negative sign here?

The integral with respect to ##y## came out the "wrong" way. The lower limit was greater than the upper limit. In general, you need to look out for this when integrating:

##\int_a^b = - \int_b^a##

So, for example:

##\int_1^{-1}\delta(x)dx = -1##

I could have avoided this by having ##y = -(x^2 -3x +2)## in that integral. Then the limits would have been the right way round (with respect to ##y##) and the negative sign would have come from ##dy##.
 
  • #25
PeroK said:
The integral with respect to ##y## came out the "wrong" way. The lower limit was greater than the upper limit. In general, you need to look out for this when integrating:

##\int_a^b = - \int_b^a##

So, for example:

##\int_1^{-1}\delta(x)dx = -1##

I could have avoided this by having ##y = -(x^2 -3x +2)## in that integral. Then the limits would have been the right way round (with respect to ##y##) and the negative sign would have come from ##dy##.
But if we consider ##y = -(x^2 -3x +2)##then our dirac delta function will look like δ(-y) is that okay?
 
  • #26
@PRASHANT KUMAR even at this level graphs help. I have a nice graph of ##x^2-3x +2##, so I can see clearly what the function is doing about the zeros and what happens when I substitute ##y## It is easy to miss that the function has a negative gradient around ##x=1## so the natural integral substitution comes out the wrong way.
 
  • #27
PRASHANT KUMAR said:
But if we consider ##y = -(x^2 -3x +2)##then our dirac delta function will look like δ(-y) is that okay?

Good point. Best to stick with the way I did it first time!
 
  • #28
PeroK said:
Good point. Best to stick with the way I did it first time!
so where does the solution lie?
 
  • #29
PeroK said:
@PRASHANT KUMAR even at this level graphs help. I have a nice graph of ##x^2-3x +2##, so I can see clearly what the function is doing about the zeros and what happens when I substitute ##y## It is easy to miss that the function has a negative gradient around ##x=1## so the natural integral substitution comes out the wrong way.
yes it has negative gradient but i could not link these two : natural integral and negative gradient
 
  • #30
PeroK said:
The integral with respect to ##y## came out the "wrong" way. The lower limit was greater than the upper limit. In general, you need to look out for this when integrating:

##\int_a^b = - \int_b^a##

So, for example:

##\int_1^{-1}\delta(x)dx = -1##

I could have avoided this by having ##y = -(x^2 -3x +2)## in that integral. Then the limits would have been the right way round (with respect to ##y##) and the negative sign would have come from ##dy##.
##\int_1^{-1}\delta(x)dx = -1## i think this should be 1
 
  • #31
PRASHANT KUMAR said:
so where does the solution lie?

Okay. Let's look at

##I = \int f(x) \delta((x-a)(x-b))dx## where ##a < b##

Your problem is a special case of this, but it may be easier to look at the general case to see what is going on.

If we draw a graph of this quadratic, we get two roots at ##x = a## and ##x = b##. So, we can see that:

##I = \int_{a-\epsilon}^{a+\epsilon} f(x) \delta((x-a)(x-b))dx + \int_{b-\epsilon}^{b+\epsilon} f(x) \delta((x-a)(x-b))dx##

Where we have focused on the two zeroes and taken a small interval around each, using a small ##\epsilon##

Now, if we do the substitution ##y = (x-a)(x-b)## and ##dy = (2x - a -b) dx## and

##I = \int_{y_1}^{y_2} \frac{f(x)}{2x-a-b} \delta(y)dy + \int_{y_3}^{y_4} \frac{f(x)}{2x-a-b} \delta(y)dy##

Where ##y_1, y_2## etc. are the y-values for ##a-\epsilon, a+\epsilon## etc.

Now, from the graph, we have to note that ##y_1 > 0## and ##y_2 < 0##. So, we need to get these limits in the correct order. Also, as we have this in the Dirac function for ##y##, we are simply evaluating at y=0, which equates to ##x =a## and ##x=b## respectively. So:

##I = -\frac{f(x)}{2x-a-b}|_{x=a} + \frac{f(x)}{2x-a-b}|_{x=b} = \frac{f(a) +f(b)}{b-a}##
 
  • #32
PRASHANT KUMAR said:
##\int_1^{-1}\delta(x)dx = -1## i think this should be 1

No.

##\int_1^{-1}\delta(x)dx = -\int_{-1}^{1}\delta(x)dx = -1##

As I said, this is generally true for any integral on any interval. If you swap the limits, you change the sign of the integral.
 
  • #33
PeroK said:
No.

##\int_1^{-1}\delta(x)dx = -\int_{-1}^{1}\delta(x)dx = -1##

As I said, this is generally true for any integral on any interval. If you swap the limits, you change the sign of the integral.
yes that is true if we change the sign then the limits are interchanged but how can it imply that the lower limit should always be less than the upper limit
 
  • #34
PRASHANT KUMAR said:
yes that is true if we change the sign then the limits are interchanged but how can it imply that the lower limit should always be less than the upper limit

It doesn't, but if you use a substitution to solve an integral sometimes the limits come out the wrong way. You might get something like:

##\int_{\pi}^{0} \sin(x) dx = -\cos(x)|_{\pi}^0 = -1 -1 = -2##

And, we know that ##\int_0^{\pi} \sin(x) = 2##

This is a basic property of the integral we are talking about here.
 
  • #35
PeroK said:
It doesn't, but if you use a substitution to solve an integral sometimes the limits come out the wrong way. You might get something like:

##\int_{\pi}^{0} \sin(x) dx = -\cos(x)|_{\pi}^0 = -1 -1 = -2##

And, we know that ##\int_0^{\pi} \sin(x) = 2##

This is a basic property of the integral we are talking about here.
while solving the problem if we do such type of substitution then it is necessary to put a negative sign otherwise it will be wrong?
 

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
31
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus
Replies
25
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
Replies
4
Views
189
  • Calculus and Beyond Homework Help
Replies
8
Views
272
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
Back
Top