This start out as homework but my question is not about helping me solving the problem but instead I get conflicting answers depend on what way I approach the problem and no way to resolve. I know the answer. I am not going to even present the original question, instead just the part that I have issue with. The difference is by using:(adsbygoogle = window.adsbygoogle || []).push({});

A) [itex]\int_{-1}^1 f(x)P_n(x)dx = \frac{1}{2^n n!}\int_{-1}^{1} f^n(x)(x^2-1)^n dx[/itex]

And

B) [tex](n+1)P_{n+1}(x) + nP_{n-1}(x) = (2n+1)xP_n(x)[/tex]

The function [itex]f(\theta) = cos(\theta)[/itex] and I want to compute:

[tex]\int_0^{\pi} f(\theta) sin(\theta) P_n(cos(\theta)d\theta [/tex]

[tex]= \int_0^{\pi} cos(\theta) sin(\theta) P_n(cos(\theta)d\theta \hbox { we let }x=cos(\theta) \Rightarrow dx=-sin(\theta) d \theta [/tex]

[tex]\Rightarrow \int_0^{\pi} cos(\theta) sin(\theta) P_n(cos(\theta)d\theta = \int_{-1}^{1} x P_n(x)dx[/tex] (1)

Using A) This imply [itex] f(x)[/itex] is only first degree and [itex]\int_{-1}^{1} x P_n(cos(x)dx = 0[/itex] for n larger than 1.The answer is 0 for n=0 and 2/3 for n=1 and the rest is 0 for n>1.

But using B)

[tex]\int_{-1}^{1} x P_n(x)dx = \frac{n+1}{2n+1}\int_{-1}^{1} P_{n+1}(x)dx + \frac{n}{2n+1}\int_{-1}^{1} P_{n-1}(x)dx[/tex]

Recall [tex]\int_{-1}^{1} P_{n}(x)dx = 0 \;\Rightarrow\; \int_{-1}^{1} P_{n+1}(x)dx = \int_{-1}^{1} P_{n-1}(x)dx = 0[/tex]

[tex] \Rightarrow \int_{-1}^{1} x P_n(x)dx = 0[/tex]

So you see you get two different answers using A) and B). I double and triple check this and I cannot see where I did wrong.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Question on orthogonal Legendre series expansion.

Loading...

Similar Threads - Question orthogonal Legendre | Date |
---|---|

I Question about second order linear differential equations | Aug 21, 2017 |

B Simple double integration of square wave question | Aug 16, 2017 |

I Question regarding integration of an equation | Jul 4, 2017 |

Orthogonality of sine and cosine question | Jun 10, 2014 |

Question on orthogonal function with respect to weight. | Nov 25, 2009 |

**Physics Forums - The Fusion of Science and Community**