title: How to numerically normalize the wave function of the Schroedinger Equation?
body: <p>I implemented the Shooting Method to numerically solve the 1D stationary Schroedinger Equation for the infinite potential pot with walls located at 0 and 1. Now I want my numerical solution for the wavefunction psi(x) to be normalized. This means that the integral from 0 to 1 of the probability of residence density rho(x)= |psi(x)|^2 has to equal 1, since there is a 100 percent chance to find the particle within the interval 0 to 1. So I have the normalization condition int(0,1) rho(x) dx = 1. I tried to implement a normalization function using the numeric integration simpson rule, but it doesn't work appropriately for higher energy states. Has anyone got an idea how to improve?</p>
  <p>So I have psi(x) and x as numpy arrays.</p>
  <pre class="lang-py prettyprint-override"><code>def normalize_psi(psi, x):
     int_psi = scipy.integrate.simps(psi,x)
     return psi/int_psi
  </code></pre>