Numerical Methods I
Numerical Methods I
Introduction:
Most of the problems of engineering, physical and economical sciences can be
formulated in terms of system of equations, ordinary or partial differential
equations. In majority of the cases, the solutions to these problems in analytical
form are non-existent or difficult. In all such cases, numerical methods provide
approximate solutions, practical for analysis. Numerical methods do not strive for
exactness. Instead, they yield approximations with specified degree of accuracy.
The early disadvantage of the several numbers of computations involved has been
removed through high speed computation using computers, giving results which
are accurate, reliable and fast.
Interpolation
Introduction:
Suppose that a function y = f(x) is given. For a set of values of x in the domain, we
can tabulate the corresponding values of y. The central problem of interpolation is
the converse of this:
Given a set of tabular values ( x0 , y0 ), ( x1, y1 ), ..., ( xn , yn ) satisfying the relation y
= f(x) where the explicit nature of f(x)is not known, it is required to find a simpler
function, say ( x) , which approximates f(x), such that f(x)and ( x) agree at the set
of tabulated points. Such a process of approximation of an unknown function by a
known function within the range where it is defined, such that both functions
assume same values at the given set of tabulated points is called interpolation. The
extrapolation is the process of approximating the unknown function by a function
second
order
forward
differences
and
are
denoted
by
These differences can be tabulated and the table so obtained is called forward
difference table and it is read diagonally downwards.
x
x0
y0
x1
y1
y0
y1
x2
y2
y2
x3
y3
y3
x4
y4
2y0
2y1
2y2
3y0
3 y1
4y0
Backward differences:
The differences y1 y0, y2 y1,,yn yn-1 when denoted by y1, y2,, yn,
are called first order backward differences of y. The operator is called the
backward difference operator. The differences of the first order differences are
called second order differences and are denoted by 2y2, 2y3, ,2yn.
Similarly one can define the rth order backward differences,
r yk r -1 yk r -1 yk -1 , r = 1, 2,
x0
y0
y1
x1
2 y2
y1
y2
x2
3y3
2 y3
y2
y3
x3
4 y4
3 y4
2 y4
y3
y4
x4
y4
Shift Operator:
The shift operator, denoted by E, is defined by the equation Eyk = yk+1. The
operator shifts the functional value yk to the next higher value yk+1.
Again operating by E, we get E2yk= E (Eyk) = E (yk+1) = yk+2. In general
Eryk = yk+r.
The inverse shift operator, denoted by E-1, is defined by the equation E-1yk = yk-1.
In general
E-ryk= ykr.
Properties of finite differences:
1. Linearity Property:
For any two constants a and b and for any two functions f(x) and g(x), we
have, (a f(x) b g(x)) = a f(x) b g(x)
2. Differences of Polynomial: The first order difference of a polynomial of degree
n is a polynomial of degree n1. Hence nth difference of a polynomial of degree n
is a constant.
Proof:
Consider
f(x) = a0xn + a1xn-1 + a2xn-2 ++ an-1x + an, a0 0.
Then,
f ( x) f ( x h) - f ( x)
a0
x h
xn
a1 x h x n-1
n-1
a2 x h
n-2
x n-2
...
nf(x) = a0n!hn,
which is a constant. Hence nth difference is a constant.
Remark: (n + 1)th and higher order differences of a polynomial of degree n are
zero.
Remark: Converse of the above is also true. i.e., if for a function f(x) the nth order
finite difference is a constant and (n+1)th ordered finite difference is zero then f(x)
is a polynomial of degree n.
3. 1+ = E.
4. 1= E-1.
4. = E = E
k
k
5. k yr (1)i 1 yk i
i 1
i
.(1)
Proof: Since
E 1 , we have E 1
k
k
k (1 E ) k (1)i E i
i 1
i
k
k
k
k
k
k
k yr (1)i E i yr (1)i E i yr (1)i yk i
i 1
i 1
i
i
i
i 1
6. k yr k yk r
Example: Find the missing term from the following table:
x 0 1 2 3
y 1 3 9 81
Explain why the result differs from the actual value 33 = 27.
Solution: There are 4 tabulated values, that is, (0, 1), (1, 3), (2, 9) and (4, 81) are
given, therefore its 4th forward difference must be zero.
2 y
3 y
4 y
2
4
a19
124 4a
a15
3
a (say)
81
a9
1053a
902a
81 a
y = 3,
Exercise
1. Find the missing points in the following table:
x
45
50
55
60
65
-2.4
11
22
40
140
p( p 1) 2
p( p 1)( p 2)...( p n 1) n
y0 ...
y0
2!
n!
........(2)
where x = x0 + ph.
Proof: Since yn(x) is a polynomial of degree n, it can be written as
yn ( x) a0 a1 ( x x0 ) a2 ( x x0 )( x x1 ) ... an ( x x0 )( x x1 )...( x xn-1 ) ....(3)
y0
.
h
2 y0
yn (x2) = y2gives a2 =
.
2! h 2
yn (xn) = yn gives an =
n y0
.
n !h n
Set x x0 ph . Then,
x x0 = ph, x x1 = (p 1) h, , x xn-1 = (p n +1)h.
Substituting in (3) and simplifying we get (2).
The formula,
yn ( x) y0 py0
p( p 1) 2
p( p 1)...( p n 1) n
y0 ...
y0 ,
2!
n!
yn ( x) yn pyn
where x = xn + ph.
Proof: Since yn(x) is a polynomial of degree n, it can be written as
yn ( x) a0 a1 ( x xn ) a2 ( x xn )( x xn-1 ) ... an ( x xn )( x xn-1 )...( x x1 ) ....(5)
yn (xn) = yn gives a0 = yn.
yn
.
h
2 yn
yn (xn-2) = yn-2 gives a2 =
.
2! h 2
yn (x1) = y1 gives an =
n y0
.
n !h n
Set x xn ph . Then,
x xn = ph, x xn-1 = (p + 1) h, , x x1 = (p + n 1)h.
Substituting in (5) and simplifying we get (4).
The formula,
yn ( x) yn pyn
p( p 1) 2
p( p 1)...( p n 1) n
yn ...
yn
2!
n!
x0 = 0
y0 = 1
x1 = 1
y1 = 0
y0= 1
y1= 1
2y0= 2
y1= 8
3y0= 6
x2 = 2
y2 = 1
x3 = 3
y3 = 10
y2= 9
p (p 1) 2
p (p 1)(p 2) 3
y0
y0 where x = x0 + ph
2!
3!
Here h = 1, x0 = 0, therefore p = x
y (x) = 1 + x (1) +
x (x 1)
x (x 1) (x 2)
2
6
1.2
1.2.3
To compute y (0.5)
Here x0 + ph = x = 0.5
p = 0.5 since x0 = 0 and h = 1
y (0.5) = y0 + p y0 +
= 1 + 0.5 (1) +
p(p 1) 2
p(p 1)(p 2) 3
y0
y0
2!
3!
(0.5) (0.5 1)
(0.5) (0.5 1) (0.5 2)
2 +
6
2
6
= 6.25
which is the same value as that obtained by substituting x = 0.5 in the cubic
polynomial.
Example 2: Using Newtons forward difference formula, find the sum
Sn 13 23 33 ... n3.
Example 3: From the following table, estimate the number of students who
obtained marks between 40 and 45.
Marks
No. of students
30 40 40 50 50 60 60 70 70 80
31
42
51
35
31
Ans:
First we prepare the cumulative frequency table, as follows,
Marks less than (x) 40 50
No. of students y
60
70
80
40
31
50
73
60
124
70
159
80
190
42
9
25
51
37
16
12
35
4
31
We shall find the number of students with marks less than 45.
From the above table we have,
y0 = 31, y0 = 42, 2y0 = 9, 3y0 = 25, 4y0 = 37
Taking x0 = 40, x = 45
We have
x = x0 + ph
45 = 40 + p10
p = 0.5
Using Newtons forward interpolation formula, we get
y (x) = y0 + p y0 +
p(p 1) 2
p(p 1)(p 2) 3
y0
y0
2
3!
(0.5)(0.5 1)
(9)
2!
(0.5)(0.5 1)(0.5 2)
(0.5)(0.5 1)(0.5 2)(0.5 3)
(37)
(25)
3!
4!
The number of students with marks less than 45 is 47.87, that is 48. But the
number of students with marks less than 40 is 31.
Hence the number of students getting marks between 40 and 45 = 48 31 = 17
students.
Example 4: The table below gives the values of tan x for 0.10 x 0.30:
X
0.10
0.15
0.20
0.25
0.30
y=tan x
0.1003
0.1511
0.2027
0.2553
0.3093
tan x
0.10
0.1003
0.0508
0.15
0.1511
0.0008
0.0516
0.20
0.2027
0.0002
0.0010
0.0526
0.25
0.2553
0.0002
0.0004
0.0014
0.0540
0.30
0.3093
Remark: Comparison of the computed and actual values shows that in the first
two cases (i.e., in interpolation) the results obtained are fairly accurate whereas in
the last-two cases (i.e., in extrapolation) the errors are quite considerable. The
example therefore demonstrates the important result that if a tabulated function is
other than a polynomial, then extrapolation very far from the table limits.
Exercise
1.
Population
2.
46
1.00
1.05
66
81
93
101
1 2
exp
t dt has the following values:
0
2
2
1.10
1.15
1.20
1.25
3.
-1/ 2
d for certain
0.20
0.22
0.24
0.26
0.28
0.30
4.
1.0
1.2
1.4
1.6
1.8
2.0
0.0
-0.112
-0.016
0.336
0.992
2.0
5.
6.
0.15
0.17
0.19
0.21
0.23
sinx
0.14944
0.16918
0.18886
0.20846
0.22798
150
152
154
156
y= x
12.247
12.329
12.410
12.490
Evaluate 155 .
7.
From the following table find the number of students who obtained less than
45 marks.
Marks
< 40
40 - 50
50 - 60
60 70
70 - 80
31
42
51
35
31
No. of
students
Population: y
(in thousands)
46
66
81
93
101
9. The following data gives the melting point of an alloy of lead and zinc,
where t is the temperature in degree centigrade and p is the percentage of
lead in the alloy.
p
40
50
60
70
80
90
yn(x0) = y0 gives a0
1
y0
( x0 x1 )( x0 x2 )...( x0 xn )
yn(x1) = y1 gives a1
1
y1
( x1 x0 )( x1 x2 )...( x1 xn )
yn(xn) = yn gives an
1
yn
( xn x0 )( xn x1 )...( xn xn-1 )
( x x0 )( x x2 )...( x xn )
( x x0 )( x x2 )...( x xn )
y0
y1 ...
( x0 x1 )( x0 x2 )...( x0 xn )
( x1 x0 )( x1 x2 )...( x1 xn )
( x x0 )( x x1 )...( x xn1 )
yn .
( xn x0 )( xn x1 )...( xn xn1 )
y= f(x) 3 0 30 132
Using Lagranges interpolation formula, we have y = f (x) =
(x 3)(x 4)(x 6)
(x 1)(x 4)(x 6)
(3)
(0)
(1 3)(1 4)(1 6)
(3 1)(3 4)(3 6)
+
=
(x 1)(x 3)(x 6)
(x 1)(x 3)(x 4)
(30)
(132)
(4 1)(4 3)(4 6)
(6 1)(6 3)(6 4)
x 3 13x 2 54x 72
x 3 11x 2 34x 24
(3)
(0)
30
6
x 3 10x 2 27x 18
x 3 8x 2 19x 12
(30)
(132)
6
30
1
( x 3 27x 2 92x 60) , which is the required
2
1 3
y 12 0 6 12
Hence estimate y at x = 2
Solution:
By data
x0 = 0, x1 = 1, x2 = 3 x3 = 4
y0 = 12, y1 = 0 y2 = 6 y3 = 12
We have y = f (x) =
(x x 0 ) (x x1 )(x x 3 )
(x x 0 ) (x x1 ) (x x 2 )
y2
y3
(x 2 x 0 ) (x 2 x1 ) (x 2 x 3 )
(x 3 x 0 ) (x 3 x1 ) (x 3 x 2 )
(x x1 ) (x x 2 )(x x 3 )
(x x 0 ) (x x 2 ) (x x 3 )
y0
y1
(x 0 x1 ) (x 0 x 2 ) (x 0 x 3 )
(x1 x 0 ) (x1 x 2 ) (x1 x 3 )
(x 1) (x 3) (x 4)
(12) + 0
(1) (3) (4)
x (x 1) (x 4)
x (x 1) (x 3)
6
12
(3) (2) (1)
(4) (3) (1)
y = f (x) = x3 7x2 + 18 x 12
Now f (2) = 23 7 (2)2 + 18 (2) 12 = 4
Therefore f (2) = 4 .
Putting x = 2.7, we get log 2.7 y(2.7) 0.9932518.
Example 3:The function y sin x is tabulated below
x
/4
/2
0.70711
1.0
sin(/6)
-12
12
24
R(x)
12
11
13
17
y(x) =
Put x = 9 we get
y(9) =
(9 5) (9 7) (9 13) (9 17)
1452
(11 5) (11 17) (11 13) (11 17)
(9 5) (9 7) (9 11) (9 17)
2366
(13 5) (13 7) (13 11) (13 17)
(9 5) (9 7) (9 11) (9 13)
5202 = 810
(17 5) (17 7) (17 11) (17 13)
Exercise
1.
2.
-2
-1
y(x)
-12
-8
Given the data points (1,-3),(3,9),(4,30) and (6,132) satisfying the function
y = f(x), compute f(5) .
3.
50
52
54
56
3.684
3.732
3.779
3.825
x 3.756.
4.
5.
x0 ,
x1
y1 y0
x1 x0
x2
y2 y1
y y2
y yn1
, x2 , x3 3
, , xn1, xn n
.
x2 x1
x3 x2
xn xn1
Similarly,
x1,
x0 , x1, x2
x1,
x2 x0 , x1
x , x x1, x2 , ,
, x1, x2 , x3 2 3
x2 x0
x3 x1
xn2 , xn1,
xn
xn1,
xn xn2 , xn1
.
xn xn2
x0 , x1, x2 , x3
x1, x2 , x3 x0 , x1, x2 ,
x3 x0
x1, x2 , x3 , x4
x2 , x3 , x4 x1, x2 , x3 ,,
x4 x1
x0
y0
First Order
Second Order
nth Order
Differences
Differences
Differences
x0 ,
x1
y1
x0 , x1, x2
x1,
x2
x1
x2
y2
x3
y3
xn1
yn1
xn
yn
x1, x2 , x3
x2 ,
x3
xn2 ,
xn1,
xn1
xn
xn2 , xn1,
x0 , x1,, xn
xn
Note: The divided differences are symmetric and independent of the order of the
arguments. That is,
[ x0 , x1 ] [ x1 , x0 ] ,
[ x0 , x1 , x2 ] [ x2 , x1 , x0 ] [ x0 , x2 , x1 ] [ x1 , x2 , x0 ] [ x1 , x0 , x2 ] [ x2 , x0 , x1 ]
and similarly for higher order differences.
x0 , x1
y y0
y y0 ( x x0 ) x, x0 .(1)
x x0
Again
x, x0 , x1
x, x0 x0 ,
x - x1
x1
x, x0 x0 , x1 x - x1 x, x0 , x1 .
Also, from
x, x0 , x1, x2
x,
x,
x0 , x1 - x0 , x1, x2
x - x2
x0 , x1 x0 , x1, x2 ( x - x2 ) x, x0 , x1, x2
x x0 x x1 x x2 x, x0 , x1, x2 .
x x0 x x1 x x2 x, x0 , x1, x2
+ x-x 0 x-x1 x-x 2 x-x n-1 x 0 , x1, , x n
x-x 0 x-x1 x-x 2 x-x n x, x 0 , x1, , x n
This is called Newtons divided difference interpolation formula, the last term
being the remainder term after (n + 1) terms.
Example 1: Given the values
10
11
13
f(x)
48
100
294
900
1210
2028
Solution:
x
f(x)
First Order
Second
Third order
Fourth
Differences
Order
Differences
order
Differences
4
Differences
48
52
15
100
97
21
7
294
0
1
202
10
900
27
310
11
1210
0
1
33
409
13
2028
Example 2: From the following table find f(x) and hence f(6) using Newtons
interpolation formula:
f(x)
Solution:
x
First Order
Second
Third order
Differences
Order
Differences
Differences
1
4
2
-2/3
1/14
-1/6
-1
1
(3x3 58 x 2 321x 224)
42
f (6) 6.2380.
Example 3: Find the equation y=f(x) of least degree and passing through the
points (-1, -21), (1, 15), (2, 12), (3, 3). Find also y at x=0.
Solution:
x
First Order
Second
Third order
Differences
Order
Differences
Differences
-1
-21
18
15
-7
-3
-3
12
-9
y 0 =6 .
Example 4: Find the Newtons divided differences polynomials for the data and
also find f(2.5).
X
f(x)
30
22
12
330
3458
f(x)
First Order
Second
Third order
Fourth
Differences
Order
Differences
order
Differences
3
Differences
30
4
22
10
12
26
114
330
44
290
1564
5
3458
y f x -30 x 3 4 x 3 x 1 2 x 3 x 1 x -0 4
an
interpolating
polynomial
for
the
data
2. Construct the interpolation polynomial for the data given below using
Newtons general interpolation formula for the divided differences
x
10
10
96
196
350
868
1746
10
f(x)
124
999
4. Fit a polynomial to the data (-4, 1245), (-1, 33), (0, 5), (2, 9), (5, 1335). Hence
find f(1) and f(7)
Numerical Differentiation:
Let
x0 , x1,, xn ,
p( p 1) 2
p( p 1)( p 2) 3
y
y
0
0
2
3!
dy dy dp
dx dp dx
1
2 p -1 2
3 p 2 -6 p 2 3
4 p3 -18 p 2 22 p -6 4
y0
y0
y0
y0
h
2
6
24
.(1)
Differentiating again,
d2y 1 2
6 p 2 18 p 11 4
3
(
p
1)
y0
0
0
2
2
dx
h
12
(2)
In a similar way the higher order derivatives can be computed. The
expressions (1) and (2) take a simpler form when the derivative is required at
x = x0, because at this point p = 0. Hence we get
1
1
1
1
dy
y0 2 y0 3 y0 4 y0
dx
h
2
3
4
x x
0
and
d2y
1
11
5
2 2 y0 3 y0 4 y0 5 y0
2
h
12
6
dx x x
is near to xn , we use
p( p 1) 2
p( p 1)( p 2) 3
yn
yn
2
3!
dy 1
2 p 1 2
3 p2 6 p 2 3
yn
yn
yn
dx h
2
3!
(3)
.(4)
The expressions (3) and (4) take a simpler form when the derivative is
required at x = xn, because at this point p = 0. Hence we get
1
1
1
1
dy
yn 2 yn 3 yn 4 yn
dx
2
3
4
x xn h
and
d2y
1
2
2
dx x xn h
11 4
5 5
2
3
yn yn yn yn
12
6
Example 1:
Given that
find
and
d2y
dx 2
50
3.684
51
3.7084
52
3.7325
at = 50 and = 56.
53
3.7563
54
3.7798
55
3.803
56
3.8259
50
3.684
0.0244
3.7084
51
0.0003
0
0.0241
52
3.7325
0.0003
0
0.0238
53
3.7563
54
3.7798
55
3.803
56
3.8259
0.0235
0.0232
0.0229
0.0003
0
0.0003
0
0.0003
(a) At x = 50, h = 1,
1
1
1
= {0.0244 (0.0003) + (0)} = 0.02455.
1
2
3
d2y
dx 2
= 1[-0.0003]= -0.0003
(b) At x = 56, h = 1,
1
= {0.0229 + 0.5 (0.0003) + 0} = 0.02275.
1
d2y
dx 2
= 1[-0.0003] = -0.0003
1.0
1.2
2.7183 3.3201
1.4
4.0552
1.6
4.9530
1.8
2.0
6.0496 7.3891
2.2
9.0250
Compute
d 2y
dy
and
at x = 1.2 and x = 2.0.
dx 2
dx
1.0
2.7183
1.2
3.3201
1.4
1.6
1.8
2.0
2.2
4.0552
4.9530
6.0496
7.3891
9.0250
0.6018
0.7351
1.3395
1.6359
0.1333
0.0294
0.1627
0.0067
0.0013
0.0361
0.8978
1.0966
0.0001
0.0080
0.1988
0.0441
0.2429
0.0014
0.0094
0.0535
0.2964
1
1
1
1
1
=
{0.7351 (0.1627) + (0.0361) (0.0080) + (0.0014)}
0.2
2
3
4
5
= 3.3205
2
1
11
5
=
0.0361
+
(0.0080)
(0.0014)} = 3.318.
{0.1627
2 (0.2)2
12
6
(b) At x=2.0, h = 0.2,
1
1
1
1
1
=
{1.3395 + (0.2429) + (0.0441) + (0.0080) + (0.0013)}
0.2
2
3
4
5
= 7.3896
2
1
11
5
=
+
0.0441
+
(0.0080)
(0.0013)} = 7.3854.
{0.2429
2 (0.2)2
12
6
Example 3: The population of a certain town is given below. Find the rate of
growth of population in 1931 and 1971:
1931
1941
40.62 60.8
(in 1000s)
1931
1941
1951
1961
1971
40.62
60.8
79.95
103.56
20.18
19.15
23.61
29.09
1951
79.95
2
1.03
4.46
1961
1971
103.56 132.65
3
5.49
4.47
1.02
5.48
132.65
1
1
1
1
=
{20.18 (1.03) + (5.49) (4.47)} = 2.36425
10
2
3
4
(ii) At x=1971, h = 10,
1
1
1
1
=
{29.09 + (5.48) + (1.02) + (4.47)} = 3.10525
10
2
3
4
Exercise
1. A rod is rotating in a plane. The following table gives the angle in radians
through which the rod has turned for various values of the time t seconds.
0.2
0.4
0.6
0.8
1.0
1.2
0.12
0.49
1.12
2.02
3.2
4.67
Calculate the angular velocity and angular acceleration of the rod when
t = 0.2 sec and t = 1.2 sec.
1. The following data gives corresponding values of pressure and specific
volume of a superheated steam
10
105
42.7
25.3
16.7
13
1.00
1.05
1.10
1.15
1.20
1.25
1.30
1.0000
1.0247
1.0488
1.0723
1.0954
1.1180
1.1401
dy
d2y
Find
and
at x 1.00 .
dx
dx 2
4. A function is given according to the table below.
1.5
2.0
2.5
3.0
3.375
7.000
13.625 24.000
5.
and
and
2.04
0.7473
Find
4.0
59.000
Find
and
at = 1.5 and = 3.5.
Given that
1.96
1.98
2.00
2.02
Find
3.5
38.875
1.20
1.0954
1.25
1.1180
1.30
1.1401
NUMERICAL INTEGRATION
Consider the definite integral
b
I y dx
a
p p -1 2
p p -1 p - 2 3
I y dx y0 py0
y0
y0 ... dx
2
6
a
x0
b
xn
I h y0 py0
y0
y0 ... dp
2
6
0
n
n 2n - 3 2
n n - 2 3
n
ydx nh y0 2 y0 12 y0 24 y0 ...
x0
xn
(1)
ydx h y0 2 y0 h y0 2 y1 - y0 2 y0 y1
x0
ydx 2 y1 y2
x1
xn -1
ydx
h
yn-1 yn
2
h
ydx
y0 2 y1 y2 ... yn-1 yn
2
x0
Geometrical significance
The curve y = f(x) is replaced by n straight line segments joining the points
bounded by the curve y = f (x), the ordinates x = x0 and x = xn and the X-axis is
approximately equal to the sum of the areas of the n trapeziums thus obtained.
Note: The error in the trapezoidal formula is
E
b - a h2 y
12
x O(h 2 )
ydx2h y0 y0 6
x0
x4
Similarly,
h
y0 y0 4 y1 y2
3
ydx 3 y2 4 y3 y4
x2
xn
and finally
ydx
xn -2
h
yn-2 4 yn-1 yn
3
x0
Remark: While applying Simpsons 1/3 rule, the given interval must be divided
into even number of equal subintervals.
Note: The error in Simpsons 1/3 rule is
b - a h4 yiv
180
3
3 2
1 3 3h
ydx
3
h
y
y0 y0 3 y1 3 y2 y3
0
0
0
2
4
8
8
x0
x6
Similarly,
ydx
x3
xn
and finally,
3h
y3 3 y4 3 y5 y6
8
ydx
xn-3
3h
yn-3 3 yn-2 3 yn-1 yn
8
3h
ydx 8 ( y0
yn ) 3( y1 y2 y4 y5
yn-2 yn-1 ) 2( y3 y6
yn3 )
x0
Remark: Simpsons 3/8 rule can be applied only if the number of sub-intervals
is a multiple of 3.
Note: The error in Simpsons 3/8 rule is
E
iv
3(b a) 4 iv
h y x
80
Examples:
6
dx
1 x2
1. Evaluate
by using
Solution:
Given n = 6, hence h
ba 60
1.
n
6
0.5
0.2
0.1
0.0588
0.0385
0.027
y0
y1
y2
y3
y4
y5
y6
(i)
By Trapezoidal rule
6
dx
1 x2 2 y0 y6 2 y`1 y2 y3 y4 y5
0
(ii)
1
1 0.027 2 0.5 0.2 0.1 0.0588 0.0385 1.4108
2
dx
h
1 x 2 3 y0 y6 4 y`1 y3 y5 2 y2 y4
0
1
1 0.027 4 0.5 0.1 0.0385 2 0.2 0.0588 1.3662
3
(iii)
dx
1 x2
0
3h
y0 y6 3 y`1 y2 y4 y5 2 y3
8
3
1 0.027 3 0.5 0.2 0.0588 0.0385 2 0.1 1.3571
8
2. Evaluate
dx
1 x2
approximate value of .
x
0.2
0.4
0.6
0.8
0.96154
0.86207
0.73529
0.60976
0.5000
y0
y1
y2
y3
y4
y5
By Trapezoidal rule
dx
1 x 2 2 y0 y5 2 y`1 y2 y3 y4
0
0.2
1 0.5 2 0.96154 0.86207 0.73529 0.60976 0.783732
2
By actual integration,
dx
1 1
(tan
x)0
=
1 x2
4
0
1
Hence 4
0.783732
3.13493
3. A solid of revolution is formed by rotating about the x-axis the area between
X-axis, the lines x=0 and x = 1 and a curve through the points with the
following coordinates:
X
0.00
0.25
0.50
0.75
1.00
1.0000
0.9896
0.9589
0.9089
0.8415
Solution:
1
Volume V= y 2 dx
0
0.00
0.25
0.50
0.75
1.00
y2
1.0000
0.9793
0.9195
0.8261
0.7081
h = 0.25.
Using Simpsons 1/3 rule,
V=
0.25
1 4 0.9793 0.8261 2 0.9195 0.7081 2.8192 .
3
4. A curve passes through the points (1, 2), (1.5, 2.4), (2, 2.7), (2.5, 2.8), (3, 3),
(3.5, 2.6), (4, 2.1). Obtain the area bounded by the curve, X-axis, x=1 and
x=4. Also find the volume of solid of revolution obtained by revolving this
area about the X-axis.
4
0.5
2 2.1 2 2.7 3 4 2.4 2.8 2.6 7.7833 sq.units
3
Volume
0.5
3
1.4
x
sin x log x e dx using Simpsons 3/8th rule.
0.2
Solution:
Let y sin x log x e x and h 0.2, n 6
The values of y are as given below:
0.2
0.4
0.6
0.8
1.00
1.2
1.4
1.4
sin
x log x e x dx
0.2
3h
y0 y6 3 y`1 y2 y4 y5 2 y3
8
3 0.2
3.0295 4.4042 3 2.7975 2.8976 3.5597 4.0698
8
2 3.1660
4.0304
Exercise
1. Given that
x
4.0
y=log x
4.2
4.4
4.6
4.8
5.00
5.2
5.2
Evaluate
ydx by
4
(i)
Trapezoidal rule
2. Evaluate
10
11
12
13
14
A (sq.ft)
950
1070
1200
1350
1530
10
12
22
30
27
18
1.5
2.5
3.5
2.4
2.7
2.8
2.6
2.1
Estimate the area bounded by the curve, X-axis and the lines x = 1, x = 4.
6. A solid of revolution is formed by rotating about the x-axis, the area
between the x-axis, the lines x=0 and x=1 and a curve through the points
with the following co-ordinates:
x
0.25
0.50
0.75
1.00