# Change of Variable issue with Integration

1. May 24, 2006

### dimensionless

I have the following equation:

$$I = \frac{a}{2} \int_{-a/2}^{a/2} x sin^{2}\left[ \pi (\frac{x}{a}-\frac{1}{2})\right], dx$$

I have set

$$y= \frac{x}{a}-\frac{1}{2}$$

and

$$dy = dx/a$$

When I substitute the two latter equations into the first equation I should get this:

$$I = {a} \int_{-1}^{0} (2y+1) sin^{2}\left[ \pi y\right], dy$$

For some reason I get this instead:

$$I = \frac{a}{2} \int_{-1}^{0} (y+\frac{1}{2}) sin^{2}\left[ \pi y\right], dy$$

I'm off by a factor of four. What am I doing wrong?

Last edited: May 25, 2006
2. May 24, 2006

### Hammie

It looks like you substitued y = x/a + 1/2 in the integral, and used x/a - 1/2 to determine the new limits of integration.

$$I = \frac{a}{2} \int_{-a/2}^{a/2} x sin^{2}\left[ \pi (\frac{x}{a}+\frac{1}{2})\right], dx$$

Or should have this been

$$I = \frac{a}{2} \int_{-a/2}^{a/2} x sin^{2}\left[ \pi (\frac{x}{a}-\frac{1}{2})\right], dx$$

3. May 25, 2006

### dimensionless

The given equation should have been

$$I = \frac{a}{2} \int_{-a/2}^{a/2} x sin^{2}\left[ \pi (\frac{x}{a}-\frac{1}{2})\right] dx$$

I have corrected this in the initial post.

Unfortunately I'm still stuck same answer (and this answer does not match the one in my book).

4. May 25, 2006

### marlon

If $$y= \frac{x}{a}-\frac{1}{2}$$ then $$x = a(y + \frac{1}{2})$$

and

$$dx = ady$$

So we get for the integral

$$I = \frac{a}{2} \int_{-1}^{0} a(y + \frac{1}{2}) sin^{2}\left[ \pi y \right] ady$$

marlon

5. May 25, 2006

### dimensionless

Well, this book does have some errors in it.