Holooly Plus Logo

Question 9.2: Evaluation of a single definite integral using fourth-order ......

Evaluation of a single definite integral using fourth-order Gauss quadrature.

Evaluate \int_{0}^{3} e^{-x^{2}} d x using four-point Gauss quadrature.

Step-by-Step
The 'Blue Check Mark' means that this solution was answered by an expert.
Learn more on how do we answer questions.

Step 1: Since the limits of integration are [0,3], the integral has to be transformed to the form \int_{-1}^{1} f(t) d t. In the present problem a = 0 and b = 3. Substituting these values in Eq. (9.31)

x=\frac{1}{2}[t(b-a)+a+b] \quad \text { and } \quad d x=\frac{1}{2}(b-a) d t         (9.31)

gives: x=\frac{1}{2}[t(b-a)+a+b]=\frac{1}{2}[t(3-0)+0+3]=\frac{3}{2}(t+1) \quad and \quad d x=\frac{1}{2}(b-a) d t=\frac{1}{2}(3-0) d t=\frac{3}{2} d t Substituting these values in the integral gives:

I=\int_{0}^{3} e^{-x^{2}} d x=\int_{-1}^{1} f(t) d t=\int_{-1}^{1} \frac{3}{2} e^{-\left[\frac{3}{2}(t+1)\right]^{2}} d t

Step 2: Use four-point Gauss quadrature to evaluate the integral. From Eq. (9.30),

\int_{-1}^1 f(x) d x \approx C_1 f\left(x_1\right)+C_2 f\left(x_2\right)+C_3 f\left(x_3\right)+\ldots+C_n f\left(x_n\right)         (9.30)

and using Table 9-1:

Table 9-1: Weight coefficients and Gauss points coordinates

\begin{array}{|c|c|c|} \hline \begin{array}{c} \text { n } \\ \text { (Number } \\ \text { of points) } \end{array} & \begin{array}{l} \text { Coefficients } C_i \\ \text { (weights) } \end{array} & \text { Gauss points } x_i \\ \hline 2 & C_1=1 & x_1=-0.57735027 \\ \hline \text { } & C_2=1 & x_2=0.57735027 \\ \hline 3 & C_1=0.5555556 & x_1=-0.77459667 \\ \hline \text { } & C_2=0.8888889 & x_2=0 \\ \hline & C_3=0.5555556 & x_3=0.77459667 \\ \hline 4 & C_1=0.3478548 & x_1=-0.86113631 \\ \hline \text { } & C_2=0.6521452 & x_2=-0.33998104 \\ \hline & C_3=0.6521452 & x_3=0.33998104 \\ \hline & C_4=0.3478548 & x_4=0.86113631 \\ \hline 5 & C_1=0.2369269 & x_1=-0.90617985 \\ \hline \text { } & C_2=0.4786287 & x_2=-0.53846931 \\ \hline & C_3=0.5688889 & x_3=0 \\ \hline & C_4=0.4786287 & x_4=0.53846931 \\ \hline & C_5=0.2369269 & x_5=0.90617985 \\ \hline 6 & C_1=0.1713245 & x_1=-0.93246951 \\ \hline \text { } & C_2=0.3607616 & x_2=-0.66120938 \\ \hline & C_3=0.4679139 & x_3=-0.23861919 \\ \hline & C_4=0.4679139 & x_4=0.23861919 \\ \hline & C_5=0.3607616 & x_5=0.66120938 \\ \hline & C_6=0.1713245 & x_6=0.93246951 \\ \hline \end{array} \begin{aligned}I=\int_{-1}^{1} f(t) d t \approx & C_{1} f\left(t_{1}\right)+C_{2} f\left(t_{2}\right)+C_{3} f\left(t_{3}\right)+C_{4} f\left(t_{4}\right)=0.3478548 \cdot f(-0.86113631) \\& +0.6521452 \cdot f(-0.33998104)+0.6521452 \cdot f(0.33998104)+0.3478548 \cdot f(0.86113631)\end{aligned}

Evaluating f(t)=\frac{3}{2} e^{-\left[\frac{3}{2}(t+1)\right]^{2}} gives:

\begin{aligned}& I=0.3478548 \frac{3}{2} e^{-\left[\frac{3}{2}((-0.86113631)+1)\right]^{2}}+0.6521452 \frac{3}{2} e^{-\left[\frac{3}{2}((-0.33998104)+1)\right]^{2}} \\& +0.6521452 \frac{3}{2} e^{-\left[\frac{3}{2}(0.33998104+1)\right]^{2}}+0.3478548 \frac{3}{2} e^{-\left[\frac{3}{2}(0.86113631+1)\right]^{2}}=0.8841359\end{aligned}

The exact value of the integral (when carried out analytically) is 0.8862073 . The error is only about 1%.

Related Answered Questions