I'm looking for a maximum accuracy quadrature formula:


$$
\int\_{-1} ^{1} \sqrt{\frac {1-x}{1+x}} f(x)dx = A\_1f(x\_1)+A\_2f(x\_2)+R(f)
$$


I don't know exactly if it's Trapezoidal rule which has the degree of accuracy one, or Simpson's rule with three or Gauss (these 3 I have studied deeply, but might be others), also I would like to prove it using numerical analysis methods so any help in this direction will be highly appreciated.



Quadrature formula max accuracy
I assume you mean maximum degree of accuracy for polynomials, that is, you require that the formula is exact for polynomial functions of degree up to $d$, and you look for the maximum possible $d$. This is the most usual requirement, although not necessarily the best one (see for instance1 <http://eprints.maths.ox.ac.uk/1116/1/NA-06-07.pdf>).


The maximum $d$ achievable clearly depends on the number of terms $n$ in the formula $\sum\_{i=1}^n w\_if(x\_i)$ that you are allowing for. So you are comparing apples and oranges in your examples: Simpson has a higher order than the Trapezoidal Rule, but this is compensated by the fact that it requires more function evaluations; it is just a trade-off in many cases. Note, also, that the orders that you are stating for these two rules are for quadrature without a weight function, while you have $w(x)=(1-x)^{1/2}(1+x)^{-1/2}$ added as a weight function. This changes the problem, because now "exact for polynomials" means a different thing.


It is a classical theorem, often taught in advanced numerical analysis courses, that Gaussian quadrature (for a specific weight function) has the highest possible order of accuracy among all those with a given number of terms --- see e.g. Stoer, Bulirsch, *Introduction to numerical analysis* Sec. 3.6.


Your weight function is a special case of the Gauss-Jacobi weight $w(x)=(1-x)^\alpha(1+x)^\beta$, so you should look for formulas giving weights and nodes for [Gauss-Jacobi quadrature](https://en.wikipedia.org/wiki/Gauss%E2%80%93Jacobi_quadrature).


1[Wayback Machine link](https://web.archive.org/web/20160321190510/http://eprints.maths.ox.ac.uk/1116/1/NA-06-07.pdf), the article is: *Trefethen, Lloyd N.*, [**Is Gauss quadrature better than Clenshaw-Curtis?**](http://dx.doi.org/10.1137/060659831), SIAM Rev. 50, No. 1, 67-87 (2008). [ZBL1141.65018](https://zbmath.org/?q=an:1141.65018), [MR2403058](https://mathscinet.ams.org/mathscinet-getitem?mr=2403058).


