TITLE: Is there a trick to solve $\int_{-1}^1 \frac{P(t)}{\sqrt{1-t^2}}{\rm d}t=a[P(x_1)+P(x_2)+P(x_3)]$?
QUESTION [7 upvotes]: I found this question in some old exam: 

Find 4 reals $a, x_1, x_2, x_3$ such that the equality
  $$\int_{-1}^1 \frac{P(t)}{\sqrt{1-t^2}}{\rm d}t=a[P(x_1)+P(x_2)+P(x_3)]$$
  is true for all polynomial with degree less or equal 3. 

My problem is not to compute these reals for a particular example but rather I didn't understand the idea behind this equality. In fact there is a similar question in this exam to prove that $\int_{-1}^1 \frac{f(t)}{\sqrt{1-t^2}}{\rm d}t=\frac{\pi}{3}[f(x_1)+f(x_2)+f(x_3)]$ for all polynomial $f$ with degree less or equal 5; this what make me sure that there is a trick behind these issues. Is there any explanation?

REPLY [5 votes]: Note that $\int_{-1}^{1}\frac{at^3+bt^2+ct+d}{\sqrt{1-t^2}}dt$ is, by symmetry, equal to $\int_{-1}^{1}\frac{bt^2+d}{\sqrt{1-t^2}}dt$. This evaluates to $\frac{\pi}{2}(b+2d)$. Now we set the first constant to $\frac{\pi}{2} k$ and try $x_1=0, x_2=z$ and $x_3=-z$, again to exploit the symmetry of the polynomial. The equality the becomes $\frac{\pi}{2}(b+2d) = \pi kbz^2+\frac{3}{2}\pi kd$. Comparing coefficients you should get  $k=\frac{2}{3}$ and $z=\frac{\sqrt{3}}{2}$. 
So we have $\int_{-1}^{1}\frac{at^3+bt^2+ct+d}{\sqrt{1-t^2}}dt = \frac{\pi}{3}[P(-\frac{\sqrt{3}}{2})+P(0)+P(\frac{\sqrt{3}}{2})]$.
Surely this is not the most elegant solution but it works just fine for degree 3 or 5 polynomials.