Chapter 07.05: Gauss Quadrature Rule of Integration
Learning Objective
After successful completion of this lesson, you should be able to:
1) derive the Gauss quadrature method for integration.
Introduction
The two-point Gauss quadrature rule is an extension of the trapezoidal rule approximation where the arguments of the function are not predetermined. In single-segment trapezoidal rule for approximating the integral ∫baf(x)dx,the end-points a and b are chosen as the quadrature points, but in the two-point Gaussian quadrature rule, two points x1 and x2 somewhere between the end-points a and b are chosen. How do we find these quadrature points is a question, and so is why we wish to find these points? The answer to the “why” question is to gain more accuracy for the same order of computational time over the trapezoidal rule. The derivation and the example following will answer both these questions.
Before we derive the two-point Gaussian quadrature rule, we derive the trapezoidal rule from the method of undetermined coefficients. Why? Because that is the method used to derive the two-point Gaussian quadrature rule as well.
Trapezoidal Rule Derivation Using Method of Undetermined Coefficients
Choose the integral ∫baf(x)dx approximated as follows.
∫baf(x)dx≈c1f(a)+c2f(b)(1)
The coefficients c1 and c2 are undetermined. We find these coefficients such that right-hand side is exact for integrals of first-order polynomial a0+a1x.
From exact integration
∫ba(a0+a1x)dx=[a0x+a1x22]ba=a0(b−a)+a1(b2−a22)(2)
But we want the right-hand side of Equation (1) to give the same result as Equation (2) for f(x)=a0+a1x which gives
c1f(a)+c2f(b)=c1(a0+a1b)+c2(a0+a1b)=a0(c1+c2)+a1(c1a+c2b)(3)
Hence from Equations (2) and (3),
a0(b−a)+a1(b2−a22)=a0(c1+c2)+a1(c1a+c2b)(4)
Since a0 and a1 are arbitrary constants for the chosen general straight line, the coefficients of a0 and a1 need to be equal. That gives
c1+c2=b−a(5a)
c1a+c2b=b2−a22(5b)
Multiplying Equation (5a) by a and subtracting from Equation (5b) gives
c2=b−a2(6a)
Substituting the value of c2 from Equation (6a) in Equation (5a) gives
c1=b−a2(6b)
Therefore
∫baf(x)dx≈c1f(a)+c2f(b)=b−a2f(a)+b−a2f(b)(7)
Two-point Gaussian Quadrature Rule Using Method of Undetermined Coefficients
In the two-point Gauss quadrature rule, an integral instead of Equation (1) is approximated as
∫baf(x)dx≈c1f(x1)+c2f(x2)(8)
The quadrature points are the two additional unknowns. There are four unknowns in Equation (8) – the two quadrature points x1, x2, and the two weights c1 and c2. Hence, these are found by assuming that the formula gives exact results for integrating a general third-order polynomial, f(x)=a0+a1x+a2x2+a3x3.
∫baf(x)dx=∫ba(a0+a1x+a2x2+a3x3)dx=[a0x+a1x22+a2x33+a3x44]ba=a0(b−a)+a1(b2−a22)+a2(b3−a33)+a3(b4−a44)(9)
But we want the right-hand side of Equation (8) to give the same result as Equation (9) for f(x)=a0+a1x+a2x2+a3x3 which is
c1f(x1)+c2f(x2)=c1(a0+a1x1+a2x21+a3x31)+c2(a0+a1x2+a2x22+a3x32)(10)
Equating Equations (9) and (10) gives
a0(b−a)+a1(b2−a22)+a2(b3−a33)+a3(b4−a44)=c1(a0+a1x1+a2x21+a3x31)+c2(a0+a1x2+a2x22+a3x32)=a0(c1+c2)+a1(c1x1+c2x2)+a2(c1x21+c2x22)+a3(c1x31+c2x32)(11)
Since in Equation (11), the constants a0, a1, a2, and a3 are arbitrary in the f(x)=a0+a1x+a2x2+a3x3, the coefficients of a0, a1, a2, and a3 must be equal. This equating gives us four equations as follows.
b−a=c1+c2
b2−a22=c1x1+c2x2
b3−a33=c1x12+c2x22
b4−a44=c1x13+c2x23(12a−d)
Without proof, we can find that the above four simultaneous nonlinear equations have only one acceptable solution
c1=b−a2
c2=b−a2
x1=(b−a2)(−1√3)+b+a2
x2=(b−a2)(1√3)+b+a2(13)
Hence from Equations (1) and (13),
∫baf(x)dx≈c1f(x1)+c2f(x2)=b−a2f(b−a2(−1√3)+b+a2) +b−a2f(b−a2(1√3)+b+a2)(14)
One-point Gaussian Quadrature Rule Using Method of Undetermined Coefficients
Since we derived the two-point Gaussian quadrature rule without showing complete proof because of its length, we show the complete proof of the one-point Gauss quadrature rule. The derivation is based on approximating the integral by using the function value at a single point x1 and giving it some weight c1 and is given by
∫baf(x)dx≈c1f(x1)(15)
To derive the values of c1 and x1, we assume the formula in Equation (15) gives exact values for an integral of a linear polynomial of the form a0+a1x.
∫ba(a0+a1x)dx=[a0x+a1x22]ba=a0(b − a)+a1(b2−a22)(16)
From the assumed formula
c1f(x1)=c1(a0+a1x1)=c1a0+c1a1x1(17)
Equating Equations (16) and (17) gives
a0(c1)+a1(c1x1)=a0(b − a)+a1(b2−a22)
Since a0 and a1 are arbitrary, we can equate the coefficients of a0 and a1, giving
c1=b−a(18)
c1x1=(b2−a22)(19)
Using Equation (18) in Equation (19) gives
(b−a)x1=b2−a22
x1=b+a2(20)
Therefore, one-point Gauss quadrature rule can be expressed as
∫baf(x)dx≈c1f(x1)=(b−a)f(b+a2)(21)
Learning Objectives
After successful completion of this lesson, you should be able to:
1) use the Gauss quadrature rule to approximate definite integrals.
Recap
In the previous lesson, you learned the theory of the Gauss quadrature rule. In this lesson, we apply the formulas of the rule to approximate definite integrals.
Example 1
The following integral is given
∫1.30.15xe−2xdx
a) Use the two-point Gauss quadrature rule to estimate the value of the integral.
b) Find the true error for part (a).
c) Find the absolute relative true error for part (a).
Solution
a) The two-point Gauss quadrature rule is given by
∫baf(x)dx≈c1f(x1)+c2f(x2)
where
c1=b−a2
x1=b−a2(−1√3)+b+a2
c2=b−a2
x2=b−a2(1√3)+b+a2
For this example
f(x)=5xe−2x, a=0.1, b=1.3
So
c1=1.3−0.12=0.6
x1=1.3−0.12(−1√3)+1.3+0.12=0.35359
c2=1.3−0.12=0.6
x2=1.3−0.12(1√3)+1.3+0.12=1.0461
Then
∫1.30.1f(x)dx≈c1f(x1)+c2f(x2)=0.6f(0.35359)+0.6f(1.04641)
Finding the values of the function at the two quadrature points
f(0.35359)=5(0.35359)e−2(0.35359)=0.87166
f(1.04641)=5(1.04641)e−2(1.04641)=0.64531
we get
∫1.30.1f(x)dx≈0.6×0.87166+0.6×0.64531=0.91018
b) The exact value of the above integral can be found as
∫1.30.15xe−2xdx=0.89386
The true error
Et=True Value−Approximate Value=0.89386 − 0.91018=−0.01632
c) The absolute relative true error |εt| is
|εt|=|True Value−Approximate ValueTrue Value|×100=|0.89386 −0.910180.89386 |×100=1.8258%
Example 2
The following integral is given
∫1.30.15xe−2xdx
a) Use the one-point Gaussian quadrature rule to estimate the value of the integral.
b) Find the true error for part (a).
c) Find the absolute relative true error, |ϵt|, for part (a).
Solution
a)
∫baf(x)dx≈(b−a)f(a+b2)
where
a=0.1
b=1.3
∫1.30.1f(x)dx≈(1.3−0.1)f(1.3+0.12)=(1.2)f(0.7)=(1.2)(5(0.7)e−2(0.7))=1.0357
b) The true value is
Et=True value−Approximate value=0.89386−1.0357=−0.14183
c) The absolute relative true error, |ϵt|, would be
|ϵt|=|True errorTrue value|×100=|−0.141830.89386|×100=15.86%
Example 3
Use two-point Gauss quadrature rule to approximate the distance covered by a rocket from t=8 to t=30 seconds as given by
x=∫308(2000ln[140000140000−2100t]−9.8t)dt
Also, find the absolute relative true error.
Solution
First, change the limits of integration from [8,30] to [−1,1] then
∫308f(t)dt=30−82∫1−1f(30−82x+30+82)dx=11∫1−1f(11x+19)dx
The weighting factors and function argument values for the two point rule are,
c1=1.000000000
x1=−0.577350269
c2=1.000000000
x2=0.577350269
Now we can use the Gauss quadrature formula
11∫1−1f(11x+19)dx≈11[c1f(11x1+19)+c2f(11x2+19)]=11[f(11(−0.5773503)+19)+f(11(0.5773503)+19)]=11[f(12.64915)+f(25.35085)]=11[(296.8317)+(708.4811)]=11058.44 m
where
f(12.64915)=2000ln[140000140000−2100(12.64915)]−9.8(12.64915)=296.8317
f(25.35085)=2000ln[140000140000−2100(25.35085)]−9.8(25.35085)=708.4811
The absolute relative true error, |ϵt|, is (True value = 11061.34 m)
|ϵt|=|11061.34−11058.4411061.34|×100=0.0262%
Learning Objectives
After successful completion of this lesson, you should be able to:
1) apply higher-point Gauss quadrature formulas to estimate integrals
2) use a table of abscissas and weights to apply the Gauss quadrature rule.
Introduction
We have discussed one-point and two-point Gauss quadrature rules in a previous lesson. So, how do higher-point Gauss quadrature rules work? For example, the three-point Gauss quadrature rule is given by
∫baf(x)dx≈c1f(x1)+c2f(x2)+c3f(x3)(1)
The coefficients (also called weighting factors) c1, c2, and c3, and the function arguments x1, x2 and x3 are calculated by assuming the formula gives exact expressions for integrating a fifth-order polynomial
∫ba(a0+a1x+a2x2+a3x3+a4x4+a5x5)dx.
General n -point rules would approximate an integral as
∫baf(x)dx≈c1f(x1)+c2f(x2)+.......+cnf(xn)(2)
Arguments and weighing factors for n-point Gauss quadrature rules
In handbooks (see Table 1), coefficients and arguments for n-point Gauss quadrature rule are not given for integrals of the form ∫baf(x)dx but for integrals of the form ∫1−1g(x)dx, that is,
∫1−1g(x)dx≈n∑i=1cig(xi)(3)
Table 1 Weighting factors c and function arguments x used in Gauss quadrature formulas
Points | Weighting Factors | Function Arguments |
---|---|---|
1 | c1=2.000000000 | x1=0.000000000 |
2 | c1=1.000000000 c2=1.000000000 |
x1=−0.577350269 x2=0.577350269 |
3 | c1=0.555555556 c2=0.888888889 c3=0.555555556 |
x1=−0.774596669 x2=0.000000000 x3=0.774596669 |
4 | c1=0.347854845 c2=0.652145155 c3=0.652145155 c4=0.347854845 |
x1=−0.861136312 x2=−0.339981044 x3=0.339981044 x4=0.861136312 |
5 | c1=0.236926885 c2=0.478628670 c3=0.568888889 c4=0.478628670 c5=0.236926885 |
x1=−0.906179846 x2=−0.538469310 x3=0.000000000 x4=0.538469310 x5=0.906179846 |
6 | c1=0.171324492 c2=0.360761573 c3=0.467913935 c4=0.467913935 c5=0.360761573 c6=0.171324492 |
x1=−0.932469514 x2=−0.661209386 x3=−0.238619186 x4=0.238619186 x5=0.661209386 x6=0.932469514 |
So if the table is given for integrals with [-1,1] integration limits, how does one solve for integrals with [a,b] integration limits.
The answer lies in that any integral with limits of [a,b] can be converted into an integral with limits [−1,1]. Let
x=mt+c(4)
If x=a, then t=−1
If x=b, then t=+1
such that
a=m(−1)+cb=m(1)+c(5a,b)
Solving the two Equations (5a) and (5b) simultaneously gives
m=b−a2c=b+a2(6a,b)
Hence from Equations (4), (6a), (6b),
x=b−a2t+b+a2dx=b−a2dt
Substituting values of x and dx into the integral gives us
∫baf(x)dx=∫1−1f(b−a2t+b+a2)b−a2dt=∫1−1f(b−a2x+b+a2)b−a2dx(7)
Hence, any integral of the form ∫baf(x)dx can be converted to an ∫1−1g(x)dx, and Table 1 can be used to estimate integrals.
Example 1
Use two-point Gauss quadrature rule to approximate the distance in meters covered by a rocket from t=8 s to t=30 s as given by
x=∫308(2000ln[140000140000−2100t]−9.8t)dt
Change the limits so that one can use the weights and abscissas given in Table 1. Also, find the absolute relative true error. The true value is given as 11061.34 m
Solution
First, change the limits of integration from [8,30] to [−1,1] using Equation (7) gives
∫308f(t)dt=30−82∫1−1f(30−82x+30+82)dx=11∫1−1f(11x+19)dx
Next, get weighting factors and function argument values from Table 1 for the two-point rule,
c1=1.000000000x1=−0.577350269c2=1.000000000x2=0.577350269
Now we can use the Gauss quadrature formula
11∫1−1f(11x+19)dx≈11[c1f(11x1+19)+c2f(11x2+19)]=11[f(11(−0.5773503)+19)+f(11(0.5773503)+19)]=11[f(12.64915)+f(25.35085)]=11[(296.8317)+(708.4811)]=11058.44 m
since
f(12.64915)=2000ln[140000140000−2100(12.64915)]−9.8(12.64915)=296.8317f(25.35085)=2000ln[140000140000−2100(25.35085)]−9.8(25.35085)=708.4811
The absolute relative true error, |ϵt|, is (True value = 11061.34 m)
|ϵt|=|11061.34−11058.4411061.34|×100=0.0262%
Example 2
Use three-point Gauss quadrature rule to approximate the distance in meters covered by a rocket from t=8 to t=30 as given by
x=∫308(2000ln[140000140000−2100t]−9.8t)dt
Change the limits so that one can use the weights and abscissas given in Table 1. Also, find the absolute relative true error. The true value is given as 11061.34 m
Solution
First, change the limits of integration from [8,30] to [−1,1] using Equation (7) gives
∫308f(t)dt=30−82∫1−1f(30−82x+30+82)dx=11∫1−1f(11x+19)dx
The weighting factors and function argument values are
c1=0.555555556x1=−0.774596669c2=0.888888889x2=0.000000000c3=0.555555556x3=0.774596669
and the formula is
11∫1−1f(11x+19)dx≈11[c1f(11x1+19)+c2f(11x2+19)+c3f(11x3+19)]=11[&0.5555556f(11(−.7745967)+19)+0.8888889f(11(0.0000000)+19)+0.5555556f(11(0.7745967)+19)]=11[0.55556f(10.47944)+0.88889f(19.00000)+0.55556f(27.52056)]=11[0.55556×239.3327+0.88889×484.7455+0.55556×795.1069]=11061.31 m
since
f(10.47944)=2000ln[140000140000−2100(10.47944)]−9.8(10.47944)=239.3327f(19.00000)=2000ln[140000140000−2100(19.00000)]−9.8(19.00000)=484.7455f(27.52056)=2000ln[140000140000−2100(27.52056)]−9.8(27.52056)=795.1069
The absolute relative true error, |ϵt|, is (True value = 11061.34 m)
|ϵt|=|11061.34−11061.3111061.34|×100=0.0003%
So does Gaussian quadrature require that the integral must be transformed to the integral limit of [-1,1]?
No, the limits do not need to be transformed. Gaussian quadrature rule can be written for any limits of integration.
It is just the weights and abscissas are given for the limits of integration of [−1,1]. So if the n-point Gaussian quadrature rule for [−1,1] limits is given as
∫1−1g(x)dx≈n∑i=1cig(xi)
and we also know that
∫baf(x)dx=b−a2∫1−1f(b−a2x+b+a2)dx
then the n-point Gaussian quadrature rule for [a,b] limits of integration can also be found.
∫baf(x)dx=b−a2∫1−1f(b−a2x+b+a2)dx≈b−a2n∑i=1cif(b−a2xi+b+a2)=n∑i=1Cif(Xi)
where
Ci=b−a2ciXi=b−a2xi+b+a2
Appendix
Example A.1
For an integral ∫1−1f(x)dx, derive the two-point Gauss quadrature rule
∫1−1f(x)dx≈c1f(x1)+c2f(x2)
Solution
Assuming the formula
∫1−1f(x)dx=c1f(x1)+c2f(x2)(A1.1)
gives exact values for integrals ∫1−11dx, ∫1−1xdx, ∫1−1x2dx, and ∫1−1x3dx . Then
∫1−11dx=2=c1+c2(A1.2)∫1−1xdx=0=c1x1+c2x2(A1.3)∫1−1x2dx=23=c1x12+c2x22(A1.4)∫1−1x3dx=0=c1x13+c2x23(A1.5)
Multiplying Equation (E1.3) by x12 and subtracting from Equation (E1.5) gives
c2x2(x12−x22)=0(A1.6)
The solution to the above equation is
c2=0, or/andx2=0, or/andx1=x2, or/andx1=−x2.
I. c2=0 is not acceptable as Equations (A1.2-A1.5) reduce to c1=2, c1x1=0, c1x21=23, and c1x31=0. But since c1=2, then x1=0 from c1x1=0, but x1=0 conflicts with c1x21=23.
II. x2=0 is not acceptable as Equations (A1.2-A1.5) reduce to c1+c2=2, c1x1=0, c1x21=23, and c1x31=0. Since c1x1=0, then c1 or x1 has to be zero, but this violates c1x21=23≠0.
III. x1=x2 is not acceptable as Equations (A1.2-A1.5) reduce to c1+c2=2, c1x1+c2x1=0, c1x21+c2x12=23, and c1x31+c2x31=0. If x1≠0, then c1x1+c2x1=0 gives c1+c2=0, and that violates c1+c2=2. If x1=0, then that violates c1x21+c2x12=23≠0.
That leaves the solution of x1=−x2 as the only possible acceptable solution, and in fact, it does not have violations (see it for yourself)
x1=−x2(A1.7)
Substituting (A1.7) in Equation (A1.3) gives
c1=c2(A1.8)
From Equations (A1.2) and (A1.8),
c1=c2=1(A1.9)
Equations (A1.4) and (A1.9) gives
x12+x22=23(A1.10)
Since Equation (A1.7) requires that the two results be of opposite sign, we get
x1=−1√3x2=1√3
or
x1=1√3x2=−1√3
Both these solutions though lead to a unique solution as
∫1−1f(x)dx=c1f(x1)+c2f(x2)(A1.11)=1f(−1√3)+1f(1√3)=f(−1√3)+f(1√3)
Example A.2
What would be the formula for
∫baf(x)dx=c1f(a)+c2f(b)
if you want the above formula to give you exact values of integral ∫ba(a0x+b0x2)dx, that is, a linear combination of x and x2.
Solution
If the formula is exact for a linear combination of x and x2, then
∫baxdx=b2−a22=c1a+c2b∫bax2dx=b3−a33=c1a2+c2b2(A2.1)
Solving the two Equations (A2.1) simultaneously gives
[aba2b2][c1c2]=[b2−a22b3−a33]
c1=−16−ab−b2+2a2ac2=−16a2+ab−2b2b(A2.2)
So
\int_{a}^{b}{f(x){dx} = - \frac{1}{6}\frac{- {ab} - b^{2} + 2a^{2}}{a}f(a) - \frac{1}{6}\frac{a^{2} + {ab} - 2b^{2}}{b}f(b)}\;\;\;\;\;\;\;\;\;\;\;\; (A2.3)
Let us see if the formula works.
Evaluate \displaystyle \int_{2}^{5}{\left( 2x^{2} - 3x \right){dx}} using Equation (A2.3)
\begin{split} \int_{2}^{5}{\left( 2x^{2} - 3x \right){dx}} &\approx c_{1}f(a) + c_{2}f(b)\\ &= - \frac{1}{6}\frac{- (2)(5) - 5^{2} + 2(2)^{2}}{2}\left\lbrack 2(2)^{2} - 3(2) \right\rbrack - \frac{1}{6}\frac{2^{2} + 2(5) - 2(5)^{2}}{5}\lbrack 2(5)^{2} - 3(5)\rbrack\\ &= 46.5 \end{split}
The exact value of \displaystyle \int_{2}^{5}{\left( 2x^{2} - 3x \right){dx}} is given by
\begin{split} \int_{2}^{5}\left( 2x^{2} - 3x \right){dx} &= \left\lbrack \frac{2x^{3}}{3} - \frac{3x^{2}}{2} \right\rbrack_{2}^{5}\\ &= 46.5 \end{split}
Any surprises?
Now evaluate \displaystyle \int_{2}^{5}{3dx} using Equation (A2.3)
\begin{split} \int_{2}^{5}{3dx} &\approx c_{1}f(a) + c_{2}f(b)\\ &= - \frac{1}{6}\frac{- 2(5) - 5^{2} + 2(2)^{2}}{2}(3) - \frac{1}{6}\frac{2^{2} + 2(5) - 2(5)^{2}}{5}(3)\\ &= 10.35 \end{split}
The exact value of \displaystyle \int_{2}^{5}{3dx} is given by
\begin{split} \int_{2}^{5}{3dx} &= \left\lbrack 3x \right\rbrack_{2}^{5}\\ &= 9 \end{split}
Because the formula will only give exact values for linear combinations of x and x^{2}, it does not work exactly even for a simple integral of \displaystyle \int_{2}^{5}{3dx}.
Do you see now why we chose a_{0} + a_{1}x as the integrand for which the formula
\int_{a}^{b}{f(x)dx \approx \ }c_{1}f(a) + c_{2}f(b)
gives us exact values?
Multiple Choice Test
(1). \displaystyle \int_{5}^{10}{f(x)dx} is exactly
(A) \displaystyle \int_{- 1}^{1}{f(2.5x + 7.5)\ dx}
(B) \displaystyle 2.5\int_{- 1}^{1}{f(2.5x + 7.5)\ dx}
(C) \displaystyle 5\int_{- 1}^{1}{f(5x + 5)\ dx}
(D) \displaystyle 5\int_{- 1}^{1}{(2.5x + 7.5)f(x)\ dx}
(2). For a definite integral of any third order polynomial, the two-point Gauss quadrature rule will give the same results as the
(A) 1-segment trapezoidal rule
(B) 2-segment trapezoidal rule
(C) 3-segment trapezoidal rule
(D) Simpson’s 1/3 rule
(3). The estimated value of \displaystyle \int_{0.2}^{2.2}{xe^{x}{dx}} by using the two-point Gauss quadrature rule is most nearly
(A) 11.672
(B) 11.807
(C) 12.811
(D) 14.633
(4). A scientist uses the one-point Gauss quadrature rule based on getting exact results of integration for functions f(x) = 1 and x. The one-point Gauss quadrature rule approximation for \displaystyle \int_{a}^{b}{f(x)dx} is
(A) \displaystyle \frac{b - a}{2}\left\lbrack f(a) + f(b) \right\rbrack
(B) \displaystyle (b - a)f\left( \frac{a + b}{2} \right)
(C) \displaystyle \frac{b - a}{2}\left\lbrack f\left( \frac{b - a}{2}\left\{ - \frac{1}{\sqrt{3}} \right\} + \frac{b + a}{2} \right) + f\left( \frac{b - a}{2}\left\{ \frac{1}{\sqrt{3}} \right\} + \frac{b + a}{2} \right) \right\rbrack
(D) (b - a)f(a)
(5). A scientist develops an approximate formula for integration as
\displaystyle \int_{a}^{b}{f(x)dx \approx c_{1}f(x_{1}),}\ \text{where}\ a \leq x_{1} \leq b
The values of c_{1} and x_{1} are found by assuming that the formula is exact for functions of the form a_{0}x + a_{1}x^{2}. The resulting formula would therefore be exact for integrating
(A) f(x) = 2
(B) f(x) = 2 + 3x + 5x^{2}
(C) f(x) = 5x^{2}
(D) f(x) = 2 + 3x
(6). You are asked to estimate the water flow rate in a pipe of radius 2 m at a remote area location with a harsh environment. You already know that velocity varies along the radial location, but you do not know how it varies. The flow rate Q is given by
\displaystyle Q = \int_{0}^{2}{2\pi rVdr}
To save money, you are allowed to put only two velocity probes (these probes send the data to the central office in New York, NY via satellite) in the pipe. Radial location, r is measured from the center of the pipe, that is, r = 0. Radial location, r = 2m is at the pipe radius. The radial locations you would suggest for the two velocity probes for the most accurate calculation of the flow rate are
(A) 0\ \text{m}, 2\ \text{m}
(B) 1\ \text{m}, 2\ \text{m}
(C) 0\ \text{m}, 1\ \text{m}
(D) 0.42\ \text{m}, 1.58\ \text{m}
For the complete solution, go to
http://nm.mathforcollege.com/mcquizzes/07int/quiz_07int_gaussquadrature_solution.pdf
Problem Set
(1). Find the value of the integral \displaystyle \int_{1}^{5}{7e^{- 2t}}{dt} using
a) 2-point Gaussian quadrature rule,
b) 3-point Gaussian quadrature rule.
Answer: a)\ 0.35285
b)\ 0.45812
(2). The upward velocity of a rocket is given by
v(t) = 200\ln(t + 1) - 10t,\ t > 0
where t is given in seconds and v is given in m/s.
a) Use 2-point Gauss quadrature rule to calculate the distance covered by the rocket from t = 0\ \text{s} to t = 5\ \text{s}.
b) What is the true value of the distance covered by the rocket from t = 0\ \text{s} to t = 5\ \text{s}?
c) What is the true error in part (a)?
d) What is the relative true error in part (a)?
e) What is the absolute relative true error in percentage for part (a).
f) Use 3-point Gauss quadrature rule to calculate the distance covered by the rocket from t = 0\ \text{s} to t = 5\ \text{s}.
Answer: a)\ 1034.6\ \text{m}
b)\ 1025.1\ \text{m}
c)\ -9.4458\ \text{m}
d)\ -0.0092144
e)\ 0.92144\%
f)\ 1026.2\ \text{m}
(3). The velocity of a body is given by
v(t) = t + 1,\ 0 < t < 2, = 33,\ 2 < t < 5
where the velocity, v(t) is given in m/s and t is in seconds.
a) Find the distance covered by the body between 1 < t < 1.9\ \text{s} by using the two-point Gauss quadrature rule. Find the absolute relative true error.
b) Find the distance covered by the body between 1 < t < 3.9\ \text{s} by using the four-point Gauss quadrature rule. Find the absolute relative true error.
Answer: a)\ 2.2049,\ 0\%
b)\ 51.75,\ 20.62\% (exact=65.2)
(4). The one-point Gauss quadrature rule is defined as
\int_{a}^{b}{f(x)dx} \approx c_{1}f(x_{1}),\ a \leq x_{1} \leq b
The values of c_{1} and x_{1} are found by assuming that the one-point formula is exact for any first order polynomial. Find c_{1} and x_{1} in the above one-point Gauss quadrature rule.
Answer: c_1 = b-a,\ x_1 = \displaystyle \frac{b+a}{2}
(5). A scientist develops an approximate formula for integration as
\int_{a}^{b}{f(x)dx} \approx c_{1}f(x_{1}),\ \text{where}\ a \leq x_{1} \leq b
The values of c_{1} and x_{1} are found by assuming that the formula is exact for the functions of the form a_{0}x + a_{1}x^{2} polynomial. Find c_{1} and x_{1}.
Answer: x_1 = \displaystyle \frac{2(b^2+a^2+ab)}{3(b+a)}
c_1 = \displaystyle \frac{3(b-a)(b+a)^2}{4(b^2+a^2+ab)}
(6). A scientist develops an approximate formula for integration as
\int_{a}^{b}{f(x)dx} \approx c_{1}f(a) + c_{2}f(b).
The values of c_{1} and c_{2} are found by assuming that the formula is exact for the functions of the form a_{0}x + a_{1}x^{2} polynomial.
a) Find the values of c_{1} and c_{2}.
b) Verify the formula works exactly for the integral \int_{2}^{7}{(3x^{2} + 5x)dx}
c) Verify the formula does not work exactly for the integral of \int_{2}^{7}{2dx}
Answer: a)\ \displaystyle c_1 = -\frac{1}{6}\frac{-ab-b^2+2a^2}{a},\ c_2 = -\frac{1}{6}\frac{a^2+ab-2b^2}{b}
b) 447.50 by formula as well as exact method
c) 12.976 by formula; 10 by exact method