Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
UNIT 4
OBJECTIVES
General Objective
Specific Objectives :
Page 1
B3001/UNIT 4/1
INPUT
4.0
INTRODUCTION
Using numerical analysis, function y can be determined for some values of x in an
experiment data or calculation of function. These data can be retrieved from experiments
or calculated from given function. These data are filled in the table form for function
y = f(x) then its is equivalent to the integral of function y = f(x) within x = a and x = b.
X
X0
X1
X2
Xn
Y0
Y1
Y2
yn
i = 0,1, n 1
Figure 6.1 shows the values for yi is a function of xi.. Integrating the function of f
between x = a and x = b, you will find the area graph and the x-axis. Geometrically this
area can be estimated from the sum of area from rectangles width h and height yi
(i=0,1,.,n-1) shown in the figure. 6.2
y2
y3
yn-2
y1
yn-1
yn
y0
a=x0
x1
x2
x3
xn-2
xn-1
xn
Fig. 6.1
Pepared by : Nithya A/P Periasamy
Page 2
B3001/UNIT 4/1
y3
y2
Yn-2
y1
Yn-1
yn
y0
a=x0
x1
x2
x3
xn-2
xn-1
xn
Fig 6.2
Mathematically, we write the equation as
Sum of area = hy0 + hy1 + hy2 + . + hyn-2 + hyn-1
or
n 1
Area = h yi
i 0
f ( x)dx h
n 1
y
i 0
Page 3
B3001/UNIT 4/1
INPUT
y2
yn-1
yn
y1
y0
x0
x1
x2
x3
xn-2
xn-1
xn
Figure 6.3
The area for each trapezium with corresponding heights yi and yi+1 is given as
h
Area = ( yi + yi 1 ) ; i = 0,1,2,.n-1
2
Page 4
B3001/UNIT 4/1
The sum area of all trapezium between x0 and xn as
h
h
h
h
h
= ( y0 y1 ) ( y1 y2 ) ( y2 y3 ) ... ( yn 2 yn 1 ) ( yn 1 yn )
2
2
2
2
2
Sum area
h
= ( y0 2 y1 2 y2 ...... 2 yn 2 2 yn 1 yn )
2
f ( x)dx 2 ( y
2 y1 2 y2 ..... 2 yn 2 2 yn 1 yn )
I= f ( x)dx
0
10
32
72
128
200
Solutions :
Using the trapezoidal rule,
b
f ( x)dx 2 ( y
2 y1 2 y2 ..... 2 yn 2 2 yn 1 yn )
for h = 2, then :
I
2
0 2(8 32 72 128) 200
2
= 680.0
This answer is just estimation. Using differentiation, the real value is 2000/3 = 666.7.
Pepared by : Nithya A/P Periasamy
Page 5
B3001/UNIT 4/1
ACTIVITY 4a
1.
1
is tan-1 x. Comparing tan-1 s with
1 x2
dx
1 x
2.
Calculate
x dx
Page 6
B3001/UNIT 4/1
FEEDBACKS 4a
1
Integrate
Integrate
1
x2 1
Trapezium Rule
Tan-1s
0.1
0.09963
0.09966
0.2
0.19732
0.19739
0.3
0.29135
0.29145
0.4
0.38038
0.38050
0.5
0.46351
0.46364
0.6
0.54028
0.54041
0.7
0.61059
0.61072
0.8
0.67462
0.67474
0.9
0.73270
0.73281
1.0
0.78529
0.78539
1.1
0.83289
0.83298
1.2
0.87597
0.87605
1.3
0.91503
0.91510
1.4
0.95048
0.95054
1.5
0.98273
0.78279
1.6
1.01214
1.01219
1.7
1.03903
1.03907
1.8
1.06366
1.06369
1.9
1.08628
1.08631
2.0
1.10712
1.17014
Trapezium rule
Ln S
2.0
0.69319
0.69314
3.0
1.09866
1.09861
4.0
1.338634
1.38629
5.0
1.60949
1.60943
1
x
Page 7
B3001/UNIT 4/1
INPUT
4.2
SIMPSONS RULE
p( p 1) 2
p( p 1)( p 2) 3
f0
f 0 .....
2
6
x0
ydx h ydp
2
1
1
1
1
1
1
h pf 0 p 2 f 0 ( p3 p 2 )2 f 0 ( p 4 p3 p 2 )3 f 0 ...
2
6
4
24
6
6
0
1
h 2 f 0 2f 0 2 f 0 03 f 0 ........
3
ydx h2 f
x0
2f 0 3 f 0
3
= h 2 f 0 2( f1 f 0 ) ( f 2 2 f1 f 0
3
= h( f 0 4 f1 f 2 )
and in this formula, the first term involved 4 f 0 is ignored as the coefficient of 3 f 0 = 0
It can be shown that this term is
h 4
f 0 and you can expect Simpsons rule to be
90
Page 8
B3001/UNIT 4/1
The sum of area
h
h
h
( f 0 4 f1 f 2 ) ( f 2 4 f3 f 4 ) ( f 4 4 f5 f 6 ),.....
3
3
3
h
( f 0 4 f1 2 f 2 4 f3 2 f 4 4 f5 .....)
3
Y4
Y3
Y2
y0
y1
x0
x1
x2
x3
x4
Fig 6.4
This rule can be expanded for all values of x ; each has to consist 2 marked lines (for
every three points). If the number of marked lines is n, the rule will follow.
xn
ydx 3 ( f
4 f1 2 f 2 4 f3 .... 4 f n 3 2 f n 2 4 f n 1 f n )
x0
Example 4.2 :
10
f ( x)dx
0
Solution :
with h = 1, you have 10 marked lines with 11 points.
Page 9
B3001/UNIT 4/1
10
18
32
50
72
98
128
162
200
I 666.7
Page 10
B3001/UNIT 4/1
ACTIVITY 4b
1.
1
Given the differentiation of
is tan-1 x. Comparing tan-1 s with
2
1 x
dx
1 x
for s
2.
Calculate
x dx
Page 11
B3001/UNIT 4/1
FEEDBACK 4b
1.
2.
Integrate
1
x2 1
Differentiate
Simpson rule
Tan-1s
0.1
0.09967
0.09966
0.2
0.19740
0.19739
0.3
0.29146
0.29145
0.4
0.38051
0.38050
0.5
0.46365
0.46364
0.6
0.54042
0.54041
0.7
0.61073
0.61072
0.8
0.67474
0.67474
0.9
0.73282
0.73281
1.0
0.78540
0.78539
1.1
0.83298
0.83298
1.2
0.87606
0.87605
1.3
0.91510
0.91510
1.4
095055
0.95054
1.5
0.98279
0.78279
1.6
1.01220
1.01219
1.7
1.03907
1.03907
1.8
1.06370
1.06369
1.9
1.08632
1.08631
2.0
1.10715
1.10714
Simpson rule
ln s
2.0
0.69315
0.69314
3.0
1.09861
1.09861
4.0
1.38629
1.38629
5.0
1.60944
1.60943
1
x
Page 12
B3001/UNIT 4/1
SELF ASSESSMENT
1.
10
2.
Calculate
x2
3.
4.
Estimate
12
b)
dx
1 x
0
x 2 dx using
a)
Estimate
using
a)
b)
Page 13
B3001/UNIT 4/1
Page 14
B3001/UNIT 4/1
1.
44.3 unit2
2.
Intgration for e x
Trapezium rule
Simpson rule
1.0
0.886318602
0.836214302
0.5
0.886226926
0.886196367
0.1
0.886226926
0.886226924
a) 578
b) 576
4.
a) 1.15
b) 1.16
Page 15