0% found this document useful (0 votes)
41 views27 pages

Module 7

Uploaded by

itsmebasic18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views27 pages

Module 7

Uploaded by

itsmebasic18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

MODULE 7

NUMERICAL METHODS IN INTEGRATION

Lesson Rationale:
Finding the exact value of a definite integral analytically is either extremely
difficult or impossible due to the complexity of the function involved. Numerical
methods provide a practical alternative for approximating these integrals. This
module introduces students to three widely used numerical integration techniques:
the Trapezoidal Rule, Simpson's Rule, and Romberg's Method. These methods form
a vital part of an engineer's computational toolkit, particularly in modeling,
simulation, and data analysis.

The integration of Microsoft Excel as a computational platform enables


students to automate calculations, visualize data, and apply these numerical
methods efficiently. Excel’s built-in functions, formulas, and tabular structure make
it an accessible yet powerful tool for illustrating the logic behind each numerical
method while reinforcing computational thinking and analytical skills.

Lesson Outcomes:
By the end of this module, students should be able to:
1. Describe the fundamental principles behind numerical integration
techniques: Trapezoidal Rule, Simpson’s Rule, and Romberg’s Method;
2. Implement the Trapezoidal Rule and Simpson’s Rule in Excel to approximate
definite integrals;
3. Interpret the effect of step size (h) and subdivision (n) on the accuracy of
the integral approximation; and,
4. Formulate and present results clearly using Excel, reinforcing the use of
software tools for technical communication.

Lesson Contents:

Topic 1: Trapezoidal Rule


Topic 2: Simpson’s Rule
Topic 3: Romberg’s Rule

TOPIC 1: TRAPEZOIDAL RULE

91 | P a g e
Integral Calculus has countless applications in many engineering fields. A
common problem from Integral Calculus is how to find the value of the definite
integral,
b
I ( f )=∫ f ( x ) dx
a

The evaluation of the integrals sometimes can be daunting and at other


times indeterminate. We will now look into the methods that can give an accurate
approximation to the exact value of the definite integral. One of these methods is
the trapezoidal rule (also known as Newton-Cotes formula). This method is done by
approximating (𝑥) by a piecewise linear function and solving for the integral of
each. Let us have the limits of the integral as interval [a, b]. We will divide this
b−a
interval into n equal subintervals, each having a width of ¿ . Then, the integral
n
approximation can be find using,
n
h
I ≈ ∑ [ f ( x i−1 ) +f ( xi ) ]
2 i=1
Where x i=a+ ih, and i=0 , 1 , … .n

Figure 12.1 illustrates the graphical interpretation of the Trapezoidal Rule.

Derivation of the Trapezoidal Rule:


There are many techniques used to derive the Trapezoidal rule but let’s
focus our attention to the derivation using the Newton’s divided difference
polynomial (used in the derivation of the Secant Method). Let us take n =1, so that
our approximate integral will be a linear polynomial, that is,
b b

∫ f ( x ) dx ≈∫ f 1 ( x ) dx
a a

92 | P a g e
Using Newton’s divided difference polynomial in manual computation, we have

f ( b )−f ( a )
f 1 ( x )=f ( a ) + (x −a)
b−a
Thus,
b b

∫ f ( x ) dx ≈∫ f 1 ( x ) dx
a a

[ ]
b
f ( b )−f ( a )
¿∫ f ( a) + ( x −a) dx
a b−a

[ )]
b

¿ f ( a ) x+
f ( b )−f ( a ) x2
b−a 2 (
−ax
a

b−a )( 2
¿ f ( a ) b−f ( a ) a+ ( −ab− + a )
f ( b )−f ( a ) b a
2 2
2
2

b−a )( 2
¿ f ( a ) b−f ( a ) a+ ( −ab− + a )
f ( b )−f ( a ) b a
2 2
2
2

b−a )( 2
¿ f ( a ) b−f ( a ) a+ ( −ab− )
f ( b )−f ( a ) b a
2 2

2
1 1 1 1
¿ f ( a ) b−f ( a ) a+ f ( b ) b− f ( b ) a− f ( a ) b+ f ( a ) a
2 2 2 2
1 1 1 1
¿ f ( a ) b− f ( a ) a+ f ( b ) b− f ( b ) a
2 2 2 2

¿(b−a) [ f ( a ) +f (b)
2 ]
[ {∑ } ]
n−1
h
¿ f ( a ) +2 f (a+ih) + f (b)
2n i=1

STEP-BY-STEP PROCESS (Using Excel)


In order to analyze and understand critically the trapezoidal rule, the step-
by-step process as follows.

Step 1) Input the proper indications/parameters.

93 | P a g e
Step 2) Input the limits of the integral and the number of divisions n in the
selected cell.
Step 3) The value of h can be found using the formula,
b−a
¿
n
Step 4) input the formula of x i. This indicates that the value of a=x o.

Step 5) Input the value of x i to the original equation.


Step 6) Drag the value of xi to the next cell.

Step 7) at the next iteration, we need to enter a condition that if x i is greater than

or equal to b, the value of x i+1 will be equal to b. Otherwise, it will be equal to the

sum of x i and h. Thus, the formula in cell E3 will be,

¿ IF (E 2≥$ B $ 2 , $ B $ 2 , E 2+ $ D $ 2)
This formula will ensure that h is added to the previous value until the value of b is
reached. Later on, it will keep entering the value of b. This is done to enable the
changing value of n to make the solution more accurate.

Step 8) Enter the formula in cell for the approximate value of I (integral). This is
based on the general formula. Thus, the formula is,
E 3−E 2
¿
2∗( F 2+ F 3)
Notice that instead using h from cell D2, we used E3-E2. This is an advantage since
the formula outputs zeros when we go beyond the right end point b. Thus, the sum
of the numbers will not be affected by the repetition of b. Also, it allows the use of
this method to non-uniform divisions in the interval [ a , b ].
Step 9) In cell H3, we will input 1 so that we can monitor if how many divisions are
we going to have based on n.
Step 10) Drag down, cell H3 (fill series) until the value of a cell in column H is
equal to n.
Step 11) Drag down the values in cells E3-G3 up to the line where the value in
column H is equal to n.
Step 12) Lastly, we can use the summation function to sum up the values in
column G. This will now be the approximate value of the integral.

94 | P a g e
Types of Cell References when using dollar sign:
TAKE NOTE:
1. Relative Reference – Example: A1
o When you copy or drag the formula, both row and column
adjust relative to the new position.
o Useful when you want to apply the same formula pattern
across rows/columns.
2. Absolute Reference – Example: $A$1
o The column and row stay fixed, no matter where you copy
the formula.
o Useful when you always want to refer to a specific cell (like
a constant or value in one place).
3. Mixed Reference
o $A1: Column A is fixed, row changes when copied.
o A$1: Row 1 is fixed, column changes when copied.

Sample Problem #1

Given the integral:

Solve for its value using,


a) Two-segmented trapezoidal rule (n=2) by manual computation
b) Using multiple-segment trapezoidal rule (n=100) implemented in a
spreadsheet application.
c) In both (a) and (b), solve for the absolute relative true error (Ea)

Solution:
a) Two-segmented trapezoidal rule (n=2),

b−a 10−0
h= = =5
2 2
300 (5) 300 ( 10 )
f ( 0 )=0 ; f ( 5 )= 5
=10.039; f ( 10 )= 10
=0.136
1+e 1+ e

[ {∑ } ]
n−1
h
I≈ f ( a )+ 2 f (a+ih) + f (b)
2 i=1

95 | P a g e
[ {∑ } ]
n−1
b−a
I≈ f ( a )+ 2 f (a+ih) + f (b)
2n i=1

[ {∑ } ]
2−1
10−0
I≈ f ( 0 ) +2 f (0+ 5) + f (10)
2(2) i=1

10
I≈
4
[ f ( 0 ) +2 f (5)+ f (10)]
10
I≈ [ 0+ 2(10.039)+ 0.136 ]
4
I ≈ 50.537

For the absolute relative error, we need first to solve for the exact value of
the integral (calcu tech).
10


0
( 300
1+e )
x
dx=246.59
x

Thus, the absolute relative true error is

|Ɛt|= |246.59−50.537
246.59 |x 100=7 9.506 %
This is a bit huge error. Thus, we need more subintervals to make the
approximation more accurate.

b) Using spreadsheet application at n=100.


1. Input the proper indications/parameters.

2. Input the limits of the integral in cells A2 and B2 and the number of divisions’ n
in cell C2.

3. The value of h in cell D2 can be found using the formula, =(B2-A2)/C2

4. In cell E2, enter the formula =A2. This indicates that the value of a=x o in E2.

96 | P a g e
5. Enter the formula in cell F2, based on the function f(x). That is,

6. Drag down cell the contents of cell F2 to cell F3.


7. In cell E3, we need to enter a condition that if x i is greater than or equal to b,

the value of x i+1 will be equal to b. Otherwise, it will be equal to the sum of x i
and h.
Thus, the formula in cell E3 will be,

8. Enter the formula in cell G3 for the approximate value of I (integral). This is
based on the general formula. Thus, for G3, the formula is,

Notice that instead using h from cell D2, we used E3-E2. This is an advantage
since the formula outputs zeros when we go beyond the right end point b. Thus,
the sum of the numbers will not be affected by the repetition of b. Also, it allows
the use of this method to non-uniform divisions in the interval [ a , b ].
9. In cell H3, we will input 1 so that we can monitor if how many divisions are we
going to have based on n.
10. Drag down, cell H3 (fill series) until the value of a cell in column H is equal to n.
11. Drag down the values in cells E3-G3 up to the line where the value in column H
is equal to n.
12. Lastly, we can use the summation function to sum up the values in column G.
This will now be the approximate value of the integral.

97 | P a g e
Figure 12.3.a. The upper part of the solution using the Trapezoidal rule in the
spreadsheet application

Figure 12.3.b. Lower part of the solution using the Trapezoidal rule in spreadsheet
application

Based on figure 12.3.b. the sum of all the terms column G is equal to I=26.4694.
This will be the approximate value of the integral.

|Ɛt|=|246.59−246.4652
246.59 |x 100=0.0101 %
Therefore, the error is less than 1%.

When compared to manual calculation, spreadsheet application


implementation makes it easier to solve for the approximate value of the integral.
Consider manually performing 100 calculations and adding them up. The arduous
task was avoided.

98 | P a g e
LABORATORY ACTIVITY #16: (25 points)

Solve the following integrals using a) two-segmented Trapezoidal rule (n=2)


by manual calculation, b) using multiple-segmented Trapezoidal rule at the
indicated number of subintervals implemented in a spreadsheet application.
Also solve for the absolute relative true error in each of the two approaches.
8
1. ∫ ( 5 x 3−7 x−24 ) dx for b) n=75
0
π
2
2.
∫ xcosx dx for b) n=90
0

Note: Upload it on your Google Drive and send the link to your instructor for
checking. Paste your answers on A4 size bondpaper, with complete name,
year and section, and date of submission on the upper right corner of the
paper.

File name: EEMath12/LabAct#/Surname

99 | P a g e
TOPIC 2: SIMPSONS RULE

Simpson’s Rule is another numerical integration technique. It was named


after Thomas Simpson rediscovered it and published in 1743. This method is
somewhat similar to the Trapezoidal rule but the difference is that this method is
done by approximating f(x) by a piecewise quadratic function and solving for the
integral over each.
Let us have the limit of the integral as interval [ a , b ]. We will divide this

b−a
interval into n equal subintervals, each having a width of h= . Then, the
n
formula for this method is given by,
n
h
I≈ ∑ f ( x ) +4 f ( x i ) +f ( xi +1)]
3 i=1 [ i−1

Where x i=a+ ih, and i=0 , 1 , … .n

Derivation of Simpson’s Rule

We will derive Simpson’s rule (1/3 rule) using the Newton’s divided
difference polynomial using the second order polynomial. That is,

f 2 ( x )=b 0 +b1 ( x−a )+ b2 ( x −a ) x− ( a+ b


2 )
where,
b 0=f ( a )

b=
( 2 )
a+ b
f −f (a)
1
a+b
−a
2

b 2=
( f ( b )−f

b−
a+ b
2
( a+b2 )− f ( a+b2 )−f ( a)
b−a
a+b
2
−a )
We will integrate the Newton’s difference polynomial. Thus,

b b

∫ f ( x ) dx ≈∫ f 2 ( x ) dx
a a

100 | P a g e
[ )]
b
¿ ∫ b 0 +b1 ( x−a ) + b2 ( x−a ) x−
a
( a+ b
2
dx

[ )]
b

( ) (
2 3 2
x x ( 3 a+ b ) x a ( a+b ) x
¿ b 0 x +b 1 −ax + b2 − +
2 3 4 2 a

( ) (
b 3−a 3 ( 3 a+ b ) ( b −a ) a (a+ b)(b−a)
)
2 2
b2−a2
¿ b 0 ( b−a )+ b1 −a ( b−a ) +b 2 − +
2 3 4 2

Substitute the values of b 0, b 1, b 2. This will result to,

[ ( a+b2 )+ f (b)]
b

∫ f ( x ) dx ≈ b−a
6
f ( a) + 4 f
a

STEP-BY-STEP PROCESS (Using Excel)


In order to analyze and understand critically the simpson’s rule, the step-by-
step process as follows.

Step 1) Input proper indications/parameters


Step 2) Input the limits of the integral in cells A2 and B2 and the number of
divisions n in cell C2.
Step 3) The value of h in cell D2 can be found using the formula, = (𝐵2 − 𝐴2)/𝐶2
Step 4) In cell E2, enter the formula =A2. This indicates that the value of 𝑎 = 𝑥0 in
E2.
Step 5) Enter the formula in cell F2, based on the function f(x).
Step 6) Drag down cell the contents of cell F2 to cell F3.
Step 7) In cell E3, we need to enter a condition that if 𝑥𝑖 is greater than or equal to
b, the value of 𝑥𝑖+1 will be equal to b. Otherwise, it will be equal to the sum of 𝑥𝑖
and h. Thus, the formula in cell E3 will be, = (𝐸2 >= $𝐵$2, $𝐵$2,2 + $𝐷$2)
This formula will ensure that h is added to the previous value until the value of b is
reached. Later on, it will keep entering the value of b. This is done to enable the
changing value of n to make the solution more accurate.
Step 8) Enter the formula in cell G3 for the approximate value of I (the integral).
This is based on the general formula. Thus, for G3, the formula is,
=(E4-E2)/6*(F2+4*F3+F4)
Step 9) In cell H3, we will input 1 so that we can monitor how many divisions we
are going to have based on n.
Step 10) Drag down, cell H3 (fill series) until the value of a cell in column H is
equal to n.

101 | P a g e
Step 11) Drag down the values in cells E3 - F3 up to the line where the value in
column H is equal to n.
Step 12) Notice that Simpson’s rule spans two subintervals in every entry in the
summation. Thus, we need to select the range of two cells G2 and G3 and drag
down up to the line where the value in column H is equal to n.
Step 13) Lastly, we can use the summation function to sum up the values in
column G. This will now be the approximate value of the integral.

Sample Problem #1

Given the integral:

Solve for its value using,


a) Two-segmented simpson’s rule (n=2) by manual computation
b) Using multiple-segment simpson’s rule (n=100) implemented in a
spreadsheet application.
c) In both (a) and (b), solve for the absolute relative true error (Ea)

Solution:
a) Two-segmented trapezoidal rule (n=2) in manual computation,

x=
b−a
6 [
f ( a )+ 4 f
a+b
2 ( )
+ f (b)
]
a +b 0+10
a=0 ; b=10 ; = =5
2 2

300 x
f (x)= x
1+ e
300 ( 5 )
f (0)=0 ; f ( 5 )= 5
=10.039
1+ e
300 ( 10 )
f ( 10 )= 10
=0.136
1+e

x=
b−a
6 [
f ( a )+ 4 f
a+b
2 ( )
+ f (b)
]
10−0
x=
6
[ f ( 0 )+ 4 f (5 )+ f (10) ]

102 | P a g e
10
x= [ 0+ 4 (10.039)+ 0.136 ]
6
x=67.1533

For the absolute relative error, we need first to solve for the exact value of
the integral (calcu tech).
10


0
( 300
1+e )
x
x
dx=246.59

Thus, the absolute relative true error is

|Ɛt|=|246.59−67.1533
246.59 |x 100=7 2.767 %
This is a bit huge error. Thus, we need more subintervals to make the
approximation more accurate.

b) Using spreadsheet application at n=100.


Step 1) Input proper indications/parameters.

Step 2) Input the limits of the integral in cells A2 and B2 and the number of
divisions n in cell C2.

Step 3) The value of h in cell D3 can be found using the formula, = (𝐵3 – 𝐴3)/𝐶3

Step 4) In cell E3, enter the formula =A3. This indicates that the value of 𝑎 = 𝑥0 in
E3.

Step 5) Enter the formula in cell F3, based on the function f(x).

103 | P a g e
Step 6) Drag down cell the contents of cell F3 to cell F4.

Step 7) In cell E4, we need to enter a condition that if 𝑥𝑖 is greater than or equal to
b, the value of 𝑥𝑖+1 will be equal to b. Otherwise, it will be equal to the sum of 𝑥𝑖
and h. Thus, the formula in cell E4 will be, = (𝐸3 >= $𝐵$3, $𝐵$3,2 + $𝐷$3)

This formula will ensure that h is added to the previous value until the value of b is
reached. Later on, it will keep entering the value of b. This is done to enable the
changing value of n to make the solution more accurate.

Step 8) Enter the formula in cell G4 for the approximate value of I (the integral).
This is based on the general formula. Thus, for G4, the formula is,
=(E5-E3)/6*(F3+4*F4+F5)

Step 9) In cell H4, we will input 1 so that we can monitor how many divisions we
are going to have based on n.

Step 10) Drag down, cell H4 (fill series) until the value of a cell in column H is
equal to n.

104 | P a g e
Step 11) Drag down the values in cells E4 – F4 up to the line where the value in
column H is equal to n.

Step 12) Notice that Simpson’s rule spans two subintervals in every entry in the
summation. Thus, we need to select the range of two cells G3 and G4 and drag
down up to the line where the value in column H is equal to n.

Step 13) Lastly, we can use the summation function to sum up the values in
column G. This will now be the approximate value of the integral.

105 | P a g e
Based on the result of the excel application, the sum of all the terms in
column G is equal to 246.59029. This will be the approximate value of the integral
in sci-cal is 246.5903. Therefore, when compared to manual calculation, it is easier
to solve for the approximate value of the integral in excel/spreadsheet application.

LABORATORY ACTIVITY #17: (25 points)

Solve the following integrals using a) two-segmented Simpsons rule (n=2) by


manual calculation, b) using multiple-segmented Simpsons rule at the indicated
number of subintervals implemented in a spreadsheet application. Also solve
for the absolute relative true error in each of the two approaches.
2
1. ∫ √17+ 4 x dx b) n=50
−4
4
2. ∫ √ x ( 1+ 2 √ x ) dx, for b) n=90
1

106 |for
Note: Upload it on your Google Drive and send the link to your instructor Page
checking. Paste your answers on A4 size bondpaper, with complete name, year
and section, and date of submission on the upper right corner of the paper.
TOPIC 3: ROMBERG’S RULE

Romberg’s method is a numerical integration technique. It refines the


Trapezoidal Rule by successively halving the step size and applying Richardson
extrapolation to improve the estimate.
It builds a triangular table of increasingly accurate estimates of an integral.

Figure . Romberg Integration Triangular Table


[Link]

The accuracy of an estimated integral can be improved by using Richardson


extrapolation, in which two numerical estimates are combined to obtain a third,
more accurate value.
Romberg Integration is an extrapolation formula of the Trapezoidal Rule for
integration. It provides a better approximation of the integral by reducing the True
Error.

Combines the composite trapezoidal Rule with Richardson extrapolation to


improve the accuracy of integration,
b
I ( f )=∫ f ( x ) dx
a

Error in the approximation:


2
Et ≈ C h Estimate of true
error
|Page
107true
Exact
error
2 4 6
E=c 1 h + c2 h + c 3 h + .. . . ..
For small h,
2 4
Et ≈ c1 h +O(h )

 Richardson Extrapolation for Trapezoidal Rule

The truncation error in a multi-segment Trapezoidal Rule with n segments


for an integral
b
I ( f )=∫ f ( x ) dx
a

Is given by
1 2
E ≈− ( b−a ) h f ' '
2
If I 1 (h1) is the approximate value of the integral from trapezoidal rule, and
E1 (h1) is the truncation error with a step side h1 we can write the following

2
I ≈ I 1 ( h1 ) + E1 ( h1 ) ≈ I 1 ( h1 ) +c h1 eq.1
where,
1
c ≈− ( b−a ) f ' ' is a constant
2
Similarly if we take another step h2 we can write:
2
I ≈ I 2 ( h2 ) + E2 ( h2 ) ≈ I 2 ( h2 ) + c h2 eq.2

Combining eq.1 and eq.2 we can solve for c,


I 2 ( h2 ) + I 1 ( h1 )
c≈ 2 2
eq.3
h1−h2

Substituting eq.3 into eq.2 we obtain an improved estimate of the integral as:

I 2 ( h2 )−I 1 ( h1 ) eq.4
I ≈ I 2 ( h2 ) +

{( ) }
2
h1
−1
h2

h1
For the special case where the interval is halved, h2 =
2

eq.5

108 | P a g e
I 2 ( h2 )−I 1 ( h1 ) 4 1
I ≈ I 2 ( h2 ) + = I 2 ( h 2 ) − I 1 ( h1 )
3 3 3

 Romberg Integration

Each successive application of the Richardson extrapolation to the


Trapezoidal Rule eliminates the leading terms in the error estimate. Thus, if the first
application of Richardson produces an error of order O(h 4 ), the next application will

produce an error of order O(h 6), and so on. The general formulation of this
procedure on the trapezoidal rule is known as the Romberg Integration.

If I 0 ,n and I n indicate the integral values computed by the trapezoidal rule


0,
2

n
with n and segments.
2
Then the improved value of the integral given by Richardson’s extrapolation
is
1
4 I 0 , n−I n
0,
2
I 1 ,n=
4 1−1
If the extrapolation is applied the second time,
2
4 I 1 ,n −I n
1,
2
I 2 ,n=
4 2−1
When the extrapolation process is repeated k times, we can generalize the
formula as:
k
4 I k−1, n−I n
k−1 ,
2
I k ,n=
4 k −1
By applying a proper number of Richardson’s extrapolations, any desired
accuracy may be obtained

|I k ,n −I k−1 , n| ≤ ε

 Basic Romberg Method (Applying Richardson Extrapolation)

109 | P a g e
1. To approximate the integral we use the results of the Composite
Trapezoidal Rule with n=1,2,4,8,16……., and denote the resulting
approximations, respectively by I 1 ,1, I 2 ,1, I 3 ,1, etc.

2. When apply extrapolation in the manner seen before, that is we obtain

O(h ) approximations I 2 ,2, I 3 ,2, I 4 , 2, etc, by


4

1
 I k ,2=I k ,1 + (I k ,1−I k−1 ,1 ), for k=2,3……
3
O(h ) approximations I 3 ,3, I 4 ,3 , I 5 ,3, etc, by
6

1
 I k ,3=I k , 2+ (I −I ), for k=3,4……
15 k ,2 k−1 ,2
where, k= order of interpolation
(i.e. k=1, values of regular trapezoidal rule
k=2, values using error estimate O(h 2),
n= more/less accurate estimate integral
(i.e. value of integral with index n+1 is more accurate than that with index
n)

Sample Problem #1

The vertical distance in meters covered by a rocket from t=8 to t=30


seconds is given by

( [ ] )
30
140000
x=∫ 2000 ln −9.8 t ¿ ¿ dt
8 140000−2100 t
Use Romberg’s Rule to find the distance covered. Use the 1, 2, 4, 8 segment
trapezoidal rule results.

Solution:
 I 1 ,1: first trapezoidal approximation with 1 interval.
h
For I 1 ,1= ( f ( a) + f ( b) )
2
h=b−a=30−8=22

f ( a )=f ( 8 )=2000 ln
[ 140000
140000−2100(8) ]
=−9.8(8)¿=177.266743 ¿

f ( b )=f ( 30 )=2000 ln
[ 140000
140000−2100(30) ]
−9.8(30)¿=901.6740015 ¿

22
I 1 ,1= ( 177.266743+901.6740015 )=11868.34819
2
 I 1 ,2: improved estimate from I 1 ,1 and I 2 ,1.

110 | P a g e
I 1 ,2 is the 1st trapezoidal estimate (with big step size).
I 2 ,1 is the trapezoidal estimate after having h once.
30+ 8
New point: h= =19
2

f ( h )=f ( 19 )=2000 ln
[ 140000
140000−2100 (19)]−9.8(19)¿=484.7454726 ¿

h
I 2 ,1= ( f ( 8 ) +2 f ( 19 ) + f ( 30 ) )
2
11
I 2 ,1= ( 177.266743+ 2 ( 484.7454726 ) +901.6740015 )=11266.37429
2
I 2 ,1−I 1 ,1 11266.37429−11868.34819
I 1 ,2=I 2 ,1 + 1
=11266.37429+ =11065.7163
4 −1 3

 I 1 ,3: improved estimate from I 1 ,2 and I 2 ,2.


For I 3 ,1: h=11 , new h=5.5

The interval is [ 8 , 30 ] is divided into 4 subintervals


points: t = 8, 13.5, 19, 24.5, 30
Already known:
f ( 8 )=177.266743
f ( 19 )=484.7454726
f ( 30 )=901.6740015
Need to compute:
f ( 13.5 )=

2000 ln
[ 140000
140000−2100 (13.5) ]
−9.8(13.5)¿=320.2468886 ¿

f ( 24.5 )=

2000 ln
[ 140000
140000−2100 (24.5) ]
−9.8(24.5)¿=676.0501168¿

h
I 3 ,1= ¿
2
5.5
I 3 ,1= ¿
2
I 3 ,1=11112.8209

For I 2 ,2:

111 | P a g e
I 3 ,1 −I 2 , 1 11112.8209−11266.37429
I 2 ,2=I 3 ,1 + 1
=11112.8209+ =11061.63644
4 −1 3

For I 1 ,3:

I 2 ,2 −I 1 , 2 11061.63644−11065.71632
I 1 ,3=I 2 ,2 + 2
=11061.63644 + =11061.36412
4 −1 15

 I 1 ,4 : we need to find I 4 ,1 then find I 3 ,2, then I 2 ,3 and finally use I 2 ,3 and I 1 ,3
For I 4 ,1 : h=5.5, new h=2.75
From 8 to 30, number of subintervals:
30−8
n= =8
2.75
Thus, there are 8 subintervals and 9 points:
8, 10.75, 13.5, 16.25, 19, 21.75, 24.5, 27.25, and 30.
Already known:
f ( 8 )=177.266743
f ( 19 )=484.7454726
f ( 30 )=901.6740015
f ( 13.5 )=320.2468886
f ( 24.5 )= 676.0501168

Need to compute:
f ( 10.75 )=

2000 ln
[ 140000
140000−2100 (10.75) ]
−9.8(10.75)¿=246.3351814 ¿

f ( 16.25 )=

2000 ln
[ 140000
140000−2100 (16.25) ]
−9.8(16.25)¿=399.5165393 ¿

f ( 21.75 )=

2000 ln
[ 140000
140000−2100 (21.75) ]
−9.8(21.75)¿=576.6423135¿

f ( 27.75 )=

2000 ln
[ 140000
140000−2100 (27.75) ]
−9.8(27.75)¿=783.9826784 ¿

For I 4 ,1 :

112 | P a g e
h
I 4 ,1 = ¿
2

2.75
I 4 ,1 = (177.266743+2 ( 246.3351814 ) +2 (320.2468886 ) +2(399.5165393)+2(484.7454726)+2( 57
2
I 4 ,1 =11074.2213

Compute I 3 ,2:

I 4 , 1−I 3 , 1 11074.2213−11112.8209
I 3 ,2=I 4 , 1+ 1
=11074.2213+ =11061.35477
4 −1 3

Compute I 2 ,3:

I 3 , 2−I 2 , 2 11061.35477−11061.63644
I 2 ,3=I 3 ,2 + 2
=11061.35477+ =11061.33599
4 −1 15

Compute I 1 ,4 :

I 2 ,3−I 1 ,3 11061.33599−11061.36412
I 1 ,4 =I 2 , 3+ 3
=11061.33599+ =11061.33554
4 −1 63

STEP-BY-STEP PROCESS (Using Excel)


To analyze and understand critically the Romberg’s Rule, the step-by-step
process is as follows,

Step 1) Input the indicated parameters/indications

Step 2)

Step 2) Input the limits of the integral and function notations

113 | P a g e
Step 3) Compute the value of h of I 1 ,1, I 2 ,1and I 1 ,2as first trapezoidal
approximation with 1 interval.
For I 1 ,1:

For I 2 ,1:

For I 1 ,2 :

Step 4) Compute I 1 ,3 to improved estimate from I 1 ,2 and I 2 ,2.

For I 1 ,3:

For I 2 ,2:

Step 5) Find the I 1 ,4 to find I 4 ,1 then find I 3 ,2, then I 2 ,3 and finally use I 2 ,3 and I 1 ,3.

From 8 to 30, number of subintervals:


30−8
n= =8
2.75

114 | P a g e
Thus, there are 8 subintervals and 9
points:
For I 4 ,1 :

For I 3 ,2:

For I 2 ,3:

For I 1 ,4 :

115 | P a g e
Step 6) Make a final triangular table of the results

Step 7) Compute the error results of each order

Initially, at large step size (h = 22), the approximation was rough: 11868.35.
As the step size was halved (h = 11, 5.5, 2.75), the first-order results moved closer
to the actual value. Higher orders of Romberg’s extrapolation (2nd, 3rd, and 4th
order) rapidly improved the estimate. Final highly accurate value at 4th order of
11061.34.
Romberg's Rule using Excel showed a very fast convergence toward the true
integral value. As the step size decreased and higher-order corrections were
applied, the error became almost negligible by the 4th order, there was no visible
change in the significant digits. Excel App allowed a clear visualization of how
Richardson extrapolation works — you could see that even if the 1st order wasn't
very accurate at the start, successive corrections made the estimate much more
precise.

116 | P a g e
The final answer is stable and reliable at around 11061.34, confirming that
the method is effective for complicated integrals involving logarithmic functions
and linear terms.
Sample Problem #2
1
Obtain ∫ e−x dx using Romberg Rule with error to 4 th
order.
0

Follow the steps from 1 to 6:

LABORATORY ACTIVITY #18: (25 points)

Solve the integral by Romberg’s Method. Show your manual computation.


48
x=∫ ¿ ¿
0

Use Romberg’s Rule to find the distance covered. Use the 1, 2, 4, 8


segment trapezoidal rule results.

Note: Upload it on your Google Drive and send the link to your instructor for
checking. Paste your answers on A4 size bondpaper, with complete name, year
and section, and date of submission on the upper right corner of the paper.

File name: EEMath12/LabAct#/Surname


Example: EEMath12/LabAct/Dela Cruz 117 | P a g e

You might also like