# Easy integration by parts but getting wrong answer. Help!

1. Feb 18, 2009

### Bacat

1. The problem statement, all variables and given/known data

I am actually looking for the expectation of x for the wavefunction that is $$\Psi (x) = \sqrt{\frac{2}{L}}Sin(\frac{\pi x}{L})$$ for $$0 < x < L$$.

To do this I need to find the solution to this integral:

$$f = \int_0 ^L \! \Psi^* x \Psi \, dx = \int_0^L \! x*(\sqrt{\frac{2}{L}}Sin(\frac{\pi x}{L}))^2 \, dx$$

3. The attempt at a solution

Using Mathematica, I know that the answer to the integral is $$\frac{L^2}{4}$$.

However, when I attempt the solution by integration by parts, I get 0. Help!

$$f = \frac{2}{L} \int_0^L \! xSin^2(\frac{\pi x}{L}) \, dx = \frac{2}{L} \left[ uv - \int v du \right]$$

Let $$u=x$$, $$du=dx$$, $$dv=Sin^2(\frac{\pi x}{L}) dx$$

Then $$v=\int dv = \int_0^L Sin^2(\frac{\pi x}{L}) dx = \frac{1}{2} \int_0^L (1-Cos(\frac{\pi x}{L}) dx)$$

$$v = \frac{L}{2} - Sin^2(\pi) = \frac{L}{2}$$

Then $$f = \frac{2}{L}\left[uv - \int v du\right] = \frac{2}{L}\left[x\frac{L}{2}\right|_{0}^{L} - \int_0^L \frac{L}{2} dx\right] = \frac{2}{L}\left[ \frac{L^2}{2} - \frac{L^2}{2}\right] = 0.$$

Where have I made an error?

2. Feb 18, 2009

### gabbagabbahey

$v$ is supposed to be the antiderivative of $dv$, not the definite integral from 0 to L of $dv$!

3. Feb 18, 2009

### Dahaka14

guess who goes to U of M and is in Prisca's class...am i right?

check your power reduction of the sine squared term again, and you should notice right away what you did wrong...hint, what happens to the angle when you go from the squared trig function to a first power trig function?

4. Feb 18, 2009

### Bacat

Ah, thank you gabbagabbahey!

And Dahaka14, no. I live in Houston. Oddly enough, the curriculum for quantum mechanics is pretty much the same wherever you go.

5. Feb 18, 2009

### gabbagabbahey

Only once you measure it. Before measurement there is a non-zero probability that the curriculum consists entirely of exorcising the vengeful spirits of cats which are both alive and dead simultaneously.

6. Feb 18, 2009

### Bacat

Haha!

Just for fun, here is one of the other problems that were part of this homework (I solved it already):

Suppose a lecture hall is evacuated and (Schrodinger) cats are projected with speed $$\nu$$ at the two doors leading out of the lecture hall in a double-slit experiment. Assume that in order for the interference fringes to be observed as the cats pile up against a distant wall the wavelength of each cat must be greater than 1 meter. Estimate the maximum speed of each cat. If the distance between the front of the lecture hall to the wall is 30 meters, how long will it take to carry out the experiment? Compare this time with the age of the universe, roughly $$10^{10}$$ years. Assume the cats each weight 1 kg.