Inner Product and Norm checks:
Let us check that the inner products of the orthonormal functions are indeed zero and that their norms are indeed one. This will be done by approximating the integrals by Reimann sums. I will take 900 terms in the Reimann sums, in order to get a reasonably good approximation.
Define the inner product of phi(p,x) with phi(q,x)
innerp:=(p,q)->evalf(sum(evalf('phi'(p,(j-1/2)/900),20)*evalf('phi'(q,(j-1/2)/900),20),j=1..900)/900,20);
Check that the inner product of phi(1,x) with phi(1,x) is indeed 1:
innerp(1,1);
Close enough!
>
Check the inner product of phi(1,x) with the first 10 phi's in the set
Check the inner product of phi(2,x) with the first 10 phi's in the set
Check the inner product of phi(3,x) with the first 10 phi's in the set
Check the inner product of phi(4,x) with the first 10 phi's in the set