def integrand(r, k, k_prim, V, l, j): return r**2 * j_l(l, k*r) * j_l(l, k_prim*r) * V(r, l, j)
def wavefunction(r): j_ls = [j_l(Q.l, points[n]*r) for n in xrange(len(points))] # A complex phase factor 1j**Q.l is removed for convenience # as it has no physical significance return sp.sqrt(2/sp.pi)*sp.sum(sp.sqrt(weights)*points*j_ls*eigvec)