# Convolution Question

Gold Member

## Homework Equations

f*f = integral from -inf to inf of f(t)f(x-t) dt = integral from -inf to inf of f(x-t)f(t)dt

## The Attempt at a Solution

My question concerns some issues with part a.

I break the problem up into two cases.

Case 1: When rectangle is sliding into the rectangle, since f(x-t) is moving.
I expect it to be from -2 ≤ x ≤ 0

In setting up the integral, I'm unsure how to analyze it based off my notes.

What I currently have:
Integral from -1 to 0 of 1*(1+t) dt where 1 represents f(x-t) and (1+t) represents f(t) part.
Unfortunately, this results in the wrong solution, as it then equals 1/2

Clearly, "x" needs to be part of the bounds based on the answer. My problem is, I don't understand how to get the bounds. I have drawn the structure with the rectangle being stationary and then the other rectangle sliding through it. I am thinking that I need to get the bounds from this drawing.
Any insight here is what I need help with and likely will guide me to understanding this problem.

Case 2: When rectangle is sliding out of the rectangle.
I expect it to be from 0 ≤ x ≤ 2

f*f(x) = x+2 if -2≤x≤0, = 2-x if 0≤x≤2, = 0 otherwise

## Answers and Replies

blue_leaf77
Homework Helper
In ##f*f = \int_{-\infty}^\infty f(x-x')f(x') \, dx'##, ##f(x')## is centered at the origin and ##f(x'-x)## is obtained after horizontal-flipping ##f(x')## and then translate it by the amount ##x##. For ##x>0##, ##f(x-x')## is on the left of ##f(x')## while for ##x<0## it's on the right of ##f(x')##.

Now, when ##x<-2##, there is no intersection between the two functions and the convolution integral returns zero. When ##-2<x<0##, there is nonzero intersection which takes the form of a rectangle. Find the left and right bounds of this intersection rectangle and compute the area of this intersection.

Then move to the case when ##0<x<2## where ##f(x-x')## is on the left of ##f(x')##. Find the left and right bounds of the intersection and same as before compute the area of this intersection.

Last edited:
RJLiberator
Gold Member
Find the left and right bounds of this intersection rectangle and compute the area of this intersection.

I'm drawing this part out and I find that from x = -1 to x = 0 we just have a square.

1 unit on the x direction and 1 unit on the y direction.
Meaning the area is 1*1 = 1.

So then that would explain the part of the integral that goes to 1, aka f(x-1) = 1.

would the integral simply be
integral from -1 to x+1 of 1*dt
therefore the answer then becomes (x+2) which solves the problem?

If so, the bounds then make some sense to me.

Gold Member
And then for case 2 we have
integral from (x-1) to 1 of 1*dt ==> 2-x

Or perhaps I have them confused case 1 vs case 2.

Ray Vickson
Homework Helper
Dearly Missed
I'm drawing this part out and I find that from x = -1 to x = 0 we just have a square.

1 unit on the x direction and 1 unit on the y direction.
Meaning the area is 1*1 = 1.

So then that would explain the part of the integral that goes to 1, aka f(x-1) = 1.

would the integral simply be
integral from -1 to x+1 of 1*dt
therefore the answer then becomes (x+2) which solves the problem?

If so, the bounds then make some sense to me.

From ##f(t)## you need ##-1 \leq t \leq 1## and from ##f(x-t)## you need ##-1 \leq x-t \leq 1##, or ##x-1 \leq t \leq x+1##. So, when ##-2 < x < 0## your integration goes from ##t = -1## to ##t = x+1##. When ##0 < x < 2## the integration goes from ##t = x-1## to ##t = 1##.

RJLiberator
Gold Member
Excellent. Then part f*f is solved and 80% understood.

Next, we have f*f*f

So, this separates into three cases. Since we use our solution in the above part to make it f*(solution)

Case 1: from -3≤ x ≤ -1

We get integration from 0 to x+3 of t dt which results in (1/2)(x+3)^2

Case 3 we go 1≤x≤3

We get integration from 0 to 3-x of t*dt which results in (1/2) (3-x)^2

Do any of these cases (Bounds) make sense. The answers are correct, but I'm struggling to form the bounds.

I have (what I think) is the right drawing of the situation. (f*f) creates a triangle from -2 to 2 on x. Then we have a box going through it in three cases.

Gold Member
Edit: Nevermind, I understand case 1 and 3 now, I had a similar problem in my notes.

So the integration for case 1 goes from t = -1 to t = x+2 on (1+t)dt
similarly, integration for case 3 goes from -2+x to 1 on (1-t)dt

Ray Vickson
Homework Helper
Dearly Missed
Excellent. Then part f*f is solved and 80% understood.

Next, we have f*f*f

So, this separates into three cases. Since we use our solution in the above part to make it f*(solution)

Case 1: from -3≤ x ≤ -1

We get integration from 0 to x+3 of t dt which results in (1/2)(x+3)^2

Case 3 we go 1≤x≤3

We get integration from 0 to 3-x of t*dt which results in (1/2) (3-x)^2

Do any of these cases (Bounds) make sense. The answers are correct, but I'm struggling to form the bounds.

I have (what I think) is the right drawing of the situation. (f*f) creates a triangle from -2 to 2 on x. Then we have a box going through it in three cases.

This gets increasingly messy as you take more convolutions. Instead, I prefer to use transform methods. First, lets translate from ##f(x)= 1\{-1 \leq x \leq 1\}## to ##g(x) = 1\{ 0 \leq x \leq 2 \}##. In other words, ##f(x) = g(x+1)##. So, if we can find ##g_n = g*g* \cdots *g## (the ##n##-fold convolution of ##g##) we can get the ##n##-fold convolution ##f_n## of ##f## as ##f_n(x) = g_n(x+n)##.

So, the Laplace transform of ##g## is
$$\hat{g}(s) = \int_0^{\infty} g(x) e^{-sx} \, dx = \frac{1-e^{-2s}}{s}$$
The nice thing about transforms is (among others) the fact that the transform of a convolution is the product of the transforms. Thus, the transform ##\hat{g_n}(s)## of ##g_n## is
$$\hat{g_n}(s) = \left(\hat{g}(s) \right)^n = \frac{(1-e^{-2s})^n}{s^n}$$
We can expand this as
$$\hat{g_n}(s) = \sum_{k=0}^n (-1)^k {n \choose k} \frac{e^{-2ks}}{s^n}$$
Now we can find the inverse transform of each term separately (using various properties of Laplace transforms) and so obtain an explicit, closed-form formula for ##g_n(x)## on ##0 \leq x \leq 2n##.

However, that is just how I would do it; you might not be permitted to use those methods, in which case good luck dealing with increasingly messy integration regions.

RJLiberator