# Legendre Differential equation question.

1. Jan 21, 2010

### yungman

Legendre equation:
$$(1-x^2)y''-2xy'+n(n+1)y=0$$ Where -1< x < 1

General solution is $$y(x)=c_1 P_n (x)+c_2 Q_n (x)$$

Where $$P_n (x)$$ is bounded and $$Q_n (x)$$ is unbounded on (-1,1).

$$Q_n (x)=P_n (x)\int \frac{dx}{[P_n (x)]^2 (1-x^2)}$$

Question: Why is $$Q_n (x)$$ unbounded on (-1,1)?

I tried to solve for $$Q_n (x)$$ by substitude $$P_n (x)$$ in, using partial fraction to simplify and integrate each terms individually.

$$Q_n (x)=P_n (x)[ln(x+A) + ln(x+B)+ \frac{1}{x+C}.......]$$

As you can see after multiplying $$P_n (x)$$ in, $$ln(x^+_- A)$$ is unbound at x=+/-A. Is that the reason Q is unbound on (-1,1)?

But the second solution can be represented by an infinite series instead of

$$Q_n (x)=P_n (x)\int \frac{dx}{[P_n (x)]^2 (1-x^2)}$$

where the power series is bounded on (-1,1).

Last edited: Jan 22, 2010
2. Jan 21, 2010

### Old Smuggler

We have that (see, e.g., Abromowitz & Stegun, Handbook of mathematical functions)
$$Q_ n(x)={\frac{1}{2}} \int_{-1}^1{\frac{P_n(y)dy}{x-y}},$$
where the integral is defined from its Cauchy principal value.
From this it is easy to see that $Q_n(x)$ diverges when $x{\rightarrow}{\pm}1$.

3. Jan 21, 2010

### yungman

I agree that it diverge at x=+/- 1. That is the reason it was specified on (-1,1).

This is true for polynomial $$P_n (x)$$ also.

Why only $$Q_n (x)$$ is unbounded if represented by power series?

I updated the original post already.

Last edited: Jan 22, 2010
4. Jan 22, 2010

### matematikawan

I remember that for a Legendre equation, one of the linearly independent solution is a polynomial Pn and the other one is an infinite series Qn. Do you meant to say that Qn(x) does not converge for x in (-1,1)?
If it doesn't converges how can it be a solution.

Just curious. Does this expression
$$Q_n (x)=P_n (x)\int \frac{dx}{[P_n (x)]^2 (1-x^2)}$$
comes from applying Lagrange method of reduction of order ?

5. Jan 22, 2010

### yungman

$$Q_n (x)$$ obtained by Reduction of Order using $$P_n (x)$$.

I never understand why they have two different form of $$Q_n (x)$$. One as shown above and the other is an infinite series like you described.

This is the two Legendre series. If n is an integer, one become a polynomial and the other solution remain a power infinite series.

$$y_1 (x)=a_0 [1-\frac{n(n+1)}{2!}x^2 +\frac{(n-2)n(n+1)(n+3)}{4!}x^4 -\frac{(n-4)(n-2)n(n+1)(n+3)(n+5)}{6!}x^6..........]$$(1)

$$y_2 (x)=a_1 [x-\frac{(n-1)(n+2)}{3!}x^3 +\frac{(n-3)(n-1)(n+2)(n+4)}{5!}x^5 -\frac{(n-5)(n-3)(n-1)(n+2)(n+4)(n+6)}{7!}x^7..........]$$(2)

(1) and (2) obvious is continuous on (-1,1) and the series converge on (-1,1)

The other is $$Q_n (x)=P_n (x)\int \frac{dx}{[P_n (x)]^2 (1-x^2)}$$(3) which have points of discontinuity as shown below is an example using (3) with n=2.

General solution is $$y(x)=c_1 P_n (x)+c_2 Q_n (x)$$
$$P_2 (x)=\frac{1}{2}(3x^2 -1)$$
$$Q_2 (x)=P_2 (x)\int \frac{dx}{[P_2 (x)]^2 (1-x^2)}=\frac{1}{2}[3x^2 -1]\int \frac{dx}{{[\frac{1}{2}[3x^2 -1]^2 (1-x^2)}}$$

$$Q_2 (x)=\frac{2}{9}[3x^2 -1]\int \frac{dx}{{[x^2 -\frac{1}{3}]^2 (1-x^2)}}$$

$$Q_2 (x)=\frac{2}{9}[3x^2 -1]\int \frac{dx}{(x+\frac{1}{\sqrt{3}})^2 (x-\frac{1}{\sqrt{3}})^2 (1-x^2)}}$$

$$Q_2 (x)=\frac{2}{9}(3x^2 -1){\int \frac{Adx}{(x+\frac{1}{\sqrt{3}})}+\int \frac{Bdx}{(x+\frac{1}{\sqrt{3}})^2 }+\int \frac{Cdx}{(x-\frac{1}{\sqrt{3}})}+\int \frac{Ddx}{(x-\frac{1}{\sqrt{3}})^2 }+\int \frac{(E+Fx)dx}{(1-x^2 )}$$

Where A, B, C, D, E, F are constant numbers only.

$$Q_2 (x)=\frac{2}{3} (x+\frac{1}{\sqrt{3}})(x-\frac{1}{\sqrt{3}}) [A ln(x+\frac{1}{\sqrt{3}})-\frac{B}{(x+\frac{1}{\sqrt{3}})}+C ln(x-\frac{1}{\sqrt{3}})-\frac{D}{(x-\frac{1}{\sqrt{3}})}-\frac{F}{2}(ln(1-x^2 )]$$

$$\Rightarrow Q_2 (x)=\frac{2}{3}[A (x+\frac{1}{\sqrt{3}})(x-\frac{1}{\sqrt{3}}) ln(x+\frac{1}{\sqrt{3}})-B(x-\frac{1}{\sqrt{3}})+C (x+\frac{1}{\sqrt{3}})(x-\frac{1}{\sqrt{3}}) ln(x-\frac{1}{\sqrt{3}})-D(x+\frac{1}{\sqrt{3}})-\frac{F}{2}(x+\frac{1}{\sqrt{3}})(x-\frac{1}{\sqrt{3}}) (ln(1-x^2 )]$$

As shown, all the denominators are cancel so the no denominator to worry about. The points of unbound are $$x=\frac{1}{\sqrt{3}}$$ and $$x=-\frac{1}{\sqrt{3}}$$ in the $$ln(x-\frac{1}{\sqrt{3}})$$ etc.

As you see, the two form of $$Q_n (x)$$ have different characteristics. What did I do wrong?

6. Jan 23, 2010

### matematikawan

Last edited by a moderator: Apr 24, 2017
7. Jan 23, 2010

### yungman

I tried the Wolfram Mathematica and get similar to your answer, difference is 3x^2-1 instead of 1-3x^2.

BUT I double check my steps on the partial fraction, B=D=9/8, E=0 and there are terms like $$ln(x^+_-\frac{1}{\sqrt{3}})$$ exist. Please double check my partial fraction work above and let me know what I did wrong. I check it 3 times already before I even post the thread. Something must be very wrong what I did and I don't see it.

You can easily see $$ln(x^+_-1)$$ are from $$\frac{1}{1-x^2 }$$.

How about the $$(3x^2 -1)^2 = 9(x+\frac{1}{\sqrt{3}})^2 (x-\frac{1}{\sqrt{3}})^2$$ ?

Thanks

Last edited by a moderator: Apr 24, 2017
8. Jan 25, 2010

### Old Smuggler

$Q_n(x)$ does not contain any integration constants, and your formula for it is rather inconvenient.
Here is a more useful formula for $Q_n(x)$ obtained from Handbook of Mathematical Functions:
$$Q_n(x)={\frac{1}{2}}P_n(x){\ln}{\frac{1+x}{1-x}}- \sum_{m=1}^nP_{m-1}(x)P_{n-m}(x)/m.$$
We easily find that
$$Q_2(x)={\frac{(3x^2-1)}{4}}{\ln}{\frac{1+x}{1-x}}-{\frac{3x}{2}}.$$

Last edited: Jan 25, 2010
9. Jan 26, 2010

### yungman

After I saw the Wolfram simulation, I work through the numbers and find all the constants, find out the terms contain all the points in between x+-1 to x=1 disappeared because the coeficients for those terms are zero!!!

Below is what I got and I double check already.
$$Q_2 (x)=P_2 (x)\int \frac{dx}{[P_2 (x)]^2 (1-x^2)}=\frac{1}{2}[3x^2 -1]\int \frac{dx}{{[\frac{1}{2}[3x^2 -1]^2 (1-x^2)}}$$

$$Q_2 (x)=2[3x^2 -1]\int \frac{dx}{ (\sqrt{3}x^2 +1)^2 (\sqrt{3}x-1)^2 (1+x)(1-x)}$$

$$Q_2 (x)=2(3x^2 -1)[{\int \frac{Adx}{ (\sqrt{3}x +1) } +\int \frac{Bdx}{ (\sqrt{3}x +1)^2 }+\int \frac{Cdx}{ (\sqrt{3}x -1) }+\int \frac{Ddx}{ (\sqrt{3}x -1)^2 }+\int \frac{Edx}{(1+x )} +\int \frac{Fdx}{(1-x )}]$$

Where A, B, C, D, E, F are constant numbers only. See below the steps to obtain the constants using partial fraction. This give:

$$Q_2 (x)=2(3x^2 -1)[\frac{\sqrt{3}}{6}\int \frac{dx}{ (\sqrt{3}x +1) } + \frac{3}{8}\int \frac{dx}{ (\sqrt{3}x +1)^2 } + \frac{2\sqrt{3}-3}{12}\int \frac{dx}{ (\sqrt{3}x -1) }+$$
$$\frac{3}{8}\int \frac{dx}{ (\sqrt{3}x -1)^2 } - \frac{1}{8}\int \frac{dx}{(1+x )} + \frac{1}{8}\int \frac{Fdx}{(1-x )}]$$

$$Q_2 (x)=2(\sqrt{3}x+1 )(\sqrt{3}x-1) [- \frac{3}{8}\frac{1}{\sqrt{3}}\frac{1}{(\sqrt{3}x+1)} - \frac{3}{8}\frac{1}{\sqrt{3}}\frac{1}{(\sqrt{3}x-1)} + \frac{1}{8}ln(1+x) - \frac{1}{8}(ln(1-x)]$$

As shown, all the denominators are cancel so the no denominator to worry about. The only points of unbound on (-1,1) are from:x=-1 and x+1.

Partial Fraction.
$$\frac{1}{ (\sqrt{3}x+1)^2 (\sqrt{3}x-1)^2 (1+x)(1-x) } = { \frac{A}{ (\sqrt{3}x +1) } + \frac{B}{ (\sqrt{3}x +1)^2 }+$$
$$\frac{C}{ (\sqrt{3}x -1) }+ \frac{D}{ (\sqrt{3}x -1)^2 }+ \frac{E}{(1+x )} + \frac{F}{(1-x )}}$$

1) Multiply both side by $$(\sqrt{3}x+1)^2$$ and let $$x=-\frac{1}{\sqrt{3}}\Rightarrow$$
$$\frac{1}{ (\sqrt{3}x-1)^2 (1+x)(1-x) } = B= \frac{1}{ (-2)^2 (1-\frac{1}{\sqrt{3}})(1+\frac{1}{\sqrt{3}})} \Rightarrow B=\frac{3}{8}$$

2) Multiply both side by $$(\sqrt{3}x-1)^2$$ and let $$x=\frac{1}{\sqrt{3}}\Rightarrow$$
$$\frac{1}{ (\sqrt{3}x+1)^2 (1+x)(1-x) } = D= \frac{1}{ (2)^2 (1+\frac{1}{\sqrt{3}})(1-\frac{1}{\sqrt{3}})} \Rightarrow D=\frac{3}{8}$$

3) Multiply both side by $$(1+x)$$ and let $$x=-1\Rightarrow$$
$$\frac{1}{ (\sqrt{3}x+1)^2 (\sqrt{3}x-1)^2 (1-x) }=E = \frac{1}{ (1-\sqrt{3})^2 (-1-\sqrt{3})^2 (2) }\RightarrowE=\frac{1}{8}$$

4) Multiply both side by $$(1-x)$$ and let $$x=1\Rightarrow$$
$$\frac{1}{ (\sqrt{3}x+1)^2 (\sqrt{3}x-1)^2 (1+x) }= F = \frac{1}{ (\sqrt{3}+1)^2 (\sqrt{3}-1)^2 (2) }\RightarrowF=\frac{1}{8}$$

Substitude B,D,E,F in:

$$\frac{1}{ (\sqrt{3}x+1)^2 (\sqrt{3}x-1)^2 (1+x)(1-x) } = { \frac{A}{ (\sqrt{3}x +1) } + \frac{3}{8}\frac{1}{ (\sqrt{3}x +1)^2 }+ \frac{C}{ (\sqrt{3}x -1) }+ \frac{3}{8}\frac{1}{ (\sqrt{3}x -1)^2 }+$$
$$\frac{1}{8}\frac{1}{(1+x )} + \frac{1}{8}\frac{1}{(1-x )}}$$

Let x=0 $$1 = A + \frac{3}{8} - C+ \frac{3}{8} + \frac{1}{8} + \frac{1}{8}\Rightarrow A-C=0$$

Let x=$$\sqrt{3}\Rightarrow\frac{1}{(3+1)^2 (3-1)^2 (1+\sqrt{3}) (1-\sqrt{3})}=-\frac{1}{128} = \frac{A}{4} + \frac{3}{128} +\frac{C}{2} +\frac{3}{32} +\frac{1}{8}\frac{1}{(1+\sqrt{3})} + \frac{1}{8}\frac{1}{(1-\sqrt{3}) }$$

$$\Rightarrow \frac{A}{4}+\frac{C}{2} = -\frac{1}{128} - \frac{3}{128} - \frac{3}{32} + \frac{16}{128} } = 0$$

This give $$A+2C=0$$

Together with $$A-C=0$$ result in $$A=C=0$$

Question is are all other n = 0,1,2,3,.....behave the same?

10. Jan 29, 2010

### yungman

I know so far all the question except one had all been clarified. The last question is:

Why books claimed Q is unbound in [-1,1] and cannot be used in a lot of the BVP? In reality the only reason P is bounded on [-1,1] only after they normalized the coefficients so P(1)=1. Or else P is unbounded too!!!! Why the book don't attempt to normalize the coefficients of Q so Q(1)=1. Then both P and Q are bounded on [-1,1].

Thanks

11. Jan 31, 2010

### yungman

12. Feb 2, 2010

### matematikawan

Qn(x) is unbounded at the end point (boundary ?).

The general solution to the Legendre Differential equation is
$$y(x)=c_1 P_n (x)+c_2 Q_n (x)$$

If we impose the boundary conditions, I think c2 must be zero because Qn(1 or -1) is unbounded. Thus, the final solution only involves Pn(x).

13. Feb 3, 2010

### yungman

Actually $$Q_n(x)$$ is bounded in (-1,1), just not bounded in [-1,1]. It is only the two end points that$$Q_n(x)$$ not bounded.

That is my whole question. $$P_n(x)$$ is bounded in [-1,1] ONLY when they normalize all the coefficients so $$P_n(1)=1$$!!! $$Q_n(x)$$ is unbounded because they did not normalize the Coefficients. You can just as easy putting a coefficient infront of each of the element of the Q and make $$Q_n(1)=1$$!!!!

Then both $$P_n(x) & Q_n(x)$$ are bounded in [-1,1].

Question is why not?? They just keep making C2=0 like what you showed

14. Feb 3, 2010

### matematikawan

Pn(x) is a polynomial of degree n. It does make sense to initialise Pn(1)=1.
But Qn(x) is an infinite series and also undefined at x=-1, 1. So it does't make sense Qn(1) = something.

15. Feb 3, 2010

### yungman

You mean there is no way to make Q converge to a finite number when x=1? I guess it make sense because no matter how small you make the coefficients, if you have infinite number of terms, still it is unbounded. Am I correct?

Still, what is so important about [-1,1]? Why can't people just work with (-1,1) so both P and Q can be used?