Background: I am doing Gauss Quadrature, which says that $$\int_{-1}^1 f(x) w(x) dx \approx \sum_{j=0}^3 w_j f(x_i)$$ where $w(x) = \frac {1}{\sqrt{1-x^2}}$. To find the $w_j$, I essentially have to solve
$$\int_{-1}^1 \frac {(x-a)(x-b)}{\sqrt{1-x^2}}dx$$
for a few different values of $a$ and $b$.
I know that once my integrand is a rational function, then I can use partial functions to solve it. However, I haven't found a $u$-substitution which makes the integrand a rational function.
I also looked at this related answer, which seems to use the Beta function. But I would hope that's not neccesary.
Thanks a lot for any help.