Convolution of an indicator function

In summary: But x-y isn't always in (-1,1). Here's what you need to do. Mark off a horizontal y-axis (not x axis) between -3 and 3. Mark a point called x at about -1.5. Then highlight the interval that goes one unit each direction of your point x. These will be the points where I(x-y) = 1 as y varies from -1 to 1. So draw a graph of this I(x-y), it is one on that interval and 0 elsewhere. Now what happens if you integrate that function...
  • #1
henry22
28
0

Homework Statement



Calculate f*f where f is the indicator function (-1,1)

Homework Equations


The convolution f*g of functions f and g is defined by:

f*g(x)=[itex]\int^{\infty}_{-\infty} f(x-y)g(y)\ dy[/itex]

The Attempt at a Solution



I haven't really done convolution before as I am teaching myself, so I am looking for a start please.
 
Physics news on Phys.org
  • #2
henry22 said:

Homework Statement



Calculate f*f where f is the indicator function (-1,1)

Homework Equations


The convolution f*g of functions f and g is defined by:

f*g(x)=[itex]\int^{\infty}_{-\infty} f(x-y)g(y)\ dy[/itex]

The Attempt at a Solution



I haven't really done convolution before as I am teaching myself, so I am looking for a start please.

Let's call your indicator function I, which is 1 on (-1,1) and zero elswhere. So you are trying to calculate

[tex]\int^{\infty}_{-\infty} I(x-y)I(y)\ dy =\int_{-1}^{1}I(x-y)\cdot 1\ dy[/tex]

since I(y) is zero elsewhere. The value of this depends on where x is. For example, if x is too large, say x = 10, then when y is in (-1,1), (x-y) will never be in (-1,1) to trigger the indicator function. So carefully examine what values make it non-zero and evaluate the integral accordingly.
 
  • #3
LCKurtz said:
Let's call your indicator function I, which is 1 on (-1,1) and zero elswhere. So you are trying to calculate

[tex]\int^{\infty}_{-\infty} I(x-y)I(y)\ dy =\int_{-1}^{1}I(x-y)\cdot 1\ dy[/tex]

since I(y) is zero elsewhere. The value of this depends on where x is. For example, if x is too large, say x = 10, then when y is in (-1,1), (x-y) will never be in (-1,1) to trigger the indicator function. So carefully examine what values make it non-zero.


So does x have to be between (2,-2) is that what you mean?
 
  • #4
LCKurtz said:
Let's call your indicator function I, which is 1 on (-1,1) and zero elswhere. So you are trying to calculate

[tex]\int^{\infty}_{-\infty} I(x-y)I(y)\ dy =\int_{-1}^{1}I(x-y)\cdot 1\ dy[/tex]

since I(y) is zero elsewhere. The value of this depends on where x is. For example, if x is too large, say x = 10, then when y is in (-1,1), (x-y) will never be in (-1,1) to trigger the indicator function. So carefully examine what values make it non-zero and evaluate the integral accordingly.

henry22 said:
So does x have to be between (2,-2) is that what you mean?

As you apparently have figured out, the integral will be 0 for x outside of that interval. What is it for x in that interval? You may have to look at cases.
 
  • #5
LCKurtz said:
As you apparently have figured out, the integral will be 0 for x outside of that interval. What is it for x in that interval? You may have to look at cases.

will the integral not just be 2 because the indicator function if triggered so it's the integral of 1 which is x between 1 and -1 which is 2?
 
  • #6
henry22 said:
will the integral not just be 2 because the indicator function if triggered so it's the integral of 1 which is x between 1 and -1 which is 2?

No. For example, suppose x = 1.9. Then if y is between -1 and 1 think about integrating I(x-y) for that x:

[tex]\int_{-1}^1 I(1.9 - y)\, dy[/tex]


For most of the y in (-1,1), 1.9-y is not going to be in (-1,1) so for most of those y the indicater will be 0. But not for all those y. It depends on the value of x.
 
  • #7
LCKurtz said:
No. For example, suppose x = 1.9. Then if y is between -1 and 1 think about integrating I(x-y) for that x:

[tex]\int_{-1}^1 I(1.9 - y)\, dy[/tex]


For most of the y in (-1,1), 1.9-y is not going to be in (-1,1) so for most of those y the indicater will be 0. But not for all those y. It depends on the value of x.

I understand what you mean, so I have y in (-1,1) and x in (2,-2) but I don't see a formula between the two that will make sure x-y is always in (-1,1)?
 
  • #8
LCKurtz said:
No. For example, suppose x = 1.9. Then if y is between -1 and 1 think about integrating I(x-y) for that x:

[tex]\int_{-1}^1 I(1.9 - y)\, dy[/tex]


For most of the y in (-1,1), 1.9-y is not going to be in (-1,1) so for most of those y the indicater will be 0. But not for all those y. It depends on the value of x.

henry22 said:
I understand what you mean, so I have y in (-1,1) and x in (2,-2) but I don't see a formula between the two that will make sure x-y is always in (-1,1)?

But x-y isn't always in (-1,1). Here's what you need to do. Mark off a horizontal y-axis (not x axis) between -3 and 3. Mark a point called x at about -1.5. Then highlight the interval that goes one unit each direction of your point x. These will be the points where I(x-y) = 1 as y varies from -1 to 1. So draw a graph of this I(x-y), it is one on that interval and 0 elsewhere. Now what happens if you integrate that function you have drawn from y = -1 to 1? What your picture looks like depends on where x is.
 
  • #9
LCKurtz said:
But x-y isn't always in (-1,1). Here's what you need to do. Mark off a horizontal y-axis (not x axis) between -3 and 3. Mark a point called x at about -1.5. Then highlight the interval that goes one unit each direction of your point x. These will be the points where I(x-y) = 1 as y varies from -1 to 1. So draw a graph of this I(x-y), it is one on that interval and 0 elsewhere. Now what happens if you integrate that function you have drawn from y = -1 to 1? What your picture looks like depends on where x is.

Sorry I think I am getting confused. I have done the graph like you said, so y must be between -1 and 1. So if x=-1.5 then I(x-y) = 1 for y between -0.5 and -1?
 
  • #10
henry22 said:
Sorry I think I am getting confused. I have done the graph like you said, so y must be between -1 and 1. So if x=-1.5 then I(x-y) = 1 for y between -0.5 and -1?

I don't want you to think x = -1.5, just be a point near there. Here's what your picture should look like:

indicator.jpg


x is an arbitrary point, and f(y) = I(x-y) is a translated indicator function that is 1 for a distance of 1 each direction from x and 0 elsewhere.

Your problem is to calculate the integral:

[tex]\int_{-1}^{1} I(x-y)\ dy[/tex]

Note that f(y) is mostly zero on (-1,1) and you need to figure out the value of ? to do the integral. It depends on x. You need to see what x this picture works for and see if you need a different picture if x is farther to the right.
 
Last edited:
  • #11
LCKurtz said:
I don't want you to think x = -1.5, just be a point near there. Here's what your picture should look like:

indicator.jpg


x is an arbitrary point, and f(y) = I(x-y) is a translated indicator function that is 1 for a distance of 1 each direction from x and 0 elsewhere.

Your problem is to calculate the integral:

[tex]\int_{-1}^{1} I(x-y)\ dy[/tex]

Note that f(y) is mostly zero on (-1,1) and you need to figure out the value of ? to do the integral. It depends on x. You need to see what x this picture works for and see if you need a different picture if x is farther to the right.

I think I have been a bit stupid here, there is a question before this that I think answers what you are asking. I had to measure the overlap of the intervals (-1,1) and (-1+x,1+x) for various values of x. I found that for values of x not in (-2,2) the overlap is empty and equals zero. For values of x inside (-2,2) the overlap is the intersection of the two intervals and the measure is given by 2-|x|.

Will this help me?
 
  • #12
henry22 said:
I think I have been a bit stupid here, there is a question before this that I think answers what you are asking. I had to measure the overlap of the intervals (-1,1) and (-1+x,1+x) for various values of x. I found that for values of x not in (-2,2) the overlap is empty and equals zero. For values of x inside (-2,2) the overlap is the intersection of the two intervals and the measure is given by 2-|x|.

Will this help me?

Yes, it will if you understand what the overlap has to do with the value of the integral. Do the integral represented by that last picture and see what you get.
 
  • #13
LCKurtz said:
Yes, it will if you understand what the overlap has to do with the value of the integral. Do the integral represented by that last picture and see what you get.

I think I understand what the overlap is. Is the overlap not the values the make the integral non-zero.

So to do the integral instead of the limits being 1 and -1 they will become -1 and ?
 
  • #14
henry22 said:
I think I understand what the overlap is. Is the overlap not the values the make the integral non-zero.

So to do the integral instead of the limits being 1 and -1 they will become -1 and ?

Yes. You get zero for the function on the rest of the interval don't you? You are integrating the function in the picture after all.

So, in the picture, what is ? in terms of x? Then do the integral and tell me what you get. It will be some function of x.

Once you figure that out your next problem is to figure out for what x the answer you get works. Think about sliding the picture left and right corresponding to different values of x and what it does to the limits of integration. And you should also be able to see why x outside of (-2,2) gives zero for the integral.

This forum has gotten dog-slow for some reason and keeps timing out for me. I hope they are working on that.
 
  • #15
LCKurtz said:
Yes. You get zero for the function on the rest of the interval don't you? You are integrating the function in the picture after all.

So, in the picture, what is ? in terms of x? Then do the integral and tell me what you get. It will be some function of x.

Once you figure that out your next problem is to figure out for what x the answer you get works. Think about sliding the picture left and right corresponding to different values of x and what it does to the limits of integration. And you should also be able to see why x outside of (-2,2) gives zero for the integral.

This forum has gotten dog-slow for some reason and keeps timing out for me. I hope they are working on that.

Yeah it's being very slow with me too. Erm would ?=x+1 so the integral is equal to (x+2)?
 
  • #16
henry22 said:
Yeah it's being very slow with me too. Erm would ?=x+1 so the integral is equal to (x+2)?

Yes, but that doesn't work for all x. Look at what happens as x moves to the right.
 
  • #17
LCKurtz said:
Yes, but that doesn't work for all x. Look at what happens as x moves to the right.

If x were to move to the right would it then be between x-1 and 1 which would then give 2-x?
 
  • #18
LCKurtz said:
Yes, but that doesn't work for all x. Look at what happens as x moves to the right.

I'm not sure but is the measure of the overlap I worked out not the answer to the integral?

So the integral will be equal to 2-|x| i.e 2+x when x is negative and 2-x when x is positive?
 
  • #19
henry22 said:
I'm not sure but is the measure of the overlap I worked out not the answer to the integral?

So the integral will be equal to 2-|x| i.e 2+x when x is negative and 2-x when x is positive?

At last the site seems up to speed. Yes, that is the correct answer. But did you actually work out the integrals to get the answers? Do you see why the form of the answer changes when x = 0? If the answer to both is "yes", then I guess we're done here. :cool:
 
  • #20
LCKurtz said:
At last the site seems up to speed. Yes, that is the correct answer. But did you actually work out the integrals to get the answers? Do you see why the form of the answer changes when x = 0? If the answer to both is "yes", then I guess we're done here. :cool:

Erm to be honest I just used the previous question :uhh:, I thought that was all I needed to do?

Do you mean that is it because the overlap is like a triangle function?
 
  • #21
LCKurtz said:
At last the site seems up to speed. Yes, that is the correct answer. But did you actually work out the integrals to get the answers? Do you see why the form of the answer changes when x = 0? If the answer to both is "yes", then I guess we're done here. :cool:

henry22 said:
Erm to be honest I just used the previous question :uhh:, I thought that was all I needed to do?

Do you mean that is it because the overlap is like a triangle function?

I don't know what you mean when you say the overlap is "like a triangle function". Or earlier where you said "I'm not sure but is the measure of the overlap I worked out not the answer to the integral" what you meant by "measure of the overlap".

Perhaps you completely understand it and we are just having trouble communicating. So please answer these three questions:

1. Did you get those two functions making the triangle shape by setting up the integrals and taking antiderivatives?

2. Do you understand why you get different answers depending on whether x > 0 or x < 0 and why 0 is where it changes form?

3. Do you understand why the integral is zero when x is outside (-2,2)?
 
  • #22
LCKurtz said:
I don't know what you mean when you say the overlap is "like a triangle function". Or earlier where you said "I'm not sure but is the measure of the overlap I worked out not the answer to the integral" what you meant by "measure of the overlap".

Perhaps you completely understand it and we are just having trouble communicating. So please answer these three questions:

1. Did you get those two functions making the triangle shape by setting up the integrals and taking antiderivatives?

2. Do you understand why you get different answers depending on whether x > 0 or x < 0 and why 0 is where it changes form?

3. Do you understand why the integral is zero when x is outside (-2,2)?

1. This is the bit I'm struggling with i think?

2. I think so, is it because when x < 0 the overlap is given by 2+x and when x<0 the overlap is 2-x?

3. Because then x-y is not in (-1,1) and so the indicator function is zero and so the integral is zero
 
  • #23
LCKurtz said:
I don't want you to think x = -1.5, just be a point near there. Here's what your picture should look like:

indicator.jpg


x is an arbitrary point, and f(y) = I(x-y) is a translated indicator function that is 1 for a distance of 1 each direction from x and 0 elsewhere.

Your problem is to calculate the integral:

[tex]\int_{-1}^{1} I(x-y)\ dy[/tex]

Note that f(y) is mostly zero on (-1,1) and you need to figure out the value of ? to do the integral. It depends on x. You need to see what x this picture works for and see if you need a different picture if x is farther to the right.

LCKurtz said:
I don't know what you mean when you say the overlap is "like a triangle function". Or earlier where you said "I'm not sure but is the measure of the overlap I worked out not the answer to the integral" what you meant by "measure of the overlap".

Perhaps you completely understand it and we are just having trouble communicating. So please answer these three questions:

1. Did you get those two functions making the triangle shape by setting up the integrals and taking antiderivatives?

2. Do you understand why you get different answers depending on whether x > 0 or x < 0 and why 0 is where it changes form?

3. Do you understand why the integral is zero when x is outside (-2,2)?

henry22 said:
1. This is the bit I'm struggling with i think?

Look at the above graph from an earlier post. In one of your posts you figured out that ? = x+1. So OK, what do you get if you integrate that function in that picture from -1 to 1. Actually do the integral.

2. I think so, is it because when x < 0 the overlap is given by 2+x and when x<0 the overlap is 2-x?

It isn't "overlap" we are after, it is the value of the integral. Draw another picture with x > 0 and do the corresponding integral once you figure out the interval. That is the only way you will understand where the 2+x and 2-x actually come from.

3. Because then x-y is not in (-1,1) and so the indicator function is zero and so the integral is zero

Yes for 3.
 
  • #24
LCKurtz said:
Look at the above graph from an earlier post. In one of your posts you figured out that ? = x+1. So OK, what do you get if you integrate that function in that picture from -1 to 1. Actually do the integral.



It isn't "overlap" we are after, it is the value of the integral. Draw another picture with x > 0 and do the corresponding integral once you figure out the interval. That is the only way you will understand where the 2+x and 2-x actually come from.



Yes for 3.

1. so the integral would be between -1 and x+1 of 1dy which would be (x+1)-(-1)=x+2?


2.If x>0 then the integral is between 1 and x-1 of 1dy which would be (x-1)-(1)=x-2
 
  • #25
henry22 said:
1. so the integral would be between -1 and x+1 of 1dy which would be (x+1)-(-1)=x+2?2.If x>0 then the integral is between 1 and x-1 of 1dy which would be (x-1)-(1)=x-2

You have the limits reversed on the second one but other than that:

Yes! Ta-Daaa! :biggrin:

You have now successfully actually calculated a convolution integral. Now that you have done that you might enjoy an animated picture of a convolution, albeit with two different functions. But it is the same idea. The shaded area represents the value of the integral. Look here:

http://mathworld.wolfram.com/Convolution.html
 
  • #26
LCKurtz said:
You have the limits reversed on the second one but other than that:

Yes! Ta-Daaa! :biggrin:

You have now successfully actually calculated a convolution integral. Now that you have done that you might enjoy an animated picture of a convolution, albeit with two different functions. But it is the same idea. The shaded area represents the value of the integral. Look here:

http://mathworld.wolfram.com/Convolution.html

I can't believe it!

So can I just check I have understood it. So to find the integral I need to say how the limits change depending on whether x>0 or x<0 and then calculate the integral for each case?
 
  • #27
henry22 said:
I can't believe it!

So can I just check I have understood it. So to find the integral I need to say how the limits change depending on whether x>0 or x<0 and then calculate the integral for each case?

That's what it amounts to. Note that I did edit that last post; you still have a minor error that I didn't notice my last post.
 
  • #28
LCKurtz said:
That's what it amounts to. Note that I did edit that last post; you still have a minor error that I didn't notice my last post.

Thank for all your help, it's very much appreciated!
 

What is the definition of convolution of an indicator function?

The convolution of an indicator function is a mathematical operation that combines two functions to create a third function. It is represented by '*' symbol and is defined as the integral of the product of the two functions over a certain range.

What is the significance of convolution of an indicator function in scientific research?

The convolution of an indicator function is a powerful tool in signal processing and data analysis. It is used to smooth and filter noisy data, detect patterns, and extract useful information from signals.

How is convolution of an indicator function related to the Fourier transform?

The convolution of an indicator function is closely related to the Fourier transform, as it can be expressed as a product of the Fourier transforms of the two functions being convolved. This relationship is useful in simplifying complex convolution operations.

What are the key properties of convolution of an indicator function?

The key properties of convolution of an indicator function include commutativity, associativity, and distributivity. It is also linear, meaning that scaling and superposition operations can be applied to the convolved function.

Can convolution of an indicator function be applied to non-continuous functions?

Yes, convolution can be applied to non-continuous functions as long as the function is well-defined over the range of integration. In fact, it is commonly used in digital signal processing where signals are discrete and not continuous.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
136
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
200
  • Calculus and Beyond Homework Help
Replies
1
Views
776
  • Calculus and Beyond Homework Help
Replies
8
Views
455
  • Calculus and Beyond Homework Help
Replies
0
Views
139
  • Calculus and Beyond Homework Help
Replies
16
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
258
  • Calculus and Beyond Homework Help
Replies
1
Views
756
  • Calculus and Beyond Homework Help
Replies
3
Views
264
Back
Top