mathe matics 2
Post on 02-Jun-2018
230 Views
Preview:
TRANSCRIPT
-
8/11/2019 mathe matics 2
1/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 1
Finite Differences and Interpolation
Suppose we are given the following values of y = f(x) for a set of values of x :
x : x0 x1 x2 xn
y : y0 y1 y2 yn
The process of finding the values of y corresponding to any value of x=x ibetween x0and xn is
called interpolation.
The technique of estimating the value of a function for any intermediate value of the
independent variable is called interpolation.
The technique of estimating the value of a function outside the given range is called
extrapolation.
The study of interpolation is based on the concept of differences of a function.
Suppose that the function y=f(x) is tabulated for the equally spaced values x = x0,
x1=x0+h, x2=x0+2h, , xn=x0+nh giving y = y0, y1, y2, , yn. To determine the values off(x) and f '(x) for some intermediate values of x, we use the following three types of
differences
1. Forward differences
2. Backward differences3. Central differences
Forward differences : The forward differences are defined and denoted by f(x)=f(x+h)-f(x), y0= y1y0
y1= y2y1y2= y3y2.yr= yr+1yr.
yn-1 = ynyn-1These are called the first forward differences and is the forward difference operator.Similarly the second forward differences are defined by
2yr= yr+1yr.In general
pyr= p-1 yr+1
p-1yr,
pthforward differences.The forward differences systematically set out in a table called forward difference table.
Value of
x
Value of
y
1s diff.
2n diff.
23r diff.
34 diff.
45 diff.
5
x0 y0
Chapter-2
-
8/11/2019 mathe matics 2
2/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 2
y0
x1 y1 y0
y1 y0
x2 y2 y1 y0y2 y1 y0
x3 y3 y2 y1
y3 y2
x4 y4 y3
y4
x5 y5
Backward Differences:The backward differences are defined and denoted by f(x)= f(x)-f(x-h),y1= y1y0y2= y2y1
y3= y3y2.yr= yryr-1
.yn= ynyn-1.
These are called the first backward differences and is the backward difference operator.
Similarly the second backward differences are defined by2yr= yr yr-1.
In generalpyr=
p-1yr p-1yr-1,pth backward differences. The backward differences systematically set out in a table calledbackward difference table.
Value of
x
Value of
y
1stdiff. 2n diff.2
3r diff.3
4t diff.4
5t diff.5
x0 y0
y1
x1 y12y2
-
8/11/2019 mathe matics 2
3/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 3
y23 y3
x2 y2 y3 y4
y3 3 y4 5 y5
x3 y32y4
4 y5
y43 y5
x4 y42y5
y5
x5 y5
Example#1. Evaluate(i) tan-1x(ii) (exlog 2x)(iii) 2cos 2x
Sol. From the definition of forward differences f(x) = f(x+h)f(x).
(i) Let f(x) = tan-1
x, thentan-1x = tan-1(x+h) - tan-1x
= .1
tan)(1
tan2
11
xhx
h
xhx
xhx
(ii)
.2log)1()1log(
2log)(log
2log2log2log)(2log
2log)(2log)2log(
xex
hee
xeex
hxe
xexexehxe
xehxexe
hhx
xhxhx
xhxhxhx
xhxx
(iii) 2cos 2x = [cos 2x]= [ cos 2(x+h)cos 2x]= cos 2(x+h)cos 2x= cos 2(x+2h)cos 2(x+h)[cos 2(x+h) )cos 2x]
-
8/11/2019 mathe matics 2
4/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 4
= 2 cos (2x+3h) sin h + 2 sin(2x+h) sin h=2 sin h [sin(2x+3h)sin(2x+h) ]=2 sin h [2 cos(2x+2h)sin h]=2 sin2h cos 2(x+h).
Example#2.Evaluate the following, with interval of difference being unity
(i)
2
(ab
x
) (ii)
n
e
x
Sol. From the definition of forward differences f(x) = f(x+h)f(x).
(i) (abx) = a bx= a(bx+1bx) = abx(b1)2(abx) = [(abx)]
= abx(b1) = a(b1) (bx)= a(b1) (bx+1bx)= a(b1)2bx.
(ii) ex= ex+1ex= ex(e1)2ex= [ex] = [ex+1ex]= (e1)ex
= (e1) ex(e1) = (e1)2ex.
Similarly 2ex = (e1)2ex, 3ex = (e1)3ex, and nex = (e1)nex.
Differences of a Polynomial:
Let f(x) = a0xn+ a1x
n-1+ a2xn-2+ + an-1x + anbe an nth degree polynomial in x, then
f(x) = f(x+h)f(x)
= a0[(x+h)nxn] + a1[(x+h)
n-1 xn-1]+ a2[(x+h)n-2xn-2 ]+ + an-1 [x+h-x]
= a0 n h xn-1 + a11x
n-2+ a21xn-2+ + an-1h,
where a11, a12, are new constant coefficients. Thus, the first difference of a polynomial of nth
degree is a polynomial of degree n-1.Similarly
2f(x) = [f(x)]
= a0n h [(x+h)n-1 xn] + a11[(x+h)n-2 xn-2 ]+ a21[(x+h)n-3 xn-3]+ + an-2, 1 [x+h-x]
= a0 n(n1) h2xn-2 + a12x
n-3+ a22xn-4+ + an-2,1h,
where a12, a12, are new constant coefficients. Thus, the second difference of a polynomial ofnth degree is a polynomial of degree n-2.
Continuing this process, for the nth difference, we get a polynomial of degree zero i.e.
nf(x) = a0n(n1) (n2) 3.2.1. hn= a0n! h
n
which is a constant.
From the above discussion, we have the following results :
-
8/11/2019 mathe matics 2
5/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 5
The differences of a polynomial of the nth degree are constant and all higher orderdifferences are zero.
If the nth differences of a function tabulated at equally spaced intervals are constant, then
the function is a polynomial of degree n (It is important in numerical analysis as itenables as to approximate a function by a polynomial).
Example#3.Evaluate 10[(1-ax)(1-bx2)(1-cx3)(1-dx4)].
Sol. Taking interval of difference h = 1.
10[(1-ax)(1-bx2)(1-cx3)(1-dx4)] = 10[abcd x10+ k1x9+ k2x
8+ + 1]
= abcd 10(x10) + k110(x9)+ k2
10(x8) + + 10(1),
where k1, k2, are constant coefficients. Since 10(xn) = 0 for n < 10, we have
10[(1-ax)(1-bx2)(1-cx3)(1-dx4)] = abcd 10(x10) = abcd 10!.
Factorial Notation: A product of the form x(x1) (x2) (x r +1) is denoted by [x]rand iscalled a factorial. In particular,
[x] = x, [x]2= x(x1) , [x]3= x(x1) (x2), [x]n= x(x1) (x2) (x n +1).
If the interval of difference is h, then
[x]n= x(xh) (x2h) (x (n1)h).
The factorial notation is of special utility in the theory of finite differences. It helps in finding the
successive differences o f a polynomial directly by simple rule of differentiation ([x]ras xr).
To express a polynomial of nth degree in the factorial notation, we use the following two steps
1.Arrange the coefficients of the powers of x in descending order, replacing missing
powers by zeros.
2.Using detached coefficients divide by x, x1, x2, x (n1) successively.
Example#4. Express f(x) = 2x3 3x2 + 3x 10 in a factorial notation and hence find alldifferences.
Sol. Let f(x) = A[x]3+ B[x]2+ C[x] + D. Then
x3 x2 x
1 2 -3 3 -10 = D_ 2 -1
2 2 -1 2 = C_ 4
-
8/11/2019 mathe matics 2
6/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 6
3 2 3 = B
_
2 = A
Hence f(x) = 2[x]3+ 3[x]2+ 2[x]10. Therefore,f(x) = 6[x]2+ 6[x] + 22f(x) = 12 [x] + 63f(x) = 12.
Other Difference Operators:(1) Shift operator : Shift operator E is the operation of increasing the argument x by h so that
E f(x) = f(x+h), E2 f(x) = f(x+2h), Enf(x) = f(x+nh).
The inverse operator E-1is defined byE-1f(x) = f(x-h).
Similarly E-nf(x) = f(x-nh).(2) Averaging operator : Averaging operator is defined by the equation
f(x) = [f(x + h/2) + f(x - h/2)].In the difference calculus, and E are regarded as the fundamental operators and ,
and can be expressed in terms of these.
Relations Between the Operators :
1. = E 12. = 1E-13. = E1/2E-1/24. = [E1/2+ E-1/2 ]5. = E = E =E1/26. E = ehD.
Example#1. Determine the missing values in the following table:
x 45 50 55 60 65
y 3 ? 2 ? -2.4
Sol. Let p and q be the missing values in the given table, then the difference table is as follows:
x y y y y45 3
p350 p 52p
2p 3p + q955 2 p + q4q2 3.6p3q
60 q 0.42q2.4q
65 -2.4
-
8/11/2019 mathe matics 2
7/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 7
Since three entries are given, the function y can be represented by a second degree polynomial.Therefore, 3y0= 0 and 3y1= 0. Thus 3p + q9 = 0 and 3.6p3q = 0. Solving theseequations, we get p = 2.925 and q = 0.225.Example#2. Determine the missing values in the following table without using difference table.
x 45 50 55 60 65
y 3 ? 2 ? -2.4Sol. Given that y0= 3, y2= 2 and y4= -2.4 and missing values be taken as y1= p and y3= q.
Since three entries are given, the function y can be represented by a second degree polynomial.Therefore, 3y0= 0 and
3y1= 0.
(E1)3y0= 0 (E1)3y1= 0(E33E2+ 3E1)y0= 0 (E
33E2+ 3E1)y1= 0y33y2+ 3y1y0= 0 y43y3+ 3y2y1= 0
q3(2)+ 3p3 = 0 -2.43q + 3(2)p = 03p + q9 = 0 3.6p3q = 0.
Solving these equations, we get p = 2.925 and q = 0.225.
Newtons Forward Interpolation Formulae:Let the function y=f(x) take the values y0, y1, y2, corresponding to the values x0, x1, x2, of x. Suppose it is required to evaluate f(x) for x=x0+ph, p is any real number.
For any real number p, we have defined E such that
Epf(x) = f(x0+ph)yp= f(x0+ph) = E
pf(x0)= (1+)py0= [1+p+p(p-1)/2! 2+ p(p-1)(p-2)/3! 3+] y0 = y0+ p y0+ p(p-1)/2!
2y0+ p(p-1)(p-2)/3! 3y0+
It is called Newtons forward interpolation formulae.
Newtons Backward Interpolation Formulae:Suppose it is required to evaluate f(x) for x=xn+ph, where p is any real number.Epf(x) = f(xn+ph)
yp= f(xn+ph) = Epf(xn)= (1- )
-p yn
= [1+p +p(p+1)/2! 2+ p(p+1)(p+2)/3! 3+] yn= yn+ p yn+ p(p+1)/2!
2yn+ p(p+1)(p+2)/3!3yn+
It is called Newtons backward interpolation formulae.
Choice of Newtons Interpolation formulae :
Newtons forward interpolat ion formulae is used for interpolating the values of y near thebeginning of a set of tabulated values and extrapolating values of y a little backward o f
y0. Newtons backward interpolation formulae is used for interpolating the values of y near
the end of a set of tabulated values and also extrapolating values of y a little ahead of yn.
Example#1. The table gives the distances in nautical miles of the visible horizon for the given
heights in feet above the earths surface :
-
8/11/2019 mathe matics 2
8/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 8
x=height 100 150 200 250 300 350 400
y=distance 10.63 13.03 15.04 16.81 18.42 19.90 21.27
Find the values of y when (i) x= 218 ft. (ii) x= 410 ft.
Sol. The difference table is
x y
100 10.63
2.4
150 13.03 -0.39
2.01 0.15
x0=200 15.04 -0.24 -0.07
1.77 0.08
250 16.81 -0.16 -0.05
1.61 0.03
300 18.42 -0.13 -0.01
1.48 0.02
350 19.90 -0.11
1.37
xn=400 21.27
(i) If we take x0=200, then y0=15.04, y0=1.77, 2y0=-0.16,
3y0=0.03, 4y0=-0.01.
Since x=218, step length h=50 and p=(x-x0)/h =18/50 = 0.36.
By Newtons forward interpolation formula, we have
y(218) = y0+ p y0+ p(p-1)/2! 2y0+ p(p-1)(p-2)/3!
3y0+ p(p-1)(p-2)(p-3)/4! 4y0
= 15.04 + 0.36 (1.77) + 0.36(0.36-1)/2 (-0.16)+ 0.36(0.36-1)(0.36-2)/6 (0.03)
+ 0.36(0.36-1)(0.36-2)(0.36-3)/24 (-0.01)
=15.04+0.6372+0.0184+0.0018+ 0.00041 = 15.69741
15.7 nautical miles.
-
8/11/2019 mathe matics 2
9/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 9
(ii) If we take xn=400, then yn=21.27, yn=1.37,2yn=-0.11,
3yn=0.02,4yn=-0.01.
Since x=410, step length h=50 and p=(x-xn)/h =10/50 = 0.2.
By Newtons backward interpolation formula, we have
y(410) = yn+ p yn+ p(p+1)/2! 2yn+ p(p+1)(p+2)/3! 3yn+ p(p+1)(p+2)(p+3)/4! 4yn
= 21.27 + 0.2 (1.37) + 0.2(0.2+1)/2 (-0.11) + 0.2(0.2+1)(0.2+2)/6 (0.02)
+ 0.2(0.2+1)(0.2+2)(0.2+3)/24 (-0.01)
=21.27+0.274-0.0132+0.0017- 0.0007 = 21.5318
21.53 nautical miles.
Interpolation with unequal intervals:
The disadvantage for the previous interpolation formulas is that, they are used only forequal intervals. The following are the interpolation with unequal intervals;
1) Lagranges formula for unequal intervals,2) Newtons divided difference formula.
Lagranges interpolation formula:If y = f(x) takes the values y0, y1, y2, , yncorrespondingto x0, x1, x2, , xn, then
,y)x(x)x)(xx(x
)x(x)x)(xx(x
y)x(x)x)(xx(x
)x(x)x)(xx(xy
)x(x)x)(xx(x
)x(x)x)(xx(xf(x)
n
1nn1n0n
1n10
1
n12101
n200
n02010
n21
which is known as Lagranges formula.
Divided Differences: If (x0, y0), (x1, y1), , (xn, yn) are given points, then the first divideddifferences for the argument x0, x1is defined by
01
0110
xx
yy]x,[x .
Similarly
.
xx
yy]x,[x,,
xx
yy]x,[x,
xx
yy]x,[x
1nn
1nn
n1n
23
23
32
12
12
21
The second divided differences for x0, x1, x2 is
02
1021210
xx
]x,[x]x,[x]x,x,[x .
The third divided differences for x0, x1, x2, x3 is
-
8/11/2019 mathe matics 2
10/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 10
03
2103213210
xx
]x,x,[x]x,x,[x]x,x,x,[x .
And so on, the nth divided differences for x0, x1, x2, ,xn is
.
xx
]x,,x,[x]x,,x,[x]x,,x,x,[x
0n
1-n10n21
n210
All the divided differences systematically set out in a table called divided difference table.
Valueof x
Valueof y
1stdivided
difference
2n divided
difference
3r divideddifference
4t divideddifference
5t divideddifference
x0 y0
[x0,x1]
x1 y1 [x0,x1,x2][x1,x2] [x0,x1,x2,x3]
x2 y2 [x1,x2,x3] [x0,x1,x2,x3,x4]
[x2,x3] [x1,x2,x3,x4] [x0,x1,x2,x3,x4,x5]
x3 y3 [x2,x3,x4] [x1,x2,x3,x4,x5]
[x3,x4] [x2,x3,x4,x5]
x4 y4 [x3,x4,x5]
[x4,x5]
x5 y5
Newtons divided difference formula: If y = f(x) takes the values y0, y1, y2, , yncorresponding to x0, x1, x2, , xn, then
f(x) = y0+(x-x0)[x0, x1] + (x-x0)(x-x1)[x0, x1, x2] + +(x-x0)(x-x1)(x-xn-1)[x0, x1, x2, , xn],which is known as Newtons general interpolation formula with divided differences.
Example#1. Given the values
x : 5 7 11 13 17
f(x): 150 392 1452 2366 5202
Evaluate f(9), using
(i) Lagranges formula(ii) Newtons divided difference formula.Sol. Let y = f(x), then from the given data, we have x0= 5, x1= 7, x2= 11, x3= 13, x4= 17 and y0= 150, y1= 392, y2= 1452, y3 = 2366, y4= 5202.
-
8/11/2019 mathe matics 2
11/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 11
(i) By Lagrnges interpolation formula
.y)x(x)()x)(xx(x
)x(x)()x)(xx(x
y)x(x)()x)(xx(x
)x(x)()x)(xx(xy
)x(x)()x)(xx(x
)x(x)()x)(xx(x
y)x(x)()x)(xx(x
)x(x)()x)(xx(xy
)x(x)()x)(xx(x
)x(x)()x)(xx(xf(x)
4
34241404
3210
3
43231303
42102
42321202
4310
1
n1312101
4320
0
n0302010
4321
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
.8105
578
3
2366
3
3872
15
3136
3
505202
13)11)(177)(175)(17(17
13)11)(97)(95)(9(9
236617)11)(137)(135)(13(13
17)11)(97)(95)(9(91452
17)13)(117)(118)(11(11
17)13)(97)(95)(9(9
39217)13)(711)(75)(7(7
17)13)(911)(95)(9(9150
17)13)(511)(57)(5(5
17)13)(911)(97)(9(9f(9)
(ii) The divided difference table is
Value
of x
Value
of y
1st
divideddifference
2n
divideddifference
3r divided
difference
4t divided
difference
5 150
121
7 392 24
265 1
11 1452 32 0
457 1
13 2366 42
709
17 5202
By Newton divided difference formulaf(x) = y0+(x-x0)[x0, x1] + (x-x0)(x-x1)[x0, x1, x2] +(x-x0)(x-x1)(x-x2)[x0, x1, x2,x3]
+ (x-x0)(x-x1)(x-x2)(x-x3)[x0, x1, x2,x3,x4].f(9) = 150 + (95)121 + (95) (97)24 + (95)(97)(911)1
+ (95)(97)(911)(913)0= 150 + 484 + 19216 + 0= 810.
-
8/11/2019 mathe matics 2
12/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 12
Numerical Differentiation:
Mathematically, the derivative represents the rate of change of a dependent variable with respect
to an independent variable. For example, if we are given a function y(t) that specifies an objects
position as a function of time, differentiation provides a means to determine its velocity, as in:
As in following Figure, the derivative can be visualized as the slope of a function.
Numerical differentiation is used when the function y = f(x) is given in tabular form or it
is highly complex. The basic idea in numerical differentiation is to replace the given function y =
f(x) on the interval by an interpolating polynomial P(x) and set f (x)= P(x), f (x) = P(x) etc. Numerical differentiation is less exact than interpolat ion.
Numerical differentiation using Newtons forward formula:Suppose y = f(x) is specified in
an interval [a, b] at equally spaced points xi= x0+ ih (i = 0, 1, , n) (x0=a, xn=b) by means ofvalues yi= f(xi). By Newton forward interpolation formula
...y4!
3)2)(p1)(pp(py
3!
2)1)(pp(py
2!
1)p(pypyf(x)y 0
4
0
3
0
2
00 ,
whereh
xxp 0 and h = xi+1xi, for i = 1, 2, , n. Here p is a function of x and
h
1
dx
dp.
Rewriting the above equation, we have
...y
24
3p11p6ppy
6
2p3ppy
2
ppypyy(x) 0
4234
0
323
0
22
00
Differentiating the above equation with respect to x, we have
....y24
622p18p4py
6
26p3py
2
12py
h
1
dp
dy
h
1
dx
dp
dp
dy
dx
dy0
423
0
32
0
2
0
Again differentiating with respect to x, we get
-
8/11/2019 mathe matics 2
13/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 13
....y12
1118p6py)1(y
h
1
dx
dy
dp
d
h
1
dx
dp
dx
dy
dp
d
dx
dy
dx
d
dx
yd0
42
0
3
0
2
22
2
p
Special case: If the derivative is required to find at a basic tabulated point x = x i, then choosex0= xiand the formulas become
050403020xx
y5
1y
4
1y
3
1y
2
1y
h
1
dx
dy
0
And
.y6
5y
12
11yy
h
1
dx
yd0
50
40
30
2
2xx
2
2
0
Numerical differentiation using Newtons backward formula:
In this case we replace y(x) by Newtons backward interpolation formula
...y4!
3)2)(p1)(pp(py
3!
2)1)(pp(py
2!
1)p(pypyy(x) n
4n
3n
2nn
whereh
xxp n and h = xi+1xi, for i = 1, 2, , n. Here p is a function of x and
h
1
dx
dp.
Rewriting the above equation, we have
...y24
3p11p6ppy
6
2p3ppy
2
ppypyy(x) n
4234
n3
23
n2
2
0n
Differentiating the above equation with respect to x, we have
....y24
622p18p4py
6
26p3py
2
12py
h
1
dp
dy
h
1
dx
dp
dp
dy
dx
dyn
423
n3
2
n2
n
Again differentiating with respect to x, we get
....y12
1118p6py)1(y
h
1
dx
dy
dp
d
h
1
dx
dp
dx
dy
dp
d
dx
dy
dx
d
dx
ydn
42
n3
n2
22
2
p
Special case: If the derivative is required to find at a basic tabulated point x = x i, then choosexn= xiand the formulas become
n5
n4
n3
n2
0xx
y5
1y
4
1y
3
1y
2
1y
h
1
dx
dy
n
and
.y
6
5y
12
11yy
h
1
dx
ydn
5n
4n
3n
2
2xx2
2
n
Example#1. Compute f (x) and f (x) at (i) x = 16 (ii) x = 15 (iii) x = 24 (iv) x = 25 from thefollowing table
x 15 17 19 21 23 25
f(x) 3.873 4.123 4.359 4.583 4.796 5.8
-
8/11/2019 mathe matics 2
14/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 14
Sol. Let y = f(x), then from the given table x0= 15, x1= 17, x2= 19, x3= 21, x4= 23, x5= 25and y0= 3.873, y1= 4.123, y2= 4.359, y3= 4.583, y4= 4.796, y5= 5.8. The finite difference table
is
x y y y y y y15 3.873
0.2517 4.123 -0.014
0.236 0.002
19 4.359 -0.012 -0.001
0.224 0.001 0.002
21 4.583 -0.011 0.001
0.213 0.002
23 4.796 -0.009
0.204
25 5
(i) Since x = 16 is nearer to the beginning of the table we use Newton forward formula. Here the
step size h = 2. Taking x0= 15, then .5.02
1
2
15160
h
xxp
Newton forward formula to compute first derivative of y=f(x) is
....y24
622p18p4py
6
26p3py
2
12py
h
1
dx
dy0
423
03
2
02
0
Substituting x = 16, p = 0.5, y0 = 0.25, 2y0=0.014,
3y0 = 0.002, 4y0= 0.001,
5y0=0.002,
we have
.(-0.001)24
622(0.5)18(0.5)4(0.5)
(0.002)6
26(0.5)3(0.5)(-0.014)
2
12(0.5)0.25
2
1
dx
dy
23
2
16x
f (16) = 0.1249375.
Newton forward formula to compute second derivative of y=f(x) is
....y12
1118p6py)1(y
h
1
dx
yd0
42
03
02
22
2
p
Substituting the values from the table, we have
.(-0.001)12
1118(0.5)6(0.5)(0.002))15.0(0.014-
2
1
dx
yd2
216
2
2
x
f (16) = -0.0038229.
(ii) Since x = 15 is in the beginning of the table, we use Newton forward formula. Here the step
size h = 2, x = x0= 15 and p = 0.Newton forward formula to compute first derivative of y=f(x) at x = x0is
-
8/11/2019 mathe matics 2
15/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 15
05
04
03
02
0xx
y5
1y
4
1y
3
1y
2
1y
h
1
dx
dy
0
Substituting the values from the table, we have
)(0.002
5
1(-0.001)
4
1(0.002)
3
1(-0.014)
2
10.25
2
1
dx
dy
15x
f (15) = 0.128958.
Newton forward formula to compute second derivative of y=f(x) at x = x0is
.y6
5y
12
11yy
h
1
dx
yd0
50
40
30
2
2xx
2
2
0
Substituting the values from the table, we have
.(0.002)6
5(-0.001)
12
110.0020.014-
2
1
dx
yd
215x
2
2
f (15) = -0.004229.(iii) Since x = 24 is nearer to the ending of the table, we use Newton backward formula. Here the
step size h = 2. Taking xn= 25, then .5.02
1
2
2524
h
xxp n
Newton backward formula to compute first derivative of y=f(x) is
....y24
622p18p4py
6
26p3py
2
12py
h
1
dx
dyn
423
n3
2
n2
n
Substituting x = 25, p =0.5, yn = 0.204,2yn=0.009,
3yn = 0.002,4yn= 0.001,
5yn=0.002, we have
.)001.0(24
622(-0.5)18(-0.5)4(-0.5)
)002.0(6
26(-0.5)3(-0.5)
)009.0(2
12(-0.5)
0.2042
1
dx
dy
23
2
25x
f (24) = 0.09727.
Newton backward formula to compute second derivative of y=f(x) is
....y12
1118p6py)1(y
h
1
dx
ydn
42
n3
n2
22
2
p
Substituting the values from the table, we have
.)001.0(12
1118(-0.5)6(-0.5))002.0)(15.0(009.02
1
dx
yd 22
242
2
x
f (24) = -0.00242708.
(iv) Since x = 25 is in the ending of the table, we use Newton forward formula. Here the step sizeh = 2, x = x0= 15 and p = 0.
Newton backward formula to compute first derivative of y=f(x) at x = xnis
-
8/11/2019 mathe matics 2
16/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 16
n5
n4
n3
n2
0xx
y5
1y
4
1y
3
1y
2
1y
h
1
dx
dy
n
.
Substituting the values from the table, we have
.)002.0(
5
1)001.0(
4
1)002.0(
3
1)009.0(
2
10.204
2
1
dx
dy
25x
f (25) = 0.10048Newton backward formula to compute second derivative of y=f(x) at x = xnis
.y6
5y
12
11yy
h
1
dx
ydn
5n
4n
3n
2
2xx
2
2
n
Substituting the values from the table, we have
.)002.0(6
5)001.0(
12
11002.0009.0
2
1
dx
yd
225x
2
2
f (25) =-0.001833.
Numerical Integration
Integration is the inverse of differentiation. Just as differentiation uses differences to quantify an
instantaneous process, integration involves summing instantaneous information to give a totalresult over an interval. Thus, if we are provided with velocity as a function of time, integrationcan be used to determine the distance traveled:
According to the dict ionary definition, to integrate means to bring together, as parts, intoa whole; to unite; to indicate the total amountMathematically, definite integration is
represented by(1)
which stands for the integral of the functionf (x) with respect to the independent variablex,evaluated between the limitsx = a tox = b. As suggested by the dictionary definition, the
meaning of Eq. (1)is the total value, or summation, off (x)dx over the rangex = a to b. In fact,the symbol is actually a stylized capital S that is intended to signify the close connectionbetween integration and summation.
Geometrically, integration is just finding the area under a curve from one point to another. It is
represented by
b
a
dxxf )( , where the numbers a and b are the lower and upper limits of
integration, respectively, the function f is the integrand of the integral, and x is the variable ofintegration. Figure 1 represents a graphical demonstrat ion of the concept.
-
8/11/2019 mathe matics 2
17/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 17
Why are we interested in integration: because most equations in physics are differential
equations that must be integrated to find the solution(s). Furthermore, some physical quantities
can be obtained by integration (example: displacement from velocity).
The problem is that sometimes integrating analytically some functions can easily become
laborious. For this reason, a wide variety of numerical methods have been developed to find theintegral.
The process of evaluating a definite integral from a set of tabulated values of the integrand f(x) is
called numerical integration. This process when applied to a function of single variable, is known
as quadrature.
Let dxy(x)Ib
a
, where y(x) takes the values y0, y1, y2, , ynfor x = x0, x1, x2, , xn. Let
us divide the interval (a, b) into n sub-intervals of width h so that x0= a, x1= x0+ h, x2= x0+ 2h,
, xn= x0+ nh = b.
Trapezoidal rule: )y...y2(y)y(y2
hy(x)dx 1-n21n0
x
x
n
0
.
Simpsons 1/3rdrule :
)y...y2(y)y...y4(y)y(y3
hy(x)dx
2-n421-n31n0
x
x
n
0
Simpsons 3/8th rule :
-
8/11/2019 mathe matics 2
18/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 18
)y...y2(y)yy...yyy3(y)y(y8
3hy(x)dx 3-n632-n1-n5421n0
x
x
n
0
Problem#1. Compute the integral
6
021 x
dx
, using (i) Trapezoidal rule (ii) Simpsons 1/3rd
rule
(iii) Simpsons 3/8th rule and also determine the relative true error.
Sol. Let2
x1
1y(x) and divide the interval (0, 6) into n = 6 subintervals each of length h = 1.
Then, we have the following tabular values.
x 0 1 2 3 4 5 6
y(x) 1 0.5 0.2 0.1 0.0588 0.0385 0.027
(i) Trapezoidal rule
)y...y2(y)y(y
2
hy(x)dx 1-n21n0
x
x
n
0
.
1.4108.
0.0385)0.05880.10.22(0.5)027.0(12
1
)yyyy2(y)y(y2
hy(x)dx 5432160
6
0
(ii) Simpsons 1/3rdrule
)y...y2(y)y...y4(y)y(y
3
hy(x)dx 2-n421-n31n0
x
x
n
0
1.3662.
0.0588)2(0.20.0385)0.14(0.50.027)(13
1
)y2(y)yy4(y)y(y3
hy(x)dx 4253160
6
0
(iii) Simpsons 3/8th rule
)y...y2(y)yy...yyy3(y)y(y8
3hy(x)dx 3-n632-n1-n5421n0
x
x
n
0
.3571.12(0.1))0.03850.05880.23(0.50.027)(08
3
)2(y)yyy3(y)y(y8
3hy(x)dx 3542160
6
0
-
8/11/2019 mathe matics 2
19/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 19
%100valueTrue
valueeApproximat-valueTrueerrortruerelativeThe .
True value :
.4056.104056.1)0(tan)6(tan)(tan
1
116
01
6
02
x
x
dx
Relative true error for (i) Trapezoidal rule = %.3699.0%1001.4056
1.4108-1.4056
(ii) Simpsons 1/3rdrule = %.803.2%1001.4056
1.3662-1.4056
(iii) Simpsons 3/8th rule = %.4504.3%1001.4056
1.3571-1.4056
Problems1. Estimate the missing values in the following table
x 45 50 55 60 65
y 3.0 ? 2.0 ? -2.4
2. Express y=2x3-3x2+3x-10 in factorial notation and hence show that 3y=12.3. Given Sin450= 0.7071, Sin500= 0.7660, Sin550= 0.8192, Sin 600= 0.8660, find Sin520, using
Newtons forward formula.4. From the following table, estimate the number of students who obtained marks between 40
and45
Marks 30-40 40-50 50-60 60-70 70-80
No. ofstudents
31 42 51 35 31
5.
Construct a cubic polynomial which takes the following values :
x 0 1 2 3
f(x) 1 2 1 10
6. The area of a circle of diameter d is given for the following values:
d 80 85 90 95 100
A 5026 5674 6362 7088 7854
Calculate the area of a circle of diameter 105.
7.
Given the valuesx: 5 7 11 13 17
f(x): 150 392 1452 2366 5202
Evaluate f(9) by using (a) Lagranges formula (b) Newtons divided difference formula.
8. Use Lagranges formula to find the form of f(x) when,
-
8/11/2019 mathe matics 2
20/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 20
x: 0 2 3 6
f(x): 648 704 729 792
9. Determine f(x) as a polynomial in x for the following data using Newtons divided differenceformula
x: -4 -1 0 2 5
f(x): 1245 33 5 9 1335
10.Apply Lagranges formula inversely to obtain a root of the equation f(x) = 0 f(30)= -30, f(34)= -13,f(38) = 3 and f(42)= 18.
15. Given that
x 1.0 1.1 1.2 1.3 1.4 1.5 1.6
y 7.989 8.403 8.781 9.129 9.451 9.750 10.031
find the values of dy/dx and d2y/dx2 at x = 1.1and at x 1.6.
16.Find the first and second derivatives of the function tabulated be low, at the point x = 1.1
x: 1.0 1.2 1.4 1.6 1.8 2.0
f(x): 0 0.128 0.544 1.296 2.432 4.00
17.From the following table, find the values of dy/dx and d2y/dx2 at x = 2.03
x: 1.96 1.98 2.00 2.02 2.04
y: 0.7825 0.7739 0.7651 0.7563 0.7473
18. The following data gives the corresponding values of pressure and specific volume of asuperheated steam.
v 2 4 6 8 10
p 105 42.7 25.3 16.7 13
19.From the table below, for each value of x, y is minimum? Also find the value of y
x 3 4 5 6 7 8
y 0.205 0.240 0.259 0.262 0.250 0.224
20. Given that ,
x: 4.0 4.2 4.4 4.6 4.8 5.0 5.2
logx: 1.3863 1.4351 1.4816 1.5261 1.5686 1.6094 1.6484
Evaluate by (a) Trapezoidal rule(b) Simpsons 1/3 rule (c) Simpsons
3/8th rule.
21.Use Simpsons 1/3rdrule to find dx by taking seven ordinates.22.The velocity (km/min) of a moped which starts from rest, is given at fixed intervals of time t
(min) as follows:
T 2 4 6 8 10 12 14 16 18 20
V 10 18 25 29 32 20 11 5 2 0
-
8/11/2019 mathe matics 2
21/21
II/IV B.Tech Mathematical Methods (13BS201) Chapter-2
Page 21
Estimate approximately the distance covered in 20 minutes.23.A river is 80 feet wide. The depth d in feet at a distance x feet from one bank is given by the
following table:
x 0 10 20 30 40 50 60 70 80
d 0 4 7 9 12 15 14 8 3
Find approximately the area of the cross-section.24.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 coordinate:
x 0.00 0.25 0.50 0.75 1.00
y 1.0000 0.9896 0.9589 0.9089 0.8415
Short Answer Questions
1. Evaluate 2(abx), interval of differences being unity.2. Show that log f(x)= log{1+f(x)/f(x)}
3.
Evaluate 10
[(1-x) (1-2x2
) (1-3x3
) (1-4x4
)], if the interval of differencing is 2.4. Prove that y3= y2+ y1+
2y0+ 3y0.
5. Prove with usual notations that (E1/2+ E-1/2) (1 + ) = 2 + . 6. Prove with usual notations that 3y2=
3y5.
7. State Newtons forward interpolative formula.8. Write the relation between and E. 9. Write the relation between , E and10.Prove with usual notations that (1+)(1- ) = 1
11.State Lagranges Interpolation formula12.State Newtons divided difference formula
18.By Trapezoidal rule, write the value of dx
19.State Simpsons 3/8 th rule. 20.If f(x) is given by x = 0 0.5 1 1.5 2
f(x) = 0 0.25 1 2.25 4.
Then the value of dx by Simpsons 1/3 rule.
top related