Re: Simple integral over special functions---HOW?
- To: mathgroup@smc.vnet.net
- Subject: [mg12648] Re: [mg12565] Simple integral over special functions---HOW?
- From: Bob Hanlon <BobHanlon@aol.com>
- Date: Sat, 30 May 1998 17:36:39 -0400
Since the general results are known, the easiest method is to use
Gradshteyn & Ryzhik 7.132 ( note condition that 2 Re lambda >
Abs[Re[mu]] )and modify Integrate (see notebook below).
Bob Hanlon
____________________________
Notebook[{
Cell[BoxData[{
FormBox[\(Unprotect[Integrate]; \), TraditionalForm],
FormBox[
RowBox[{
RowBox[{
RowBox[{\(\[Integral]\_\(-1\)\%1\),
RowBox[{
FractionBox[
RowBox[{
SubscriptBox[
TagBox["P",
LegendreP], \(n_?OddQ\)], "(", "x_", ")"}],
\(\@\(1 - x_\^2\)\)], \(\[DifferentialD]x_\)}]}], ":=",
"0"}],
";"}], TraditionalForm],
FormBox[
RowBox[{
RowBox[{
RowBox[{\(\[Integral]\_\(-1\)\%1\),
RowBox[{
FractionBox[
RowBox[{
SubscriptBox[
TagBox["P",
LegendreP], \(2\ n_?IntegerQ + 1\)], "(", "x_",
")"}],
\(\@\(1 - x_\^2\)\)], \(\[DifferentialD]x_\)}]}], ":=",
"0"}],
";"}], TraditionalForm],
FormBox[
RowBox[{
RowBox[{
RowBox[{\(\[Integral]\_\(-1\)\%1\),
RowBox[{
RowBox[{\(\((1 - x_\^2)\)\^\[Lambda]_\), " ",
RowBox[{
SubsuperscriptBox[
TagBox["P",
LegendreP], "\[Nu]_", \(\[Mu]_: 0\)], "(", "x_",
")"}]}], \(\[DifferentialD]x_\)}]}], ":=",
\(\(\[Pi]\ 2\^\[Mu]\ \(\[CapitalGamma](\[Lambda] + \[Mu]\/2 +
1)\)\
\(\[CapitalGamma](\[Lambda] - \[Mu]\/2 + 1)
\)\)\/\(\(\[CapitalGamma](\[Lambda] + \[Nu]\/2 +
3\/2)\)\
\(\[CapitalGamma](\[Lambda] - \[Nu]\/2 + 1)\)\
\(\[CapitalGamma](\(-\(\[Mu]\/2\)\) + \[Nu]\/2 + 1)\)\
\(\[CapitalGamma](\(-\(\[Mu]\/2\)\) - \[Nu]\/2 + 1\/2)
\)\)\)}], ";"}], TraditionalForm],
FormBox[\(Protect[Integrate]; \), TraditionalForm]}], "Input"],
Cell[BoxData[
FormBox[
RowBox[{\(f(\[Nu]_, \[Mu]_: 0, \[Lambda]_)\), ":=",
RowBox[{"Evaluate", "[",
RowBox[{"Module", "[",
RowBox[{\({x}\), ",",
RowBox[{\(\[Integral]\_\(-1\)\%1\),
RowBox[{
RowBox[{\(\((1 - x\^2)\)\^\[Lambda]\), " ",
RowBox[{
SubsuperscriptBox[
TagBox["P",
LegendreP], "\[Nu]", "\[Mu]"], "(", "x",
")"}]}],
\(\[DifferentialD]x\)}]}]}], "]"}], "]"}]}],
TraditionalForm]], "Input"],
Cell[BoxData[
\(TraditionalForm\`\(?? f\)\)], "Input"],
Cell[BoxData[
\(TraditionalForm\`f(\[Nu], \[Mu], \[Lambda])\)], "Input"],
Cell[BoxData[
\(TraditionalForm\`f(\[Nu], \[Lambda])\)], "Input"],
Cell[BoxData[
\(TraditionalForm\`f(\[Nu], \(-\(1\/2\)\))\)], "Input"],
Cell[BoxData[
\(TraditionalForm\`Simplify[f(2\ n + 1, \(-\(1\/2\)\))]\)],
"Input"],
Cell["which is zero.", "Text"],
Cell[BoxData[{
FormBox[
RowBox[{\(n /: IntegerQ[n] = True\), ";",
RowBox[{\(\[Integral]\_\(-1\)\%1\),
RowBox[{
RowBox[{\(1\/\@\(1 - x\^2\)\), " ",
RowBox[{
SubscriptBox[
TagBox["P",
LegendreP], \(2\ n + 1\)], "(", "x", ")"}]}],
\(\[DifferentialD]x\)}]}]}], TraditionalForm],
FormBox[\(Clear[n]; \), TraditionalForm]}], "Input"],
Cell[BoxData[{
FormBox[
RowBox[{\(n /: OddQ[n] = True\), ";",
RowBox[{\(\[Integral]\_\(-1\)\%1\),
RowBox[{
RowBox[{\(1\/\@\(1 - x\^2\)\), " ",
RowBox[{
SubscriptBox[
TagBox["P",
LegendreP], "n"], "(", "x", ")"}]}],
\(\[DifferentialD]x\)}]}]}], TraditionalForm],
FormBox[\(Clear[n]; \), TraditionalForm]}], "Input"],
Cell[BoxData[
FormBox[
RowBox[{"Table", "[",
RowBox[{
RowBox[{\(\[Integral]\_\(-1\)\%1\),
RowBox[{
RowBox[{\(1\/\@\(1 - x\^2\)\), " ",
RowBox[{
SubscriptBox[
TagBox["P",
LegendreP], "n"], "(", "x", ")"}]}],
\(\[DifferentialD]x\)}]}], ",", \({n, 0, 12}\)}], "]"}],
TraditionalForm]], "Input"]
},
FrontEndVersion->"Macintosh 3.0",
ScreenRectangle->{{0, 832}, {0, 604}}, WindowSize->{534, 577},
WindowMargins->{{Automatic, 86}, {Automatic, 2}}, ShowCellLabel->False,
MacintoshSystemPageSetup->"\<\
00<0001804P000000]P2:?oQon82n@960dL5:0?l0080001804P000000]P2:001
0000I00000400`<300000BL?00400@0000000000000006P801T1T00000000000
00000000000000000000000000000000\>"
]
In a message dated 5/24/98 2:09:53 AM, morrison@phyast.nhn.ou.edu wrote:
>Hi. I have repeatedly run into trouble trying to get Mathematica to
>evaluate analytically simple integrals involving special functions. For
>example, the following integral has a simple analytic form:
> Integrate[LegendreP[n,x]/Sqrt[1-x^2],{x,-1,+1}] When I enter the
>above into Mathematica, it returns the integral unevaluated unless I
>specify a value for n. Figuring that the problem was that Mathematica
>didn't realize that n is a non-negative integer, I did the following:
> n/: IntegerQ[n] = True;
> Integrate[LegendreP[n,x]/Sqrt[1-x^2], {x,-1,+1}, Assumptions ->
>n >= 0]
>Again, Mathematica returned the integral unevaluated, along with the
>assumption.
>It's as though the information that n is an integer in the Global`
>context doesn't get communicated to the Integrate command. Can anyone
>tell me (a) whether the above method fully specifies n as an integer in
>all such situations (I have other failures where function definitions
>seem unaware of such a specification) and if not, how to properly
>specify a symbol as an integer and (b) how to make Integrate evaluate
>integrals such as the example above?