# An Integration by parts Identity

If I have an integral $\int_{-1}^1 u\;dv$ that upon performing integration by parts yields:

$$\int_{-1}^1 u\;dv=-\int_{-1}^1 v\;du$$

(i.e. $uv\bigg|_{-1}^1=0$).

Is there a trick that I can use to evaluate the integral?

Specifically:

$$\int_{-1}^{1}C_{n_1}^{l_1}(x)\cdot(1-x^2)^{l_1-l_2}\frac{d^{n_2}}{dx^{n_2}}\left[(1-x^2)^{n_2+l_2-1/2}\right]dx$$ $$=-\int_{-1}^{1}(2l_{1}C_{n_1-1}^{l_1+1}(x)\cdot(1-x^2)^{l1-l2}-2x(l_1-l_2)C_{n_1}^{l_1}(x)\cdot(1-x^2)^{l_1-l_2-1})\times$$ $$\frac{d^{n_2-1}}{dx^{n_2-1}}\left[(1-x^2)^{n_2+l_2-1/2}\right]dx$$

Note: the $C_n^l(x)$ is a gegenbauer polynomial.

-
May be... The less concrete question, the less concrete answer. –  Norbert Jan 13 '12 at 23:04
@Norbert: I realize it was a bit general to begin with, but it was intended to be a heuristic question. I've added the specific equation I'm trying to integrate, though I think its complexity might not make the principle transparent. –  okj Jan 13 '12 at 23:22

Use a Gauss–Gegenbauer quadrature rule. Your integrand is a polynomial of degree at most $n_1$ times a weight $l_1 - 1/2$ which corresponds to the orthogonal family $(C_n^{l_1})_n$. You only need the roots of $C_{\frac{n_1+1}{2}}^{l_1}$ for the quadrature to yield exact value in your case.