If the wavefunction of the electron in a box of length $L$ is $$\psi{(x)}=\sqrt{\frac{2}{L}}\cdot\sin{\frac{n\pi x}{L}}$$ What would be the probability of finding the electron between $0.25L$ and $0.75L$?.
From postulate 1 of quantum mechanics I know that $$1=\int_{0}^{L}{\psi(x) \psi^{*}(x)\,\mathrm{d}x}.$$
Trying out a similar reasoning leads me to think that the required probability is the integral $$ \int_{0.25L}^{0.75L}{\psi(x) \psi^{*}(x)\,\mathrm{d}x}$$ which gives the answer as $0.5$. But the book gives the answer as $0.82$.
What is the problem with my method and can anyone explain me why the answer is $0.82$?