# 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$$.

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

• The Legendre weight function $w(x)=1$ is for the definition of the orthogonality. The $w_i$ are not (directly) related to $w(x)$. See en.wikipedia.org/wiki/Gauss-Legendre_quadrature – gammatester Nov 25 '18 at 21:16
• I have make correction of my question. I need to find first three legendre polynomials with the information $w(x)=1$ – user612508 Nov 25 '18 at 21:21

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?$$