# Homework Help: Integrating a rect(x) function visually/intuitively

1. Nov 19, 2013

### Lavace

1. The problem statement, all variables and given/known data
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 ℝ.

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

between the intervals of -0.5 and +0.5.

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

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

2. Nov 19, 2013

### Staff: Mentor

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

3. Nov 20, 2013

### Lavace

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?

4. Nov 20, 2013

### Staff: Mentor

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