Nothing Special   »   [go: up one dir, main page]

U1 Finite Differences

Download as pdf or txt
Download as pdf or txt
You are on page 1of 57
At a glance
Powered by AI
Finite differences are used to approximate functions and their derivatives. They involve taking the differences between function values at evenly spaced points. Forward and backward differences can be calculated using difference operators and tables.

Finite differences involve taking the differences between function values at evenly spaced points. Forward differences are calculated by subtracting subsequent function values, while backward differences subtract preceding values. Higher order differences involve applying the difference operator multiple times.

Forward and backward differences are calculated using difference operators. The first forward difference operator E is used to calculate first order forward differences. Higher order differences apply the operator multiple times. Backward differences use the inverse operator E^-1.

Finite Differences

Let y  f ( x) be a function of x
X a a+h a+2h ……….. ………. a+nh
Y f(a) f(a+h) f(a+2h) ……….. ………. f(a+nh)
y0 y1 y2 ……….. ………. yn
Here values of x are equidistant and called Argument
Values of y called entry

Finite Differences

Forward Backward
Newton’s Operator 

First Forward Difference--- y0  y1  y0 f(a+h)-f(a)


y1  y2  y1

y2  y3  y2

…………….
yn  yn 1  yn

Second Forward Difference---  2 y0  (y0 )  ( y1  y0 )  y1  y0

 2 y1  y2  y1

 2 y2  y3  y2

……………..
 2 yn  yn 1  yn

Similarly third Difference, fourth difference etc.


Table for forward differences

X y First Second Third Fourth


difference difference difference difference
A y0
y0
a+h y1  2 y0
y1 3 y0
a+2h y2  2 y1  4 y0
y2  3 y1
a+3h y3  2 y2
 y3
a+4h y4

Newton’s Backward difference


First Backward Difference--- y1  y1  y0

y2  y2  y1 f(a+h)
y3  y3  y2

…………….
yn1  yn1  yn

Second Backward Difference---  2 y1  (y1 )  ( y1  y0 )  y1  y0

 2 y2  y2  y1

 2 y3  y3  y2

……………..
 2 yn 1  yn 1  yn

Similarly third Difference, fourth difference etc……


Operator E
E[ f (a)]  f (a  h)
 E ( y0 )  y1

E 2 [ f (a )]  E[ f (a  h)]  f (a  2h)
 E ( y0 )  y1

Similarly E n [ f (a)]  f (a  nh)

Operator E-1
E 1[ f (a)]  f (a  h)

Similarly E  n [ f (a)]  f (a  nh)

Relations
y0  y1  y0  E ( y0 )  y0  ( E  1) y0
   E -1
E   1
E 1[ f (a)]  f (a  h)  f (a)  f (a)  (1  ) f (a)

 E 1  1   ,
Another result
E  E  
Hint: E[ f (a)]  ................

Examples:
ax b
1) Find first ,second, third forward difference of e ,where a and
b are constant

ax b a ( x  h ) b ax b ax b
Solution: e e  e  e (e  1) ah

 2eax b  (eax b )  [eax b (eah  1)]  (eah  1)(eax b )  (eah  1) 2 eax b


Third difference………………
2) Show that  (cos 2 x)  4sin h cos(2 x  2h)
2 2

………………H.W.

3) Find the function whose first difference is e ax


1 ax 1
Sol: [ f ( x )]  e  f ( x )  e 
ax
e ax
 E 1

 (1  E ) 1 e ax
 (1  E  E 2  E 3  .....)e ax
 (e ax  e a ( x  h )  e a ( x  2 h )  e a ( x 3h )  .....)
 e ax (1  e ah  e 2 ah  e3ah  .........)
1 a/(1-r)
 e ax .
1  e ah
e ax
 ah
e 1

2 2
4) (x )  ?
E

2 2 ( E  1) 2 2
(x )  ( x )  ( E  2  E 1 )( x 2 )
E E
Sol:  ( x  h) 2  2 x 2  ( x  h) 2
=2h 2

2 3
5) (x )  ? H.W.
E
6) Prove that     
[ f (a)]  [ f ( a)  f (a  h)]
 f ( a  h)  f ( a)  [ f ( a)  f ( a  h)]
Sol:
= [ f ( a)]  [ f ( a)]
= (  )[ f ( a)]

7) Prove that
[ f ( x)
[log f ( x)]  log[1  ]
f ( x)
Sol:
[log f ( x)]  log[ f ( x  h)]  log[ f ( x )]
f ( x  h)
= log
f ( x)
 f ( x )  f ( x  h)  f ( x ) 
log  
 f ( x) 
 f ( x)  f ( x) 
 log  
=  f ( x) 
 f ( x) 
 log 1 
 f ( x) 

8) Evaluate (  ) ( x  x) given that h=1


2 2
H.W.
  2  x Ee x
9) Prove that  E  e .  2e x  e
x

 
  2  x  ( E  1)2  x 1 x
 e    e  ( E  2  E )e
Sol:    E 
E
= e x  h  2e x  e x h

Ee x e xh ex
  xh
e
2 x
( E  1) e2 x
e  2e x  e x  h
e x  2 h  2e x  h  e x

Hence ………

8) (  ) ( x  x)  8 ,h=1
2 2

Solution:
(  ) 2 ( x 2  x)  ( E  1  1  E 1 ) 2 ( x 2  x)
=(E 2  2  E 2 )( x 2  x)
=( x  2h) 2  ( x  2h) - 2 x 2 - 2 x  ( x - 2h)2  ( x - h)
= ( x  2) 2  ( x  2) - 2 x 2 - 2 x  ( x - 2) 2  ( x -1)
=8

9) Show that hD  log(1  )


Solution: We know that

E[ f ( x )]  f ( x  h)
h2 h3
=f ( x )  hf '( x )  f ''( x )  f '''( x )  .....
2! 3!
h2 2 h3 3
= f ( x )  hD[ f ( x )]  D [ f ( x )]  D [ f ( x )]  .....
2! 3!
( hD ) 2 ( hD )3
E[ f ( x)] =[1  hD    .....] f ( x )
2! 3!
(1   ) f ( x) =e hD f ( x)
(1   ) =e hD
log((1   )  hD
Show that f (5)  f (4)  [ f (3)]   [ f (2)]   [ f (2)]
2 3
10)
R.H.S.
 f (4)  [ f (3)]   2 [ f (2)]   3[ f (2)]
 f (4)  ( E  1)[ f (3)]  ( E  1) 2 [ f (2)]  ( E  1) 3[ f (2)]
 f (4)  f (4)  f (3)  f (4)  2 f (3)  f (2)  f (5)  3 f (4)  3 f (3)  f (2)
 f (5)

Factorial Polynomial:
The factorial polynomial is the continued product of the factors which
increase or decrease by a constant.

[ x]1  x
[ x]2  x( x  h)
[ x]3  x( x  h)( x  2h)
[ x]n  x( x  h)( x  2h)......[ x  (n  1)h]
Important Results

(i )[ x]n  n[ x]n 1


1 n [ x]n 1
(ii ) [ x] 
 n 1
Proof (i):

[ x]n  [ x  h]n  [ x]n


=( x  h) x( x - h).......{x - (n - 2)h}- x ( x - h).......{x - (n -1)h}
 [ x( x - h).......{x - (n - 2)h}][ x  h  {x  (n  1)h}]
 [ x]n 1 nh  n[ x]n 1
Example:Express y  3x  x  x  1
3 2
in factorial polynomial
form, Hence show  ( y )  18
3

Solution:
x3 x2 x Constant
1 3 1 1 1
0 3 4
2 3 4 5 coeff. of
[ x ]1
0 6
3 coeff. of 10 coeff. of
[ x ]3 [ x ]2

 y  3[ x]3  10[ x]2  5[ x]1  1


y  9[ x]2  20[ x]  5
 2 y  18[ x]1  20
3 y  18
H.W.

1) Express y  2 x  5 x  7
4 2
in factorial polynomial form,
Hence find  ( y ) for x=1.5
2

2) Express y  x  5 x  3x  7 x  5 in factorial
4 3 2

polynomial form, Hence find third order forward difference

Newton’s Interpolation forward difference formulae


1)
n( n  1) 2
f (a  nh)  f (a )  nf (a )   f (a )  ....
2!
Proof:

f (a  nh)  E n [ f (a)]
 (1  ) n f (a)

2)
1 2n  1 2 3n 2  6n  2 3
f '(a  nh)  [f (a )   f (a )   f (a ) 
h 2! 3!
4n3  18n 2  22n  6 4
 f (a )  ...]
4!
3)

1 2
f ''(a  nh)  2
[  f ( a )  ( n  1)  3
f (a) 
h
12n 2  36n  22 4
 f (a )  ...
4!
Newton’s Interpolation Backward Difference formulae
1)

n(n  1) 2
f (a  nh)  f (a )  nf (a )   f (a ) 
2!
n(n  1)(n  2) 3
 f ( a )....
3!
Proof:

f (a  nh)  E  n [ f (a)]
 (1  ) n f (a)

2)
1 2n  1 2 3n 2  6n  2 3
f '(a  nh)  [f (a)   f (a)   f (a ) 
h 2! 3!
4n3  18n 2  22n  6 4
 f ( a)  ...]
4!
3)

1
f ''(a  nh)  2
[ 2 f (a)  (n  1)3 f (a) 
h
12n 2  36n  22 4
 f ( a)  ...]
4!

Example: Use Newton’s forward interpolation formula, find the cubic


polynomial and hence evaluate f(0.5) for the following data
X 0 1 2 3 4
Y -1 0 13 50 123

Solution:
Newton’s forward difference table
X f ( x) f ( x)  2 f ( x)  3 f ( x)  4 f ( x)
0 -1
1
1 0 12
13 12
2 13 24 0
37 12
3 50 36
73
4 123

a  nh  x, h  1
Put a  0, h  x in formula

n( n  1) 2
f (a  nh)  f (a )  nf (a )   f (a )  ....
2!
x( x  1) 2 x ( x  1)( x  2) 3
f ( x)  f (0)  xf (0)   f (0)   f (0)
2! 3!

x ( x  1) x ( x  1)( x  2)
 1  x (1)  (12)  12
2 6
 2 x3  x  1
 f (0.5)  2(0.5)3  0.5  1  1.25
Example: Find the missing term
X 100 101 102 103 104
Y 2 2.0043 ? 2.0128 2.0170

Solution: Let the missing term be y2 .Then difference table


X y y 2 y 3 y 4 y
100 2.000
0.0043
101 2.0043 y2  2.0086
y2  2.0043 6.0257  3y2

102 y2 4.0171  2 y2 6 y2  12.0514

2.0128  y2 3 y2  6.0257
103 2.0128 y2  2.0086
0.0042
104 2.0170

Fourth difference must be zero


6 y2  12.0514  y2  2.0086
Example: Find y(0.3) and y’(0.3) for the following data
X 0.2 0.4 0.6 0.8 1.0
Y 25.04 6.21 3.138 2.202 2.0

Solution: Forward Difference Table

X y y 2 y 3 y 4 y
0.2 25.04
-18.83
0.4 6.21 15.758
-3.072 -13.622
0.6 3.138 2.136 12.22
-0.936 -1.402
0.8 2.202 0.734
0.0042
1.0 2.0
a  nh  0.3, h  0.2, a  0.2
Let  n 
0.3  0.2
 0.5
0.2
n( n  1) 2
f (a  nh)  f (a )  nf (a )   f (a )  ....
2!
0.5(0.5  1) 2
f (0.3)  f (0.2)  0.5f (0.2)   f (0.2) 
2!
0.5(0.5  1)(0.5  2) 3
 f (0.2) 
3!
0.5(0.5  1)(0.5  2)(0.5  3) 4
 f (0.2)
4!
0.5(0.5  1)
 25.04  0.5(18.63)  (15.358) 
2!
0.5(0.5  1)(0.5  2) 0.5(0.5  1)(0.5  2)(0.5
( 13.022) 
3! 4!
y (0.3)  12.328
1 2n  1 2 3n 2  6n  2 3
f '(a  nh)  [f (a )   f (a )   f (a ) 
h 2! 3!
4n3  18n 2  22n  6 4
 f (a )]
4!
1 2(0.5)  1 3(0.5) 2  6(0.5)  2
f '(0.3)  [18.63)  (15.358)  (
0.2 2! 3!
4(0.5)3  18(0.5) 2  22(0.5)  6
(12.22)]
4!
 88.76
Example: The table below gives the result of an observation.  is the
observed temperature in degree centigrade of a vessel of cooling
water, t is the time in minutes from the beginning of observation
T 1 3 5 7 9
 85.3 74.5 67.0 60.5 54.3

Find the approximate rate of cooling at t=3 and t=3.5


T   2 3 4
1 85.3
-10.8
3 74.5 3.3
-7.5 -2.3
5 67.0 1.0 1.6
-6.5 -0.7
7 60.5 0.3
-6.2
9 54.3
d
Rate of cooling is dt

a  nh  3, h  2, a  3
n  0
1 2n  1 2 3n 2  6n  2 3
f '(a  nh)  [f (a )   f (a )   f (a ) 
h 2! 3!
4n3  18n 2  22n  6 4
 f (a )]
4!

1 2(0)  1 2 3(0) 2  6(0)  2 3


f '(3)  [f (3)   f (3)   f (3)]
2 2! 3!
1 1 1
= [7.5  (1.0)  (0.7)]  4.116670 C / min
2 2 3

Now t=3.5 is not tabular value


a  nh  3.5, h  2, a  3
 n  0.25
1 2(.25)  1 3(.25) 2  6(.25)  2
f '(3.5)  [7.5  (1)  (0.7)]
2 2! 3!
=-3.9151oC / min

Example: From the following table find the number of students who
obtained less than 45 marks
Marks 30-40 40-50 50-60 60-70 70-80
No.of 31 42 51 35 31
students

Solution: Prepare cumulative frequency table


Marks less 40 50 60 70 80
than (x)
No.of 31 73 124 159 190
students(y)
X y y 2 y 3 y 4 y
40 31
42
50 73 9
51 -25
60 124 -16 37
35 12
70 159 -4
31
80 190
y (45)  ?
a  nh  45, a  40, h  10
 n  0.5
n( n  1) 2
f (a  nh)  f (a )  nf (a )   f (a )  ....
2!
(0.5)(0.5  1) 2
f (45)  f (40)  (0.5)f (40)   f (40)  ....
2!
= 31+0.5(42)+ ....
=47.87  48
Number of students having marks less than 40 are 31
Number of students having marks between 40 and 45 are 48-31=17

Example: Calculate sinh(1.1) from table


X 1 1.1 1.2 1.3 1.4 1.5
cosh( x) 1.5431 1.6685 1.8107 1.9709 2.1509 2.3524
H.W.
dx d 2 x
Example: Find & 2 at t=0.2 for following table
dt dt
T 0 0.2 0.4 0.6 0.8 1.0
X 0 .122 .493 1.123 2.022 3.2
H.W.
Backward differences
Example: The distance covered by an athlete for the 50 meter race is
given in the following table
Time(sec) T 0 1 2 3 4 5 6
Distance(Meter) S 0 2.5 8.5 15.5 24.5 36.5 50

Determine the speed of athlete at t=5 secs correct to two decimal


places.
Solution: Here t=5 is closure to end value, so use Backward
difference formula
T S S 2 S 3 S 4 S 5 S 6 S
0 0
2.5
1 2.5 3.5
6.0 -25
2 8.5 1.0 3.5
7.0 1.0 -3.5
3 15.5 2.0 0 1
9.0 1.0 -2.5
4 24.5 3.0 -2.5
12.0 -1.5
5 36.5 1.5
13.5
6 50
a  nh  5, h  1, a  5
Here
n  0
1 2n  1 2 3n 2  6n  2 3
f '(a  nh)  [f (a)   f (a)   f (a ) 
h 2! 3!
4n3  18n 2  22n  6 4
 f ( a)  ...]
4!

Put n=0
ds 1 1 1 1 4
 [f (5)   2 f (5)   3 f (5)   f (5)  ...]
dt 1 2 3 4
ds 1 1 1 1 1
 [12  (3)   3 (1.0)  (0)  ( 3.5)...]
dt 1 2 3 4 5

 13.1333 meter per second

Example: From the following table of values of x and y obtain


dy d 2 y
, for x=1.2, x=2.0,x=2.2
dx dx 2
X 1.0 1.2 1.4 1.6 1.8 2.0 2.2
Y 2.7183 3.3201 4.0552 4.9530 6.0496 7.3891 9.0250

Solution: Difference table


X y y 2 y 3 y 4 y 5 y 6 y
1.0 2.7183
0.6018
1.2 3.3201 0.1333
0.7351 0.0294
1.4 4.0552 0.1627 0.0067
0.8978 0.0361 0.0013
1.6 4.9530 0.1988 0.0080 0.0001
1.0966 0.0441 0.0014
1.8 6.0496 0.2429 0.0094
1.3395 0.0535
2.0 7.3891 0.2964
1.6359
2.2 9.0250

By Newton’s Forward difference formula


Here a+nh=1.2,h=0.2,a=1.2
Thus n=0

1 2n  1 2 3n 2  6n  2 3
f '(a  nh)  [f (a )   f (a )   f (a ) 
h 2! 3!
4n3  18n 2  22n  6 4
 f (a )  ....]
4!

dy 1 1 1
( ) x 1.2  [0.7351   0.1627   0.0367 
dx 0.2 2 3
1 1
 0.008   0.0014]
4 5
 3.3205

1 2
f ''(a  nh)  2
[  f ( a )  ( n  1)  3
f (a) 
h
12n 2  36n  22 4
 f (a )  ...
4!
Put n=0

1 2
f ''(a)  2
[  f ( a )   3
f (a) 
h
11 4 5
 f ( a)   5 f ( a)  ..
12 6
1
= [0.1627  0.0361 
0.04
11 5
(0.0080)  (0.0014)]
12 6
= 3.318
Now x=2.0 and 2.2 are close to end values so use backward difference
table
X y y 2 y 3 y 4 y 5 y 6 y
1.0 2.7183
0.6018
1.2 3.3201 0.1333
0.7351 0.0294
1.4 4.0552 0.1627 0.0067
0.8978 0.0361 0.0013
1.6 4.9530 0.1988 0.0080 0.0001
1.0966 0.0441 0.0014
1.8 6.0496 0.2429 0.0094
1.3395 0.0535
2.0 7.3891 0.2964
1.6359
2.2 9.0250
1 2n  1 2 3n 2  6n  2 3
f '(a  nh)  [f (a)   f (a)   f (a ) 
h 2! 3!
4n3  18n 2  22n  6 4
 f ( a)  ...]
4!

1 1 1
f '(a)  [f (a)   2 f (a )  3 f (a ) 
h 2 3
1 4
 f ( a)  ...]
24
dy 1 1 1
 [1.6359  (0.2964)  (0.0535) 
dx 0.2 2 3
1 1 1
(0.0094)  (0.0014)  (0.0001)]
4 5 6
=9.0228
1
f ''(a  nh)  2
[ 2
f ( a )  ( n  1) 3
f (a ) 
h
12n 2  36n  22 4
 f ( a)  ...]
4!
d2y 1 11 5 137
2
 2
[0.2964  0.0535  (0.0094)  (0.0014)  (0
dx (0.2) 12 6 180
=8.992
Similarly
 dy 
   7.39
 dx  x  2.0
 d2y  H.W.
 2  8.992
 dx  x  2.0
Example: Find the numerical value of the first derivative at x=0.4 of
the function f(x) defined as under
X 0.1 0.2 0.3 0.4
Y 1.10517 1.22140 1.34986 1.49182

Solution:
Now x=0.4 is close to end value so use backward difference table
X y y 2 y 3 y
0.1 1.10517
0.1162
3
0.2 1.22140 0.01223
0.1284 0.00127
6
0.3 1.34986 0.01350
0.4196
0.4 1.49182

a  nh  0.4
Here a  0.4, h  0.1
n  0

1 2n  1 2 3n 2  6n  2 3
f '(a  nh)  [f (a)   f (a)   f (a ) 
h 2! 3!
4n3  18n 2  22n  6 4
 f ( a)  ...]
4!
1 1 1
f '(a )  [f (a )   2 f (a )   3 f (a ) 
h 2 3
1 4
 f ( a)  ...]
24
1 1
f '(0.4)  [1.14196  (0.0135) 
0.1 2
1
(0.00127)]
3
=1.49133
Example: Find the first and second derivative of x at x=1.5 from
table
x 15 17 19 21 23 25
x 3.873 4.123 4.359 4.583 4.796 5.00

Solution:
X y y 2 y 3 y 4 y 5 y
15 3.873
0.25
17 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.00
a  nh  15
a  15, h  1
n  0

1 2n  1 2 3n 2  6n  2 3
f '(a  nh)  [f (a )   f (a )   f (a ) 
h 2! 3!
4n3  18n 2  22n  6 4
 f (a )  ...]
4!
1 1 1
f '(15)  [f (15)   2 f (15)   3 f (15) 
2 2 3
1 4
 f (15)  ...]
4
 0.12915
1 2
f ''(a  nh)  2
[  f ( a )  ( n  1)  3
f (a) 
h
12n 2  36n  22 4
 f (a )  ...
4!
1 2
f ''(15)  2
[  f (15)   3
f (15) 
2
11 4
 f (15)  ...]  0.046
12
Integration
Trapezoidal Rule
x0  nh
h
 ydx  ( y0  yn )  2( y1  y2  .......  yn1 )
x0
2
Simpson’s 1/3 rule
x0  nh
h ( y0  yn )  4( y1  y3  y5 .......  yn 1 )  

x0
ydx  
3  2( y2  y4  y6 .......  yn 2


Simpson’s 3/8 rule

x0  nh
3h ( y0  yn )  3( y1  y2  y4  y5 ......  yn 1 )  

x0
ydx  
8  2( y3  y6  y9 .......  yn 3 )

Example: Use Trapezoidal Rule with four steps to estimate the value
2
x
of integral 
0 2 x 2
dx

Solution: Here
n  4, xn  x0  nh
 2=0+4h
 h=0.5
x
Let
y  f ( x) 
2  x2
X 0 0.5 1 1.5 2
Y 0 0.3333 0.57735 0.727606 0.81645

x0  nh
h
 ydx  ( y0  yn )  2( y1  y2  .......  yn1 )
x0
2
0.5 (0  0.81645)  2(0.33333  
2
x
 dx  0.57735  0.727606) 
0 2 x 2 2  
=1.023267
2
1
2) Evaluate 
1
dx
x 2 by dividing the interval into equally spaced
intervals of width (i) 0.5 (ii) 0.25
Solution(i) Taking h=0.5
X 1 1.5 2
Y 1 0.4444 0.25
Simpson’s 1/3 rule
x0  nh
h ( y0  yn )  4( y1  y3  y5 .......  yn 1 )  

x0
ydx  
3  2( y2  y4  y6 .......  yn  2


2
1 0.5
 dx  ( y0  y2 )  4 y1 
1
x2 3
2
1 0.5
 dx  (1  0.25)  4(0.4444)
1
x2 3
=0.50463

(ii) Taking h=0.25


x 1 1.25 1.5 1.75 2
y 1 0.64 0.4444 0.3265 0.25
x0  nh
h ( y0  yn )  4( y1  y3  y5 .......  yn 1 )  

x0
ydx  
3  2( y2  y4  y6 .......  yn  2

0.25 ( y0  y4 )  4( y1  y3 )  
2
1

1
x2
dx  
3  2( y2 )


0.25 (1  0.25)  4(0.64  0.3265)  
2
1

1
x 2
dx 
3  2(0.4444) 

=0.50041
Exact value of integration

 1
2 2
1
1 x2  x 1  0.5
dx 

Example: Evaluate  (4  2sin x)dx , using 3/8 rule where n=5


0

Solution:Here
n  5, xn  x0  nh
  =0+5h
 h= /5
x 0  /5 2 /5 3 /5 4 /5 
y 4 5.176 5.902 5.902 5.176 4
Simpson’s 3/8 rule
x0  nh
3h ( y0  yn )  3( y1  y2  y4  y5 ......  yn 1 )  

x0
ydx  
8  2( y3  y6  y9 .......  yn 3 )


3h ( y0  y5 )  3( y1  y2  y4 )  
x5


x0
ydx  
8  2( y3 )



3( / 5) (4  4)  3(5.176  5.902  5.176)  
 (4  2sin x)dx 
0
8  2(5.902)



= 16.155483

Example: Compute the value of definite integral


1.4

 (sin x  log x  e
x
)dx , using 3/8 rule where h=0.1
0.2

Solution: Here
h  0.1, xn  x0  nh
 1.4=0.2+n(0.1)
 n=12
Note:
sin(0.2)  1.1986693
log10 (0.2)
log e (0.2)=  1.6094382
log10 e

x 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1 1.2 1.3 1.4
.
1
y 3.0 2.84 2.79 2.82 2.89 3.01 3.16 3.34 3.55 3 4.0 4.3 4.70
295 9351 7533 129 7586 4665 6040 8290 9752 . 698 704 4177
4 8 8 4 9 3 6 5 8 8 3 9 5
Simson’s 3/8 Rule
x0  nh
3h ( y0  yn )  3( y1  y2  y4  y5 ......  yn 1 )  

x0
ydx  
8  2( y3  y6  y9 .......  yn 3 )

1.4
( y0  y12 )  4( y1  y2  y4  y5  y7 
3(0.1)  
 ydx 
8 
 y8  y10  y11 )  
0.2
 2( y3  y6  y9 ) 
=4.0511582

3
dx
Example: Compute 0 1  x by Simpson’s 3/8 Rule by dividing interval
(0,3) into 6 equal parts.
Solution: Here

xn  x0  nh  3=0+6h  h=0.5
x 0 0.5 1 1.5 2 2.5 3
y 1 0.66667 0.5 0.4 0.33333 0.2857 0.25
Simson’s 3/8 Rule

x0  nh
3h ( y0  yn )  3( y1  y2  y4  y5 ......  yn 1 )  

x0
ydx  
8  2( y3  y6  y9 .......  yn 3 )

3
3h
 ydx  ( y0  y6 )  3( y1  y2  y4  y5 )  2( y3 )
0
8
3(0.5) (1  0.25)  3(0.66667  0.5  0.4  0.3333  
3
dx
0 1  x  8 0.2851  2((0.25) 

= 1.3888313
Difference Equations
Difference Equations
An equation of the term (ar Er + ar–1 Er–1 + ---+ a1 E + a0) yn = f(n)
where a0, a1, - - -, ar are constants is called a linear difference
equation of order ‘r’ with constant coefficient.
In symbolic form, above euation can be written as
(E)yn = f(n) - - - (1)
The solution of equation (1) contains two parts
(a) Complementary function (C.F.)
(b) Particular solution (P.I.)
The complete solution of (1) is given by
yn = C.F. + P.I.
Note: When the R.H.S. of equation (1) is zero, then the complete
solution of (1) is simply.
Yn = C.F.
6.20.1 Rules per finding complementary function:
The equation (E) = 0, is called an auxillary equation for above
equation (1).
[i.e. (E)yn = f(n)]
Let m1, m2, m3, - - - mr be the ‘r’ roots
of the equation (E) = 0. Now according to the nature of the roots,
the C.F. is given below:
Case I: Roots real and different:
If m1, m2, m3, ----, mr are all real and distinct, then
C.F. = C1 (m1)n + c2 (m2)n + C3 (m3)n + ---- + Cr (mr)n
where C1, C2, C3, - - -, Cr are all arbitrary constants.
Case II: Let two of the roots say m1 and m2 be real and equal, each
equal to m and remaining m3, - - - - mr be all real and
different, then
C.F. = (C1 + C2 n) mn + C3 (m3)n + - - - - + Cr(mr)n
Similarly, if three of the roots say m1, m2 and m3 be real and
UNIT - 6 331
equal, each equal to m and remaining m4, ---, mr be all real
and different, then
C.F. = (C1 + C2n + C3
n2) mn + C4 (m4)n + - - - + Cr (mr)n
Note: We can write C.F. in the same manner by taking four equal
roots, fire equal roots and so on.
Case III: Let two of the roots say m1 and m2 be complex conjugates i.e.
i and remaining roots m3, ----, mr be real and different,
then
nnn
C.F. r C1 cos n C2 sinn C3 m3 Cr mr
where r 2 2 and tan 1 /
Case IV: Let m1, m2 = i and m3, m4 = i and remaining m5,
- - -, mr be real and district, then

n
1234
nn
55rr
C.F. r C C n cosn C C n sinn
CmCm
where r 2 2 and tan 1 /
Ex. 1. Solve Yn 2 2yn 1 4yn 0
Solution: The given equation can be written as
2
E yn 2Eyn 4yn 0
i.e. (E2 – 2E+4) yn = 0
The auxiliarly eqution is,
E2 – 2E + 4 = 0
i.e.
244 4
E
2

i.e. E 1 3 i
i.e. the roots are complex conjugate of each other.
n
C.F. r C1 cos n C2 sin n
where 22r 1 3 2
and 1 3
tan 3
1

332 TechnoScan – Applied Mathematics

n
12
nn
C.F. 2 C cos C sin
33

Hence the solution is, n


n12
nn
y 2 C cos C
33

Ex. 2. Solve 2
n( 3 2) y 0
Solution: Given equation is
( 3 – 3 + 2) yn = 0
it can be written as
2

E 1 3 E 1 2 yn 0 E 1
(E2 – 2E + 1 – 3E + 3 + 2) yn = 0
i.e. 2
E 5E 6 yn 0
The auxiliary equation is given by
E2 – 5E + 6 = 0
i.e. (E – 2) (E – 3) = 0
E = 2, 3
i.e. roots are real and different
C.F. = C1 (2)n + C2 (3)n
Hence solution of given equation
Difference Equations: Difference Equation is the equation between
the differences of an unknown function.

e.g.  yn  5yn  6 yn  0
2

e.g.
E 2
yn  3Eyn  2 yn  0

Order of Equation: The highest power of E is the order of equation.


Formation of Difference Equation:

Example: From the equation yn  A.2  B.3 ,derive a difference


n n

equation by eliminating the arbitrary constants A and B.What is the


order of equation?
Solution:

yn  A.2n  B.3n

yn 1  A.2n 1  B.3n 1

yn  2  A.2n  2  B.3n  2
Eliminating A and B from above three equations

yn 1 1
yn 1 2 3 0
yn  2 4 9
6 yn  5 yn 1  yn  2  0
yn  2  5 yn 1  6 yn  0

Solution of Difference Equations


Complete Solution=Complementary function +Particular Integral
yn  C.F .  P.I .

To find Complementary function


1) First write given equation in the form of f ( E )  n
2) Solve f(E)=0, find roots

Real Distinct Equal Imaginary


C.F.= C1 (m1 ) n  C2 (m2 ) n (C1  C2 n)(m1 ) n ( 2   2 )n/2 C1 cos n  C2 sin n 

3) To find P.I.
(i)
When n  a n
1 1
P.I .  an  a n , if f (a )  0
f (E) f (a )

(ii) f(a)=0

1
P.I .  a n  na n 1
Ea
1 n(n  1) n 2
P.I .  an  a
( E  a) 2
2!

1 1
(iii) P.I .  np  np
f (E) f (1  )
(iv)

When n  sin kn
1 1  (eikn  eikn ) 
P.I .  sin kn   
f (E) f (E)  2i 

(v)
When n  a n (n)
1 1
P.I .  a n (n)  a n  ( n)
f (E) f (aE )

Example: Solve
Solve (E 2  6 E  9) yn  0
Sol : A.E. m 2  6m  9  0  m  3, 3
C.F .  (C1  C2 n)( 3) n
P.I .  0
" yn  C.F .  P.I ."
 yn  (C1  C2 n)( 3) n

Example:
Solve (E 2  5E  6) y x  5 x
Sol : A.E. m 2  5m  6  0  m  2, 3
C.F .  C1 (2) x  C2 (3) x
1 1 1
P.I .  (5) x  (5) x  (5) x
E  5E  6
2
25  25  6 6
" y x  C.F .  P.I ."
1
 y x  C1 (2) x  C2 (3) x  (5) x
6

Example:
Solve (E 2  5E  6) y x  5 x
Sol : A.E. m 2  5m  6  0  m  2, 3
C.F .  C1 (2) x  C2 (3) x
1 1 1
P.I .  (5) x  (5) x  (5) x
E  5E  6
2
25  25  6 6
" y x  C.F .  P.I ."
1
 y x  C1 (2) x  C2 (3) x  (5) x
6
Example

Solve un  2  7un 1  10un  12e3n  4


n

Sol : (E 2  7 E  10)un  12e3n  4


n

A.E.  m 2  7 m  10  0  m  2, 5
C.F .  C1 (2) n  C2 (5) n
1
P.I .  
n
3n
(12e 4 )
E 2  7 E  10
1 1
 2 (12e3n )  2
n
(4 )
E  7 E  10 E  7 E  10
e3 n 1

n
= 12 6 (4 )
e  7e3  10 42  7(4)  10
e3 n 1 n
=12 6  (4 )
e  7e3  10 2
" y x  C.F .  P.I ."
e3 n
 y x  C1 (2)  C2 (5)  12 6
n n
 (2) 2 n 1
e  7e  10
3
Example
Solve un  2  4un 1  4un  2
n

Sol : (E 2  4 E  4)un  2
n

A.E.  m 2  4m  4  0  m  2, 2
C.F .  (C1  C2 n)(2) n
1
P.I . 
n
(2 )
E 2  4E  4
1
 (2) n
( E  2) 2

2n  2
= n( n -1)
2!
" y x  C.F .  P.I ."
 un  (C1  C2 n)(2) n  n(n -1)2 n 1
Example

Solve (E 2  4 E  3) y x  3
x

Sol :
A.E.  m 2  4m  3  0  m  1, 3
C.F .  C1 (1) x  C2 (3) x
1
P.I .  (3x )
E  4E  3
2

1 1 1  x
   (3)
2  E  3 E  1 
1 1 1
= x 3x 1  (3) x
2 2 3 1
" yx  C.F .  P.I ."
1 1
 un  C1 (1) x  C2 (3) x  x 3x 1  (3) x
2 4
Example

Solve u x  2  7u x 112u x  cosx


Sol :
A.E.  m 2  7 m  12  0  m  4, 3
C.F .  C1 (4) x  C2 (3) x
1
P.I .  (cos x)
E  7 E  12
2

1 eix  e  ix
= 2 ( )
E  7 E  12 2
1 eix 1 e  ix
= 2 ( ) 2 ( )
E  7 E  12 2 E  7 E  12 2
1 eix e  ix 
  2i 
2  e  7ei  12 e 2i  7e  i  12 

" y x  C.F .  P.I ."


1 eix e  ix 
 u x  C1 (4)  C2 (3)   2i
x x

2  e  7ei  12 e 2i  7e  i  12 
Example
Solve y x  2  4 y x  9 x 2
Sol :
A.E.  m 2  4  0  m  2, 2
C.F .  C1 (2) x  C2 ( 2) x
1
P.I .  (9 x 2 )
E 4
2

1
=9 x2
(1  )  4
2

1
=9 2 ( x2 )
  2  3
1
 2 1 
 3 1     2  ( x 2 )
 3 3 
1
 2 1 
=  3 1      2   [ x( x  1)  x]
 3 3 
1
 2 
1
=  3 1      2   [ x ]
2
 [ x]
 3 3 
 2 1 2 2 1 2
2

=  3 1              ... [ x]2  [ x]
  3 3  3 3  
 2 
 3 1     2  ... [ x]2  [ x]
7
=
 3 9 
 2 2 7 
 3 [ x]2  [ x]  .2[ x]   .2 
 3 3 9 
 4 2 14 
=  3  x( x  1)  x  x   
 3 3 9
 4 20 
=  3  x2  x 
 3 9 

" y x  C.F .  P.I ."


 4 20 
 y x  C1 (2) x  C2 ( 2) x  3  x 2  x 
 3 9 
Example
Solve yn  2  2 yn 1  yn  2n n 2
Sol :
A.E.  m 2  2m  1  0  m  1,1
C.F .  (C1  C2 n)(1) n
1
P.I .  (2 n n 2 )
( E  1) 2

1
= 2n n2
(2 E  1) 2

1
=2 n {n( n  1)  n}
(2  2  1) 2
=2 n (2  1) 2{[ n]2  [ n]}
=2 n (1  4  12 2  ...){[ n]2  [ n]}
=2 n ([ n]2  [ n]  4.2[ n]  4  12  2)
=2 n {n( n  1)  n  8n  4  24}
=2 n {n 2  8n  20}
" y x  C.F .  P.I ."
 yn  (C1  C2 n)  2n {n 2  8n  20}

You might also like