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)]$? 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?
 A: 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.
A: This probably has something to do with Chebyshev polynomials.
\begin{align}
T_0(x)=&\ 1\\
T_1(x)=&\ x\\
T_{n+1}(x)=&\ 2xT_n(x)-T_{n-1}\hspace{1em}  \forall\  n\geq 1
\end{align}
These polynomials have orthogonality property with $1/\sqrt{1-x^2}$ as weight.
$$\int_{-1}^{1}T_n(x)T_m(x)\frac{1}{\sqrt{1-x^2}}\,\text{d}x=
\left\lbrace
\begin{array}{ll}
0 & m\neq n\\
\pi & m=n=0\\
\pi/2 & m=n\neq 0
\end{array}
\right.$$
For example, in a third order polynomial, $1=T_0(x)T_0(x)$, $x=T_1(x)T_0(x)$, $x^2=T_1(x)T_1(x)$ and $x^3=0.5T_1(x)\times(T_2(x)+T_0(x))$.
P.S. I am not allowed to comment given my reputation and hence am posting this as an answer; although, this should have been a comment.
Edit
These polynomials also satisfy what is called "discrete orthogonality" (see this). If $x_i$ are the roots of $T_n(x)$, then for $0\leq p,q\leq n-1$, the following holds.
\begin{align}
\sum_i T_p(x_i)T_q(x_i)=\left\lbrace
\begin{array}{ll}
0 & p\neq q\\
n & p=q=0\\
n/2 & p=q\neq 0\\
\end{array}
\right.
\end{align}
With this property, I think the question is solved. Let $P_n(x)$ be any $n$-th order polynomial. Then, $P_n(x)$ can be expanded using the Chebyshev polynomial basis.
$$P_n(x)=\sum_{i=0}^{n} b_i T_i(x)=\sum_{i=0}^{n} b_i T_i(x)T_0(x)$$
By orthogonality, as already pointed out in the comments,
$$\int_{-1}^{1} \frac{P_n(x)}{\sqrt{1-x^2}}=\int_{-1}^{1} \frac{P_n(x)T_0(x)}{\sqrt{1-x^2}}=\pi b_0$$
Now, suppose $x_j$, $0\leq j\leq n-1$ represent roots of $T_n(x)$. Then,
$$\sum_{j=0}^{n-1}P_n(x_j)=\sum_{j=0}^{n-1}\sum_{i=0}^{n} b_i T_i(x_j)T_0(x_j)=\sum_{i=0}^{n} b_i \sum_{j=0}^{n-1} T_i(x_j)T_0(x_j)=nb_0$$
The last equality follows from discrete orthogonality. Summing up, we have
$$\int_{-1}^{1} \frac{P_n(x)}{\sqrt{1-x^2}}=\pi b_0=(\pi/n) \sum_{j=0}^{n-1}P_n(x_j)$$
