CN – Lab8 (Solution)

$ 24.99
Category:

Description

Quadrature formulas (2)
The rectangle quadrature formula is
:
The repeated rectangle quadrature formula is

with
Problems:
1. Use Romberg s algorithm for trapezium and Simpson s formulas to approximate the integral

with precision ” = 10 5:
2. Plot the graph of : Use an adaptive quadrature algorithm for Simpson s formula to approximate the integral

with precision ” = 10 4: Compare the obtained result with the one obtained applying repeated Simpson formula for n = 50 and 100: (The exact value is 1:4260247818.)
3. a) Use the rectangle formula to evaluate the integral

b) Use the repeated rectangle formula, for n = 150 and 500; to evaluate the integral

(Answer: 0.1094)
Facultative problems
Quadrature formula of Gauss type for double integral
Consider the integral
We change the variable y from [c;d]; in variable t from [ 1;1]: The linear transformation gives:

We obtain

with cn;j and rn;j given in tables. Then, it is changed the interval [a;b] in the interval [ 1;1] and it is repeated the same procedure.
Algorithm:
INPUT: a,b,c,d,m,n the coe¢ cients ci;j and nodes rij for i = maxfm;ng and 1 j i
OUTPUT: the approximant J of the integral I
h1 = (b a)=2; h2 = (b + a)=2; J = 0:
For i = 1;2;:::;m do
JX = 0
x = h1rm;i + h2; k1 = (d c)=2; k2 = (d + c)=2:
For j = 1;2;:::;n do y = k1rn;j + k2; Q = f(x;y);
JX = JX + cn;jQ:
end{for}
Let J = J + cm;i k1 JX:
end{for}
J = h1J
Romberg s algorithm for rectangle quadrature formula
Apply successively the rectangle formula on [a;b]; then on subintervals obtained by dividing in 3 equal parts, in 32 equal parts, and so on. We get
:
Continuing in an analogous manner, we obtain the sequence
QD0(f); QD1(f);:::;QDk(f);::: (2)
which converges to the value I of the integral
If we want to approximate the integral I with error less than “; we compute successively the elements of (2) until the rst index for which
QDm(f) QDm 1(f) “;
QDm(f) being the required value.
The algorithm for generating the elements of the sequence (2) is:
I. Let and QD0(f) := hf(x1):
II. For k := 1;2;… do
;
for i = 1;:::;m 1; do x2i := x2i 1 + h2; x2i+1 := x2i + h3; x2m := x2m 1 + h2 and

(for k = 1 (m = 1) the generation of x2i; x2i+1 is missing).
Problems
1. The volume of a solid is given by Approximate the volume applying the algorithm for Gauss type quadratures for double integrals for m = n = 5: Compare the result with the one obtained applying Simpson s algorithm for double integrals for m = n = 10: (Result: 0.178571) Nodes r5;i Coe¢ cients c5;i
We know the following data: 0:9062
0:5385
0 0:2369
0:4786
0:5689
0:5385 0:4786
0:9062 0:2369
2. Use the Romberg s iterations for rectangle formula to approximate the
integral

with precision ” = 10 4:

Reviews

There are no reviews yet.

Be the first to review “CN – Lab8 (Solution)”

Your email address will not be published. Required fields are marked *