Integrating a rect(x) function visually/intuitively

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).

rect_functions.png


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
 
Physics news on Phys.org
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).

rect_functions.png


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.
 
Thread 'Use greedy vertex coloring algorithm to prove the upper bound of χ'
Hi! I am struggling with the exercise I mentioned under "Homework statement". The exercise is about a specific "greedy vertex coloring algorithm". One definition (which matches what my book uses) can be found here: https://people.cs.uchicago.edu/~laci/HANDOUTS/greedycoloring.pdf Here is also a screenshot of the relevant parts of the linked PDF, i.e. the def. of the algorithm: Sadly I don't have much to show as far as a solution attempt goes, as I am stuck on how to proceed. I thought...
Back
Top