# Integrating the Dirac Delta Function

1. Feb 9, 2008

### opticaltempest

I am trying to evaluate the following integral.

$$\int_{-\infty}^{\infty}{\delta(2t-3)\sin(\pi t) dt}$$

where delta represents the Dirac delta function.

I am told that the answer is -1. However, when I evaluate it in MATLAB and Maple 11, I get an answer of -1/2. What is the correct way to evaluate this integral by hand? Which answer is correct?

2. Feb 9, 2008

### CompuChip

The delta function just picks out the value in which the argument of the delta is zero.
So the integral will just give
$$sin(\pi t_0)$$
where t_0 is the solution to 2t - 3 = 0.

3. Feb 9, 2008

### opticaltempest

When I evaluate this integral in MATLAB I type:

syms t;
int(dirac(2*t-3)*sin(pi*t),-inf,inf)

and it returns -1/2.

4. Feb 9, 2008

5. Feb 9, 2008

### Dick

Yes, but you don't necessarily have to trust that formula. Change variables to u=2t-3. du=2dt (there's the missing 2). So the integral becomes (1/2)*delta(u)*sin(pi(u+3/2))*du. Now you can just put u=0.

6. Feb 9, 2008

Thanks

7. Feb 9, 2008

### opticaltempest

What would happen if I had

$$\int_{-\infty}^{\infty}{\delta \bigg(-\frac{1}{3} t \bigg) dt}$$ ?

Using change of variables we could have

$$u=-\frac{1}{3}t$$

Then

$$du=-\frac{1}{3}dt \implies dt=-3du$$

Our original integral is then equivalent to

$$\int_{-\infty}^{\infty}{\delta (u) \cdot -3 du}= -3$$

This answer doesn't agree with equation (5) listed on
http://mathworld.wolfram.com/DeltaFunction.html

According to (5) I should get 3 not -3. What is wrong?

8. Feb 9, 2008

### Dick

For that change of variables you have to reverse the limits as well. If t goes -infinity -> +infinity, u goes +infinity -> -infinity. Gives you an extra sign.

9. Feb 9, 2008

### opticaltempest

I recall changing limits when doing u-substitutions in previous calculus classes, but how do I know when to change the limits when dealing with infinite limits? Why do we need to 'flip' the limits on this integral with this change of variables?

10. Feb 9, 2008

### Dick

I just told you. If u=(-1/3)*t, then if t~+infinity then u~-infinity. So the upper limit becomes -infinity instead of +infinity. $$\int_{\infty}^{-\infty}{\delta (u) \cdot -3 du}= -\int_{-\infty}^{\infty}{\delta (u) \cdot -3 du}=3$$.

11. Oct 6, 2009

### ryukyu

When you do the change of variable in the OP's first problem, do the limits of integration change. If have a similar problem where the delta is 4t-3 instead of 2t-3. So I know

u=4t-3
du-4dt
t=(u+3)/4
dt=(1/4) * du

so I have 1/4 * int(sin(pi*(u+3)/4)*dirac(u)du

I have no idea how to move forward if the limits are +/- inf

I know my final result is supposed to be (1/8)sqrt(2)

Last edited: Oct 6, 2009
12. Oct 6, 2009

### Dick

The direction of the infinity limits doesn't change if u=4t-3. It looks to me like your main problem is that t=(u+3)/4 NOT t=(u-3)/4.Try solving for t again.

13. Oct 6, 2009

### ryukyu

I didn't think they limits changed. I just needed to be sure. I did fix the t in my original post. I didn't pay close enough attention to what I actually had written correctly on my homework.

I guess where I get confused is in placing u = 0. I know the goal was to find a t that would make the dirac argument equal 0 and that this is what we actually did in the substitution.

If we do this though doesn't dirac(0) = inf ?

making our integral (1/4)*int(sin(3pi/4)*inf du , -inf, inf)

14. Oct 6, 2009

### Dick

No, no. dirac(0) isn't really even inf, it's just plain not defined. The rule to remember is that integral(f(u)*dirac(u))=f(0) if zero is inside the limits of integration and f is continuous. Notice there is no 'integral' on the right side. Reread any material you have on the dirac delta function.

15. Oct 6, 2009

### ryukyu

Great, I've got it now. Thanks!

I did know that int(f(x)dirac(a)) = f(a) if a is in the limits. I don't know why I have trouble spotting the simple stuff like this. Our textbook is the bane of signals and systems (isbn: 0073309508) so it's no much help. Between the textbook and the instructor we have very few examples of how to do things.