# Integrating Legendre Polynomials over half range

Solving for the potential of a conducting sphere with hemispheres at opposite potentials, (not using Green's function) I am stuck at this point:

$$I_l = V_1 \int_0^1 P_l(x)dx+V_2 \int_{-1}^0 P_l(x)dx$$ For example, I have $$\Phi(r,x) = K\sum_{l=0}^\infty r^l P_l(x) I_l$$ How do I proceed to discover an expression for $I_l$

-

Noting that $P_\ell(x)$ is even for even $\ell$ and odd for odd $\ell$, we have the relation

$$\int_{-1}^0 P_\ell(x)\mathrm dx=(-1)^{\ell}\int_0^1 P_\ell(x)\mathrm dx$$

so we can concentrate on evaluating

$$\int_0^1 P_\ell(x)\mathrm dx$$

for which we can use the integral expression

$$\int P_\ell(x)\mathrm dx=\frac{P_{\ell+1}(x)-P_{\ell-1}(x)}{2\ell+1}$$

and the special values $P_\ell(1)=1$ (due to normalization) and

$$P_\ell(0)=\begin{cases}\frac{(-1)^{\ell/2}}{2^\ell}\binom{\ell}{\ell/2}&\ell\;\text{even}\\0&\ell\;\text{odd}\end{cases}$$

For even $\ell$, it is easy to see from these considerations that the integral is equal to 1 for $\ell=0$, and 0 otherwise. This leaves us the case of odd $\ell$, where we obtain the expression

$$\int_0^1 P_{2\nu+1}(x)\mathrm dx=\frac{(-1)^\nu}{2^{2\nu+1}(\nu+1)}\binom{2\nu}{\nu}$$

The cheap-ass way of determining the value of $\int_0^1 P_{2\nu}(x)\mathrm dx$ without going through the rigamarole above is to note that since $P_{2\mu}(x)$ and $P_{2\nu}(x)$ for integer $\mu$ and $\nu$ are both even functions, their product is also an even function, and thus

$$\int_0^1 P_{2\mu}(x)P_{2\nu}(x)\mathrm dx=\frac12\int_{-1}^1 P_{2\mu}(x)P_{2\nu}(x)\mathrm dx$$

after which, we then recall the orthogonality relation for the Legendre polynomials

$$\int_{-1}^1 P_{2\mu}(x)P_{2\nu}(x)\mathrm dx=\frac{2\delta_{2\mu,2\nu}}{4\mu+1}$$

and then consider letting $\nu=0$...

-

One way would be to ask WolframAlpha; the result is

$$\frac{\sqrt{\pi}}{2\Gamma(1-\frac{l}{2})\Gamma(\frac{l+3}{2})}\;.$$

This is $1$ for $l=0$ and $0$ for positive even $l$, since the gamma function has poles at the non-positive integers. For odd $l=2k+1$, it can be rewritten as

$$\begin{eqnarray} \frac{\sqrt{\pi}}{2\Gamma(1-\frac{2k+1}{2})\Gamma(\frac{2k+1+3}{2})} &=& \frac{\sqrt{\pi}}{2\Gamma(\frac{1}{2}-k)\Gamma(k+2)} \\ &=& \frac{(2k)!}{2(-4)^kk!(k+1)!} \\ &=& \frac{(-1)^k(2k)!}{2^{2k+1}k!(k+1)!} \;. \end{eqnarray}$$

To derive this yourself (for $l>0$; the $l=0$ case is trivial), you can express $P_l(x)$ as a derivative:

$$\begin{eqnarray} \int_0^1P_l(x)\mathrm dx &=& \int_0^1\frac{1}{2^ll!}\frac{\mathrm d^l}{\mathrm dx^l}(x^2-1)^l\mathrm dx \\ &=& \left[\frac{1}{2^ll!}\frac{\mathrm d^{l-1}}{\mathrm dx^{l-1}}(x^2-1)^l\right]_0^1\;. \end{eqnarray}$$

The $l-1$ derivatives will not exhaust the $l$ factors of $x^2-1$, so the value at $1$ is $0$. The value of the derivative at $0$ is $(l-1)!$ times the coefficient of $x^{l-1}$ in $(x^2-1)^l$, which is $0$ for even $l$. For odd $l=2k+1$, we can get it from the binomial expansion

$$(x^2-1)^l=\sum_{m=0}^l\binom{l}{m}(-1)^{l-m}x^{2m}\;,$$

which yields

$$\begin{eqnarray} \int_0^1P_l(x)\mathrm dx &=& -\frac{(2k)!}{2^{2k+1}(2k+1)!}\binom{2k+1}{k}(-1)^{2k+1-k}\;, \end{eqnarray}$$

in agreement with the above result.

The integrals from $-1$ to $0$ are the same for $l=0$ and the same up to a sign for odd $l$.

-