# Legendre polynomials

1. Sep 20, 2006

### gulsen

...and orthogonality relation.

The book says
$$\int_{-1}^{1} P_n(x) P_m(x) dx = \delta_{mn} \frac{2}{2n+1}$$

So I sat and tried derieving it. First, I gather an inventory that might be useful:

$$(1-x^2)P_n''(x) - 2xP_n'(x) + n(n+1) = 0$$
$$[(1-x^2)P_n'(x)]' = -n(n+1)P_n(x)$$

$$P_n(-x) = (-1)^n P_n(x)$$
$$P_n'(-x) = -(-1)^n P_n'(x)$$

And started the job. Now...
$$[(1-x^2)P_n'(x)]' = -n(n+1)P_n(x)$$
multiplying both sides with $$P_m(x)$$ and integrating from -1 to 1
$$\int_{-1}^{1} [(1-x^2)P_n'(x)]' P_m(x) dx = \int_{-1}^{1} -n(n+1)P_n(x) P_m(x) dx$$
applying a partial to the lefthand side
$$(1-x^2)P_n'(x) P_m(x) |_{-1}^{1} - \int_{-1}^{1} (1-x^2)P_n'(x) P_m'(x) dx = \int_{-1}^{1} -n(n+1)P_n(x) P_m(x) dx$$
switching n and m's, ve get another equation like it
$$(1-x^2)P_m'(x) P_n(x) |_{-1}^{1} - \int_{-1}^{1} (1-x^2)P_m'(x) P_n'(x) dx = \int_{-1}^{1} -m(m+1)P_m(x) P_n(x) dx$$

substituing these

$$[-n(n+1) + m(m+1)]\int_{-1}^{1} P_n(x) P_m(x) dx = [(1-x^2)(P_n'(x) P_m(x) - P_m'(x) P_n(x))] |_{-1}^{1}$$

now, from the inventory
$$P_n(-x)P_m'(-x) = -P_n(x) P_m'(x)$$
the righthand side becomes
$$\lim_{x \to 1} 2[(1-x^2)(P_n'(x) P_m(x) - P_m'(x) P_n(x))$$
and in it's final shape
$$\int_{-1}^{1} P_n(x) P_m(x) dx = \lim_{x \to 1} 2(1-x^2) \frac {(P_n'(x) P_m(x) - P_m'(x) P_n(x))}{-n(n+1) + m(m+1)}$$

For $$n \neq m$$, there's no problem, it's straightly 0. But for $$n = m$$...
And everything starts going wrong. By stating
$$(1-x^2)P_n'(x) = \int -n(n+1)P_n(x) dx$$
i'm making a little change

$$\int_{-1}^{1} P_n(x) P_m(x) dx = \lim_{x \to 1} 2 \frac {P_m(x) (\int -n(n+1)P_n(x) dx) - P_n(x) (\int -m(m+1)P_m(x) dx))}{-n(n+1) + m(m+1)}$$

Now I plug $$P_n(x) = P_m(x)$$, $$x=1$$ and $$P_n(1) = 1$$ and state

$$\int_{-1}^{1} P_n(x) P_m(x) dx = \lim_{x \to 1} 2 \frac {P_m(x) (\int -n(n+1)P_n(x) dx) - P_n(x) (\int -m(m+1)P_m(x) dx))}{-n(n+1) + m(m+1)}$$

$$\int_{-1}^{1} P_n(x) P_m(x) dx = 2 (\int P_n(x) dx)_{x=1}$$
which is the nonsense of the day.

Where's the error?

Last edited: Sep 20, 2006
2. Sep 21, 2006

### jpr0

In the line after you say

"and in it's final shape",

if you intend to let $n=m$ here, then you have effectively divided your expression by $0$. This line is only valid for $n\neq m$.

3. Sep 21, 2006

### gulsen

This's not the error.

If you think it this way, you cannot compute a derivative as well, since you're dividing with 0 when computing it as well. Note that I'm dividing 0 with 0, which is indefinite, and from than line on, all I did was to get rid of this indefinition.

4. Sep 21, 2006

### arildno

Complete and utter nonsense. If you don't see that the ALGEBRAIC expression 0/0 is meaningless, you're lost.

5. Sep 22, 2006

### jpr0

Take your expression from the previous line (or whatever), and set $n=m$, and you will see that you have $$0=0[/itex]. I'm not sure what you hope to derive from this expression. For example [tex] 3\times 0 = 5\times 0$$

Diving this expression by zero gives $5=3$. ??
Anyway, if you want to derive the orthogonality relation for Legendre polynomials when $n=m$ then it's easier to derive it from the generating function.

6. Sep 22, 2006

### HallsofIvy

Staff Emeritus
Nobody who know calculus divides by 0 when finding a derivative!

7. Sep 23, 2006

### gulsen

Look, I'm not a freshman, and I know my calculus that much. Stop lecturing me on that, it goes very funny.
Derivative:
$$\lim_{\Delta x \to 0} \frac{f(x+\Delta x) - f(x)}{\Delta x}$$
If you directly set $$\Delta x = 0$$ which is the thing you ultimately do, you get a 0/0 which is not a solution, this is where you divide by at term that goes to 0 when finding a derivative.
Since you're too pedantic, you'll probably tell me division by limit of a term that goes to zero is different from division by 0, but that name was coined by jpr0 in the first place for my limit, and none of you give a **** to it.

Tell me how this is limit

$$\int_{-1}^{1} P_n(x) P_m(x) dx = \lim_{x \to 1} 2 \frac {P_m(x) (\int -n(n+1)P_n(x) dx) - P_n(x) (\int -m(m+1)P_m(x) dx))}{-n(n+1) + m(m+1)}$$

which is said to be "wrong because i'm dividing by 0" is different than

$$\lim_{\Delta x \to 0} \frac{f(x+\Delta x) - f(x)}{\Delta x}$$
I appreciate why most of great physicist hate mathematicians. They seem to know you well. I have asked a simple question, yet what you say is everything far from solution. Most questions I raise at physics department goes smooth, while almost all questions I raise right here goes haywire.

Now go **** yourselves guys. I'll this question at QP forum. Even if I can't get a correctly reply, I know that chances are very low that I'll meet such arrogance and idiocy. Have fun, and lock the topic.

Last edited: Sep 23, 2006
8. Sep 23, 2006

### Hurkyl

Staff Emeritus
There's a huge difference between trying to find the limit

$$\lim_{x \rightarrow 0} \frac{\text{stuff}}{x},$$

which you are talking about in post #7, and the limit

$$\lim_{x \rightarrow 0} \frac{\text{stuff}}{0},$$

which you are doing in post #1, in the case where m = n.

Exercise: if m = n, then -n(n+1) + m(m+1) = _____.

Another mistake (that isn't what's causing the problem you're seeing) is that

$$(1 - x^2)P'_n(x) = \int -n(n+1) P_n(x) \, dx$$

is incorrect. The left hand side is a specific function, and the right hand side denotes all of the possible antiderivatives of the integrand. You meant to write something like:

$$(1 - x^2)P'_n(x) = P'_n(0) + \int_0^x -n(n+1) P_n(t) \, dt$$

Are you sure its the mathematicians' fault? :grumpy: People are telling you that you are literally performing an arithmetic division by zero, but you keep trying to justify it by talking about limit forms. You accuse people of being "too pedantic" -- but the sloppiness in your understanding of limits is precisely what's at fault here.

9. Sep 23, 2006

### gulsen

Thanks for pointing this out Hurkly. My reply to you is here.

10. Sep 23, 2006

### jpr0

The problem is that you're working with Legendre polynomials, which implies here that your n and m are integers. Now if you want to "tend n to m", without simply setting n=m, then you will be working with non-integer Legendre functions where the above recursion relations simply do not work (and they probably even diverge at x=1, x=-1 anyway).

The difference between a derivative and doing what you're doing is that the small parameter (h) in the definition of "derivative" ((f(x+h)-f(x))/h) can be continously taken to zero, when the leading term in f(x+h)-f(x) goes linearly to zero as a function of h. How can you continously let one integer tend to another? You can't.

You asked in your original post what was wrong with what you were doing. I pointed out your error. In another post I also suggested a method of proving the orthogonality relation based on the generating function, which is what you will see in most maths texts - sorry if this wasn't good enough for you.

And finally "Look, I'm not a freshman, and I know my calculus that much." -- clearly you don't.

11. Sep 23, 2006

### arildno

No, I don't. Nor does anyone who knows mathematics do so.
We do not set $\bigtriangleup{x}=0$ either "directly" or "ultimately", whatever you mean by those vague terms.