Introduction Consider the integral of function f(x) from a to b I=∫abf(x)dx. To find a numerical (approximate) value of
Posted: Tue Jul 12, 2022 12:47 pm
Introduction Consider the integral of function f(x) from a to b I=∫abf(x)dx. To find a numerical (approximate) value of I, one may need to divide the interval/domain [a,b] into a set of N subintervals/segments by employing the points a=x1,x2,x3,⋯,xN,xN+1=b I=∫abf(x)dx=∫x1=ax2f(x)dx+∫x2x3f(x)dx+⋯+∫xNxN+1=bf(x)dx=k=1∑N∫xkxk+1f(x)dx and then apply a numerical integration method to each segment. One popular numerical integration method is the Gaussian quadrature rule that is stated as ∫xkxk+1f(x)dx≈2xk+1−xki=1∑nwif(2xk+1−xkξi+2xk+1+xk), where n is the number of Gauss points, ξi the abscissas and wi the weight factors. Table 1 displays the abscissas and weight factors for the first three values of n. Table 1: Abscissas and weight factors for Gaussian integration In this assignment, the integrand and the limits are given by f(x)ab=sin(πx/10)m,=0 m,=10 m,
and the segments are of the same length h=(b−a)/N. It is noted that h is called the grid size. Your tasks are to apply the Gaussian quadrature with n=3 to evaluate the integral I for several values of N, and compare the obtained values with the analytical solution. Requirements For this assessment item, you must perform hand calculations: 1. Find the analytical (exact) value of the integral I. 2. Apply the 3-point Gaussian quadrature to evaluate the integral I for N=1 (the entire domain) and N=2 (the domain divided into 2 segments). 3. Calculate the percentage error ϵ=∣Iexact ∣∣Iapprox −Iexact ∣×100% for each N value. In (7), Iapprox and Iexact are the approximate and exact values of the integral I, respectively. 4. Report the approximate solutions rounded to four decimal places and the corresponding percentage errors rounded to two significant figures.
and the segments are of the same length h=(b−a)/N. It is noted that h is called the grid size. Your tasks are to apply the Gaussian quadrature with n=3 to evaluate the integral I for several values of N, and compare the obtained values with the analytical solution. Requirements For this assessment item, you must perform hand calculations: 1. Find the analytical (exact) value of the integral I. 2. Apply the 3-point Gaussian quadrature to evaluate the integral I for N=1 (the entire domain) and N=2 (the domain divided into 2 segments). 3. Calculate the percentage error ϵ=∣Iexact ∣∣Iapprox −Iexact ∣×100% for each N value. In (7), Iapprox and Iexact are the approximate and exact values of the integral I, respectively. 4. Report the approximate solutions rounded to four decimal places and the corresponding percentage errors rounded to two significant figures.