Computational Project 4: Comparing Convergence Rates of Variable Order Integration Methods, Study Guides, Projects, Research of Mechanical Engineering

In this project, students are required to develop their own variable order integration code based on newton-cotes coefficients and integrate a given function using different integration rules and parameters. The goal is to compare the rates of convergence of the integration methods by integrating the function with n=13, 25, 49, 97, 193, 385, and 769 uniformly spaced points on the [0,1] interval for two different choices of parameters α and β. Students are expected to plot the error vs. N in log-log scale and discuss the differences in convergence plots for cases (a) and (b).

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 02/13/2009

koofers-user-ufz-2
koofers-user-ufz-2 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computational Project # 4
Due October 23
Develop your own variable order integration code based on Newton-Cotes coefficients
given in Table 5.1 of the class notes with the number of points in integration stencil as
input parameter. Use 2 (trapezoidal), 3 (Simpson), 4, 5, and 7 point rule to integrate
function
()
(
)
() 1.2 1 exp ( 1)fx x x x
α
β
=−
over [0, 1] interval for
(a)
α
= 2,
β
= 0.2,
(b)
α
= 0.2,
β
= 2.
For each of the integration rule and both choices of the parameters
α
and
β
, integrate the
function using N=13, 25, 49, 97, 193, 385, and 769 uniformly spaced points on the
interval [0,1] and compare the rates of convergence of the four integration methods, i.e.
plot the error vs. N in log-log scale. Use legend and different color (style) lines to
distinguish between integration methods. Assume that the exact integral in the first case
is 0.0095499658265276 and in the second case is 0.3457273592825. Compare the
convergence rates with analytically predicted rates given in Table 5.1 of class notes.
Discuss the difference of convergence plots for cases (a) and (b).
P.S. Bring your solution to class. Email your code to [email protected]. The
program that you send should be a working program. All the codes will be checked
whether they run or not. If they are erroneous, but run, points will be taken for the errors.
If the code does not run (it has some syntax errors), an additional 25% will be taken off.
The goal of this class is for you to be comfortable solving engineering problems. Please
take your time and learn how to trust the computer.

Partial preview of the text

Download Computational Project 4: Comparing Convergence Rates of Variable Order Integration Methods and more Study Guides, Projects, Research Mechanical Engineering in PDF only on Docsity!

Computational Project # 4

Due October 23

Develop your own variable order integration code based on Newton-Cotes coefficients given in Table 5.1 of the class notes with the number of points in integration stencil as input parameter. Use 2 (trapezoidal), 3 (Simpson), 4, 5, and 7 point rule to integrate function

f ( ) x = x^ α ( 1.2 − x ) ⎡⎣ 1 − exp ( β( x −1))⎤⎦

over [0, 1] interval for

(a) α = 2, β = 0.2,

(b) α = 0.2, β = 2.

For each of the integration rule and both choices of the parameters α and β , integrate the

function using N= 13, 25, 49, 97, 193, 385, and 769 uniformly spaced points on the interval [0,1] and compare the rates of convergence of the four integration methods, i.e. plot the error vs. N^ in log-log scale. Use legend and different color (style) lines to distinguish between integration methods. Assume that the exact integral in the first case is 0.0095499658265276 and in the second case is 0.3457273592825. Compare the convergence rates with analytically predicted rates given in Table 5.1 of class notes. Discuss the difference of convergence plots for cases (a) and (b).

P.S. Bring your solution to class. Email your code to [email protected]. The program that you send should be a working program. All the codes will be checked whether they run or not. If they are erroneous, but run, points will be taken for the errors. If the code does not run (it has some syntax errors), an additional 25% will be taken off. The goal of this class is for you to be comfortable solving engineering problems. Please take your time and learn how to trust the computer.