Posts

Gaussian Quadrature: Evaluating a Definite Integral

Evaluation of the Definite Integral \( \int_0^1 \sin(x^2+2) \,dx \) using the Gaussian Quadrature Formula with Four Points

To evaluate the definite integral \( \int_0^1 \sin(x^2+2) \,dx \) using the Gaussian quadrature formula with four points, we first need to transform the interval of integration [0,1] to the standard interval [-1,1].

Let \( x=\frac{1}{2}(t+1) \), then \( dx=\frac{1}{2}dt \). When \( x=0 \), we get \( t=-1 \); and when \( x=1 \), we get \( t=1 \).

The integral becomes:

\[ \int_0^1 \sin(x^2+2) \,dx = \int_{-1}^1 \sin\left(\left(\frac{t+1}{2}\right)^2+2\right)\frac{1}{2}dt \]

Let \( f(t)=\frac{1}{2}\sin\left(\left(\frac{t+1}{2}\right)^2+2\right) \).

Gaussian Quadrature Formula

The Gaussian quadrature formula with four points is given by:

\[ \int_{-1}^1 f(t) \,dt \approx \sum_{i=1}^4 w_i f(t_i) \]

Weights and Points

The weights \( w_i \) and points \( t_i \) for a four-point Gaussian quadrature are:

\[ t_1 = -\sqrt{\frac{3}{7} + \frac{2}{7}\sqrt{\frac{6}{5}}} \approx -0.86113631 \] \[ t_2 = -\sqrt{\frac{3}{7} - \frac{2}{7}\sqrt{\frac{6}{5}}} \approx -0.33998104 \] \[ t_3 = \sqrt{\frac{3}{7} - \frac{2}{7}\sqrt{\frac{6}{5}}} \approx 0.33998104 \] \[ t_4 = \sqrt{\frac{3}{7} + \frac{2}{7}\sqrt{\frac{6}{5}}} \approx 0.86113631 \] \[ w_1 = w_4 = \frac{18 - \sqrt{30}}{36} \approx 0.34785485 \] \[ w_2 = w_3 = \frac{18 + \sqrt{30}}{36} \approx 0.65214515 \]

Evaluation at Each Point

Next, we evaluate \( f(t) \) at each of these points:

For \( t_1 = -0.86113631 \):

\[ x_1 = \frac{1}{2}(t_1+1) = \frac{1}{2}(-0.86113631+1) = 0.069431845 \] \[ f(t_1) = \frac{1}{2}\sin((0.069431845)^2+2) = \frac{1}{2}\sin(2.0048201) = \frac{1}{2}(0.9056636) = 0.4528318 \]

For \( t_2 = -0.33998104 \):

\[ x_2 = \frac{1}{2}(t_2+1) = \frac{1}{2}(-0.33998104+1) = 0.33000948 \] \[ f(t_2) = \frac{1}{2}\sin((0.33000948)^2+2) = \frac{1}{2}\sin(2.108929) = \frac{1}{2}(0.8354078) = 0.4177039 \]

For \( t_3 = 0.33998104 \):

\[ x_3 = \frac{1}{2}(t_3+1) = \frac{1}{2}(0.33998104+1) = 0.66999052 \] \[ f(t_3) = \frac{1}{2}\sin((0.66999052)^2+2) = \frac{1}{2}\sin(2.448887) = \frac{1}{2}(0.6508922) = 0.3254461 \]

For \( t_4 = 0.86113631 \):

\[ x_4 = \frac{1}{2}(t_4+1) = \frac{1}{2}(0.86113631+1) = 0.930568155 \] \[ f(t_4) = \frac{1}{2}\sin((0.930568155)^2+2) = \frac{1}{2}\sin(2.866057) = \frac{1}{2}(0.2764515) = 0.13822575 \]

Final Calculation

Finally, we apply the Gaussian quadrature formula:

\[ \int_0^1 \sin(x^2+2) \,dx \approx \sum_{i=1}^4 w_i f(t_i) \] \[ = w_1 f(t_1) + w_2 f(t_2) + w_3 f(t_3) + w_4 f(t_4) \] \[ = (0.34785485)(0.4528318)+(0.65214515)(0.4177039)+(0.65214515)(0.3254461)+(0.34785485)(0.13822575) \] \[ = 0.157523+0.272494+0.212217+0.048106 \] \[ \approx 0.69034 \]

Therefore, the approximate value of the integral is \( 0.69034 \).

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.