Find the Legendre polynomial Let us consider the numerical integral $ \ \int_{-1}^{1}w(x) f(x)dx=\sum_{i=0}^{N} f(x_i)w_i$, where $w_i$ are the weights and $w(x)$ is the weight function.
Legendre polynomials, denoted by $ \{p_n \}$ are a list of orthogonal polynomial supported on $[-1,1]$ with weight $w(x)=1$.  Then the explicit expression for $p_0,p_1,p_2$.
Answer: 
we have show that
$p_0=1, \ p_1=x , \ p_2=\frac{1}{2}(3x^2-1)$. 
How to show this using $w(x)=1$?
If $w(x)=1$, then we have
$ \int_{-1}^{1} f(x)dx=\sum_{i=0}^{N} f(x_i) w_i$.
Now how to proceed?
help me

(Up to now I see no correction to the question, here is the computation of the first Legendre polynomials)
This is a simple exercise in integration and using the orthogonality relations.
Let's write $(f,g)=\int_{-1}^1 f(x)g(x) dx$. Then you have to compute the polynomials $p_n$ of degree $n$ with 
$(p_n, p_m) = \frac{2}{2n+1}\delta_{nm}.$
Firts, with $p_0=a$ you have  $$2=(p_0,p_0) = 2a  \Longrightarrow a = 1.$$
With $p_1(x) =ax + b$ you get 
$$0 =(p_1, p_0) = 2b \Longrightarrow b = 0$$
$$\frac{2}{3}=(p_1, p_1) = \frac{2}{3}a^2 \Longrightarrow a = 1.$$
So $p_1(x) = x.$ Can you continue with the Ansatz $p_2(x) = ax^2+bx+c?$
