Illustration Squared magnitude of a wave function (example)

Squared magnitude $$|\mathit{\Psi}|^2$$ of the wave function of a particle in the infinite potential well (for $$n=3$$):$$\mathit{\Psi}(x) ~=~ \sqrt{\frac{2}{L}}\sin\left(\frac{3\pi}{L}\,x\right)$$
The area under the $$|\mathit{\Psi}|^2$$ is the probability. The probability between the points $$x=a$$ and $$x=b$$ is given by$$P ~=~ \int_{a}^{b} |\mathit{\Psi}|^2 \, \text{d}x$$