Вы находитесь на странице: 1из 2

CMSC 150 Laboratory Exercise 9 Numerical Integration and Differentiation

Objective: To be able to apply the composite Simpson’s rule and two-point


Gaussian quadrature.

π 2
Solve for the value of the definite integral ∫
0
x 2 cos xdx

1. Create a Maxima ™ block statement that will implement the Composite


Simpson’s Rule from n=2 to a specified maximum value of n (set the
maximum value as 50). Make sure that it should start from entering the
function, the bounds of the definite integral, and the maximum value of n. Set
the initial value of the definite integral approximation to zero. It should also
compute for the absolute error of the approximation for every iteration (or for
every value of n). The block statement must display the approximate definite
integral and its corresponding absolute error for each value of n. Take note
that n must be always even for composite Simpson’s Rule. (15pts)

2. Determine the values of n and h required to approximate the given definite


integral to within 10−5.(That is, the minimum value of n such that the absolute
error (|latest approx. – most prev. approx.|) is less than 0.00001)
a. What are the minimum values of n and h using Composite Simpson’s Rule?
(5 pts)
b. Given the answers in (a), what is the approximate value of definite integral
and its corresponding absolute error? (5 pts)

3. Solve the given definite integral using two-point Gaussian quadrature.


a. What is the transformed definite integral in terms of the bounds -1 and 1?
Show your solutions. (5pts)
b. What is the approximate definite integral using two-point Gaussian
quadrature? (5pts)

1. Save all your answers in a single document file (as .doc/.docx .pdf/.odt) with the
filename as your surname ONLY. Send the file to rommel.real@gmail.com.
2. ANSWER IN COMPLETE SENTENCES.
3. Note: Submit it on or before August 23, 2010, 1PM. Late submission will have a
2% deduction for every hour (and a fraction thereof) of delay on your percentage
score.
CMSC 150 Laboratory Exercise 9 Numerical Integration and Differentiation

4. Compute the accuracy percentages (1−rel.error) of the final approximations


using Composite Simpson’s Rule (2b) and the two-point Gaussian quadrature
(3d) with respect to the actual value of the definite integral. Provide an
analysis of the performance of every method. Refer also to your answers in
number 3. (10 pts)

1. Save all your answers in a single document file (as .doc/.docx .pdf/.odt) with the
filename as your surname ONLY. Send the file to rommel.real@gmail.com.
2. ANSWER IN COMPLETE SENTENCES.
3. Note: Submit it on or before August 23, 2010, 1PM. Late submission will have a
2% deduction for every hour (and a fraction thereof) of delay on your percentage
score.

Вам также может понравиться