Integrating a rect(x) function visually/intuitively

3 replies · 20K views · last reply
Lavace
Messages
62
Reaction score
0

Homework Statement


Compute the standard inner product <f,g> between two one-dimensional functions f(x) = rect(0.5 + x) and g(x) = rect(0.5x), which both depend on the argument x is a member of ℝ.


Homework Equations


Clearly, we must solve the following :
<f,g> = ∫f(x)g(x) dx

between the intervals of -0.5 and +0.5.

The Attempt at a Solution


I have drawn out two graphs, the top one is what the original rect(x) function looks like, and the bottom one contains f(x) (green) and g(x) (orange).

Two plots: top shows a unit rect function from -0.5 to 0.5 at height 1; bottom shows a green rect from -0.5 to 0 and an orange rect from -0.25 to 0.25, both at height 1, on axes marked -0.5, -0.25, 0.


If I was integrating just one function, I could say that it is the area of the rectangle between the interval.

However, I'm not sure how this changes with ∫f(x)g(x), could someone enlighten me?

Finally, is g(x) drawn correctly?

Many thanks
 
Lavace said:

Homework Statement


Compute the standard inner product <f,g> between two one-dimensional functions f(x) = rect(0.5 + x) and g(x) = rect(0.5x), which both depend on the argument x is a member of ℝ.


Homework Equations


Clearly, we must solve the following :
<f,g> = ∫f(x)g(x) dx

between the intervals of -0.5 and +0.5.

The Attempt at a Solution


I have drawn out two graphs, the top one is what the original rect(x) function looks like, and the bottom one contains f(x) (green) and g(x) (orange).

Two graphs of rectangular pulse functions on x-y axes. Top: a unit-height box spanning -0.5 to 0.5 on the x-axis. Bottom: a green box from -0.5 to -0.25 and an orange box from -0.25 to 0.5, both of height 1.


If I was integrating just one function, I could say that it is the area of the rectangle between the interval.

However, I'm not sure how this changes with ∫f(x)g(x), could someone enlighten me?

Finally, is g(x) drawn correctly?

Many thanks

It seems you are missing a couple of pieces of information, at least I'm not seeing them in your graphs. The graph of rect(x + 1/2) is a translation to the left by 1/2 unit of the graph of rect(x). The graph of rect(x/2) is an expansion away from the y-axis by a factor of 2.

If you have accurate drawings of the two graphs, it should be simple to get a graph of the product of the two functions, and then find the integral (area).
 
The rect(x) function states that: if |x| > 0.5, then rect(x) = 0, if |x| = 0.5, then rect(x) = 0.5, if |x| < 0.5, then rect(x) = 1

So, by translating with rect(x+0.5), we see that obeying the above function results in just half the rectangle (I think...).

Also, if rect(0.5x) transforms away from the y-axis, that means the total area is now 0.5, right?

But what, intiutively speaking, is the integral of a product? I know the integral is the area, so would I multiply the resepctive areas and this is my result?
 
Lavace said:
The rect(x) function states that: if |x| > 0.5, then rect(x) = 0, if |x| = 0.5, then rect(x) = 0.5, if |x| < 0.5, then rect(x) = 1

So, by translating with rect(x+0.5), we see that obeying the above function results in just half the rectangle (I think...).
No. To get the graph of y = rect(x + 1/2), just translate (shift) the graph of y = rect(x) left by 1/2 unit. This transformation doesn't change the area under the graph.
Lavace said:
Also, if rect(0.5x) transforms away from the y-axis, that means the total area is now 0.5, right?
"Transforms away" is not very descriptive of what happens. "Expansion" is a better description. Every point on the graph of y = rect(x) moves to a position twice as far from the y-axis as it was. For example, the point (-1/2, 1/2) moves to (-1, 1/2) and the point (.8, 1) moves to (1.6, 1). This kind of transformation will produce a new graph with twice the area.
Lavace said:
But what, intiutively speaking, is the integral of a product? I know the integral is the area, so would I multiply the resepctive areas and this is my result?
No. You need the graph of the product of f and g. To do this, using different colors, draw graphs of f and g. Using a third color, draw the graph of f*g. Just move along the x-axis from left to right. When you come to the place on the x-axis where either f or g is nonzero, mark a point that indicates the value. All of the products except one will be 0, 1/2, or 1.

When you have the graph of fg you can evaluate the integral by inspection, just by looking at the graph.