- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey! :giggle:
Calculate the node $x_0$ and the weight $a_0$ of Gauss Quadrature so that $$\int_0^1w(x)f(x)\, dx\approx I_0(f)=a_0f(x_0)$$ where $w(x)=1+\sqrt{x}$.
I have done the following:
The Gauss quadrature formula with $(n + 1)=1$ node (i.e. $n=0$) integrates polynomials of degree $2n + 1=1$ exactly.
\begin{align*}\int_0^1w(x)\cdot 1\, dx=a_0 &\Rightarrow \int_0^1\left (1+\sqrt{x}\right )\cdot 1\, dx=a_0 \\ & \Rightarrow \int_0^1\left (1+\sqrt{x}\right )\, dx=a_0 \\ & \Rightarrow \int_0^1\left (1+x^{\frac{1}{2}}\right )\, dx=a_0 \\ & \Rightarrow \left [x+2x^{\frac{1}{2}+1}\right ]_0^1=a_0 \\ & \Rightarrow \left [x+2x^{\frac{3}{2}}\right ]_0^1=a_0 \\ & \Rightarrow 1+2 =a_0 \\ & \Rightarrow a_0 =3 \\ \int_0^1w(x)\cdot x\, dx=a_0\cdot x_0 &\Rightarrow \int_0^1\left (1+\sqrt{x}\right )\cdot x\, dx=3x_0 \\ & \Rightarrow \int_0^1\left (x+x\sqrt{x}\right )\, dx=3x_0 \\ & \Rightarrow \int_0^1\left (x+x^{\frac{3}{2}}\right )\, dx=3x_0 \\ & \Rightarrow \left [\frac{x^2}{2}+\frac{2}{3}x^{\frac{3}{2}+1}\right ]_0^1=3x_0 \\ & \Rightarrow \left [\frac{x^2}{2}+\frac{2}{3}x^{\frac{5}{2}}\right ]_0^1=3x_0 \\ & \Rightarrow \frac{1}{2}+\frac{2}{3} =3x_0 \\ & \Rightarrow \frac{7}{6} =3x_0 \\ & \Rightarrow x_0=\frac{7}{18} \end{align*}
Is that correct? Or if we say that it integrates polynomials of degree $1$ do we mean that $w(x)f(x)=1$ and $w(x)f(x)=x$ instead of $f(x)=1$ and $f(x)=x$ ?
:unsure:
Calculate the node $x_0$ and the weight $a_0$ of Gauss Quadrature so that $$\int_0^1w(x)f(x)\, dx\approx I_0(f)=a_0f(x_0)$$ where $w(x)=1+\sqrt{x}$.
I have done the following:
The Gauss quadrature formula with $(n + 1)=1$ node (i.e. $n=0$) integrates polynomials of degree $2n + 1=1$ exactly.
\begin{align*}\int_0^1w(x)\cdot 1\, dx=a_0 &\Rightarrow \int_0^1\left (1+\sqrt{x}\right )\cdot 1\, dx=a_0 \\ & \Rightarrow \int_0^1\left (1+\sqrt{x}\right )\, dx=a_0 \\ & \Rightarrow \int_0^1\left (1+x^{\frac{1}{2}}\right )\, dx=a_0 \\ & \Rightarrow \left [x+2x^{\frac{1}{2}+1}\right ]_0^1=a_0 \\ & \Rightarrow \left [x+2x^{\frac{3}{2}}\right ]_0^1=a_0 \\ & \Rightarrow 1+2 =a_0 \\ & \Rightarrow a_0 =3 \\ \int_0^1w(x)\cdot x\, dx=a_0\cdot x_0 &\Rightarrow \int_0^1\left (1+\sqrt{x}\right )\cdot x\, dx=3x_0 \\ & \Rightarrow \int_0^1\left (x+x\sqrt{x}\right )\, dx=3x_0 \\ & \Rightarrow \int_0^1\left (x+x^{\frac{3}{2}}\right )\, dx=3x_0 \\ & \Rightarrow \left [\frac{x^2}{2}+\frac{2}{3}x^{\frac{3}{2}+1}\right ]_0^1=3x_0 \\ & \Rightarrow \left [\frac{x^2}{2}+\frac{2}{3}x^{\frac{5}{2}}\right ]_0^1=3x_0 \\ & \Rightarrow \frac{1}{2}+\frac{2}{3} =3x_0 \\ & \Rightarrow \frac{7}{6} =3x_0 \\ & \Rightarrow x_0=\frac{7}{18} \end{align*}
Is that correct? Or if we say that it integrates polynomials of degree $1$ do we mean that $w(x)f(x)=1$ and $w(x)f(x)=x$ instead of $f(x)=1$ and $f(x)=x$ ?
:unsure: