Integration: Gauss quadrature formula I want to find the formula for the Gauss quadrature that integrate the Integral $\int_{-1}^1f(x)\sqrt{|x|^3}\, dx$ exactly for every cubic polynomial $f$. 
$$$$ 
What exactly do we have to do here? 
Is $\sqrt{|x|^3}$ the weighting function? 
If yes, it s not a standard weighting function, for example $w=1$ or $w=\frac{1}{\sqrt{1-x^2}}$ where we know which polynomials we have to take to get the points? 
What do we have to in this case wehre we have a general weighting function? 
 A: We need a family of orthogonal polynomials for the weight $w(x)=|x|^{3/2}$ over the interval $(-1,1)$. There isn't an obvious Sturm-Liouville equation for this family, but if we note that
$$\begin{align}\int_{-1}^1|x|^{3/2}f(x)dx&=\int_{-1}^0|x|^{3/2}f(x)dx+\int_0^1|x|^{3/2}f(x)dx\\
&=\int_1^0|y|^{3/2}f(-y)(-dy)+\int_0^1|y|^{3/2}f(y)dy\\
&=\int_0^1|y|^{3/2}f(-y)dy+\int_0^1|y|^{3/2}f(y)dy\\
&=\int_0^1|x|^{3/2}\left(f(x)+f(-x)\right)dx\end{align}$$
So if $f(x)$ is an odd polynomial in $x$, the integral is zero. Thus every even polynomial is automatically orthogonal to every odd polynomial so we can derive a family of even orthogonal polynomials and a family of odd ones. For the even polynomials, let $p_n\left(x^2\right)$ be the polynomial of degree $2n$ and let $q_{n-1}\left(x^2\right)$ be any even polynomial of degree at most $2n-2$. Then
$$\begin{align}\int_{-1}^1|x|^{3/2}p_n\left(x^2\right)q_{n-1}\left(x^2\right)dx
&=2\int_0^1x^{3/2}p_n\left(x^2\right)q_{n-1}\left(x^2\right)dx\\
&=2\int_0^1y^{3/4}p_n(y)q_{n-1}(y)\frac{dy}{2y^{1/2}}\\
&=\int_{-1}^1\left(\frac{u+1}2\right)^{1/4}p_n\left(\frac{u+1}2\right)q_{n-1}\left(\frac{u+1}2\right)\frac{du}2\\
&=2^{-5/4}\int_{-1}^1\left(u+1\right)^{1/4}p_n\left(\frac{u+1}2\right)q_{n-1}\left(\frac{u+1}2\right)du\\
&=0\end{align}$$
Where we have made the substitutions $x=y^{1/2}$ and $y=\frac{u+1}2$. So that requires
$$p_n\left(\frac{u+1}2\right)=p_n(y)=p_n\left(x^2\right)=P_n^{(0,1/4)}(u)=P_n^{(0,1/4)}(2y-1)=P_n^{(0,1/4)}\left(2x^2-1\right)$$
Where $P_n^{(0,1/4)}(u)$ is the Jacobi polynomial. Using the formula kindly provided to us by @Count Iblis the weight corresponding to $x_k$ where $P_n^{(0,1/4)}\left(2x_k^2-1\right)=0$ is
$$\lambda_k=\frac{8n+1}{4n(4n+1)P_n^{(0,1/4)\prime}\left(2x_k^2-1\right)P_{n-1}^{(0,1/4)}\left(2x_k^2-1\right)}$$
For the purposes of the stated problem, we only need $2n=2$, but for completeness we point out that the odd $2n+1$-point formulas have points at the roots of $P_n^{(0,5/4)}\left(2x_k^2-1\right)=0$ with weights
$$\lambda_k=\frac{8n+5}{4n(4n+5)x_k^2P_n^{(0,5/4)\prime}\left(2x_k^2-1\right)P_{n-1}^{(0,5/4)}\left(2x_k^2-1\right)}$$
And also at $x_{n+1}=0$ with weight
$$\lambda_{n+1}=\frac{\left(n!\right)^2\Gamma\left(\frac54\right)\Gamma\left(\frac94\right)}{\left[\Gamma\left(n+\frac94\right)\right]^2}$$
Although the reader should be wary since none of the above formulas have been carefully checked.  
EDIT: Fixed errors in weights and checked through $5$-point formulas.
A: The formalism is explained here. So, you need to find the set of orthogonal polynomials where the inner product is defined using the weight function. Applying the Gram-Schmidt procedure and working with monic polynomials (i.e. the coefficient of the highest power of x is set equal to 1) yields the 3 term recurrence relation given at the end of this section.
In your case the weight function is $|x|^{3/2}$, and this yields the orthogonal polynomials:
$$
\begin{split}
p(0,x) &= &1\\
p(1,x) &= &x\\
p(2,x)& = -&\frac{5}{9} + x^2\\
p(3,x)& = -&\frac{9}{13}x + x^3\\
p(4,x)& = &\frac{45}{221} - \frac{18}{17} x^2 + x^4\\
p(5,x)& = &\frac{39}{119} x -\frac{26}{21} x^3 + x^5
\end{split}
$$
If you use $p(n,x)$, then the abscissa $x_i$ are the roots of $p(n,x)$, and the weight $w_i$ for $x_i$ is given by:
$$w_{i} = \frac{\int_{-1}^{1}|x|^{3/2}p(n-1,x)^{2}dx}{p'(n,x_{i})p(n-1,x_{i})}$$
This formula is derived in this section. Note that the $a_k = 1$ here as we're using monic polynomials. To get an exact result for every cubic polynomial, using the abscissa and weights derived from $p(2,x)$ suffices. An n-point Gaussian quadrature will be exact when integrating a 2n-1 th degree polynomial. So, if you use $p(5,x)$, you'll get a quadrature rule that yields exact results for polynomials up to 9th degree. And note that the roots of $p(5,x)$ have simple expressions.
