Re: Q Legendre orthogonal polynomials mistake
- To: mathgroup at smc.vnet.net
- Subject: [mg67908] Re: Q Legendre orthogonal polynomials mistake
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Wed, 12 Jul 2006 05:06:15 -0400 (EDT)
- References: <e8nt4n$k7c$1@smc.vnet.net> <e8qg8f$o63$1@smc.vnet.net> <e8tbj5$227$1@smc.vnet.net> <e8vtqe$ssc$1@smc.vnet.net> <paul-072B78.21101211072006@news.uwa.edu.au> <44B3BE66.2090801@sbcglobal.net>
- Sender: owner-wri-mathgroup at wolfram.com
Robert: >Well it is nice to know it is built in. >My written documentation is older ( version3). It would be a very good idea to update then. There have been many, many, symbolic (and especially numeric) function changes since version 3 and it becomes difficult to determine if the problems/issues that you raise are due to the old version that you are running. >In that book only the P function is documented. >The Q was added in either version 4 or version 5. Not according to the documentation. It says that LegendreQ was New in Version 1; modified in 3. >Trying to run that code pulled down my system yesterday.( crash, burn... yeah) >My point was that my toral inverse polynomials >f[x_.n_]=x^n*LengendreP[n,1/x] >are new and different than LengendreQ[n,x]. >I'd appreaciate you guys stop saying my questions are "nonsense." What I meant was that -- and I stand by this -- I could not understand what you were asking. It would be helpful if the question was posed clearly. For example, the subject of the posting was Q Legendre orthogonal polynomials mistake Now, whose mistake? Yours, referring to an earlier posting, or a mistake/bug in Mathematica? And reading the posting, what is the question? You wrote >I got the ArcTan mixed with ArcTanh: > >(*Jahnke and Emde, Page 111*) >W[x_, n_] = Sum[LegendreP[m - 1, x]*LegendreP[n - m, x]/m, {m, 1, n}] >Q[n_, x_] = ArcTanh[x]*LegendreP[n, x] - W[x, n] >p0 = Table[Q[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}] >Inm = Table[N[Integrate[p[[n]]*p[[m]], {x, -1, 1}]], {n, 1, 6}, {m, 1, 6}] >MatrixForm[Inm] > >A way to check is the Integral (Abramowitz and Stegun page 337 gives): >Table[Integrate[LegendreP[n, x]* Q[m, x], {x, 1, Infinity}], {m, 0, >5}, {n, 0, 5}] Where is the question here? [1] When you wrote "I got the ArcTan mixed with ArcTanh", did you mean that this was your error, or when you run the Mathematica code you got ArcTan instead of ArcTanh? [2] When you wrote "A way to check is the Integral (Abramowitz and Stegun page 337 gives)", what are you trying to check? Your definition Q[n, x] is type 2: W[x_, n_] = Sum[LegendreP[m - 1, x]*LegendreP[n - m, x]/m, {m, 1, n}] Q[n_, x_] = ArcTanh[x]*LegendreP[n, x] - W[x, n] which is identical to LegendreQ[n, 0, 2, x], Table[Q[n, x] == LegendreQ[n, 0, 2, x] // TrigToExp // Simplify, {n, 0, 5}] {True, True, True, True, True, True} However, the integral (Abramowitz and Stegun page 337) requires type 3 (with a different choice of branch cut), and also a restriction that m > n: Table[1/((m - n) (m + n + 1)) == Integrate[LegendreP[n, x] LegendreQ[m, 0, 3, x], {x, 1, Infinity}], {n, 0, 5}, {m, n + 1, 5}] // Flatten // Union >I view some of the respomses as irresposible too. You post regularly on MathGroup and I try to understand each of your questions. However, it is often unclear what the problem is, or what exactly you are looking for. I guess that people get tired of trying to understand what you are asking. >Now that I know it is built in I can try a limited 1dimensional system using >the Q polynomials and see how that works. Try what? What limited 1dimensional system? Again, there is no context for your statement. Cheers, Paul