4
$\begingroup$

Wondering why Mathematica can't solve this integral:

Integrate[
 LegendreP[l1, 1, x] * 
  LegendreP[l2, 1, x], {x, -1, 1}]

Mathematica outputs: $\int_{-1}^1 P_{\text{l1}}^1(x) P_{\text{l2}}^1(x) \, dx$

But I see there is an analytical solution: $$ \int_{-1}^{1} P^{m}_{l}(x) P^{m}_{k}(x)dx=\frac{2}{2l + 1}\frac{(l + m)!}{(l - m)!}\delta_{lk} $$ Where $\delta_{lk}$ is Kronecker delta

The solution looks like it involves integration by parts and trig substitution. I'm wondering why Mathematica can't solve it, or if there is some way to modify the input so that Mathematica can figure it out. Trying to build intuition on how to use Mathematica and what are it's limits.

I also tried forming the function myself but it didn't help:

p[x_, l_, m_] := ((-1)^m/(2^l l!)*(1 - x^2)^(m/2) * D[(y^2 - 1)^l, {y, l + m}]) /. y -> x;
Integrate[p[x, l1, 1] * p[x, l2, 1], {x, -1, 1}]
$\endgroup$
2
  • $\begingroup$ I believe that your relation is only true if l1 and l2 are integers. However, it doesn't look like Mathematica can find a result, even using Assuming[{l1, l2} \[Element] Integers && l1 > 0 && l2 > 0,...] $\endgroup$
    – mikado
    Aug 22, 2021 at 17:20
  • 1
    $\begingroup$ Quasi-duplicate: (151618); and (155030), (231472) $\endgroup$
    – Michael E2
    Aug 22, 2021 at 18:59

1 Answer 1

5
$\begingroup$

As Michael E2 points out, you can 'guess' the answer as follows:

tt = Table[
  Integrate[LegendreP[l1, 1, x]*LegendreP[l2, 1, x], {x, -1, 1}]
  , {l1, 1, 5}, {l2, 1, 5}]

enter image description here

FindSequenceFunction[Diagonal[tt], n]// FullSimplify

enter image description here

Update

To find the general recurence:

tt2 = Table[
  tt = Table[
    Integrate[
     LegendreP[l1, k, x]*LegendreP[l2, k, x], {x, -1, 1}], {l1, 1, 
     10}, {l2, 1, 10}];
  {k,FindSequenceFunction[Diagonal[tt], n] // FullSimplify},
  {k, 0, 5}]

Then

FindSequenceFunction[tt2, k]

enter image description here

$\endgroup$
2
  • $\begingroup$ Ah, thanks. Though the answer gets really messy if I try to vary m as well (set to constant 1 in example). $\endgroup$
    – Frank
    Aug 23, 2021 at 13:56
  • 1
    $\begingroup$ @Frank see update $\endgroup$
    – chris
    Aug 23, 2021 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.