Nodes and weight of Gauss Quadrature

In summary, Gauss quadrature can be calculated using a single node if f(x) is a function of only one variable, and it can be calculated using two nodes if f(x) is a function of two variables.
  • #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:
 
Mathematics news on Phys.org
  • #2
mathmari said:
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$ ?

Hey mathmari!

I believe it is indeed intended that $f(x)=1$ and $f(x)=x$. (Nod)

mathmari said:
$$ \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$$

If we take the derivative of $2x^{\frac{1}{2}+1}$, then we don't get $x^{\frac{1}{2}}$ do we? :oops:

mathmari said:
$$\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$$

If we take the derivative of $\frac{2}{3}x^{\frac{3}{2}+1}$, then we don't get $x^{\frac{3}{2}}$ do we? :oops:
 
  • #3
Klaas van Aarsen said:
If we take the derivative of $2x^{\frac{1}{2}+1}$, then we don't get $x^{\frac{1}{2}}$ do we? :oops:

If we take the derivative of $\frac{2}{3}x^{\frac{3}{2}+1}$, then we don't get $x^{\frac{3}{2}}$ do we? :oops:

Oh yes... :oops:

It should be:
\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+\frac{1}{\frac{1}{2}+1}x^{\frac{1}{2}+1}\right ]_0^1=a_0 \\ & \Rightarrow \left [x+\frac{2}{3}x^{\frac{3}{2}}\right ]_0^1=a_0 \\ & \Rightarrow 1+\frac{2}{3} =a_0 \\ & \Rightarrow a_0 =\frac{5}{3}\approx 1.6667 \\ \int_0^1w(x)\cdot x\, dx=a_0\cdot x_0 &\Rightarrow \int_0^1\left (1+\sqrt{x}\right )\cdot x\, dx=\frac{5}{3}x_0 \\ & \Rightarrow \int_0^1\left (x+x\sqrt{x}\right )\, dx=\frac{5}{3}x_0 \\ & \Rightarrow \int_0^1\left (x+x^{\frac{3}{2}}\right )\, dx=\frac{5}{3}x_0 \\ & \Rightarrow \left [\frac{x^2}{2}+\frac{1}{\frac{3}{2}+1}x^{\frac{3}{2}+1}\right ]_0^1=\frac{5}{3}x_0 \\ & \Rightarrow \left [\frac{x^2}{2}+\frac{2}{5}x^{\frac{5}{2}}\right ]_0^1=\frac{5}{3}x_0 \\ & \Rightarrow \frac{1}{2}+\frac{2}{5} =\frac{5}{3}x_0 \\ & \Rightarrow \frac{9}{10} =\frac{5}{3}x_0 \\ & \Rightarrow x_0=\frac{27}{50}=0,54 \end{align*}
:geek:
 
  • #4
mathmari said:
It should be:
:geek:
It looks correct to me now. (Nod)
 
  • #5
Klaas van Aarsen said:
It looks correct to me now. (Nod)

Great! Thank you! 👏
 

1. What are nodes in Gauss Quadrature?

Nodes in Gauss Quadrature refer to the points at which the integrand is evaluated in order to approximate the integral. These points are carefully chosen to maximize the accuracy of the approximation.

2. How is the weight of Gauss Quadrature determined?

The weight of Gauss Quadrature is determined by solving a set of equations known as the moments equations. These equations ensure that the approximation is as accurate as possible by assigning appropriate weights to each node.

3. What is the significance of the number of nodes in Gauss Quadrature?

The number of nodes in Gauss Quadrature determines the accuracy of the approximation. Generally, the more nodes that are used, the more accurate the approximation will be. However, there is a limit to the number of nodes that can be used for a given integral.

4. How are the nodes and weights of Gauss Quadrature calculated?

The nodes and weights of Gauss Quadrature are calculated using numerical methods such as Gaussian elimination or Newton-Cotes formulas. These methods involve solving a system of equations to determine the optimal nodes and weights for a given integral.

5. Can Gauss Quadrature be used for any type of integral?

No, Gauss Quadrature is most effective for approximating integrals with smooth and continuous functions. It may not be as accurate for integrals with discontinuities or singularities. Additionally, the number of nodes and weights needed for an accurate approximation may vary depending on the complexity of the integrand.

Similar threads

Replies
6
Views
919
  • General Math
Replies
2
Views
1K
Replies
7
Views
1K
Replies
6
Views
1K
Replies
4
Views
1K
Replies
3
Views
188
Replies
2
Views
616
  • General Math
Replies
4
Views
716
Replies
3
Views
1K
Replies
18
Views
2K
Back
Top