Professional Documents
Culture Documents
And Integratio: Times
And Integratio: Times
And Integratio: Times
which is th
Numerical Differentiation
value of
approximate numerical
4.1.
the process of calculating or evaluating
xe x0,In*p, if f(*) is not known derivative
explict eqn.
For
(5) b
a set ofIt is n, is of
1, 2,.....value
assigned
derivatives of afunction f(x)at some
numerical values (x;, y), i=0, known. this method we fit an interpolation
as many
values of the function and then differentiate it timesan
polynomial to the given set of
interpolation formula to be used depends on the assigned value of T
desired. The choice of the
which derivative or derivatives are required. of derivative or deri
equi-spaced and it is required to find the valueFurthermore if the d
If thevalues ofx are Newton's, Sterling's or Bessel's formula.
any one of the of the given se
tives,we shall use
the point near the beginning or at,the point near the endrespectively, Als
ative is required at forward or backward interpolation formula
values then we shall use Newton'spoint near the middle of the given set of values then we shall
the derivative is to be found at the
formulae. If the values of x are not equi-spaced, we
shall
any one of the central difference formula.
Newton's divided difference or Lagrange's
the
interpolation formula, we can derive a formula for
Hence cOFresponding to each of the
derivatives.
u(u- 1) (u - 2) (u - 3)
4!
Ayot ...
.2)
where x=Xn t uh i.e., u=
du 1 .3)
dx h
On differentiating both sides of (1), w.r.t. u, we get
dy_ dy du
Now
dx du dx
which is the general formula, to compute the value of dy for non-tabulated values of x.
dx
For tabulated value of x, the formula (5) takes a simpler form, for example for r =Xo =
eqn. (5) becomes
...6)
Jx=o
Jx=
and (9) can also be obtained as follows:
Aliter : Theformulae (6), (8)
EehD
We know that 1+A=
A) =A-A'+,4°-+..
1
hD =log (1 + 2 3
...(10)
D=-; 2
3
...(11)
12
...(12)
and
du_ 1 ..3)
da h
On differentiating both sides of (1) w.r.t. u, we get
2u + 1 3u' + 6u +2 4u' +18u'+22u +6
dy-Vynt
du 2! 3! 4! yy,t.... ...(4)
Now
dy dy. du
dx du dx
which is the general formula tocompute the value of dx for non-tabulated value of x.
For tabulated value of x near the end of the tabulated value, the formula (5) takes a simpler
form.
For example, for x=X, u =u), the formula (5) becomes
...(6)
Proceeding exactly on similar lines, we can obtain higher order derivatives. For example
dy 3 ..(9)
Jx=n
NUMERICAL
DIFFERENTIATION AND INTEGRATION 87
- AD =log (1 -V)=-|v+++t.
D=+ ...
D²= 1 | V + 2 + +1+ . .
1 5 137
h 12 180 +...
3
D=
1
Now Dy, i.e., dx
Jx=
5 137
D'y, ie., dx| 2y, + oy, +12y , +y+
6 180
Jx=x
dyl
and D°y, i.e., dx3
Jx=*n
which are same as (6), (8) and (9).
&. Derivatives using Sterling centraldifference formula
By Sterling formula, we have
Ayo t Ay- 1 u2 u(u²-1) A°y-1+ A°y-2, uu'-1) Ay-2t.
2
+ 24,1t 3! 4!
2
Since U =
du
dx
dy_dy du
Now du dx
dx
3u2-1/ A°y+A'y-2 +
2u-u Ay-2t
A'y-1 6 2 12
2 ..(2)
tabulated values of x.
compute the value of dx for non
which is the general formula to
88
NUMERICAL ANALYSK
For tabulated value at x=X, we have u=0
1 Ayo +Ay-1 1 A'y-1 t A'y -2,
-
2 6 2
Jx=)
To find second derivative:
Differentiating (2) w.r.t. x, we get
d'y d (dy)du
da? du du dx
-ay. 6u Ay-1 +A°y-2 6u'-1 1
6! 12
(A°y_1tA°y. 2 6u-1
2 12 Ay.t.. ...3)
which is the general formula to compute the value of for non tabulated values ofx. For tabulated
value at x = t0, we have u = 0
Jx=0
4. Derivative using Bessel's central difference formula
From Bessel's formula, we have
2! 2
1
2 u(u -1)
3! Ay-1+ 4! 2
Differentiating w.r.t. u, we get
1
dy -= Ayo + 2u -1 4y-1+ A'yo 3u2-3u +,
du 2! 2 3! y-1
4u'-6u-2u +2|
4! ...(1)
Since
du
dx h
Now dy_dy du
dx dudx
1
1
2u -14y.j+4y) 3u- 3u +2
2! 2 3!:
4u-6u - 2u +2|A*y-1+A*y -2
4! ..2)
NUMERICAL DIFFERENTIATION AND INTEGRATION 89
which is the general formula for finding the value ofy atx near the middle of the tabulated values.
dx
Eor tabulated values at x=x0, we have u=0
[dy 1 1
dx
24
(a'y-+Ay-p) +.. ...(3)
which is the general formula to compute the value of dy2 at x near the middle of the tabulated
values.
2
4y-1-41 (ay+A'y-) +...
Jx=0
5. Derivative using Newton's divided difference formula
By Newton's divided difference formula, we have
Ay A²y A'y
1 0-0000
0-1280
0-7520 0-0480
and d'y 1
[A Yo+ (u - 1) 4' yl
11-1 1
Here h= 0-2, =1, x=11 and u= 0-2 . 2
1
10.1280 +0, 4x6 x00480=0.630
dz11 1 0-0480
and 0-2880 - 6-60
dr J11 (0-2)° 2
0.414
1-1 8.403 0-036
0-378 0-006
1-2 8.781 0-030 -0-002
0-348 0-004 0-001
1-3 9-129 -0-026 0-001 0-002
0-322 0-003 0-003
1.4 9951 -0.023 0-002
0-299 0-005
1-5 9.750 -0-018
0-281
1-6 10-031
...(.2)
and
Jx=0
Here h=0-1, to=11 (which belongs to the tabulated values)
yo=+0-003.
Ayo = 0-378, Ayo =-0-030, A° yo = 0-004, Ayo =-0-001, A°
Substituting these values in (1)and (2), we get
dy 1
(0-1)|"
0378-(- 0.080)+(0004)-(-0-001) +.
*=11
1
(0-378 + 0-015 + 0-0013 + 0-0002] = 3-945
0-1
1 +
and
= 0-030 - (0-004) +x(-0-001)
12
Jx= 11 (01)|
1
n0-0034] =34
end of
to find the values of derivatives at x= 16, which lies near the
formula,
(iüi) In this case, we have tabulated values. Hence from Newton's backward
tabulated values and also belongs to the
we have
92
NUMERICAL ANALYSIE
1
dx=x,
and
Jr=I,
d=16 0-1
= 2.748
o281*>+,-0018) +,(0.005) + (0002) + (0.003) +
d"y 1 11
and
dr Jr=16 (0.1)°|
0-018 + 0-005 +
12 (-0001)+-0001) +..
=-1:47
Example 3. Find the value off '() at x=04 from the following table :
0-01 0-02 0-03 0-04 0-05 0-06
fx): 0-1023 0-1047 0-1071 0-1096 0-1122 0-1148
Solution. Since the value of derivative is required at x 04 which lies near the middle of the
tabulated values. Hence we shall use one of the central difference formula. In this question, we have
used Bessel's formula
fu) Afu)
0-01 -3 0-1023
0-0024
0-02 -2 0-1047 0-0000
0-0024 0-0001
0-03 -1 0-1071 0-0001 -0-0001
0-0025 0-0000
0-04 0 0-1096
0-0001 0-0001
0-0026 -0-0001
0-05 1 0-1122 0-0000
0-0026
0-06 2 0-1148
NUMERICAL
DIFFERENTIATION AND INTEGRATION 93
Now
d
f0-4)): f(0)_ 0.03075 =0-2561.
dx h 12x 0-01
Example 4. Given the values of an emperial function fx) for certain values of x, find f (93).
60 75 90 105 120
formula is
We know that Sterling's
Af0) +Af-1) ,A'f- 1)
fu) =f(0) + u. 2 2!
1JAf- 1) + 4°f- 2),uu²- 12)
u(u- 4! f-2) +t..
3! 2
=-0-03627
=fx) tabulated below at the point
Example 5. Find the first derivative of the function y
t= 10.
5 11 27 34
fx) fx) f)
3 - 13
18
5 23 16
146 1
11 899 40
1026 1
27 17315 69
2613
34 35606
...(.2)
Putting x0 =3, *1=5,* = 11, x = 27, x, =34 and x= 10 in
(2), we get
f(10)= 18 +12 x16+ 23x1=233.
EXERCISE 4(a)
1 Findy'(0) and y"(0) from the following table:
0 2 4
f(«): 4 15 7 6
[M.D.U. 2006]
2. Find the first and second derivatives offc) atx = 1-5 if
1-5 2-0 2-5 3-0 3-5 4-0
3. Find the first and second derivatives of the function tabulated below at
()x=1-00. (ü) x=1-25 (iiü)x = 115
NUMERICAL DIE
time (t) is given in the following table:
The distance (s) covered by a car in a given
18 20 24
Time (Minutes) 12 14 Alsotak
23 25 34
Distance (Km) 14 18
Let y dx, where y =f*), be the integral which is tobe evaluated numerically, when a
a
set of tabulatedvalues (x;, y), i=0, 1, 2,...n has been given. Let the values of the argumentsx,
Ij,...*, be equi-spaced with x =a, X =*o + h, x =* + 2h,.... * =*0 +nh =b.
w
Clearly with these arguments the interval (a, b) has been divided into n equal sub-intervals th
b-a
each of width h=
Yn-1
Yo
X
X,+h x% +2h X+ (n-1)h x+ nh
Fig.
NUMERICAL DIFFERENTIATION AND INTEGRATION 97
U=
fo + hu) h . du
+
n - 2n + 35n 50n + 12n
6 4 5!
which is the general quadrature formula and is known as Newton-Cotes quadrature formula. From
this general formula by putting n = 1, 2, 3, 4, ... we get number of quadrature formuBae.
Now, we shall derive some important quadrature formulae taking n = 1, 2, 3, 4 and 6.
Tapezoidal Rule: Putting n = 1in (2) and neglecting the second and higher order differ
ences*, we get
...(3)
When n =lwe get only two values Yo Yi corresponding to x, and x,. From these we can find the
differences upto first order only. Also from given two set of values ( Yo), (1, y) we can fit a
polynomial of degreeone (i.e., a straight line) and hence all difference above order one are zero.
98 NUMERICAL ANALYS
Eq. (3)gives the area of one strip bound by x=Xo and x= to +h.
Similarly using the formula (3), we find that
t 3h
fr) dx = l', +yal
Pto th ot nh
Hence fr)dx : fo) dx t..+| fx) dx
Xo + (n - 1) h
....6)
x+ 4}h
fx) da h
eto t nh
fx) dx = ly,-2+4yn -1 t)
to t (n - 2) h
9 3
=h| 3yo +,2 o1-Yo)+(2 -2y1 +yo) + - 9, +3y, -yo)
- 3 Yo + 3y +3y, +y] ...(9)
Clearly, equation (9) determines the area of three strips bounded by the ordinates at
0, o + h, to + 2h, xo + 3h, at a time. Similarly using the fomula (9) by taking n a multiple of 3, we
find that
3
f) dx = lyg +3y4 +3y; +yd
fo + 9h
fe) dx =ly6+3y, +3ys +y¡l ..(10)
ro t nh
fx) dx = bn-gt3yh-2+3y,-1t yl
to + (n -3) h
NUMERICAL
100
N
results, we get
Onadding all these o t 3h
ko t nh
three-eighth rule.
This rule is called Simpson's 11.
NUMERICAL DIFFERENTIATION AND 101
INTEGRATION
3h
Similarly, fr) da = 10
and so on.
Adding all these integrals from x,to Xh t nh, where n is a multiple of 6, we get
3h
fx) dr =
10
(16)
This rule is called Weddle's rule.
Error in quadrature formulae. The error in the quadrature formulae is given by
E y dx P(x)dx [M.D.U. 2005)
where P(x) is the polynomial representing the function y=fx) in the interval la, b|.
SOL VED EXAMPLES
5-2
log x dx, given that
Example 1. Using trapezoidal rule, caleulate the value of the integral
1-6094)
((1-3863 + 1-6486) + 2 (1-4351 + 1-4816 + 1-5260 + 1-5686 +
NUMERICAL ANA
1
Example 2. Evaluate dx by using
0
1 2 3 4 5 6
y: 1-0 0-500 0-2000 0-1000 0-0588
0-0385 0-0270
Yo
6
1
=tan 6= 1-4056
Also 1+** ;dr =[tan1, Jo
h=
4-0 =1 and cÍ =0,x =1, , =2, xg =3, *4=4.
4
1
By Simpson'srule,we have
pto t 4h
4
+y9) +2y2l
e dx= y dx = lão +y) +4 (1
20-09)+2 (7-39)]
= (1+54-60) +4(2-72 +
1 [55-60 + 91-24 + 14-78]
=;(161-62) =53-873
is
The actual value of integral
=|e= let - el =(5460 - 1] =5360
dz
1
On using Simpson's rule, we get
3
0.7
12e dx = 3 l(yo +y) +4 (y; +y3) +2y2)
0-5
0-05 ((0-4288818 + 0-4154730) + 4 (0-4278774 + 0-4208867) + 2(0-4251076)]
3
0-05 [0-8443548 + 3-3950564 +0-8502152|
3
= 0-0848271.
starts from rest, is given at fixed intervals
Example 6. The velocity v(kmImin) of abike which
of time (min.)as follows :
14 16 18 20
4 8 10 12
t: 2
11 5 2
18 25 29 32 20
10
covered in 20minutes.
Estimateapproximately the distance
covered in t (min.).
Solution, Let S (km)be the distance
dS
We know that =U
dt
covered in 20 minutes is given by
Hence required distance S
t Vg)l
t Us t U, t Ug) + 2 (V, + V4 + Vg
20
h
vdt =3 I(vo + U10) +4 (uj + Ug
(By Simpson's 1 /3 rule]