- #1

Bacat

- 151

- 1

## Homework Statement

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

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

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

## The Attempt at a Solution

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

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

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

Let [tex]u=x[/tex], [tex]du=dx[/tex], [tex]dv=Sin^2(\frac{\pi x}{L}) dx[/tex]

Then [tex]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)[/tex]

[tex]v = \frac{L}{2} - Sin^2(\pi) = \frac{L}{2}[/tex]

Then [tex]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.[/tex]

Where have I made an error?