# Exercise Problem

A particle in a box of length $L$ is in the state $\left|\psi\right\rangle$ such that its wavefunction is

$\psi(x)=\left\langle x|\psi\right\rangle= \sqrt{\frac{2}{L}}\sin\left(\frac{\pi x}{L} \right)$

What is the probability that the particle is in right half of the box?

### Solution

The probability density associated with the given wave function is

$\mathrm{p}(x) = |\psi(x)|^2= \frac 2 L \sin^2\left(\frac{\pi x}{L}\right)$

The probability that the particle is in right half of the box is the integration of this probability density from $x=L/2$ to $x=L$. Thus the required probability is

$\mathrm{P}= \int_{L/2}^L \mathrm{p}(x) dx = \frac 2 L\int_{L/2}^L\sin^2\left(\frac{\pi x}{L}\right)dx$

The result of this integration should be $1/2$ (Work out this integration).

Thus the probability that the particle is in right half of the box of length $L$ in the state given in the problem is $L/2$.