TITLE: Numerical Integration $\int_0^1\frac{1}{\sqrt[3]{x}}f(x)dx$
QUESTION [1 upvotes]: a. Integrate $$\int_0^1\frac{1}{\sqrt[3]{x}}f(x)dx$$ With $4$ sample points: $A_1,A_2,x_1,x_2$ 
b. Evaluate $$\int_0^1\frac{1}{\sqrt[3]{x}}e^xdx$$
For the first step, we can not use Gauss–Legendre quadrature so we first have to find an orthogonal basis such that:
$$\frac{1}{\sqrt[3]{x}}f(x)=A_1p_1(x_1)+A_2P_2(x_2)$$ where $x_1,x_2$ are root of the orthogonal basis?

REPLY [0 votes]: I think the point is to set up Gauss-Jacobi quadrature with $\alpha=0$, $\beta=-1/3$, and $n=2$. If the integration formula is to be exact for $f(x)\in\mathcal{P}_3$ then we must have
$$\int_0^1x^{-1/3}x^k\pi_2(x)dx=\sum_{j=1}^2A_jx_j^k\pi_2(x_j)=0$$
for $k\in\{0,1\}$ where $\pi_2(x)=(x-x_1)(x-x_2)=x^2+ax+b$. Writing out the equations we get
$$\begin{array}{lll}\frac35a&+\frac32b&=-\frac38\\
\frac38a&+\frac35b&=-\frac3{11}\end{array}$$
With solution $a=-\frac{10}{11}$, $b=\frac5{44}$ so that $x_1=\frac{10-3\sqrt5}{22}$ and $x_2=\frac{10+3\sqrt5}{22}$. Now we have the equations for the weights:
$$\int_0^1x^{-1/3}x^kdx=\sum_{j=1}^2a_jx_j^k$$
For $k\in\{0,1,2,3\}$. Writing out the equations for $k\in\{0,1\}$,
$$\begin{array}{lll}A_1&+A_2&=\frac32\\
\frac{10-3\sqrt5}{22}A_1&+\frac{10+3\sqrt5}{22}A_2&=\frac35\end{array}$$
With solution
$$\begin{align}A_1&=\frac34+\frac3{10\sqrt5}\\
A_2&=\frac34-\frac3{10\sqrt5}\end{align}$$
Upon checking we confirm that the formula is valid for $k\in\{2,3\}$ as well so we conclude that the integration formula exact for $f(x)\in\mathcal{P}_3$ is
$$\begin{align}\int_0^1x^{-1/3}f(x)dx&=\left(\frac34+\frac3{10\sqrt5}\right)f\left(\frac{10-3\sqrt5}{22}\right)+\left(\frac34-\frac3{10\sqrt5}\right)f\left(\frac{10+3\sqrt5}{22}\right)\\
&\quad+\frac{81}{216832}f^{(4)}(\xi)\end{align}$$
For some $\xi\in(0,1)$ for any function $f(x)$ with a continuous fourth derivative on $[0,1]$.  
EDIT: Forgot part b:
$$\begin{align}\int_0^1x^{-1/3}e^xdx&\approx\left(\frac34+\frac3{10\sqrt5}\right)\exp\left(\frac{10-3\sqrt5}{22}\right)+\left(\frac34-\frac3{10\sqrt5}\right)\exp\left(\frac{10+3\sqrt5}{22}\right)\\
&\approx2.342990538392430\end{align}$$
{"set_name": "stack_exchange", "score": 1, "question_id": 3531474}