How to integral legendre polynomial

Click For Summary

Discussion Overview

The discussion centers around the integral of the product of the cosine function and Legendre polynomials, specifically the expression $$\int_{-1}^{1} \cos(x) P_{n}(x)\,dx$$. Participants explore various methods for evaluating this integral, including the use of Rodrigues' formula and integration by parts, while also considering cases for odd and even values of \(n\).

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant proposes using Rodrigues' formula to express the integral in terms of derivatives of \((x^2-1)^n\).
  • Another participant suggests that the integral can be evaluated by parts multiple times, leading to different forms based on whether \(n\) is odd or even.
  • There is a discussion on the implications of the integrals of sine and cosine functions multiplied by \((x^2-1)^n\), particularly noting that sine leads to zero due to its odd function nature.
  • A later reply introduces the idea of expressing cosine as a series involving Legendre polynomials and discusses the orthogonality of these polynomials.
  • Participants explore the use of the beta function and series expansions to derive further expressions for the integral.
  • One participant mentions the use of Wolfram Alpha as a computational tool but expresses a desire for a worked solution instead.
  • There is a suggestion to share solutions among participants, indicating a collaborative approach to solving the integral.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a single method for evaluating the integral. Multiple competing approaches and interpretations of the integral remain, with some participants favoring series expansions while others focus on integration techniques.

Contextual Notes

The discussion includes various mathematical steps that are not fully resolved, such as the handling of certain integrals and the assumptions made regarding the properties of the functions involved. There are also dependencies on specific definitions and theorems that are not explicitly stated.

Who May Find This Useful

This discussion may be useful for students and researchers interested in mathematical methods involving Legendre polynomials, integral calculus, and series expansions in the context of physics and engineering applications.

Another1
Messages
39
Reaction score
0
Question

$$\int_{-1}^{1} cos(x) P_{n}(x)\,dx$$

____________________________________________________________________________________________
my think (maybe incorrect)
$$\int_{-1}^{1} cos(x) P_{n}(x)\,dx$$
$$\frac{1}{2^nn!}\int_{-1}^{1} cos(x) \frac{d^n}{dx^n}(x^2-1)^n\,dx$$ This is rodrigues formula
by part n times
$$\frac{1}{2^nn!}(-1)^n\int_{-1}^{1} \frac{d^n}{dx^n}cos(x) \frac{d^{n-n}}{dx^{n-n}}(x^2-1)^n\,dx$$
$$\frac{1}{2^nn!}(-1)^n\int_{-1}^{1} \frac{d^n}{dx^n}cos(x) (x^2-1)^n\,dx$$
in case n = odd number
$$\frac{1}{2^nn!}(-1)^n\int_{-1}^{1} (-1)^{\frac{n+1}{2}}sin(x) (x^2-1)^n\,dx$$
in case n = even number
$$\frac{1}{2^nn!}(-1)^n\int_{-1}^{1} (-1)^{\frac{n}{2}}cos(x) (x^2-1)^n\,dx$$
_________________________________________________________________________________________________

how to integral

$$\int_{-1}^{1}sin(x) (x^2-1)^n\,dx$$ and $$\int_{-1}^{1}cos(x) (x^2-1)^n\,dx$$
 
Physics news on Phys.org
Another said:
Thank you. But i don't have pro Wolframalpha.
please. you can show that solution?

I do. But there's no worked solution for this one anyway.
 
Last edited:
Joppy said:
I do. But there's no worked solution for this one anyway.

thank you vary much. now i can solve it
 
Another said:
thank you vary much. now i can solve it

Would you mind sharing your solution? I remember there being a trick with these things but I cannot remember!
 
Joppy said:
Would you mind sharing your solution? I remember there being a trick with these things but I cannot remember!

Ok

let
$$ cos(x) = \sum_{n=0}^{\infty}C_{n}P_{n}(x)$$

orthogonal
$$ \int_{-1}^{1} cos(x)P_{n}(x)\,dx = \int_{-1}^{1} C_{n}P_{n}(x)P_{n}(x)\,dx$$
$$ \int_{-1}^{1} cos(x)P_{n}(x)\,dx = C_{n}\int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx$$
see that
$$ \int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx= \frac{1}{2^{2n}(n!)^2}\int_{-1}^{1} \frac{d^n}{dx^n}(x^2-1)^n\frac{d^n}{dx^n}(x^2-1)^n\,dx$$
you can integral by part n time
So..
$$ u= \frac{d^n}{dx^n}(x^2-1)^n$$ and $$du=\frac{d^{n+1}}{dx^{n+1}}(x^2-1)^n\,dx$$
$$ dv= \frac{d^n}{dx^n}(x^2-1)^ndx$$ and $$v=\frac{d^{n-1}}{dx^{n-1}}(x^2-1)^n$$

$$ udv=uv-vdu$$

$$ uv= \frac{d^n}{dx^n}(x^2-1)^n \frac{d^{n-1}}{dx^{n-1}}(x^2-1)^n =0 $$ When limit of the integrate from -1 to 1

So when integrate by part n times
$$ \int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx= \frac{1}{2^{2n}(n!)^2}\left[0+0+...+(-1)^n\int_{-1}^{1}\frac{d^{n-n}}{dx^{n-n}}(x^2-1)^n \frac{d^{n+n}}{dx^{n+n}}(x^2-1)^n \,dx\right]$$
$$ \int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx= \frac{1}{2^{2n}(n!)^2}\left[\int_{-1}^{1}(x^2-1)^n \frac{d^{2n}}{dx^{2n}}(1-x^2)^n \,dx\right]$$ ; times (-1)^n in (x^n-1)^n

You know $$(1-x^2)^n=\sum_{k=0}^{n}{n \choose k} 1^{n-k}(-1)^n(x^2)^n $$
$$ \int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx= \frac{1}{2^{2n}(n!)^2}\left[\int_{-1}^{1}(x^2-1)^n \frac{d^{2n}}{dx^{2n}}\sum_{k=0}^{n}{n \choose k} 1^{n-k}(-1)^n(x^2)^n \,dx\right]$$

The final term of $$(1-x^2)^n=\sum_{k=0}^{n}{n \choose k} 1^{n-k}(-1)^n(x^2)^n = ...+ {n \choose n }(-1)^n x^{2n}$$

because $$ \frac{d^m}{dx^m}x^n = 0$$ when n < m

So that
$$ \int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx= \frac{1}{2^{2n}(n!)^2}\left[\int_{-1}^{1}(x^2-1)^n \frac{d^{2n}}{dx^{2n}}(-1)^nx^{2n} \,dx\right]$$
$$ \int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx= \frac{1}{2^{2n}(n!)^2}\left[\int_{-1}^{1}(x^2-1)^n (-1)^n (2n)! \,dx\right]$$
$$ \int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx= \frac{(2n)!}{2^{2n}(n!)^2}\left[\int_{-1}^{1}(1-x^2)^n \,dx\right]$$

set $$s =\frac{x+1}{2}$$

$$ \int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx= \frac{(2n)!}{2^{2n}(n!)^2}\left[\int_{0}^{1} 2\cdot 2^{2n}s^n(1-s)^n\,ds\right]$$ beta function
$$ \int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx= \frac{(2n)!}{2^{2n}(n!)^2} 2\cdot 2^{2n}\frac{(n!)^2}{(2n+1)!}$$
$$ \int_{-1}^{1} P_{n}(x)P_{n}(x)\,dx= \frac{2}{2n+1}$$

see that
$$ \int_{-1}^{1} cos(x)P_{n}(x)\,dx= \frac{1}{2^{n}n!}\int_{-1}^{1}cos(x)\frac{d^n}{dx^n}(x^2-1)^n\,dx$$

You can integral by part n times.
$$ u = con(x)$$ and $$ dv = \frac{d^n}{dx^n}(x^2-1)^n dx $$
So . . .
$$ \int_{-1}^{1} cos(x)P_{n}(x)\,dx= \frac{(-1)^n}{2^{n}n!}\int_{-1}^{1}(x^2-1)^n \frac{d^n}{dx^n}cos(x),dx$$

give two solution

in case n = odd number
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^n\int_{-1}^{1} (-1)^{\frac{n+1}{2}}sin(x) (x^2-1)^n\,dx$$
in case n = even number
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^n\int_{-1}^{1} (-1)^{\frac{n}{2}}cos(x) (x^2-1)^n\,dx$$

But $$ sin(x) (x^2-1)^n $$ are Odd function So $$ \frac{1}{2^nn!}(-1)^n\int_{-1}^{1} (-1)^{\frac{n+1}{2}}sin(x) (x^2-1)^n\,dx = 0$$

left only one solution

$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^n\int_{-1}^{1} (-1)^{\frac{n}{2}}cos(x) (x^2-1)^n\,dx$$ n = 0,2,4,...
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^{\frac{n}{2}} 2 \int_{0}^{1} cos(x) (1-x^2)^n\,dx$$ ; even function

Wolfram|Alpha: Computational Intelligence

You know $$ cos(x) = \sum_{i=0}^{\infty}\frac{(-1)^i}{(2i)!}x^{2i} $$
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{2}{2^nn!}(-1)^{\frac{n}{2}} \int_{0}^{1} \sum_{i=0}^{\infty}\frac{(-1)^i}{(2i)!}x^{2i} (1-x^2)^n\,dx$$
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^{\frac{n}{2}} \sum_{i=0}^{\infty}\frac{(-1)^i}{(2i)!} (2)\int_{0}^{1} x^{2i} (1-x^2)^n\,dx$$; Beta function form
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^{\frac{n}{2}} \sum_{i=0}^{\infty}\frac{(-1)^i}{(2i)!} \frac{(i-\frac{1}{2})!n!}{(i-\frac{1}{2}+n+1)!}$$
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^{\frac{n}{2}} \sum_{i=0}^{\infty}\frac{(-1)^i}{(2i)!} \frac{(i-\frac{1}{2})! \Gamma(n+1)}{(i+n+\frac{1}{2})!}$$

from $$(i-\frac{1}{2})! = \frac{1}{i!}(\frac{1}{2})^{2i}\sqrt{\pi}(2i)!$$

$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^{\frac{n}{2}}\Gamma(n+1) \sum_{i=0}^{\infty}\frac{(-1)^i}{(2i)!} \frac{1}{(i+n+\frac{1}{2})!}\frac{1}{i!}(\frac{1}{2})^{2i}\sqrt{\pi}(2i)!$$
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^{\frac{n}{2}}\Gamma(n+1) \sum_{i=0}^{\infty}\frac{(-1)^i}{(2i)!} \frac{1}{(i+n+\frac{1}{2})!}\frac{1}{i!}(\frac{1}{2})^{2i}\sqrt{\pi}(2i)! \cdot \frac{2^{n+\frac{1}{2}}}{2^{n+\frac{1}{2}}}$$
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^{\frac{n}{2}}\Gamma(n+1) 2^{n+\frac{1}{2}}\sqrt{\pi}\sum_{i=0}^{\infty}\frac{(-1)^i}{i!} \frac{1}{(i+n+\frac{1}{2})!}(\frac{1}{2})^{2i} \cdot (\frac{1}{2})^{n+\frac{1}{2}}$$
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^{\frac{n}{2}}\Gamma(n+1) 2^{n+\frac{1}{2}}\sqrt{\pi}\sum_{i=0}^{\infty}\frac{(-1)^i}{i!} \frac{1}{(i+n+\frac{1}{2})!}(\frac{1}{2})^{n+\frac{1}{2}+2i}$$
$$\int_{-1}^{1} cos(x)P_{n}(x)\,dx=\frac{1}{2^nn!}(-1)^{\frac{n}{2}}\Gamma(n+1) 2^{n+\frac{1}{2}}\sqrt{\pi}J_{n+\frac{1}{2}}(1)$$ ; Bessel polynomialSo
$$C_{n}=\frac{2n+1}{2}\int_{-1}^{1} cos(x)P_{n}(x)\,dx= \frac{2n+1}{2} \frac{1}{2^nn!}(-1)^{\frac{n}{2}}\Gamma(n+1) 2^{n+\frac{1}{2}}\sqrt{\pi}J_{n+\frac{1}{2}}(1)$$
$$C_{n}=\frac{2n+1}{2}\int_{-1}^{1} cos(x)P_{n}(x)\,dx= \frac{2n+1}{n!}(-1)^{\frac{n}{2}}\Gamma(n+1) 2^{-\frac{1}{2}}\sqrt{\pi}J_{n+\frac{1}{2}}(1)$$ n = 0,2,4,...

and finaly

$$ cos(x) = \sum_{n=0}^{\infty}C_{n}P_{n}(x)$$
$$ cos(x) = \sum_{n=0}^{\infty} \frac{2n+1}{n!}(-1)^{\frac{n}{2}}\Gamma(n+1) 2^{-\frac{1}{2}}\sqrt{\pi}J_{n+\frac{1}{2}}(1) P_{n}(x)$$

- My solution
 
Last edited:

Similar threads

  • · Replies 30 ·
2
Replies
30
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 29 ·
Replies
29
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
6
Views
2K