CE324 Module 9 10 Numerical Integration
CE324 Module 9 10 Numerical Integration
NUMERICAL
SOLUTIONS TO CE
PROBLEMS
NUMERICAL
INTEGRATION
f ( x )dx
the area under a function y
a
f(x)
plotted on a graph.
b
I f ( x )dx
a
Where:
f(x) = the integrand
a b x
a = lower limit of
integration
b = upper limit of
NUMERICAL
INTEGRATION
-Simpler functions use integration to find area under the
curve of the graph.
– considered to be 𝑦2 𝑦 𝑛−2
the simplest 𝑦1 𝑦𝑛
method of
𝑦0 𝑦 𝑛−1
numerical
integration.
– In this method,
the value of is
approximated by
adding the areas
of series of
TRAPEZOIDAL RULE
[ ] ( )[ 𝑓 ( 𝑎) +2 ∑ 𝑦 + 𝑓 (𝑏)]
𝑏 𝑏 𝑛− 1
𝑓 ( 𝑎) + 𝑓 (𝑏) h
∫ 𝑓 (𝑥 )𝑑𝑥 ≈(𝑏 − 𝑎) ∫ 𝑓 (𝑥 )𝑑𝑥 ≈ 2 𝑖
𝑎 2 𝑎 𝑖=1
where,
TRAPEZOIDAL RULE
b
I f ( x )dx where f ( x ) fn( x )
a
,
n 1 n
and f n ( x ) a0 a1 x ... an 1 x an x
TRAPEZOIDAL RULE
[ ]
linear polynomial,
𝑏
𝑓 (𝑎)+ 𝑓 (𝑏)
∫ 𝑓 (𝑥)𝑑𝑥 ≈(𝑏− 𝑎) 2
𝑎
TRAPEZOIDAL RULE
1 𝑦 𝑛−2
𝐴= h ( 𝑏1 +𝑏 2 ) 𝑦2
2 𝑦1 𝑦𝑛
1
𝐴 𝑛= h ( 𝑦 𝑛 −1 + 𝑦 𝑛 )
2
TRAPEZOIDAL RULE
( )[ ]
𝑏 𝑛− 1
Let +…+. Thus, the formula for h
∫ 𝑓 ( 𝑥 ) 𝑑𝑥 ≈ 2 𝑦 0 +2 ∑ 𝑦 𝑖 + 𝑦 𝑛
Trapezoidal rule is: 𝑎 𝑖=1
,
TRAPEZOIDAL RULE
EXAMPLE 1:
Determine the value of
EXAMPLE 1:
a. Analytical Calculation
From rules of Thus:
integration:
TRAPEZOIDAL RULE
EXAMPLE 1:
b. Trapezoidal Method
Solve for the value of h: 1 1
4 16
EXAMPLE 1:
b. Trapezoidal Method
EXAMPLE 1:
b. Trapezoidal Method
EXAMPLE 1:
c. True Error
EXAMPLE 1:
d. Percentage Relative True Error
Solve for the percentage relative true error:
TRAPEZOIDAL RULE
EXAMPLE 2:
Determine the value of
EXAMPLE 2:
a. Analytical Calculation
From rules of integration:
Thus:
TRAPEZOIDAL RULE
EXAMPLE 2: 1 8
b. Trapezoidal Method 1.5 26.375
2 65.5
Solve for the value of h:
2.5 131.825
3 232
3.5 372.7321
=
Solve for the values of to : 4 560.75
=
4.5 802.7917
5 1105.6
5.5 1475.9205
6 1920.5
TRAPEZOIDAL RULE
EXAMPLE 2:
( )[ ]
𝑏 𝑛− 1
b. Trapezoidal Method h
∫ 𝑓 ( 𝑥
Solve for the approx. value:
) 𝑑𝑥 ≈
2
𝑦 0 +2 ∑ 𝑦 𝑖 + 𝑦 𝑛
𝑎 𝑖=1
Solve for the summation:
+…+
TRAPEZOIDAL RULE
EXAMPLE 2:
b. Trapezoidal Method
EXAMPLE 2:
c. True Error
EXAMPLE 2:
d. Percentage Relative True Error
Solve for the percentage relative true error:
SIMPSONS’S RULE
– The closed forms are those where the data points at the
beginning and end of the limits of integration are known.
For number of
segments/interval is even,
employ
SIMPSONS’S RULE
Depth is )
SIMPSONS’S RULE
fxo = your starting point (endpoint of 1/3 rule if solution is in conjunction with
both rule)
fx1 = the first interval after that point
fx2 = the second interval
fx3 = the odd end interval
SIMPSONS’S RULE
EXAMPLE 1:
Use Simpson’s Rule with 6 intervals to estimate the definite
integral of
Solution:
6 intervals = even, then use 1/3 rule only
Then: x0 = 1 (start) ; x1 = 2 ; x2 = 3 ; x3 = 4 ; x4 = 5; x5
= 6 ; x6 = 7 (end point)
SIMPSONS’S RULE
EXAMPLE 1:
Solution:
=
= 49.594832
THANKS!
Do you have any
questions?