Re: failure to Integrate in orthogonal polynomials
- To: mathgroup at smc.vnet.net
- Subject: [mg67842] Re: failure to Integrate in orthogonal polynomials
- From: Roger Bagula <rlbagula at sbcglobal.net>
- Date: Mon, 10 Jul 2006 06:37:52 -0400 (EDT)
- References: <e8nt4n$k7c$1@smc.vnet.net> <e8qg8f$o63$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jens-Peer Kuska wrote: >Hi, > >I see no sense using the Legendre polynomials for that problem. >Anyway the matrix element of the Hamiltonian is ><p[n]|H|p[m]> and that mean you have to compute > >Integrate[p[[n]]*(D[p[[m]],{x,2}] + p[[m]]/x), {x, -1, 1}] > >instead of > >Integrate[p[[n]]*(D[p[[m]],{x,2}] + 1/x), {x, -1, 1}] > >or is the wave function in space representation not more >multiplied by the potential ?? > >The code > > If[Integrate[p[[n]]*p[[m]], {x, -1, > > 1}] - 1 == 0, Integrate[p[[n]]*(D[p[[m]], {x, > > 2}] + 1/x), {x, -1, 1}]/Integrate[p[[n]]*p[[m]], {x, -1, 1}], 0] > >is even more interesting, because first you test that <p[n]|p[m]>==1, >i.e n==m and it would be quicker to test n==m .. and finally you >divide by Integrate[p[[n]]*p[[m]], {x, -1, 1}], but you do this only >in the case where you already know that >Integrate[p[[n]]*p[[m]], {x, -1, 1}]==1 > >The whole condition is nonsense because the Hamiltonian must have >off-diagonal elements. And finally why not use the potential 1/(x+I*eps) >compute all your integrals and set eps->zero ??? > >And why you don't start with the LegendreP[0,x] to ensure that your >basis is complete ??? > >Regards > Jens > > > > >> >> > > > Jens-Peer Kuska, Your help corrected two errors : 1) the potential 2) not starting at zero Also I stopped dividing by the <p[n]*p[m]>. It gives a spectrum for the Legendre particle in a box states that at least works. The idea was to set system constants hbar^2/2*m and e^2 to one: take out Bessel, Fourier and spin partitions in a Schrödinger Hamiltonian and make it a "pure" sphere-like orthogonal standing wave in one dimension. Getting the potential to Integrate involved adding a systematic constant to the even levels that canceled out the singularity that a 1/x term gave. The output seem to be resonance frequency / energy levels at which transitions would take place between Legendre states in such a simplified system. Clear[norm, p0, p, Enm, Inm] p0 = Table[LegendreP[n, x], {n, 0, 5}] norm = Table[(1/Integrate[p0[[n]]*p0[[n]], {x, -1, 1}])^(1/2), {n, 1, 6}] p = Table[p0[[n]]*norm[[n]], {n, 1, 6}] c = Table[CoefficientList[p[[m]], x][[1]], {m, 1, 6}] v[x_, m_] = c[[m]]/x - p[[m]]/x Enm = Table[Integrate[p[[n]]*(D[p[[m]], {x, 2}] + v[x, m]), {x, -1, 1}], { n, 1, 6}, {m, 1, 6}] MatrixForm[Enm] Union[Flatten[N[Enm]]] ListPlot[Union[Flatten[N[Enm]]], PlotJoined -> True, PlotRange -> All]