# Advanced application of the Binomial Theorem

I'm trying to solve the following integral:

$$\int_{-1}^{1}C_{n_1-l_1}^{l_1+1}(x)C_{n_2-l_2}^{l_2+1}(x)C_{n_3-l_3}^{l_3+1}(x)(1-x^2)^{(l_1+l_2+l_3+1)/2}dx$$

Where $C_{n}^{\lambda}(x)$ is a Gegenbauer (a.k.a ultraspherical) polynomial.

I have found a solution using the generating function for $C_{n}^{\lambda}(x)$ as:

$$\sum_{n_1-l_1=0}^{\infty}\ \ \sum_{n_2-l_2=0}^{\infty}\ \ \sum_{n_3-l_3=0}^{\infty}r^{n_1-l_1}r^{n_2-l_2}r^{n_3-l_3}\int_{-1}^{1}C_{n_1-l_1}^{l_1+1}(x)C_{n_2-l_2}^{l_2+1}(x)C_{n_3-l_3}^{l_3+1}(x)(1-x^2)^{(l_1+l_2+l_3+1)/2}dx$$ $$=\int_{-1}^{1}(1-2xr+r^2)^{-(L+3)}(1-x^2)^{(L+3)/2}$$ $$=\sqrt{\pi}\frac{\Gamma(\frac{L+3}{2})}{\Gamma(\frac{L+4}{2})}(1-r^2)^{-(L+3)}$$

Where I've written$L=l_1+l_2+l_3$ for convenience of notation. The obvious next step is to express the binomial using the Binomial theorem and then equate the coefficients of the the resulting triple series with the coefficients of what we started with (i.e. the integral that I'm interested in). Doing so I get:

$$=\sqrt{\pi}\frac{\Gamma(\frac{L+3}{2})}{\Gamma(\frac{L+4}{2})}(1-r^2)^{-(l_1+1)}(1-r^2)^{-(l_2+1)}(1-r^2)^{-(l_3+1)}$$ $$=\sum_{i=0}^{\infty}\sum_{j=0}^{\infty}\sum_{k=0}^{\infty}r^{2i}r^{2j}r^{2k}(-1)^{i+j+k}\sqrt{\pi}\frac{\Gamma(\frac{L+3}{2})}{\Gamma(\frac{L+4}{2})}\left(\begin{array}{c}-l_1-1\\i\end{array}\right)\left(\begin{array}{c}-l_2-1\\j\end{array}\right)\left(\begin{array}{c}-l_3-1\\k\end{array}\right)$$

I then set

$$\begin{array}{c}2i=n_1-l_1\\2j=n_2-l_2\\2k=n_3-l_3\end{array}$$

$$\begin{array}{l} \int_{-1}^{1}C_{n_1-l_1}^{l_1+1}(x)C_{n_2-l_2}^{l_2+1}(x)C_{n_3-l_3}^{l_3+1}(x)(1-x^2)^{(l_1+l_2+l_3+1)/2}dx\\=(-1)^{(N-L)/2}\sqrt{\pi}\frac{\Gamma(\frac{L+3}{2})}{\Gamma(\frac{L+4}{2})}\left(\begin{array}{c}-l_1-1\\\frac{1}{2}(n_1-l_1)\end{array}\right)\left(\begin{array}{c}-l_2-1\\\frac{1}{2}(n_2-l_2)\end{array}\right)\left(\begin{array}{c}-l_3-1\\\frac{1}{2}(n_3-l_3)\end{array}\right) \end{array}$$

So $\bf{HERE's}$ my problem: Its not correct. At least not all of the time, I've spent several days on it and I can't figure out why it's not right. Can someone point out what I've done wrong?

Some ambiguous things in the derivation that could be causing problems are:

1. The way I chose to split up the binomial is not unique, I could have done it in powers of, e.g., $-l_1, -l_2, -l_3-3$. But this just seems to suggest that there should be other solutions which are equivalent, not that this solution is incorrect.
2. My assignment of $2i=n_1-l_1$, etc. is not unique either. If I had instead chosen $2i=n_2-l_2$ the binomial coefficients would be different. There are 6 possible ways to do this and not all of them are equivalent.

Here are a couple tests I've done:

1. for $l_1=l_2=l_3=0$ my solution gives $\pi/2\ \forall\ n_i$. This is true most of the time but if you explicitly evaluate the integral for some cases, e.g. $n_1=2, l_1=n_2=l_2=n_3=l_3=0$, the answer should be zero.
2. The solution is correct if $n_i=l_i\ \forall\ i$ since in that case all of the gegenbauer polynomials equal 1.
3. For some cases, e.g. $n_1=2, l_1=n_2=l_2=0, n_3=4,l_3=2$, some of the permutations of the binomials that I mentioned before are correct but others are not.

As a help the generating function for the Gegenbauer polynomials is: $$(1-2xr+r^2)^{-\lambda}=\sum_{n=0}^{\infty}C_{n}^{\lambda}(x)r^n\ \ \ ,\left|r\right|<1$$

-

It's possible that I'm confused, but aren't those $r$'s all the same variable? In that case you shouldn't be able to set $2i=n_1-l_1$, $2j=n_2-l_2$, $2k=n_3-l_3$ separately, you should only be able to set $$2(i+j+k) = (n_1-l_1) + (n_2-l_2) + (n_3-l_3).$$ Then the final answer should involve a two-dimensional sum, with only one of $i$, $j$, $k$ determined by the above condition.