MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: failure to Integrate in orthogonal polynomials

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67821] Re: failure to Integrate in orthogonal polynomials
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sun, 9 Jul 2006 04:50:42 -0400 (EDT)
  • References: <e8nt4n$k7c$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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

Roger Bagula wrote:
> I thought that I might simulate a
> one dimensional quantum Legendre system ( particle in a box)  in 
> Mathematica.
> It works for odd levels but fails for even levels on the interval/ 
> domain {-1,1}:
> 
> p0 = Table[LegendreP[n, x], {n, 1, 5}]
> norm = Table[(1/Integrate[p0[[n]]*p0[[n]], {x, -1, 1}])^(1/2), {n, 1, 5}]
> p = Table[p0[[n]]*norm[[n]], {n, 1, 5}]
> Enm = Table[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], {n,
>    1, 5}, {m, 1, 5}]
> MatrixForm[Enm]
> Inm = Table[N[Integrate[p[[n]]*p[[m]], {x, -1, 1}]], {n, 1, 5}, {m, 1, 5}]
> MatrixForm[Inm]
> Union[Flatten[N[Enm]]]
> 
> If anybody can get an esimate of the even levels it would be nice.
> the odd levels are very near +/-Sqrt[6]. I'm using an 1/x potential
> function and a second derivative operator.
> Roger Bagula
> 


  • Prev by Date: Re: ReplacePart in an If[] construct?
  • Next by Date: Re: ReplacePart in an If[] construct?
  • Previous by thread: failure to Integrate in orthogonal polynomials
  • Next by thread: Re: failure to Integrate in orthogonal polynomials