Professional Documents
Culture Documents
net
ww
w.E
a syE
ngi
nee
rin
g.n
et
5.
w.E
subsequent iterations).
How will you find a negative root of a polynomial equation by
Iteration method? asy
En
Sol. Let f(x) =0 be the polynomial. The negative root of this polynomial
can be obtained by finding the positive root of f(– x) = 0.
gin
6. State the order (rate) of convergence and convergence condition for
Newton Raphson method.
Sol. The order of convergence of Newton Raphson method is 2 eer
(quadratic) and convergence condition is f ( x) f ( x) f ( x) .
2
ing
7. Newton Raphson method is also known as the method of_______ .ne
Sol. Iteration.
Let x = a x a
2
Sol.
( i.e.) f(x) = x2 - a f ( xn ) xn a, f ( xn ) 2 xn
2
n
2 xn
1 a
x n .
2 xn
11. Derive Newton’s algorithm for finding the pth root of a number N.
Sol. Let xp = N1/p p
x N x N 0
p 1
i.e. f(x) = x N f ( xn ) xn N , f ( xn ) pxn
p p
w.E
px n
p 1
.
asy
12. Establish an iteration formula to find the reciprocal of a positive
number N by Newton Raphson method.
Sol. Let x = 1/N
En
1
N N 0
x
1
x gin
1
(i.e.) f ( x) N f ( x n )
x
1
xn
1
N , f ( x n ) 2
xn eer
By Newton Raphson method, ing
xn
f ( xn )
xn
1
xn
N
2 1
x n x n N
.ne
x n 1
f ( x n )
2
1
xn
xn
t
x n 2 Nx n .
13. Derive Newton’s formula to find the cube root of a positive number k.
Sol. Let x = 3 k
f(x) = x3 – k f ( xn ) xn k , f ( xn ) 3xn
3 2
2
3x n
1 k
2 xn 2 .
3 xn
16. The numerical methods of solving linear equations are of types one
is direct and the other is _________
Sol. Iterative or indirect.
18. ww
Give the sufficient condition of convergence of Gauss Seidel method.
Sol. The absolute value of the leading diagonal element is greater than the
w.E
sum of the absolute values of the other elements in that row, which is
called diagonally dominant.
19. asy
Write the conditions for convergence in Gauss Seidel iterative
En
technique. (or) When the method of iteration will be useful?
Sol. The coefficient matrix should be diagonally dominant.
gin
eer
20. Gauss Elimination , Gauss Jordan method are direct methods while
_______ are iterative or indirect methods.
Sol. Gauss Seidel method.
ing
21. State Gauss Seidel method.
.ne
Sol. As soon as a new value for a variable is found by iteration it is used
immediately in the following equations. This method is called Gauss
Seidel method.
t
22. Gauss Seidel method always converges – True or False.
Sol. False.
23. Write the first iteration values of x,y,z when the equations
27x+6y-z = 85, 6x+15y+2z = 72, x+y+5z = 110 are solved
by Gauss Seidel method.
Sol. Here the coefficient matrix is diagonally dominant. Then
x 1 85 6 y z …. ...(1)
27
y= 1
72 6 x 2 z ……(2)
15
z= 1
110 x y ……..(3)
5
First Iteration
Put y = 0, z = 0 in (1), we get x = 3.148
Put x = 3.148, z = 0 in (2), we get y = 3.451
Put x = 3.148, y = 3.451 in (3), we get z = 20.662
25. Compare Gauss Elimination and Gauss Jordan methods for solving
linear systems of the form AX=B.
Sol. In Gauss Elimination method, the coefficient matrix reduced to upper
triangular matrix and we get the solution by back substitution whereas
in Gauss Jordan method, the coefficient matrix reduces to an unit or
ww
identity matrix and we get the solution without using back
substitution.
26.
w.E
Solve 3x+y = 2, x+3y = -2 by Gauss Seidel iteration method.
asy
Sol. In sixth iteration, we get x = 1, y = -1.
27. En
What type of Eigen value can be obtained using power method?
Sol. Dominant eigen value.
gin 1 2
28. Find the dominant eigen value of A =
Sol. Dominant eigen value = 5.3722 eer
3 4
by power method.
ing
29. On what type of equations Newton’s method can be applicable ?
Sol. Newton’s method can be applicable to the solution of both algebraic .ne
and transcendental equation and can be also used when the roots are
complex. t
30. By Gauss elimination method solve x y 2 and 2 x 3 y 5.
Sol. The augmented matrix is
1 1 2
[A,B] = 2 3 5
1 1 2
= R2 R2 2 R1
0 1 1
By back substitution, x y 2 ----(1)
y 1
(1) becomes, x 1 2
x 1
Hence x = 1, y = 1.
34. State fixed point theorem and fixed point iteration formula.
Sol. Any function f(x) = 0 is expressed as the fixed point equation x = (x)
whose root is given be the point of intersection of the curves y = x and
y = (x) .
ww
Fixed point iteration formula is xi 1 ( xi ) , i 0,1,2,.........
w.E
35. Compare Gauss Elimination with Gauss Seidel method.
Sol. Gauss Elimination Gauss Seidel
i.Direct method
asy
ii. Used to find inverse of
i. Indirect method
ii. Used to solve system of
the matrix also. En equations only
1 2 eer
36. Find inverse of A = 3 4
by Gauss Jordan method.
ing
Sol. AI =
1 2 1 0
3 4 0 1 .ne
=
1 3 1 0
0 1 2 1
7 3
t
=
1 0
0 1 2 1
7 3
Hence A-1 =
2 1
PART – B
10 asy
(2.34)
1.4343
10 1.6315 En
nd
11.6315
The 2 approximation is
gin
x2 x1
f ( x1 ) eer
f ( x1 )
f (11.6315) ing
11.6315
f (11.6315)
.ne
11.6315
(0.05494)
1.49994
11.6315 0.0366
t
11.5949
rd
The 3 approximation is
f ( x2 )
x3 x2
f ( x2 )
f (11.5949)
11.5949
f (11.5949)
(0.0000695)
11.5949
1.498567
11.5949 0.000046
11.5949
Hence the required positive real root is
11.5949
Raphson method.
Sol. Let f ( x) 1 x sin x
3
ww Choose x0 = 1.2
Then the 1st approximation is
w.Ex1 x0
( x0 )
( x0 )
asy
1. 2
(1.2)
(1.2)
(0.2040) En
1. 2
3.9576 gin
1.2 0.0515
1.2515 eer
nd
The 2 approximation is
( x1 )
ing
x2 x1
( x1 ) .ne
1.2515
(1.2515)
(1.2515)
t
(0.010 7)
1.2515
4.3849
1.2515 0.0024
1.2491
rd
The 3 approximation is
( x2 )
x3 x2
( x2 )
(1.2491)
1.2491
(1.2491)
(0.0002)
1.2491
4.3646
1.2491 0.00005
1.2491
3. Find the real root of the equation cos x 3x 1 by fixed point method
correct to four places of decimals.
Sol. Let f ( x) 3x cos x 1
f(0) = –2 = –ve, f(1) = 1.4597 = +ve
The root lies between 0 and 1.
[ Also f (0.6) ve, f (0.7) ve ]
Now, 3x cos x 1 = 0
1
3x cos x 1 x (1 cos x) ( x)
3
1
(i.e.) ( x) (1 cos x)
ww 3
( x)
sin x
w.E 3
sin x sin x
asy
Clearly | ( x) |
3
3
1 in (0,1).
Choose x0 = 0.6
Then x1 ( x0 ) (0.6) En
1
(1 cos 0.6)gin
3
0.6084 eer
x2 ( x1 ) (0.6084)
1 ing
3
(1 cos 0.6084)
.ne
0.6069
x3 ( x2 ) (0.6069)
1
t
(1 cos 0.6069)
3
0.6071
x4 ( x3 ) (0.6071)
1
(1 cos 0.6071)
3
0.6071
Hence the required positive real root is
0.6071
asy 4.3437 1
4.3259
En
x3 ( x2 ) (4.3259)
10
4.3259 1 gin
4.3331
x4 ( x3 ) (4.3331) eer
10 ing
4.3331 1
4.3302 .ne
x5 ( x4 ) (4.3302)
10
t
4.3302 1
4.3313
x6 ( x5 ) (4.3313)
10
4.3313 1
4.3310
x7 ( x6 ) (4.3310)
10
4.3310 1
4.3311
Hence the required positive real root is
4.3311
w.E
By back substitution, we have
x
1
5
3
y z
10
23
10
52
5
y
28
5asy
z
188
5
189
26
z
567
26 En
From the last equation, z = 3
gin
From the second equation, 52 y 28 (3) 188
5 5
eer
5
ing
52 188 84 104
y
5 5 5 5
y=–2
From the first equation, .ne
x
1
5
23 9 2
3
x (2) (3)
10
23
10 t
10 10 5
x 1
x = 1, y = – 2, z = 3.
6. Solve the equation by Gauss Jordan method :
2 x1 x 2 4 x3 4
x1 3x 2 x3 5
3x1 2 x 2 2 x3 1
Sol. The augmented matrix is
2 1 4 4
[A,B] = 1 3 1 5
3 2 2 1
1 1 / 2 2 2
= 1 3 1 5
3 2 2 1
1 1 / 2 2 2
= 0 7 / 2 3 7 R2 R2 R1
R R 3R
0 7 / 2 4 7 3 3 1
1 1 / 2 2 2
= 0 1 6 / 7 2
0 7 / 2 4 7
1 0 11 / 7 1
= 0 1 6 / 7 2 R1 R1 1 / 2 R2
R R 7 / 2R
0 0 1 0 3 3 2
1 0 11 / 7 1
= 0 1 6 / 7 2
0 0 1 0
ww =
1 0 0 1 R R 11 / 7 R
0 1 0 2 1
1
R R 6 / 7R
0 0 1 0 2 2 3
3
w.E
Hence the solution is
x1 1, x2 2, x3 0.
asy 2 2 3
En
7. Find the inverse of 2 1 1 using Gauss Jordan method.
2 2 3 1 0 0
1 3 5
gin
Sol. AI = 2 1 1 0 1 0 eer
1 3 5 0 0 1
1 1 3 / 2 1 / 2 0 0 ing
= 2 1 1 0 1 0
1 3 5 0 0 1 .ne
1 1 3 / 2 1 / 2 0 0 R R 2 R
= 0 1 2 1 1 0
2 2
R R3 R1
1
t
0 2 7 / 2 1 / 2 0 1 3
1 1 3 / 2 1 / 2 0 0
= 0 1 2 1 1 0
0 2 7 / 2 1 / 2 0 1
1 0 1 / 2 1 / 2 1 0 R R R
= 0 1 2 1 1 0
1 1 2
R R3 2R2
0 0 1 / 2 5 / 2 2 1 3
1 0 1 / 2 1 / 2 1 0
= 0 1 2 1 1 0
0 0 1 5 4 2
1 0 0 2 1 1 R R 1 / 2 R
= 0 1 0 9 7 4
1 1 3
R R2 2 R3
0 0 1 5 4 2 2
= IA-1
2 1 1
A -1
= 9 7
4
5 4 2
2 0 1
8. Find the inverse of 3 2 5 using Gauss Jordan method.
1 1 0
2 0 1 1 0 0
Sol. AI = 3 2 5 0 1 0
1 1 0 0 0 1
1 0 1 / 2 1 / 2 0 0
= 3 2 5 0 1 0
1 1 0 0 0 1
1 0 1 / 2 1 / 2 0 0 R R 3R
= 0 2 7 / 2 3 / 2 1 0
2 2 1
R3 R3 R1
0 1 1 / 2 1 / 2 0 1
ww 1 0 1 / 2
0 1 7 / 4
1/ 2 0 0
3 / 4 1 / 2 0
=
w.E
0 1 1 / 2
1 0 1 / 2
1 / 2 0 1
1/ 2 0 0
= 0 1 7 / 4
asy
3 / 4 1 / 2 0
R R3 R2
0 0 5 / 4
1 0 1 / 2 1/ 2 0En
5 / 4 1 / 2 1 3
0
= 0 1 7 / 4
0 0 1
3 / 4 1 / 2
1 2 / 5 4 / 5
gin
0
1 0 0
0 1 0
1 1 / 5 2 / 5 eer
1 1 / 5 7 / 5 R1 R1 1 / 2 R3
=
0 0 1
1 2 / 5
R R 7 / 4R
4 / 5 2 2 3
ing
= IA -1
1 1 / 5 2 / 5
.ne
A-1 = 1 1 / 5 7 / 5
1 2 / 5
4 / 5
t
9. Solve by Gauss Siedel method
x y 54 z 110
27 x 6 y z 85
6 x 15 y 2 z 72
Sol. As the coefficient matrix is not diagonally dominant, rewrite the
27 x 6 y z 85
equations as 6 x 15 y 2 z 72
x y 54 z 110
27 6 1
Here the coefficient matrix 6 15 2 is diagonally dominant,
1 1 54
since |27| >|6| + |–1| , |15| > |6|+|2| , |54| > |1|+|1|.
w.E
put y 3.5408, z 1.9132 in the equation (1), we get
x
1
[85 6(3.5408) 1.9132] 2.4322
27
asy
put x 2.4322, z 1.9132 in the equation (2), we get
y
1
15 En
[72 6(2.4322) 2(1.9132)] 3.5720
gin
put x 2.4322, y 3.5720 in the equation (3), we get
1
z [110 2.4322 3.5720] 1.9258
54 eer
rd
3 iteration
put y 3.5720, z 1.9258 in the equation (1), we get ing
x
1
[85 6(3.5720) 1.9258] 2.4257 .ne
y
27
put x 2.4257, z 1.9258 in the equation (2), we get
1
[72 6(2.4257) 2(1.9258)] 3.5729
t
15
put x 2.4257, y 3.5729 in the equation (3), we get
1
z [110 2.4257 3.5729] 1.9260
54
4th iteration
put y 3.5729, z 1.9260 in the equation (1), we get
1
x [85 6(3.5729) 1.9260] 2.4255
27
put x 2.4255, z 1.9260 in the equation (2), we get
1
y [72 6(2.4255) 2(1.9260)] 3.5730
15
put x 2.4255, y 3.5730 in the equation (3), we get
1
z [110 2.4255 3.5730] 1.9260
54
5th iteration
put y 3.5730, z 1.9260 in the equation (1), we get
1
x [85 6(3.5730) 1.9260] 2.4255
27
put x 2.4255, z 1.9260 in the equation (2), we get
1
y [72 6(2.4255) 2(1.9260)] 3.5730
15
put x 2.4255, y 3.5730 in the equation (3), we get
1
z [110 2.4255 3.5730] 1.9260
54
Hence the required solution is x 2.4255, y 3.5730, z 1.9260
w.E
Sol. Here the coefficient matrix
2 3 10
is diagonally dominant,
asy
since |10| >|2| + |1| , |10| > |1|+|–1| , |10| > |–2|+|3|.
Solving for x, y, z we have
1
En
x (9 2 y z ) (1)
10
1
y (22 x z ) (2)
10 gin
1
z (22 2 x 3 y) (3) eer
10
1st iteration ing
put y z 0 in the equation (1), we get
x
1
(9 0 0) 0.9
.ne
10
put x 0.9, z 0 in the equation (2), we get
1
t
y [22 0.9 0] 2.29
10
put x 0.9, y 2.29 in the equation (3), we get
1
z [22 2(0.9) 3(2.29)] 3.067
10
2nd iteration
put y 2.29, z 3.067 in the equation (1), we get
1
x [9 2(2.29) 3.067] 1.0513
10
put x 1.0513, z 3.067 in the equation (2), we get
1
y [22 1.0513 3.067] 1.9984
10
put x 1.0513, y 1.9984 in the equation (3), we get
1
z [22 2(1.0513) 3(1.9984)] 3.0098
10
3rd iteration
put y 1.9984, z 3.0098 in the equation (1), we get
1
x [9 2(1.9984) 3.0098] 0.9987
10
put x 0.9987, z 3.0098 in the equation (2), we get
1
y [22 0.9987 3.0098] 1.9989
10
put x 0.9987, y 1.9989 in the equation (3), we get
1
z [22 2(0.9987) 3(1.9989)] 2.9994
10
4th iteration
put y 1.9989, z 2.9994 in the equation (1), we get
1
x [9 2(1.9989) 2.9994] 0.9998
10
put x 0.9998, z 2.9994 in the equation (2), we get
1
ww 1
AX8 = 4
6
3 2 0.2957
5 1
3.0707
6.9992
0.2958
4 1 0.0750 = 0.4828 = 6.9992 0.0690
1
1
AX9 = 4
w.E 3
3 2 0.2958
2.0888 0.2992
4 1 0.0690 = 0.4592 = 6.9818 0.0658
6 3 5 1 asy
6.9818 1
AX10 = 4
1 3 2 0.2992
2.1018
En 0.3006
4 1 0.0658 = 0.46 = 6.9926 0.0658
6 3
3
5 1 6.9926 1
gin
AX11 = 4
1 2
4 1
0.3006
0.0658
=
2.1032
0.4656
= eer
0.3004
7.0010 0.0665
6
1
3 5
3 2
1
0.3004
7.0010
2.1009
1
0. 3 ing
AX12 = 4
6
4 1
5
0.0665
1
= 0.4676
7.0019
= 7.0019 0.0668
1
.ne
AX13 = 4
1
3
3
4
2
1
0. 3
0.0668
=
2.0996
0.4672
=
0.2999
7.0004 0.0667
t
6 3 5 1 7.0004 1
Dominant eigen value = 7.0004
and corresponding eigen vector = (0.2999, 0.0667, 1)
12. Find the dominant eigen value and the corresponding eigen vector of
1 6 1
A= 1 2 0 by power method. Find also the least latent root (smallest
0 0 3
eigen value) and hence the third eigen value.
1
Sol. Let X1 = 0 be an arbitrary initial eigen vector.
0
1 6 1 1 1 1
AX1 = 1 2 0 0 = 1 = 1 1 = 1.X
2
0 0 3 0 0 0
1 6 1 1 7 1
AX2 = 1 2 0 1 = 3.0002 = 7 0.4286
0 0 3 0 0 0
1 6 1 1 3.5716 1
AX3 = 1 2 0 0.4286 = 1.8573 = 3.5716 0.52
0 0 3 0 0 0
1 6 1 1 4.12 1
AX4 = 1 2 0 0.52 = 2.0398 = 4.12 0.4951
0 0 3 0 0 0
1 6 1 1 3.9706 1
AX5 = 1 2 0 0.4951 = 1.9901 = 3.9706 0.5012
0 0 3 0 0 0
ww 1 6 1 1 4.0072
AX6 = 1 2 0 0.5012 = 2.0024
0 0 3 0 0
1
= 4.0072 0.4997
0
AX7 =
w.E
1 6 1 1
1 2 0 0.4997 =
3.9982
1.9994
1
= 3.9982 0.5001
asy
0 0 3 0
0
0
AX8 =
1 6 1 1
1 2 0 0.5001 =
En
4.0006
2.0002
1
= 4.0006 0.5
0 0 3 0 0
Dominant eigen value = 4.0006 4 gin 0
25 1 2
13. Find the numerically largest eigen value of A = 1 3 0 by power
2 0 4
method and the corresponding eigen vector.
1
Sol. Let X1 = 0 be an arbitrary initial eigen vector.
0
25 1 2 1 25 1
AX1 = 1 3 0 0 = 1 = 25 0.04 = 25X2
ww 2 0 4 0
25 1 2 1
2
25.2
0.08
1
w.E
AX2 = 1 3 0 0.04 = 1.12 = 25.2 0.0444
2 0 4 0.08
1.68 0.0667
AX3 =
25
1
1
asy
2 1
3 0 0.0444 =
25.1778
1.1332
=
1
25.1778 0.0450
2 0 4 0.0667
En 1.7332 0.0688
AX4 =
25
1
1 2
3 0
1
0.0450 =
gin
25.1826
1.135
=
1
25.1826 0.0451
2
25
0 4
1 2
0.0688
1
1.7248
25.1821 eer 0.0685
1
AX5 = 1
2
3 0
0 4
0.0451 =
0.0685
1.1353
1.726
=
ing
25.1821 0.0451
0.0685
Largest eigen value = 25.1821 .ne
and corresponding eigen vector = (1, 0.0451, 0.0685)
1 2 3
t
14. Find the largest eigen value and eigen vector of the matrix 0 4 2 by
0 0 7
power method.
1
Sol. Let X1 = 1 be an arbitrary initial eigen vector.
1
1 2 3 1 6 0.8571
AX1 = 0 4 2 1 = 2 = 7 0.2857 = 7X2
0 0 7 1 7 1
1 2 3 0.8571 3.2857 0.4694
AX2 = 0 4 2 0.2857 = 3.1428 = 7 0.4490
0 0 7 1 7 1
ww AX8 =
1 2 3 0.5671
0 4 2 0.1655
0 0 7 1
=
3.8981
1.338
7
=
0.5569
7 0.1911
1
AX9 =
w.E
1 2 3 0.5569
0 4 2 0.1911 =
3.9391
1.2356
0.5627
= 7 0.1765
asy
0 0 7 1
7
1
AX10 =
1 2 3 0.5627
0 4 2 0.1765
= En
3.8927
1.294
0.5561
= 7 0.1849
0 0 7 1 7
gin 1
AX11 =
1 2 3 0.5561
0 4 2 0.1849
=
3.9259
1.2604
eer
0.5608
= 7 0.1801
0 0 7 1
1 2 3 0.5608
7
3.921
1
0.5601 ing
AX12 = 0 4 2 0.1801
0 0 7 1
= 1.2796
7
= 7 0.1828
1
.ne
AX13 =
1 2 3 0.5601
0 4 2 0.1828
=
3.9257
1.2688
=
0.5608
7 0.1813
t
0 0 7 1 7 1
1 2 3 0.5608 3.9234 0.5605
AX14 = 0 4 2 0.1813 = 1.2748 = 7 0.1821
0 0 7 1 7 1
1 2 3 0.5605 3.9247 0.5607
AX15 = 0 4 2 0.1821 = 1.2716 = 7 0.1817
0 0 7 1 7 1
1 2 3 0.5607 3.9241 0.5606
AX16 = 0 4 2 0.1817 = 1.2732 = 7 0.1819
0 0 7 1 7 1
1 2 3 0.5606 3.9244 0.5606
AX17 = 0 4 2 0.1819 = 1.2724 = 7 0.1818
0 0 7 1 7 1
Hence Largest eigen value = 7 and eigen vector = ( 0.5606, 0.1818, 1 )
3 1 2 6
= 8 5 3 4 12
3 3 2 2 6
1 1 1 1 2
0 1 3 2 2 R 2 R 2 4 R1
R R 8R
ww = 0 3 5 4 4 3
0 0 1 1 0 4
3
R R 4 3R1
1
w.E 1 1 1 1
0 1 3 2
2
2
=
asy
0 3 5 4 4
1 1 0
0 0
1 0 2 En
1 0 R1 R1 R 2
=
0
1 3 2 2 gin
0
0
0 4 2 2 R 3 R 3 3R 2
0 1 1 0
eer
1
0
0 2
1 3
1 0
2
ing
=
0
2
0 1 1 / 2 1 / 2 .ne
0
1
0 1
0 0
1
0
0
1 R 1 R1 2 R3
t
0 1 0 1/ 2 1 / 2 R 2 R 2 3R3
=
0 0 1 1 / 2 1 / 2
0 0 0 1 / 2 1 / 2 R 4 R 4 R3
1 0 0 0 1
0 1 0 1/ 2 1 / 2
=
0 0 1 1 / 2 1 / 2
0 0 0 1 1
1 0 0 0 1
0 1 0 0 1
= R 2 R2 1 / 2 R4
0 0 1 0 1
R R3 1 / 2 R 4
0 0 0 1 1 3
x1 1, x2 1, x3 1, x4 1.
method.
Sol. Let f ( x) x 4 sin x
2
asy
The 2 approximation is
x2 x1
( x1 )
1.9344
(1.9344)
En
( x1 ) (1.9344)
gin
1.9344
(0.0034)
5.2914
1.9344 0.0036 eer
rd
1.9338 ing
The 3 approximation is
x3 x2
( x2 )
1.9338
(1.9338) .ne
( x2 ) (1.9338)
(0.0002)
t
1.9338
5.2879
1.9338 0.00003
1.9338
Hence the positive real root for ( x) 0 is 1.9338
The required negative root of the given equation f(x) = 0 is
–1.9338
18. Solve by Gauss Seidel iteration the given system of equations starting with
(0,0,0,0) as solution. Do 5 iterations only
4 x1 x 2 x3 2, x1 4 x 2 x 4 2, x1 4 x3 x 4 1, x 2 x3 4 x 4 1
4 1 1 0
1 4 0 1
Sol. Here the coefficient matrix is diagonally dominant.
1 0 4 1
0 1 1 4
Solving for x1, x2, x3, x4 we have
1
x1 (2 x2 x3 ) (1)
4
1
x2 (2 x1 x4 ) (2)
4
1
x3 (1 x1 x4 ) (3)
4
1
x4 (1 x2 x3 ) (4)
4
1st iteration
put x 2 x3 x 4 0 in the equation (1), we get
ww x1
1
4
(2 0 0) 0.5
w.E
put x1 0.5, x3 x4 0 in the equation (2), we get
1
4 asy
x 2 (2 0.5 0) 0.625
3rd iteration
x1 0.84375, x2 0.85938, x3 0.60938, x4 0.61719
4th iteration
x1 0.86719, x2 0.87110, x3 0.62110, x4 0.62305
5th iteration
x1 0.87305, x2 0.87402, x3 0.62402, x4 0.62451
5 4 3
19. Find the numerically largest eigen value of A = 10 8 6 by power
20 4 22
1
method with the initial eigen vector X0 = 1 .
1
Sol. Eigen value = 25
Eigen vector = ( 0.25, 0.5, 1 )
ww
20. Find the numerically largest eigen value of A =
1 3 2
4 4 1
by power
w.E 1
1 .
6 3 5
asy
method with the initial eigen vector X0 =
1
Sol. Eigen value = 7
En
Eigen vector = ( , , )
gin
21. Solve by Gauss Elimination method
eer
x1 x 2 10 x3 35.61, 10 x1 x 2 x3 11.19, x1 10 x 2 x3 20.08
Sol. The required solution is
ing
x1 = 1.3217, x2 = 1.5147, x3 = 3.5417
.ne
22. Using Jacobi’s method find eigen values and eigen vectors of
1
2 2
t
A 2 3 2
2 2 1
Sol. Here the largest non-diagonal element is a13 = a31 = 2
Since a11 = a33 = 1, we have
4
1 1
cos 0 sin 0
2 2
P1 0 1 0
0 1 0
1 1
sin 0 cos 0
2 2
The first transformation gives
1 1 1 1
2 0 1 2 0
2 2
2
2
D1 P1 AP1 0 0 0
1
1 2 3 2 0 1
1 1 1 1
0 2 2 1 0
2 2 2 2
1 1 3 1
2 0 2 2
2
2
0 1 0 2 3 0
1 1 3 1
0 2
2 2 2 2
3 2 0
2 3 0
0 0 1
Now the largest non-diagonal element is a12 = a21 = 2
ww Since a11 = a22 = 3, we have
1 1
4
w.E
cos
P2 sin
sin
cos
0
0
1
2
1
2
0
0
0 asy
0
1 0
2
0
2
1
En
The second transformation gives
1 1
gin 1 1
2
1
2
0
3 2 0 1
2
eer
2
0
1
D2 P2 D1 P2
2
1
2
0 2 3 0
2
1 0 0 1 0
ing 1
2
0
0
0
0
.ne
1
1
2
1
2
5
0
2
1
2
0
t
1 1 5 1
0 0
2 2 2 2
0 0 1 0 0 1
5 0 0
0 1 0
0 0 1
The eigen values are 5, 1, 1.
The matrix of the vectors is P = P1 P2
1 1
1 1 0
0
2
2 2
2
P 0
1 1
0 1 0
1 1 2 2
0 0 0 1
2 2
1 1 1
2 2 2
1 1
0
2 2
1 1 1
2 2 2
The corresponding eigen vectors are
1 1
2 1
2 2
ww
1
2
, , 0
1
2 1
w.E
1
2
1
2
2
asy
23. Find the eigen values and eigen vectors of
2
using Jacobi’s
2
En 2 1
method.
gin
Sol. Here the largest non-diagonal element is a12 = a21 = 2
1
tan 1
2a 12 1
tan 1
a11 a22 2
2 2
2 1 2
1
eer
1
tan 0.4636
3
4
2
2 1 0
24. Find all eigen values of 1 2 1 by Jacobi’s method (Apply only 3
0 1 2
iterations).
Sol. Here the largest non-diagonal element is a12 = a21 = 1
Since a11 = a22 = 2, we have
4
1 1
0
cos sin 0 2 2
P1 sin 0
1 1
cos 0
2 2
0 0 1 0 0 1
The first transformation gives
1 1 1 1
ww 1
2
1 1
2
0
2 1 0
1 2 1
1
2
1
2
0
w.E
D1 P1 AP1
0
2
0
2
0
1
0 1 2
0
2
0
2
0
1
asy
1
1
2
1 En
1
2
0
2
1
3
2
0
2
1
2
0
gin
2
3
2
1
0 0 1
1
2 eer
1
2
1
2
ing
1
0
2
1 .ne
0
1
3
1
2
2
t
2 2
1
Now the largest non-diagonal element is a13 = a31 =
2
2a 2/ 2
tan 1 2 0.4777
1 1 1
tan 1 13
tan 1
2 a11 a33 2 1 2 2
cos 0 sin cos 0.4777 0 sin 0.4777
P2 0 1 0 0 1 0
sin 0 cos sin 0.4777 0 cos 0.4777
0.8881 0 0.4597
0 1 0
0.4597 0 0.8881
The second transformation gives
1
1 0
0.8881 0 0.4597 2 0.8881 0 0.4597
1
D2 P2 D1P2 0 0
1
1 0
0 3
1 0
0.4597 0 0.8881 2 0.4597 0 0.8881
1 1
2
2
2
0.8881 0.563
0 0.4597 0 1.0877
0.3251 0.628
0 1 0
3
0.4597 0.2914 0.7071 2.1063
0 0.8881
0.5 0.3251 0
0.3251 3 0.628
0 0.628 2.3662
Now the largest non-diagonal element is a23 = a32 = 0.628
2 a23 1 2 0.628 1
tan 1
1
tan 1 tan 1.9817 0.5517
1
asy 1 0 0
0 0.8516 0.5241
En
0 0.5241 0.8516
The third transformation gives gin
D3 P3
1
D2 P3
eer
1
0
0 0 0.5
0.8516 0.5241 0.3251
0.3251
3
1
0
ing 0 0
0.628 0 0.8516 0.5241
0 0.5241 0.8516 0
.ne
0.628 2.3662 0 0.5241 0.8516
1
0
0
0 0 0.5
0.8516 0.5241 0.3251
0.5241 0.8516 0
0.2769 0.1704
2.8839 1.0375
1.7749 1.6859
t
0.5 0.2769 0.1704
0.2769 3.3862 0
0.1704 0 1.9795
The eigen values are 0.5, 3.3862, 1.9795
3. ww
What is the relation between the shift operator E and the backward
difference operator ?
w.E
Sol. = 1 – E-1
4.
asy
The third difference of a polynomial of degree four are zero. Say
True or False.
Sol. False. En
5. gin
What will be the first difference of a polynomial of degree 4?
Sol. We get a polynomial of degree 3.
eer
6. +E
-1
= ________
Sol. +E-1 = 1–E-1+E-1 = 1. ing
7. Given u0 1, u1 11, u2 21, u3 28, u4 29 .Find u0 .
4
.ne
Sol.
x
0
y = ux
1
ux
2
ux
3
ux
4
ux t
10
1 11 0
10 –3
2 21 –3 0
7 –3
3 28 –6
1
4 29
Hence 4u0 = 0.
8. If u1 1, u3 17 , u4 43, u5 89 . Find the value of u2.
Sol. Let the missing term be y1.
2 3 4
x y = ux ux ux ux ux
1 1
y1–1
2 y1 –2y1+18
17–y1 3y1–61
3 17 y1-43 –4y1+124
26 –y1+63
4 43 20
46
5 89
By assumption, we have
– 4y1+124 = 0
y1 = 31.
where u
x xn
asy
h
En
This formula is used mainly for interpolating the values of y near the
end of a set of tabular values.
gin
11. ee
Say True or False. – Newton’s divided difference formula is
applicable only for equally spaced intervals.
rin
Sol. False.
g.n
12. State Newton’s divided difference formula.
et
Sol. y y0 ( x x0 )y0 ( x x0 )( x x1 ) y0 ( x x0 )( x x1 )( x x2 ) y0 +
2 3
( x x 0 )( x x1 )( x x 2 )( x x 3 ).......( x x n 1 )
yn
( x n x 0 )( x n x1 )( x n x 2 )( x n x 3 ).......( x n x n 1 )
17.
asy
Lagrange’s interpolation formula is merely a ______ of Newton’s
divided difference interpolation formula.
Sol. Variant. En
18. gin
What is the difference between Newton divided difference Formula and
Lagrange’s formula.
ee rin
Sol. Lagrange’s formula is merely a variant of Newton divided difference
formula.
g.n
19. What is inverse interpolation?
et
Sol. It is the process of finding the values of x corresponding to a value of y,
not present in the table.
20. What is the Lagrange’s formula to find y if three sets of values (x0,y0),
(x1,y1), (x2,y2) are given?
( x x1 )( x x2 ) ( x x 0 )( x x 2 )
Sol. y f ( x ) y y1
( x0 x1 )( x0 x2 )
0
( x 1 x 0 )( x1 x 2 )
( x x 0 )( x x1 )
y2
( x 2 x 0 )( x 2 x1 )
( y y1 )( y y 2 )( y y 3 ).......( y y n )
Sol. x f ( y) x0
( y 0 y1 )( y 0 y 2 )( y 0 y 3 ).......( y 0 y n )
( y y0 )( y y2 )( y y3 ).......( y yn )
+ ( y y )( y y )( y y ).......( y y ) x1
1 0 1 2 1 3 1 n
( y y0 )( y y1 )( y y3 ).......( y yn )
+ ( y y )( y y )( y y ).......( y y ) x2
2 0 2 1 2 3 2 n
+……………………………….+
( y y 0 )( y y1 )( y y 2 )( y y 3 ).......( y y n 1 )
xn
( y n y 0 )( y n y1 )( y n y 2 )( y n y 3 ).......( y n y n 1 )
asy ( x x0 )( x x1 )
( x 2 x0 )( x 2 x1 )
y2
y f ( x) En
( x 1)( x 2)
.0
( x 0)( x 2)
.1
( x 0)( x 1)
gin
(0 1)( 0 2) (1 0)(1 2)
y x( x 2) 8x( x 1)
(2 0)( 2 1)
.16
ww y 3 ( x / 2)(8)
h 2 2
( x / 2)( x / 2 1)
(8) 0
w.E
y 3 4 x x( x 2)
2!
y = x2 + 2x – 3.
asy
En
26. Write down the properties of cubic splines.
Sol. i) S(xi) = yi, i = 0,1,2,……n
gin
ii) S(x) is a cubic polynomial in each interval (xi-1, xi).
iii) S ( x0 ) S ( xn ) 0
ee rin
iv) S(x), S’(x), S’’(x) are continuous at each point (xi,yi), i =0,1,2,….n.
Sol. S ( x)
1
6h
( xi x)3 M i 1 ( x xi 1 )3 M i
xi x h2 x xi 1 h2
yi 1 M i 1 yi M i
h 6 h 6
29. Write down the relation in the cubic spline to find the quantities Mi
where the interval n is equally spaced.
M i 1 4M i M i 1 2 yi 1 2 yi yi 1 , where i= 1,2,3,…….(n – 1).
6
Sol.
h
30. Test whether the following functions are cubic splines or not
P1 ( x) x 2 x 1,1 x 2
P2 ( x) 3x 3,2 x 3.
Sol.
P1 (2) 3 P2 (2)
P1 (2) 3 P2 (2)
P1 (2) P2 (2)
Hence the given function is not a cubic spline.
31. Show that the divided differences are symmetrical in their arguments.
Sol.
f ( x1 ) f ( x 0 ) f ( x 0 ) f ( x1 )
f ( x 0 , x1 ) f ( x1 , x 0 ).
x1 x 0 x 0 x1
x y = 1/x En y 2 y
a 1/a
gin
–1/ab
1/abc
b
c
1/b
1/c
ee
–1/bc
rin
34. If f(x) = 1/x2, find f(a,b) and f(a,b,c) by using divided differences. g.n
Sol. The divided difference table is
x y = 1/x2 y 2 y
et
a 1/a2
2 – (a+b)/a2b2
b 1/b (ab + bc + ca) / a2b2c2
2 – (b+c)/b2c2
c 1/c
PART – B
1. Using Newton’s Forward Interpolation formula find the polynomial f(x)
satisfying the following data. Hence find f(2).
x: 0 5 10 15
f(x) : 14 379 1444 3584
Sol. Let y = f(x).
The difference table is
x y = f(x) y 2 y 3 y
0 14
365
700
5 379 375
1065
1075
10 1444
2140
15 3584
Newton Forward Interpolation formula is
ww y y 0 uy 0
u (u 1) 2
y0
u (u 1)(u 2) 3
y 0 ............
w.E where u
2!
x x0 x 0 x
3!
y 14
x
(365) asy h 5 5
( x / 5)( x / 5 1)
(700)
( x / 5)( x / 5 1)( x / 5 2)
(375)
5
En 2!
14 73x x( x 5)(14) x( x 5)( x 10).
1
3!
1
g
in
2
1
2 ee
(i.e.) f ( x) x 3 13x 2 56 x 28
x4 1 x 4 x 4
y 1 ( 2) 1(3) 0
2 2! 2 2
3
1 ( x 4) ( x 4)( x 6)
8
8 8 x 32 3( x 2 10 x 24)
8
1 2
8
3 x 22 x 48
1
8
13
y (5) 3(5) 2 22(5) 48 1.625
8
3. Given sin 45 0.7071 , sin 50 0.7660 , sin 55 0.8192 , sin 60 0.8660 Find
0 0 0 0
ww 45 0.7071
0.0589
-0.0057
50
55 w.E
0.7660
0.8192
0.0532
0.0468
-0.0064
-0.0007
60 0.8660 asy
y y 0 uy 0 En
Newton Forward Interpolation formula is
u (u 1) 2
y0
u (u 1)(u 2) 3
y 0 ............
2!
gin
x x 0 52 45 7
3!
where u
h
y 0.7071 (1.4)(0.0589)
5ee 1.4
5
(1.4)(1.4 1)
(0.0057) rin
2!
(1.4)(1.4 1)(1.4 2) g.n
y = 0.7880
3!
(0.0007)
et
(i.e.) sin 520 = 0.7880
u (u 1) 2 u (u 1)(u 2) 3
y y n uy n yn y n ............
2! 3!
x x n 0.38 0.4
where u 0.2
h 0.1
(0.2)(0.2 1)
y 1.4918 (0.2)(0.1419) (0.0134)
2!
(0.2)(0.2 1)(0.2 2)
(0.0011)
3!
(0.2)(0.2 1)(0.2 2)(0.2 3)
(0.0002)
4!
y = 1.4623
w.E
Find the pressure at temperature t = 1750.
Sol. To find the pressure f(t) at temperature t = 1750 , we use Newton’s Backward
formula.
The difference table isasy
y = f(t)
En
f (t ) 2 f (t ) 3 f (t ) 4 f (t )
t
140 3.685 gin
150 4.854
160 6.302
1.169
1.448
ee
0.279
0.047
0.002 rin
170 8.076
1.774
0.326
0.375
0.049
g.n
180 10.225
2.149
et
Newton Backward Interpolation formula is
u (u 1) 2 u (u 1)(u 2) 3
y y n uy n yn y n ............
2! 3!
x x n 175 180
where u 0.5
h 10
(0.5)(0.5 1)
y 10.225 (0.5)(2.149) (0.375)
2!
(0.5)(0.5 1)(0.5 2)
(0.049)
3!
(0.5)(0.5 1)(0.5 2)(0.5 3)
(0.002)
4!
y = 9.1005
6. From the following data, estimate the number of persons earning weekly
wages between 60 and 70 rupees.
Wage Below 40 40 – 60 60 – 80 80 – 100 100 – 120
(in Rs.)
No. of person 250 120 100 70 50
(in thousands)
Sol. The difference table is
Wage No. of persons y 2 y 3 y 4 y
x y
Below 40 250
120
Below 60 370
-20
100 -10
Below 80 470 20
-30
70 10
Below 100 540
-20
50
Below 120 590
ww
Let us calculate the number of persons whose weekly wages below 70.
So we will use Newton’s forward formula.
w.E
Newton Forward Interpolation formula is
u (u 1) 2 u (u 1)(u 2) 3
y y 0 uy 0
asy
2!
y0
x x0 70 40
3!
y 0 ............
where u
Enh
20
1.5
y = 423.59 424.
Number of person whose weekly wages below 70 = 424 g.n
Number of person whose weekly wages below 60 = 370
Number of persons whoseweekly
et
424 370 54 thousands.
wagesbetween Rs.60 and Rs.70
ee
( x0 x1 )( x0 x2 )( x0 x3 )
( x x0 )(x x 2 )(x x3 )
y1 rin
( x1 x0 )(x1 x 2 )(x1 x3 )
( x x0 )( x x1 )(x x3 )
g.n
( x 2 x0 )( x 2 x1 )( x 2 x3 )
y2
et
( x x0 )(x x1 )(x x 2 )
y3
( x3 x0 )(x3 x1 )(x3 x 2 )
Here x = 2000
(2000 1999 )( 2000 2001 )( 2000 2002 )
y f ( x) (1997 1999 )(1997 2001 )(1997 2002 )
43
w.E
( x x0 )( x x1 )(x x3 )
( x 2 x0 )( x 2 x1 )( x 2 x3 )
y2
asy
( x x0 )(x x1 )(x x 2 )
( x3 x0 )(x3 x1 )(x3 x 2 )
y3
En
Given x = 27
y f ( x) gin
(27 17 )( 27 31)( 27 35 )
68 .7
ee
(14 17 )(14 31)(14 35 )
(27 14)(27 31)(27 35)
64 rin
(17 14)(17 31)(17 35)
(27 14)(27 17)(27 35) g.n
(31 14)(31 17)(31 35)
(27 14)(27 17)(27 31)
44
et
39.1
(35 14)(35 17)(35 31)
(10 )( 4)( 8) (13)( 4)( 8)
y f ( x) 68 .7 64
(3)( 17 )( 21) (3)( 14 )( 18 )
(13)(10 )( 8) (13)(10 )( 4)
44 39 .1
(17 )(14 )( 4) (21)(18 )( 4)
f(x) = –20.5266 + 35.2169 + 48.0672 – 13.4471
(i.e.) f(x) = 49.3104
asy
(3 1)(3 0)(3 2)
(12)
y
2 1 En 1
x( x 2 5 x 6) ( x 1)(x 2 5 x 6) x( x 2 2 x 3)
3 2
gin 6
x( x 2 x 2)
1 ee
y [(4 x3 20 x 2 24 x) (3x3 12 x 2 3x 18)
6 rin
( x3 2 x 2 3x) (6 x3 6 x 2 12 x)] g.n
1
y (12 x 3 36 x 2 18 x 18 )
6
et
y 2 x 3 6 x 2 3 x 3.
11. Given log10 654 2.8156 , log 10 658 2.8182 , log 10 659 2.8189 ,
log 10 661 2.8202 . Find log 10 656 by using Lagrange’s formula.
Sol. Let y = log 10 x
The following data is
x : 654 658 659 661
log 10 x : 2.8156 2.8182 2.8189 2.8202
Here x = 656.
y
(2)( 3)( 5)
(4)( 5)( 7)
2.8156 En
(2)( 3)( 5)
(4)( 1)( 3)
2.8182
(2)( 2)( 5)
2.8189
gin
(2)( 2)( 3)
(5)(1)( 2) ee
(7)(3)( 2)
y = 0.6033 + 7.0455 – 5.6378 + 0.8058
2.8202
rin
y = 2.8168
(i.e.) log 10 656 = 2.8168 g.n
12. Find the polynomial f(x) by using Lagrange’s formula and hence find f(3)
et
for
x: 0 1 2 5
f(x) : 2 3 12 147
Sol. Lagrange’s interpolation formula is
( x x1 )( x x2 )( x x3 )
y f ( x) y0
( x0 x1 )( x0 x2 )( x0 x3 )
( x x0 )(x x 2 )(x x3 )
y1
( x1 x0 )(x1 x 2 )(x1 x3 )
( x x0 )( x x1 )(x x3 )
y2
( x 2 x0 )( x 2 x1 )( x 2 x3 )
( x x0 )(x x1 )(x x 2 )
y3
( x3 x0 )(x3 x1 )(x3 x 2 )
( x 1)( x 2)( x 5)
y f ( x) (2)
(0 1)( 0 2)( 0 5)
( x 0)( x 2)( x 5)
(3)
(1 0)(1 2)(1 5)
( x 0)( x 1)( x 5)
(12)
(2 0)(2 1)(2 5)
( x 0)( x 1)( x 2)
(147)
(5 0)(5 1)(5 2)
1 3
y ( x 1)(x 2 7 x 10) x( x 2 7 x 10) 2 x( x 2 6 x 5)
5 4
49
x( x 2 3x 2)
20
ww 1
y [(4 x 3 32x 2 68x 40) (15x 3 105x 2 150x)
20
w.E
(40 x 3 240 x 2 200 x) (49 x 3 147 x 2 98 x)]
y
1
20 asy
(20 x 3 20 x 2 20 x 40 )
y x 3 x 2 x 2. En
Now, f(3) = 33 + 32 – 3 + 2
gin
(i.e.) f(3) = 35. ee rin
13. Using Lagrange’s formula, Prove that
y0
1 1 1
( y1 y 1 ) y 3 y 1 y1 y3
1
g .ne
2
Sol. The following data is
8 2 2
t
x: 1 –1 –3 3
y : y1 y 1 y 3 y3
Here x = 0.
Lagrange’s interpolation formula is
( x x1 )( x x 2 )( x x3 )
y x f ( x) y0
( x0 x1 )( x0 x 2 )( x0 x3 )
( x x0 )(x x 2 )(x x3 )
y1
( x1 x0 )(x1 x 2 )(x1 x3 )
( x x0 )( x x1 )(x x3 )
y2
( x 2 x0 )( x 2 x1 )( x 2 x3 )
( x x0 )(x x1 )(x x 2 )
y3
( x3 x0 )(x3 x1 )(x3 x 2 )
Given x = 0
(0 1)( 0 3)( 0 3) (0 1)( 0 3)( 0 3)
y0 (1 1)(1 3)(1 3) y1 (1 1)( 1 3)( 1 3) y1
(0 1)( 0 1)( 0 3) (0 1)( 0 1)( 0 3)
y 3 y3
(3 1)( 3 1)( 3 3) (3 1)(3 1)(3 3)
9 9 1 1
y0 y1 y 1 y 3 y 3
16 16 16 16
1 1 1 1 1 1
y 0 y1 y 1 y 3 y 3
2 16 2 16 16 16
y0
1
y1 y 1 1 1 y 3 y 1 1 y1 y3
2 8 2 2
14. Applying Lagrange’s formula to find the roots of the equation f(x) = 0 when
f(30) = –30, f(34) = –13, f(38) = 3, f(42) = 18.
ww
Sol. To find x [ (i.e.) the roots of the equation f(x) = 0], we have to use Lagrange’s
w.E
inverse interpolation formula.
The following data is
x : 30 34
asy
f(x) : –30 –13
38 42
3 18
En
Lagrange’s inverse interpolation formula is
( y y1 )( y y 2 )( y y 3 )
x f ( y)
gin
( y 0 y1 )( y 0 y 2 )( y 0 y 3 )
x0
ee
( y y 0 )( y y 2 )( y y3 )
( y1 y 0 )( y1 y 2 )( y1 y3 )
x1
rin
( y y 0 )( y y1 )( y y3 )
( y 2 y 0 )( y 2 y1 )( y 2 y3 )
x2 g.n
( y y 0 )( y y1 )( y y 2 )
x3
et
( y3 y 0 )( y3 y1 )( y3 y 2 )
x (30(01313)()(0303)(3)(03018) 18) 30
(0 30)(0 3)(0 18)
34
(13 30)(13 3)(13 18)
(0 30)(0 13)(0 18)
38
(3 30)(3 13)(3 18)
(0 30)(0 13)(0 3)
42
(18 30)(18 13)(18 3)
x = 37.2304
x y = u(x) y 2 y 3 y
1 –26
38
28
2 12 3
122
43
ww 4
6
256
844
294
w.E
Newton divided difference formula is
asy
y y0 ( x x0 )y0 ( x x0 )( x x1 )2 y0
En
( x x0 )( x x1 )( x x2 )3 y0 + …………….
Here x = 3
gin
y = –26 + (3 –1).(38) + (3 –1)(3 – 2)(28) + (3 –1)(3 – 2)(3 – 4)(3)
= – 26 + 76 + 56 – 6
= 132 – 32 ee rin
= 100
(i.e.) u(3) = 100. g.n
16. Using Newton divided difference method find f(1.5) using the data
f(1.0) = 0.7651977, f(1.3) = 0.6200860, f(1.6) = 0.4554022,
et
f(1.9) = 0.2818186, f(2.2) = 0.1103623.
Sol. The divided difference table is
x y = f(x) y 2 y 3 y 4 y
1 0.7651977
–0.4837057
1.3 0.6200860
–0.1087338
–0.548946 0.0658783
1.6 0.4554022 0.0018251
–0.0494433
–0.578612 0.0680684
1.9 0.2818186
0.0118183
–0.571521
2.2 0.1103623
w.E
Sol. The divided difference table is
x
0
y = ux
–4
asy y 2 y 3 y 4 y
1 –2 En 2
4 220 gin
74
18
9
1
5 546
326
602
ee 63
138
15
rin
6 1148
g.n
Newton divided difference formula is
y y0 ( x x0 )y0 ( x x0 )( x x1 )2 y0
et
( x x0 )(x x1 )(x x2 )3 y0
( x x0 )(x x1 )(x x2 )(x x3 )4 y0 ................
y 4 ( x 0)(2) ( x 0)(x 1)(18)
( x 0)( x 1)( x 4)(9)
( x 0)( x 1)( x 4)( x 5)(1)
u2 4 (2)( 2) (2)(1)(18) (2)(1)( 2)(9) (2)(1)( 2)( 3)(1)
= – 4 + 4 + 36 – 36 + 12
= 12.
u 3 = – 4 +(3)(2) + (3)(2)(18) + (3)(2)( –1)(9) + (3)(2)( –1)( –2)(1)
= – 4 + 6 + 108 – 54 + 12
= 68.
w.E
xi x
h
i 1
y
h2
6
M
x xi 1
i 1
h
i
y
h2
6
M
i ---(1)
asy
In the interval [1,2], { put i = 1 in (1) } we have
2 x 1 x 1
1
6 En
S ( x) (2 x) 3 .0 ( x 1) 3 (18 )
1
6 ( 0
6
)
1
1
1
6
(18 )
gin
ee
3( x 1)3 6(2 x) 4( x 1)
3( x 3 3 x 2 3x 1) 12 6 x 4 x 4
rin
3x 9 x 11x 11
3 2
g.n
In the interval [2,3], { put i = 2 in (1) } we have et
1
S ( x) (3 x) 3 (18 ) ( x 2) 3 (0)
3 x
1 1
1
(18 ) x 2 16 1 (0)
6 6 1 6
1
asy
In the interval [0,1], { put i = 1 in (1) } we have
S ( x) (1 x) 3 .0 ( x 0) 3 (9)
1 x
1
5
1 x0
( 0
6
) 4
1
(9)
6
En 1 6
3 3
2
11
x 5(1 x) x
2 gin
3
x3 5
2
x
2
ee rin
3 x
S ( x) y ( x) x 3 5 g.n
3
2
(i.e.) y (0.5) (0.5)3
2
0.5
5
et
2 2
= – 5.0625
9 1
S ( x) y( x) x 2
2 2
9 1
(i.e.) y(1) (1)
2 2
= 4.
i 0 1 2 3
xi 1 2 3 4
f(xi) 0.5 0.3333 0.25 0.20
Estimate the value of f(2.5) using cubic spline functions.
4M 1 M 2 0.5004 (1)
and M 1 4M 2 0.1998 (2)
rin
S ( x)
1
(3 x) 3 (0.1201) ( x 2) 3 (0.0199) g.n
6
3 x
0. 3333
1
( 0.1201 )
x2
0.25
1et
( 0.0199 )
1 6 1 6
S (2.5)
1
6
(3 2.5) 3 (0.1201) (2.5 2) 3 (0.0199)
3 2.5 1 2.5 2 1
0.3333 ( 0.1201 ) 0.25 ( 0.0199 )
1 6 1 6
21. From the following table, find the value of tan 45 015’ by Newton’s Forward
Interpolation formula.
x o : 45 46 47 48 49 50
o
tan x : 1 1.03553 1.07237 1.11061 1.15037 1.19175
Sol.
xo y = tan xo y 2 y 3 y 4 y 5 y
45 1
0.03553
46 1.03553
0.00131
0.03684 0.00009
47 1.07237 0.00003
0.00140
0.03824 0.00012 -0.00005
48 1.11061 -0.00002
0.00152
0.03976 0.00010
49 1.15037
0.00162
0.04138
50 1.19175
Newton Forward Interpolation formula is
u (u 1) 2 u (u 1)(u 2) 3
y y 0 uy 0 y0 y 0 ............
2! 3!
x x 0 45 15 45
where u 0.25
1
ww h
y 1 (0.25)(0.03553)
(0.25)(0.25 1)
(0.00131)
w.E
2!
(0.25)(0.25 1)(0.25 2)
(0.00009)
asy 3!
(0.25)(0.25 1)(0.25 2)(0.25 3)
En 4!
(0.00003)
gin
(0.25)(0.25 1)(0.25 2)(0.25 3)(0.25 4)
5!
(0.00005)
x: 3 4 5 6 7 8 9 et
which 23.6 is the sixth term. Find the first and tenth terms of the series.
ww y 73.9 (1)(21.1)
h
(1)(1 1)
1
(4.5)
(1)(1 1)(1 2)
(0.5) 0
w.E
= 73.9 + 21.1 + 4.5 + 0.5
2! 3!
y(10) = 100
asy
2 3 En
23. Find the cubic spline interpolation
x: 1 4 5
f: 1 0 1 0
gin1
rin
6
yi1 2 yi yi1 , i 1,2,3.
M i 1 4M i M i 1
h2
M 0 4M 1 M 2 6( y0 2 y1 y2 )
g.n
M 1 4M 2 M 3 6( y1 2 y 2 y3 ) et
M 2 4M 3 M 4 6( y 2 2 y3 y 4 )
0 4M 1 M 2 6(1 0 1) 12
M 1 4M 2 M 3 6(0 2.1 0) 12
M 2 4M 3 0 6(1 0 1) 12
30 36 30
Solving, we get M1 = , M2 = , M3 =
7 7 7
The cubic spline is
S ( x)
1
6h
( xi x)3 M i 1 ( x xi 1 )3 M i
xi x h2 x xi 1 h2
yi 1 M i 1 yi M i ----(A)
h 6 h 6
ww 1
S ( x) 11x 3 117 x 2 405x 452
7
w.E
In the interval [4,5], { put i = 4 in (A) } we have
1
S ( x) 5 x 3 75x 2 363x 572
asy 7
En
24. Find the sixth term of the sequences 8, 12, 19, 29, 42.
Sol.
x y ygin 2 y 3 y 4 y
0
1
8
12
4 ee 3 rin
2 19
7
3
0
0
g.n
3
4
29
42
10
13
3
0
et
Sixth term = y5 = E5y0 = (1+ )5y0
= y0 + 5 y0 + 10 2y0 + 10 3y0 + ……..
= 8 + 5 (4) + 10(3) + 0 + 0
= 58.
25. Define forward, backward, central differences and divided difference.
Sol. f(x) = f(x+h) – f(x)
f(x) = f(x) – f(x – h)
f(x) = f(x+h) – f(x – h)
f ( x1 ) f ( x0 )
f(x) = x1 x0
u
2!
x xn
yn
3!
yn .................
where
dy dy du
asy
h
.
dx du dx
En
1
y n
h
2u 1 2
2
yn
3u 2 6u 2 3
6
yn
gin
2u 3 9u 2 11u 3 4
12
y n ......
eer
2. Using Newton’s forward and backward difference formula, write the
ing
formula for the first and second derivative at the starting value x = x0
Sol.
and at the end value x = xn upto the fourth order difference term?
.ne
dy
1 1 1 1
y0 2 y0 3 y0 4 y0 .............
dx x x0 h 2 3 4
t
d2y 1 11
2 2 2 y0 3 y0 4 y0 .......................
dx x x0 h 12
dy 1 1 1 1
yn 2 yn 3 yn 4 yn .............
dx x x
n
h 2 3 4
d2y 1 11
2 2 2 yn 3 yn 4 yn .......................
dx x x n h 12
f ( x h) f ( x h)
f ( x)
2h
f (0.8 0.1) f (0.8 0.1)
f (0.8)
2(0.1)
f ( 0 .9 ) f ( 0 .7 )
0 .2
cos(0.9) cos(0.7)
0 .2
0.716
Error = – 0.001
ww
5. When can numerical differentiation be used?
Sol. When the function is given in the form of table of values instead of
w.E
giving analytical expression we use numerical differentiation.
6. asy
If f(x) = ax ( a 0 ) is given for x = 0, 0.5, 1. Show by numerical
differentiation that f (0) 4 a a 3.
En
Sol. For x = 0, 0.5, 1, the values of y = f(x) = ax are a0, a , a1
0.5
gin ( i.e.) 1, a , a
x y = ax yee 2 y
rin
0
0.5
1
a -1 g.n
et
a
a-2 a +1
a a- a
1
dy 1 1 2
f (0) y0 y0 ........
dx x 0 h 2
1 1
a 1 ( a 2 a 1)
0.5 2
a 3
2 2 a
2 2
4 a a 3.
ww x: 0
6
6
2
6
3
6
4
6
5
6
w.E
y=sinx: 0
Trapezoidal rule is
0.5 .8660 1 .8660 0.5 0
0 sin xdx
h
asy
( y0 y n ) 2( y1 y 2 y3 .........y n1
2
En
(0 0) 2(0.5 0.8660 1 0.8660 0.5)
6( 2) gin
0.9770
ee rin
6
11. Write down the Trapezoidal rule to evaluate f ( x)dx with h = 0.5
Sol. Trapezoidal rule is
1
g.n
et
( y0 yn ) 2( y1 y2 y3 .........yn 1
6
h
1
f ( x)dx =
2
0.5
( y0 y10 ) 2( y1 y2 y3 ........y9 )
2
14. In deriving the Trapezoidal formula, the arc of the curve y = f(x) over
each sub interval is replaced by its ______
Sol. chord.
15. When does Simpson’s rule or Simpson’s one-third rule give exact
result?
Sol. Simpson’s rule will give exact result, if the entire curve y = f(x) is itself
a parabola.
16. What are the truncation errors in Trapezoidal and Simpson’s rules of
numerical integration?
h3
Sol. Error in the Trapezoidal rule is f ( ) . Error in the Trapezoidal
12
rule is of the order h2.
h5
Error in the Simpson’s one-third rule is f IV
( ) . Error in the
ww 90
Simpson’s one-third rule is of the order h4.
w.E
Error in the Simpson’s three eighth rule is
3h 5
80
f IV
( ) .
asy
Error in the Simpson’s three eighth rule is of the order h4.
En
17. What is the condition for Simpson’s 3/8 rule and state the formula.
gin
Sol. The condition for Simpson’s 3/8 rule is the number of sub-intervals
should be a multiple of 3.
Simpson’s 3/8 rule is
xn ee rin
f ( x)dx 8 ( y
3h
yn ) 3( y1 y2 y4 y5 y7 .........)
x0
0
g.n
2( y3 y6 y9 .......... .......... )
xn et
18. To evaluate ydx by Simpson’s1/3rd rule as well as by Simpson’s 3/8th
x0
20. Can you use Simpson’s rule for the following data:
x : 7.47 7.48 7.49 7.50 7.51 7.52
f(x) : 1.93 1.95 1.98 2.01 2.03 2.06
Why?
Sol. We cannot use Simpson’s rule, since the number of ordinates
is 6 (even).
ww
1
dx
24. Evaluate 1 x 2 by Gaussian two point formula.
1
Sol.
1
w.E
dx
1 x2 =
1
dt
11 t
2
f
1
3
f
1
3
1
where f(t) = 1 t 2
1
asy = 0.75 + 0.75
En= 1.5
gin
25. State three point Gaussian quadrature formula.
Sol.
b
a 1
1
f ( x)dx f (t )dt ee
where the interval (a,b) is changed into (-1,1) by the
rin
a b ba
transformation x
2 2
t
g.n
Then
1
f (t )dt A f (t ) A f (t ) A f (t )
1
1 1 2 2 3 3 et
where A1 = A3 = 0.5555, A2 = 0.8888
and t1 = -0.7745, t2 = 0, t3 = 0.7745
e
x
28. Using Simpson’s rule find dx given e0 = 1, e1 = 2.72, e2 = 7.39,
0
3 4
e = 20.09, e = 54.6
Sol. The following data is
x: 0 1 2 3 4
y: 1 2.72 7.39 20.09 54.6
( y0 yn ) 4( y1 y3 y5 .........)
n
h
x f ( x ) dx
3
0
2( y 2 y 4 y6 .......... .......... )
4
e dx
x 1
(1 54.6) 4(2.72 20.09) 2(7.39)
0
3
ww = 53.8733
w.E
29. Compare Trapezoidal rule and Simpson’s 1/3rd rule for evaluating
numerical integration.
asy
Sol. i) In Newton Cotes Quadrature formula, if we put n = 1 we get
Trapezoidal rule whereas if we put n = 2, we get Simpson’s 1/3rd rule.
En
ii) In Trapezoidal rule, the interpolating polynomial is linear whereas in
Simpson’s 1/3rd rule, the interpolating polynomial is of degree 2.
gin
iii) In Trapezoidal rule, there is no restriction on the number of intervals
whereas in Simpson’s 1/3rd rule, the number of intervals should be
even. ee rin
g.n
et
PART – B
x y= f(x) y 2 y 3 y 4 y 5 y
3.0 – 14
3.968
3.2 –10.032
0.768
4.736
3.4 –5.296 –0.464
0.304
5.04 2.048
3.6 –0.256 1.584
1.888 –5.12
6.928 –3.072
3.8 6.672 –1.488
0.4
ww4.0 14
7.328
w.E
Newton Forward Interpolation formula is
y y 0 uy 0 asy
u (u 1) 2
y0
u (u 1)(u 2) 3
y 0 ............
where u
x x0
2!
En 3!
dy
h
1
gin
dx x x0 h
1
2
1
3 ee 1
4
1
y0 2 y0 3 y0 4 y0 5 y0 ..........
5
rin
dy 1
dx x 3 0.2
3. 968
1
2
( 0 .768 )
1
3
( 0 .464 )
1
4
( 2 .048
g.n
)
1
5
( 5. 12 )
(i.e.) f (3) = 9.4665 et
d2y 1 2 11 4 5 5
2 2 y 0 3
y 0 y 0 y 0 ..........
dx x x0 h 12 6
d2y 1 11 5
2 0.768 ( 0.464) ( 2.048) (5.12)
2
dx x 3 (0.2) 12 6
dv
Initial Accleration = at t = 0.
dt
dv 1 1 2 1 3 1 4
v0 v0 v0 v0 ............
dt t t0 h 2 3 4
ww dv 1 1
w.E
dt t 0 5 2
1
3
1
3 (8) (36 ) (24 )
4
asy
= 1 m/sec2 .
d En
3. Find
dt gin
at t = 3 and t = 8 given
t : 1 3 5
: 85.3 74.5 67 60.5 54.3
7
ee
9
rin
Sol. The difference table is
g.n
t
1
85.3
–10.8
2 3 4
et
3 74.5
3.3
–7.5
5 67 –2.3
1
–6.5 1.6
7 60.5 –0.7
0.3
–6.2
9 54.3
d 1 1 2 1 3 1 4
0 0 0 0 ............
dt t t0 h 2 3 4
d 1 1 1 1
10 .8 (3.3) (2.3) (1.6)
dt t 3 2 2 3 4
= – 4.1167
d
To find at t = 8, we use Newton backward interpolation formula.
dt
Newton Backward Interpolation formula is
u (u 1) 2 u (u 1)(u 2) 3
n u n n n .........
2! 3!
t tn 8 9
where u 0.5
h 2
d d du
.
dt du dt
1 2u 1 2 3u 2 6u 2 3 2u 3 9u 2 11u 3 4
y n yn yn y n ......
h 2 6 12
d 1 2(0.5) 1 3(0.5) 2 6(0.5) 2
6.2 (0.3) (0.7)
t 8
dt 2 2 6
2(0.5) 3 9(0.5) 2 11(0.5) 3
(1.6)
ww = – 3.1188
12
x: 0 2
w.E
4. Find y (6) from the following data
3 4 7 9
y : 4 26 58 112 466 922 asy
Sol. Since the arguments are not equally spaced, we will use Newton’s divided
difference formula. En
gin
The divided difference table is
x
0
y= f(x)
4
y 2 y ee 3 y 4 y
rin
5 y
2 26
11
7 g.n
3
4
58
112
32
54
11
1
1
0 et
16 0
118 0
7 466 1
22
228
9 922
y = tan y 2 y 3 y
31 0.6008
0.0241
32 0.6249
0.0004
0.0245
33 0.6494 0.0002
0.0006
0.0251
34 0.6745
d (tan ) 1 1 1
y 0 2 y 0 3 y 0 .......... ..
d 310 h
ww 2 3
w.E
sec2 31 0
1
10
0. 0241
1
2
( 0.0004 )
1
3
( 0. 0002 )
1
asy
0 0.02396666
( 1800
1
En
0.02396666
10 )
0.017453292gin 180
sec2 310 1.373188852
(i.e.) sec 310 = 1.1718 ee rin
6. Consider the following table of data :
g.n
x: 0.2 0.4 0.6 0.8 1.0
f(x) : 0.9798652 0.9177710 0.8080348 0.6386093 0.3843735
Find f (0.25) using Newton Forward interpolation formula
et
and f (0.95) using Newton Backward interpolation formula.
Sol. The difference table is
x y = f(x) y 2 y 3 y 4 y
0.2 0.9798652
–0.0620942
0.4 0.9177710 –0.047642
–0.1097362 –0.0120473
0.6 0.8080348 –0.0596893 –0.0130737
–0.1694255 –0.025121
0.8 0.6386093 –0.0848103
–0.2542358
1.0 0.3843735
u (u 1) 2 u (u 1)(u 2) 3
y y 0 uy 0 y0 y 0 ............
2! 3!
x x0 0.25 0.2 0.05
where u 0.25
h 0.2 0.2
dy dy du
= .
dx du dx
1 2u 1 2 3u 2 6u 2 3
y 0 y0 y0
h 2 6
2u 3 9u 2 11u 3 4
y 0 ......
12
dy 1 2(0.25 ) 1
0. 0620942 (0.047642 )
dx x 0.25 0.2 2
3(0.25 ) 2 6(0.25 ) 2
(0.0120473 )
ww
6
2(0.25 ) 3 9(0.25 ) 2 11(0.25 ) 3
(0.0130737 )
1
w.E 12
=
0 .2
(i.e.) f (0.25) = – 0.2535645
asy
[ – 0.0620942 + 0.0119105 – 0.0013804 + 0.0008512]
En
u (u 1) 2
gin
Newton Backward Interpolation formula is
u (u 1)(u 2) 3
y y n uy n
2!
yn
ee
3!
y n ............
x x n 0.95 1.0 0.05 rin
where u 0.25
dy dy du
h 0.2 0.2
g.n
dx
= .
du dx
1 2u 1 2 3u 2 6u 2 3
et
y n yn yn
h 2 6
2u 3 9u 2 11u 3 4
y n ......
12
dy 1 2(0.25 ) 1
0 . 2542358 (0.0848103 )
dx x 0.95 0.2 2
3(0.25 ) 2 6(0.25 ) 2
(0.025121 )
6
2(0.25 ) 3 9(0.25 ) 2 11(0.25 ) 3
(0.0130737 )
12
1
= [ – 0.2542358 – 0.0212026 – 0.0028784 – 0.0008512]
0 .2
(i.e.) f (0.95) = – 1.39584
ww
Newton Forward Interpolation formula is
u (u 1) 2 u (u 1)(u 2) 3
w.E
y y 0 uy 0
x x0
2!
y0
3!
y 0 ............
where u
h asy
dy
y 0
2u 1 2
y0 En
3u 2 6u 2 3
y0
du 2
gin
6
2u 3 9u 2 11u 3 4
2u 1
ee
3u 2 6u 2
12
y 0 ......
rin
2.25
2
(2.5)
6
(3)
g.n
2u 3 9u 2 11u 3
12
(6) et
4.5 5u 2.5 3u 2 6u 2 2u 3 9u 2 11u 3
2
2u 3 12u 2 22u 12
2
dy
u 3 6u 2 11u 6
du
dy
For maximum or minimum , =0
dx
1 dy
. 0
h du
dy
0
du
(i.e.)u 3 6u 2 11u 6 0
ww dx
1
Sol. h
w.E
1 (1) 2
0.25
1
8 8
asy
When h = 0.25, the values of y =
1
are
x : –1 –0.75 –0.50 –0.25 En 1 x2
0 0.25 0.50 0.75 1
y : 0.5 0.64 0.8 0.9412 gin 1 0.9412 0.8 0.64 0.5
Trapezoidal rule is
xn
f ( x)dx
h ee
( y0 yn ) 2( y1 y2 y3 .........yn1 rin
x0
1
dx 0.25
2
g.n
11 x 2 2 [(0.5 0.5) 2(0.64 0.8 0.9412 1 0.9412
et + 0.8 + 0.64 )]
= 0.125[1 + 11.5248]
= 0.125 (12.5248)
= 1.5656
0
parts using Trapezoidal rule.
1 0
Sol. h 0.25
4
x2
When h = 0.25, the values of y e are
x : 0 0.25 0.50 0.75 1
y : 1 0.9394 0.7788 0.5698 0.3679
Trapezoidal rule is
xn
f ( x)dx
h
( y0 yn ) 2( y1 y2 y3 .........yn1
x0
2
1
0.25
dx [(1 0.3679) 2(0.9394 0.7788 0.5698)]
x 2
e
0 2
= 0.125 [1.3679 + 4.576]
= 0.125 (5.9439)
= 0.7430
parts.
ww
Sol. h
50
10
0.5
w.E
When h = 0.5, the values of y =
1
4x 5
are
x : 0 0.5 1 1.5 2
asy
2.5 3 3.5 4 4.5 5
y : 0.2 0.1429 0.1111 0.0909 0.0769 0.0667 0.0588 0.0526 0.0476 0.0435 0.04
En
Simpson’s 1/3rd rule is
xn gin
f ( x)dx h3 ( y
x0
0 ee
y n ) 4( y1 y3 y5 .........)
rin
2( y 2 y 4 y6 .......... .......... )
5 g.n
0 4x 5 = 3 (0.2 0.04) 4(0.1429 0.0909 0.0667
dx 0.5
et
+ 0.0526 + 0.0435) + 2(0.1111 + 0.0769 + 0.0588 + 0.0476)]
5
dx 0 .5
0 4x 5 = 3 [0.24 + 1.5864 + 0.5888]
0 .5
= (2.4152)
3
= 0.4025
To find log e5
5
dx
We have 4x 5 = 0.4025
0
Integrating we get
log(4 x 5)
5
= 0.4025
4 0
1
log 25 log 5 0.4025
4
log 5 4(0.4025)
(i.e.) log 5 = 1.6100
1
dx
11. Evaluate 1 x 2 take h = 0.125. Hence find using Simpson’s rule.
0
1
Sol. When h = 0.125, the values of y = are
1 x2
x : 0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1
y : 1 0.9846 0.9412 0.8767 0.8 0.7191 0.64 0.5664 0.5
f ( x)dx h3 ( y
ww
x0
0 y n ) 4( y1 y3 y5 .........)
En
+ 0.5664) + 2(0.9412 + 0.8 + 0.64)]
1
dx 0.125
gin
0 1 x 2 = 3 [1.5 + 12.5872 + 4.7624]
=
0.125
[18.8496]
ee rin
3
= 0.7854 g.n
To find
dx
1
et
We have 1 x 2 = 0.7854
0
1
1 1 x
1 tan 1 0.7854
0
0 0.7854
4
(i.e.) = 3.1416
6
dx
12. Evaluate 1 x 2 by dividing the range into 6 equal parts using Simpson’s
0
rule.
60
Sol. h 1
6
1
When h = 1, the values of y = are
1 x2
x: 0 1 2 3 4 5 6
y : 1 0.5 0.2 0.1 0.0588 0.0385 0.0270
Since we are dividing the range into 6 equal parts, we use Simpson’s 3/8th
rule.
Simpson’s 3/8 rule is
xn
ww x0
2( y3 y6 y9 .......... .......... )
6
w.E
0 1 x 2 = 8 (1 0.0270) 3(0.5 0.2 0.0588 0.0385) 2(0.1)]
dx 3(1)
3 asy
En
= [1.0270 + 2.3919 + 0.2]
8
= 1.3571
gin
13. Evaluate
5.2
log
4
e
ee
xdx using Simpson’s rule.
rin
Sol. We can divide the range into 6 equal parts and use Simpson’s 3/8th rule.
5.2 4 g.n
h
6
0.2
When h = 0.2, the values of y = log ex are
et
x: 4 4.2 4.4 4.6 4.8 5 5.2
y : 1.3863 1.4351 1.4816 1.5261 1.5686 1.6094 1.6487
Simpson’s 3/8 rule is
xn
f ( x)dx 38h ( y
x0
0 yn ) 3( y1 y2 y4 y5 y7 .........)
2( y3 y6 y9 .......... .......... )
5.2
log e xdx =
3(0.2)
(1.3863 1.6487) 3(1.4351 1.4816
4 8
+ 1.5686 + 1.6094) + 2(1.5261)]
3(0.2)
= [3.035 + 18.2841 + 3.0522]
8
= 1.8278
1
xdx
14. Compute x 3 10 using Trapezoidal rule and Simpson’s rule with the
0
number of points 3,5,9. Improve the results using Romberg integration.
1
xdx
Sol. Let I = x 3 10
0
x
i) When h = 0.5, the values of y are
x 3 10
x: 0 0.5 1
y: 0 0.0494 0.0909
x
ii) When h = 0.25, the values of y are
x 3 10
x: 0 0.25 0.5 0.75 1
y : 0 0.0250 0.0494 0.0720 0.0909
x
ww
iii) When h = 0.125, the values of y
x 3 10
are
w.E
x : 0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1
y : 0 0.0125 0.0250 0.0373 0.0494 0.061 0.072 0.082 0.0909
Using Trapezoidal rule
xn
f ( x)dx
h asy
( y0 yn ) 2( y1 y2 y3 .........yn1
x0
2 En
we have I1 =
0.5
gin
[(0 0.0909) 2(0.0494)]
2
= 0.04743
0.25
ee rin
[(0 0.0909) 2(0.025 0.0494 0.072)]
I2 =
2 g.n
= 0.04796
I3 =
0.125
2
[(0 0.0909) 2(0.0125 0.025 0.0373
et
+ 0.0494 + 0.061 + 0.072 + 0.082]
= 0.04808
Using Simpson’s 1/3rd rule
xn
f ( x)dx h3 ( y
x0
0 y n ) 4( y1 y3 y5 .........)
2( y 2 y 4 y6 .......... .......... )
0.5
we have I1 = [(0 0.0909) 4(0.0494)]
3
= 0.04808
0.25
I2 = [(0 0.0909) 4(0.025 0.072) 2(0.0494)]
3
= 0.04814
0.125
I3 = [(0 0.0909) 4(0.0125 0.0373 0.061 0.082)
3
+ 2(0.025 + 0.0494 + 0.072)]
= 0.04812
ww 3
= 0.04808 +
0.04808 0.04796
w.E 3
= 0.0481 -------------(B)
asy
From (A) and (B) we get
1
xdx
En
I = x 3 10 = 0.0481
0
gin
1 .2
dx ee
15. Evaluate 1 x using Romberg method. rin
0
1 .2
dx
Sol. Let I = 1 x
g.n
0
Using Trapezoidal rule, let us find the value of the given definite
et
integral by taking h = 0.6, 0.3, 0.15 respectively.
1
i) When h = 0.6, the values of y are
1 x
x: 0 0.6 1.2
y: 1 0.625 0.4545
1
ii) When h = 0.3, the values of y are
1 x
x: 0 0.3 0.6 0.9 1.2
y : 1 0.7692 0.625 0.5263 0.4545
1
iii) When h = 0.15, the values of y are
1 x
x : 0 0.15 0.3 0.45 0.6 0.75 0.9 1.05 1.2
y : 1 0.8696 0.7692 0.6897 0.625 0.5714 0.5263 0.4878 0.4545
f ( x)dx
h
( y0 yn ) 2( y1 y2 y3 .........yn1
x0
2
0.6
we have I1 = [(1 0.4545) 2(0.625)]
2
= 0.8114
0.3
I2 = [(1 0.4545) 2(0.7692 0.625 0.5263)]
2
= 0.7943
0.15
I3 = [(1 0.4545) 2(0.8696 0.7692 0.6897
2
+ 0.625 + 0.5714 + 0.5263 + 0.4878]
= 0.7899
ww
Using Romberg method for I1 and I2 , we get
I I
w.E
I I2 2 1
3
0.7943 0.8114
= 0.7943 +
asy3
En
= 0.7886 -------------(A)
gin
Using Romberg method for I2 and I3 , we get
I I2
I I3 3
3
0.7899 0.7943
ee rin
= 0.7899 +
3 g.n
= 0.7884 -------------(B)
x 2 2x 1
2
x 2 2x 1 (1 t ) 2 2(1 t ) 1
2 1
I = 1 ( x 1) 4 dx = 1 1 (1 t 1) 4 dt
0
t 2 2t 1 2 2t 1
1
dt
1 1 (t 2) 4
(t 2) 2
1
dt
1 1 (t 2 ) 4
1
(t 2)2
= f (t )dt where f(t) = 1 (t 2) 4
1
I = A1f(t1) + A2f(t2) + A3f(t3)
where A1 = A3 = 0.5555, A2 = 0.8888
t1 = – 0.7745, t2 = 0, t3 = 0.7745
(0.7745 2) 2
ww f(t1) = f(– 0.7745) =
1 (0.7745 2) 4 = 0.4613
(0 2) 2
w.E
f(t2) = f(0) =
1 (0 2) 4
0.2353
rin
17. Evaluate
e x
1 .5
2
dx using three point Gauss quadrature formula. g.n
0 .2
Sol. Transform the variable x to t by
et
a b ba
x t
2 2
0.2 1.5 1.5 0.2
= t
2 2
x = 0.85 +0.65 t
dx = 0.65 dt
1 .5 1
I = e dx = e ( 0.850.65t ) 0.65dt
x2 2
0 .2 1
1
1
dx
18. Evaluate
1 x4
0
using three point Gauss formula.
Sol. Transform the variable x to t by
a b ba
x t
2 2
ww 0 1 1 0
= 2 2 t
x =
1 t w.E
2
dt asy
dx =
2
En
I =
1
dx
1
gin dt / 2
ee 1 t
4
= 1
0 1 x4 1
2
rin
2
1
dt
16 (1 t ) 4
g.n
1
1
1
et
= 2 f (t )dt where f (t )
1 16 (1 t ) 4
I = 2 [A1f(t1) + A2f(t2) + A3f(t3)]
1
f(t1) = f(– 0.7745) = = 0.2500
16 (1 0.7745) 4
1
f(t2) = f(0) = = 0.2425
16 (1 0) 4
1
f(t1) = f(0.7745) = = 0.1964
16 (1 0.7745) 4
2.0 1.5
(0.15)(0.25) En
rectangular box) + 4( sum of the remaining values)]
=
4
gin
[ (1.2238 + 1.4816 + 1.3863 + 1.6094) + 2( 1.3610
ee
+ 1.2669 + 1.3083 + 1.3481 + 1.5041+ 1.5790 + 1.5476 + 1.5151)
+ 4 (1.3987 + 1.4351 + 1.4702 )]
(0.15)(0.25)
rin
=
= 0.4292
4
[5.7011 + 22.8602 + 17.216]
g.n
20. Evaluate
1
2
2 xy
1 (1 x 2 )(1 y 2 ) dxdy by Trapezoidal rule
et
0
with h = k = 0.25
Sol. When h = k = 0.25,
y
x 0 0.25 0.5 0.75 1
Trapezoidal rule is
hk
I= [ sum of the four corner values + 2( sum of the values in the
4
rectangular box) + 4( sum of the remaining values)]
(0.25)(0.25)
= [ (0 + 0 + 0.5 + 0.4) + 2( 0.2353 + 0.4 + 0.48 + 0 +0 +0
4
+0.1882 + 0.32 + 0.384 + 0.4308 + 0.4615 + 0.4878 ) + 4 (0.2296
+ 0.3902 + 0.4683 + 0.2172 + 0.3692 + 0.4431 + 0.2027 + 0.3446
+ 0.4135)]
(0.25)(0.25)
= [0.9 + 6.7752 + 12.3136]
4
= 0.3123
1 1
1
21. Using Simpson’s rule evaluate 0 1 x y dxdy taking h = k = 0.5
ww
Sol. When h = k = 0.5,
0
w.E y
x 0
asy 0.5 1
0 1 En 0.6667 0.5
1
2 2 xydy
22. Evaluate
0
1 (1 x 2
)(1 y 2
)
dx using Simpson’s 1/3rd method with
0 0 0 0 0 0
w.E
+{(0+0+0.3692+0.32)+4(0+0.2172+0.3446+0.1882) +16(0.2027)}
+{(0.4+0.5+0.4615+0.3692)+4(0.48+0.3902+0.4431+0.4878)
asy
+{(0.3692+0.32+0.4615+0.4)+4(0.4431+0.3446+0.384+0.4308)
+16(0.4683)}
(0.25)(0.25) En +16(0.4135)}]
=
9 gin
[7.8136+6.9324+16.4279+14.5767]
= 0.3177
1 1
ee rin
e dxdy by Trapezoidal rule with h = k = 0.5
23. Evaluate
0 0
x y
g.n
Sol. When h = k = 0.5,
x
y
0 0.5 1
et
0 1 1.6487 2.7183
2 4
dx dy
24. Using Simpson’s rule evaluate
1
3 x y 2 taking h = k = 0.5
Sol. When h = k = 0.5,
y
x 3 3.5 4
=
9 w.E
(0.5)(0.5)
[ (0.1 + 0.0588 + 0.0909 + 0.0556) + 4( 0.0755 + 0.0952
En
gin
25. By dividing the range into 10 equal parts, evaluate sin x dx by using
eer
0
rd
Simpson’s 1/3 rule. It is possible to evaluate the same by Simpson’s
3/8th rule. Justify your answer.
Sol. h
0
ing
10
10
.ne
When h =
10
, the values of y = sin x are
x : 0 π/10 2 π/10 3 π/10 4 π/10 5 π/10 6 π/10 7 π/10 8 π/10 9 π/10 π
y : 0 0.3090 0.5878 0.8090 0.9511 1 0.9511 0.8090 0.5878 0.3090 0
t
Simpson’s 1/3rd rule is
xn
f ( x)dx h3 ( y
x0
0 y n ) 4( y1 y3 y5 .........)
2( y 2 y 4 y6 .......... .......... )
/ 10
sin x dx = (0 0) 4(0.3090 0.8090 1 0.8090 0.3090)
0 3
+ 2(0.5878 + 0.9511 + 0.9511 + 0.5878)]
= [0 + 12.944 + 6.1556]
30
= 2.0001
1
dx
26. Evaluate 1 x using two point and three point Gaussian formula and
0
compare with the exact value.
Sol. Transform the variable x to t by
a b ba 0 1 1 0
x t = t
2 2 2 2
1 t
=
2
dx = ½ dt
1 1
1 / 2 dt dt 1
dx
1
3
asy
(1) I = 1 x = 0.2795 + 0.4128
3
0 En
= 0.6923
gin
Three point formula
1
dx
1
ee
I = 1 x = f (t )dt where f(t) =
1
rin
t 3
0 1
= A1f(t1) + A2f(t2) + A3f(t3) g.n
where A1 = A3 = 0.5555, A2 = 0.8888
t1 = – 0.7745, t2 = 0, t3 = 0.7745
1
et
f(t1) = f(– 0.7745) = (0.7745 3) = 0.4493
1
f(t2) = f(0) = (0 3) =0.3333
1
f(t1) = f(0.7745) = (0.7745 3) = 0.2649
5
4
27. Evaluate 2 x 2 dx using Gaussian three point formula.
3
Sol. Transform the variable x to t by
a b ba 3 5 5 3
x t = t
2 2 2 2
=4+t
dx = dt
5 1 1
4 dt 1
3 2 x 2 dx 2
1 ( 4 t )
2
2
1
f (t ) dt where f (t )
(4 t ) 2
= 2 [A1f(t1) + A2f(t2) + A3f(t3)]
where A1 = A3 = 0.5555, A2 = 0.8888
t1 = – 0.7745, t2 = 0, t3 = 0.7745
1
f(t1) = f(– 0.7745) = (4 0.7745 ) 2 = 0.0961
ww 1
w.E
f(t2) = f(0) = ( 4 0) 2 =0.0625
1
asy
f(t1) = f(0.7745) = (4 0.7745 ) 2 = 0.0439
I = 2 [A1f(t1) + A2f(t2) + A3f(t3)]
En
= 2 [(0.5555)(0.0961) + (0.8888)(0.0625) + (0.5555)(0.0439)]
= 0.2666 gin
ee
28. A river is 80 meters wide. The depth ‘d’ in meters at a distance x meters
from one bank is given by the following table. Calculate the area of rin
cross-section of the river using Simpson’s one third rule.
x : 0 10 20 30 40 50 60 70 80 g.n
d: 0 4 7
rd
Sol. Simpson’s 1/3 rule is
9 12 15 14 8 3
et
xn
f ( x)dx h3 ( y
x0
0 y n ) 4( y1 y3 y5 .........)
2( y 2 y 4 y6 .......... .......... )
80
y dx =
10
(0 3) 4(4 9 15 8) 2(7 12 14)]
0 3
= 710 sq. meters.
ww y ( x) x 3 5 x 8
y ( x) 3 x 2 5 , y ( x) 6 x
w.E
f (4) 3(4) 2 5 43
f (4) 6(4) 24. asy
2.5 4 En
dx dy
gin
30. Evaluate 1 x y 2 using x 0.5 y Simpson’s 1/3 rule in
1 x2
f ( x, y)dy
1
0.2561 0.2347 0.2169 0.2015 0.1883
2.5 4
1. What are the merits and demerits of the Taylor method of solution.
Sol. Taylor method is very powerful if we can calculate the successive
derivative of y in an easy manner. If there is a simple expression for the
higher derivatives in terms of the previous derivatives of y, Taylor’s
method will work very well.
dy
But in the differential equation f ( x, y) , the function f(x,y) may
dx
have a complicated algebraical structure. Then the evaluation of higher
order derivatives may become tedious. This is the demerit of this method.
2.
ww
Taylor series method will be very useful to give some _____ for
powerful numerical methods such as Runge kutta method, Milne’s
method, etc.w.E
Sol. Initial starting values.
3. asy
The use of Taylor series to solve numerically, differential equations is
En
restricted by the labour involved in the determination of _________.
Sol. Higher order derivatives.
dy gin
x y xy , y(0) = 1 by Taylor series
4. Solve the differential equation
dx eer
method to get the value of y at x = h.
Sol. Given ing
y x y xy
x0 0, y0 1
.ne
y x y xy
y0 0 1 0 1
t
y 1 y xy y
y0 1 1 0 1 3
y y xy y y y0 ' ' ' 3 1 0 1 5
y y 2 y xy y y0 ' ' ' ' 5 6 0 3 14
Taylor’s series is
( x x0 ) 2 ( x x0 ) 3 ( x x0 ) 4 iv
y ( x) y 0 ( x x0 ) y 0
y0
y0 y .......
2! 3! 4!
(h 0) 2 (h 0) 3 (h 0) 4
y (h) 1 (h 0)(1) (3) (5) (14 ) .......
2 6 24
3 5 7
y(h) 1 h h 2 h3 h 4 ...................
2 6 12
7. Taylor series and Runge kutta method are single step methods while
________ and ________ are multistep methods.
Sol. Milne’s predictor and corrector method and Adam-Bashforth predictor
and corrector method.
9.
ww
In Euler’s method, if h is small, the method is too slow and if h is large, it
w.E
gives inaccurate value. Say True or False.
Sol. True.
asy
10. The modified Euler method is based on the average of ______
Sol. Points En
gin
11. In Euler’s method, if h is small, the method is too slow and if h is large, it
Sol. True. ee
gives inaccurate value. Say True or False.
rin
dy
12. Using modified Euler’s method, find y(0.1) if
dx g.n
x 2 y 2 , y(0) 1.
2 2
Sol. Given f(x,y) = x + y , x0 = 0, y0 = 1, h = 0.1
y1 y 0 f ( x0 , y 0 ) f x 0 h, y 0 hf ( x 0 , y 0
h et
2
f ( x0 , y 0 ) x0 y 0 0 1 1
2 2
y1 1
0.1
1 f 0 0.1,1 0.1(1)
2
y1 1
0.1
1 f 0.1,1.1
2
y1 1
0.1
1 1.22
2
y1 1.111
13. Write down the formula to solve second order differential equation using
Runge kutta method of 4th order.
Sol. The second order differential equation is
d2y dy
g ( x , y , )
dx2 dx
dy
put z. (1)
dx
dz
then g ( x, y, z ) (2)
dx
Equation (1) and (2) can be solved using the formula
k1 hf ( x0 , y0 , z0 )
h k l
k2 hf x0 , y0 1 , z0 1
2 2 2
ww h k
k3 hf x0 , y0 2 , z0 2
2 2
l
2
w.E
k4 hf x0 h, y0 k3 , z0 l3
y
1
asy
k1 2k2 2k3 k4
6
y1 y0 y En
gin
l1 hg ( x0 , y0 , z0 )
h k
ee
l2 hg x0 , y0 1 , z0 1
l
rin
2 2 2
l
g.n
h
2
k
l3 hg x0 , y0 2 , z0 2
2 2 et
l4 hg x0 h, y0 k3 , z0 l3
z
1
k1 2k2 2k3 k4
6
z1 z0 z
Similarly we can find the next increments by replacing
x0,y0,z0 and x1,y1,z1 and so on.
14. In the derivation of 4th order Runge kutta formula, why it is called fourth
order.
Sol. The number of parameters = 13.
It is called fourth order formula since the parameters are determined such
that yn+1 obtained by Runge kutta method agrees upto h4 term in Taylor’s
method.
15. What are the values of k1 and l1 to solve y' ' xy' y 0, y(0) 1, y' (0) 0
by Runge kutta method of 4th order.
Sol. Given
y ' ' xy ' y 0
dy dz
put z then xz y 0
dx dx
dz
xz y
dx
Also given x0 = 0, y0 = 1, y 0 z 0 0
k1 = hf(x0,y0,z0) = hz0 = 0.
l1 = hg(x0,y0,z0) = h (– x0z0 – y0)
=h(0–1)
= – h.
16. What do you mean by total error in error analysis?
ww
Sol. The difference between the computed value yi and the true value y(xi) at
any stage is known as the total error. It is comprised of truncation error
w.E
and round off error.
17. State the special advantage of Runge kutta method over Taylor series
asy
method. (or) Compare Taylor series and Runge kutta method. (or)
En
Which is better Taylor method or Runge kutta method.
Sol. Runge kutta methods do not require prior calculation of higher derivatives
gin
of y(x), as the Taylor method does. Also the Runge kutta formulas involve
the computation of f(x,y) at various positions, instead of derivatives and
better method.
ee
this function occurs in the given equation. Hence Runge kutta method is
rin
g.n
18. Runge kutta formulas involve the computation of f(x,y) at various points
instead of ____________
Sol. Calculation of higher order derivatives of f(x,y). et
19. Compare Taylor series and Runge kutta method.
Sol. 1. The use of Runge kutta method gives quick convergence to
the solutions of the differential equation than Taylor’s
series method.
2. In Runge kutta method, the derivatives of higher order are
not required for calculation as in Taylor’s series method.
20. Write the formula to find k2, k4 in Runge kutta method of fourth order.
Sol.
h k
k2 hf x0 , y0 1
2 2
k4 hf x0 h, y0 k3
21. If f(x,y) = f(x) i.e. only a function of x alone, then the fourth order
Runge kutta method reduces to ________
Sol. The area by Simpson’s one-third rule.
22. Compare Runge kutta method and predictor - corrector method.
Sol. Runge kutta methods are self starting whereas predictor and corrector
method are not self starting. In Runge kutta method, it is not possible to
get any information about truncation error. In predictor and corrector
method it is possible to get easily a good estimate of the truncation error.
23. What will you do, if there is a considerable difference between predicted
value and corrected value, in predictor and corrector methods?
Sol. If there is a considerable difference between predicted value and
corrected value, we take the corrected value as the predicted value and
find out the new corrected value. This process is repeated till there is no
great difference between two consecutive corrected values.
ww
24. Predictor and corrector methods are single step methods.
w.E
Say True or False.
Sol. False.
asy
25. Write down the error in Milne’s method.
14 h5 5
En
Sol. The truncation error in Milne’s predictor formula is
45
y ( )
gin
The truncation error in Milne’s corrector formula is
h5 5
y ( )
ee
26. Write down the error in Adam-Bashforth’s method.
90
rin
Sol. The truncation error in Adam’s predictor formula is
251 h 5 5
720
y ( ) g.n
The truncation error in Adam’s corrector formula is
19 h 5 5
720
y ( ) et
27. What is a predictor – corrector method ?
Sol. Predictor – corrector methods are methods which require the values of y
at xn , xn 1 , xn 2 ,......... . for computing the values of y at x n 1 . We first use
a formula to find the value of y at x n 1 and this is known as a predictor
formula. The value of y so got is improved or corrected by another
formula is known as corrector formula.
28. What do you mean by saying that a method is self starting? Not self
starting ?
Sol. For computing the values of y at x n 1 , we do not require the values of y at
xn , xn 1 , xn 2 ,......... . This is called self starting. If we require the values of y
at xn , xn 1 , xn 2 ,......... . to find y at x n 1 then it is called not self starting.
PART – B
dy
1. Using Taylor’s series find y at x = 0.1 if x 2 y 1, y(0) = 1.
dx
Sol. Given x0 0, y0 1
y x 2 y 1 y0 x0 y0 1 0 1 1
2
y0 0 0 0 (6) 6
iv
ww
Taylor’s series about x x0 is given by
( x x0 ) 2 ( x x0 ) 3 ( x x 0 ) 4 iv
w.E
y ( x) y 0 ( x x0 ) y 0
2!
y0
3!
y0
4!
y 0 .......
x3 x4 En
2! 3! 4!
6 24 gin
y ( x) 1 x 0 (2) (6) .......... ...
x3 x4
y ( x) 1 x .......... ...
3 4
ee rin
y (0.1) 1 (0.1)
(0.1) 3 (0.1) 4
.......... ... g.n
3 4
= 1 – 0.1 + 0.00033 – 0.000025
= 0.9003
et
2. By means of Taylor series expansion, find y at x = 0.1 and x = 0.2 correct to
dy
three decimal places, given 2 y 3e x , y(0) 0.
dx
Sol. Given x0 0, y 0 0
y 2 y 3e x y 0 2 y 0 3e x0 0 3(1) 3
y 2 y 3e x y 0 2 y 0 3e x0 2(3) 3(1) 9
y 2 y 3e x y 0 2 y 0 3e x0 2(9) 3(1) 21
y iv 2 y 3e x y0 2 y0 3e x0 2(21) 3(1) 45
iv
( x 0) 2 ( x 0) 3 ( x 0) 4
y ( x) 0 ( x 0)(3) (9) (21) (45 ) .......
2! 3! 4!
9 x 2 7 x 3 15 x 4
y ( x) 3x .......... ...
2 2 8
9(0.1) 2 7(0.1) 3 15 (0.1) 4
y (0.1) 3(0.1) .......... ...
2 2 8
= 0.3 + 0.045 + 0.0035 + 0.0001875
= 0.3487
9(0.2) 2 7(0.2) 3 15 (0.2) 4
y (0.2) 3(0.2) .......... ...
ww 2 2
= 0.6 + 0.18 + 0.028 + 0.003
8
= 0.811
w.E dy
1
asy
3. Use Taylor series solution to solve numerically
dx
xy 3 , y(1) = 1. Tabulate y
for x = 1.1, 1.2
Sol. Given x0 1, y 0 1 En
1
y xy y0 x0 y0 1(1) 1
1gin
ee
3 3
1 3
2
1
1 2
1
y x y . y y y 0 x0 y 0 3 . y 0 y 0 3 = 1 1 4
3
rin
3 3
2 5 / 3 1 2 / 3 1 2 / 3
y xy
3
1
3
y .1 y 2 / 3 y
g.n
9
y
2 4 1 1 8
y xy
3
y y
3 3 et
y0
9 9 3 3 9
Taylor’s series about x x0 is given by
( x x0 ) 2 ( x x0 ) 3 ( x x 0 ) 4 iv
y ( x) y 0 ( x x0 ) y 0 y 0 y 0 y 0 .......
2! 3! 4!
( x 1) 2 4 ( x 1) 3 8
y ( x) 1 ( x 1)(1) .....
2! 3 3! 9
(1.1 1) 2 4 (1.1 1) 3 8
y (1.1) 1 (1.1 1)(1) .....
2! 3 3! 9
2(0.1) 2 4(0.1)3
= 1 + 0.1 + ........
3 27
= 1 + 0.1 + 0.0067 + 0.00014
= 1.1068
(1.2 1) 2 4 (1.2 1) 3 8
y (1.2) 1 (1.2 1)(1) .....
2! 3 3! 9
2(0.2) 2 4(0.2) 3
= 1 + 0.2 + ........
3 27
= 1 + 0.2 + 0.0267 + 0.0012
= 1.2279
d2y 2 dy
4. Find the value of y(1.1) and y(1.2) from 2
y x 3 , y (1) 1, y(1) 1
dx dx
by using Taylor’s series method.
Sol. Given y y y x ---------(1)
2 3
y z
y 0 z 0 0
ee z 3x 2 y 2 z z.2 y. y
rin
z 0 3(1) 0 2(1)(1)(1) 1
y z
y 0 z 0 1
g.n
z 6 x y 2 z z .2 y. y 2 [ y z. y y y .z y z. y ]
z 0 6(1) (1)(1) 0 2 [0 0 1] 6 1 2 3
y iv z et
y 0 z 0 3
iv
(1.2 1) 3 (1.2 1) 4
y (1.2) 1 (1.2 1)(1) (3) .....
6 24
(0.2) 3 (0.2) 4
= 1 + 0.2 + ........
6 8
= 1 + 0.2 + 0.0013+ 0.0002
= 1.2015
dy y x
5. Use Euler’s method to approximate y when x = 0.1 given that dx y x with
y = 1 for x = 0.
Sol. We break up the interval 0.1 into five subintervals, we get the answer in more
accurate form. So take h = 0.02
yx
Given f ( x, y ) y x .
w.E y x0
y1 y 0 h 0 1 0
= 1 + (0.02)
y 0 x0
1 0
asy = 1.02
En
(i.e.) y(0.02) = 1.02
x1 x0 h
= 0 + 0.02 gin
= 0.02
y 2 y1 hf ( x1 , y1 )
ee rin
y x
y 2 y1 h 1 1 = 1.02 + (0.02) 1.02 0.02 g.n
y1 x1
= 1.0392
1.02 0.02
et
(i.e.) y(0.04) = 1.0392
x2 x1 h
= 0.02 + 0.02
= 0.04
y 3 y 2 hf ( x 2 , y 2 )
y x2 1.0392 0.04
y3 y 2 h 2 = 1.0392+ (0.02)
y 2 x2 1.0392 0.04
= 1.0577
(i.e.) y(0.06) = 1.0577
x3 x 2 h
= 0.04+ 0.02
= 0.06
y 4 y 3 hf ( x3 , y 3 )
y x3 1.0577 0.06
y 4 y3 h 3 = 1.0577 + (0.02) 1.0577 0.06
y 3 x3
= 1.0756
(i.e.) y(0.08) = 1.0756
x 4 x3 h
= 0.06 + 0.02
= 0.08
y 5 y 4 hf ( x 4 , y 4 )
y x4 1.0756 0.08
y5 y 4 h 4 = 1.0756 + (0.02) 1.0756 0.08
y 4 x4
= 1.0928
ww (i.e.) y(0.1) = 1.0928
6. Solve
dy
dx w.E
1 y with the initial condition x = 0, y = 0. Using Euler’s
asy
algorithm, tabulate the solutions at x = 0.1, 0.2, 0.3, 0.4. Get the solutions by
Euler’s modified method also.
Sol.
En
Given f ( x, y) 1 y .
gin
Also given x0 0, y 0 0 and h = 0.1
Euler’s method
y1 y0 hf ( x0 , y0 ) ee
y1 y 0 h[1 y 0 ] = 0 + (0.1)[1 – 0] rin
= 0.1 g.n
(i.e.) y(0.1) = 0.1
x1 x0 h
= 0 + 0.1
et
= 0.1
y 2 y1 hf ( x1 , y1 )
y 2 y1 h[1 y1 ] = 0.1+ (0.1)[1 – 0.1
] = 0.19
(i.e.) y(0.2) = 0.19
x2 x1 h
= 0.1 + 0.1
= 0.2
y 3 y 2 hf ( x 2 , y 2 )
y3 y 2 h[1 y 2 ] = 0.19 + (0.1)[1 – 0.19]
= 0.271
(i.e.) y(0.3) = 0.271
x3 x 2 h
= 0.2 + 0.1
= 0.3
y 4 y 3 hf ( x3 , y 3 )
y 4 y 3 h[1 y 3 ] = 0.271 + (0.1)[1 – 0.271]
= 0.3439
(i.e.) y(0.4) = 0.3439
= 0 + 0.1 gin
= 0.1
ee
y 2 y1 f ( x1 , y1 ) f [ x1 h, y1 hf ( x1 , y1 )]
h
rin
2
f ( x1 , y1 ) 1 y1 g.n
= 1 – 0.095
= 0.905
et
y 2 0.095
0.1
0.905 f [0.1 0.1,0.095 (0.1)(0.905)]
2
y 2 0.095
0.1
0.905 f [0.2,0.1855] 0.095 0.1 0.905 (1 0.1855)
2 2
0.095
0.1
0.905 0.8145
2
= 0.18098
(i.e.) y(0.2) = 0.18098
x2 x1 h
= 0.1+ 0.1
= 0.2
y3 y 2
h
f ( x2 , y2 ) f [ x2 h, y2 hf ( x2 , y2 )]
2
f ( x2 , y 2 ) 1 y 2
= 1 – 0.18098
= 0.81902
y3 0.18098
0.1
0.81902 f [0.2 0.1,0.18098 (0.1)(0.81902)]
2
y3 0.18098
0.1
0.81902 f [0.3,0.2629]
2
0.18098
0.1
0.81902 (1 0.2629) 0.18098 0.1 0.81902 0.7371
2 2
= 0.2588
(i.e.) y(0.3) = 0.2588
x3 x 2 h
ww = 0.2+ 0.1
= 0.3
y 4 y3 w.Eh
2
f ( x3 , y3 ) f [ x3 h, y3 hf ( x3 , y3 )]
asy
f ( x3 , y 3 ) 1 y 3
En
= 1 – 0.2588
= 0.7412
y 4 0.2588
0.1 gin
0.7412 f [0.3 0.1,0.2588 (0.1)(0.2588)]
y 4 0.2588
2
0.1 ee
0.7412 f [0.4,0.3329] rin
2
y 4 0.2588
0.1
0.7412 (1 0.3329) g.n
y 4 0.2588
0.1
2
0.7412 0.6671
et
2
= 0.3292
(i.e.) y(0.4) = 0.3292
dy
7. Given that log 10 ( x y ) with the initial condition that y = 1 when x = 0,
dx
use Euler’s modified method to find y for x = 0.2 and x = 0.5 in more accurate
form.
Sol. Given f ( x, y ) log 10 ( x y ) .
Also given x 0 0, y 0 1 . Take h = 0.1
By Euler modified method,
y1 y0 f ( x0 , y0 ) f [ x0 h, y0 hf ( x0 , y0 )]
h
2
f ( x0 , y 0 ) log 10 ( x0 y 0 )
= log 10 (0 1)
=0
y1 1
0.1
0 f [0 0.1,1 (0.1)(0)] 1 0.1 0 f [0.1,1]
2 2
1
0.1
0 log 10 (0.1 1)
2
= 1.0021
(i.e.) y(0.1) = 1.0021
x1 x0 h
= 0 + 0.1
= 0.1
y 2 y1 f ( x1 , y1 ) f [ x1 h, y1 hf ( x1 , y1 )]
h
ww 2
f ( x1 , y1 ) log 10 ( x1 y1 )
y 2 1.0021
2
0.1
g ine
0.0422 log 10 (0.2 1.0063)
= 1.0083
2
e rin
(i.e.) y(0.2) = 1.0083
x2 x1 h g.n
= 0.1 + 0.1
= 0.2
et
y3 y 2 f ( x2 , y 2 ) f [ x2 h, y 2 hf ( x2 , y 2 )]
h
2
f ( x 2 , y 2 ) log 10 ( x 2 y 2 )
= log 10 (0.2 1.0083 )
= 0.0822
y3 1.0083
0.1
0.0822 f [0.2 0.1,1.0083 (0.1)(0.0822)]
2
y3 1.0083
0.1
0.0822 f [0.3,1.0165]
2
y3 1.0083
0.1
0.0822 log 10 (0.3 1.0165)
2
= 1.0184
(i.e.) y(0.3) = 1.0184
x3 x 2 h
= 0.2 + 0.1
= 0.3
y 4 y3 f ( x3 , y3 ) f [ x3 h, y3 hf ( x3 , y3 )]
h
2
f ( x3 , y3 ) log 10 ( x3 y3 )
= log 10 (0.3 1.0184 )
= 0.12005
y 4 1.0184
0.1
0.12005 f [0.3 0.1,1.0184 (0.1)(0.12005)]
2
y 4 1.0184
0.1
0.12005 f [0.4,1.0304]
2
y 4 1.0184
0.1
0.12005 log 10 (0.4 1.0304)
ww = 1.0322
2
w.E
(i.e.) y(0.4) = 1.0322
x 4 x3 h
asy
= 0.3 + 0.1
= 0.4
En
y5 y 4 f ( x4 , y 4 ) f [ x4 h, y 4 hf ( x4 , y 4 )]
h
2
gin
f ( x 4 , y 4 ) log 10 ( x 4 y 4 )
= 0.1560
ee
= log 10 (0.4 1.0322 )
rin
y5 1.0322
0.1
0.1560 f [0.4 0.1,1.0322 (0.1)(0.1560)] g.n
y5 1.0322
2
0.1
0.1560 f [0.5,1.0478]
et
2
y5 1.0322
0.1
0.1560 log 10 (0.5 1.0478)
2
= 1.0495
(i.e.) y(0.5) = 1.0495
1
8. Using R-K method of fourth order, solve y 3x y with y(0) = 1 at x = 0.2
2
taking h = 0.1
1
Sol. Given f ( x, y ) 3x y
2
Also given x 0 0, y 0 1 . Take h = 0.1
To find y(0.1)
y
k1 hf ( x0 , y0 ) = (0.1) 3x0 0 = (0.1) 3(0)
1
2 2
= 0.05
h k 0.1 0.05
k2 hf x0 , y0 1 = (0.1) f 0 , 1
2 2 2 2
1.025
= (0.1) f (0.05 ,1.025) = 0.1 3(0.05 )
2
= 0.0663
h k 0.1 0.0663
k 3 hf x0 , y 0 2 = (0.1) f 0 , 1
2 2 2 2
1.0332
= (0.1) f (0.05 ,1.0332) = 0.1 3(0.05 )
2
= 0.0667
ww
k 4 hf x 0 h, y 0 k 3 = (0.1) f (0 0.1,1 0.0667)
1.0667
w.E = (0.1)
3( 0. 1)
2
1 asy
y [k1 2k2 2k3 k4 ]
= 0.0833
6
En
1
gin
= [0.05 2(0.0663) 2(0.0667) 0.0833]
6
= 0.0666
y1 y0 y ee rin
= 1 + 0.0666
= 1.0666 g.n
(i.e.) y(0.1) = 1.0666
x1 x0 h et
= 0 + 0.1
= 0.1
To find y(0.2)
y1 1.0666
k1 hf ( x1 , y1 ) = (0.1) 3x1 = (0.1) 3(0.1)
2 2
= 0.0833
h k 0 .1 0.0833
k 2 hf x1 , y1 1 = (0.1) f 0.1 , 1.0666
2 2 2 2
1.1083
= (0.1) f (0 .15 , 1.1083 ) = 0.1 3( 0 . 15 )
2
= 0.1004
h k 0. 1 0.1004
k 3 hf x1 , y1 2 = (0.1) f 0.1 , 1.0666
2 2 2 2
1.1168
= (0.1) f (0.15 ,1.1168) = 0.1 3(0.15 ) 2
= 0.1008
k 4 hf x1 h, y1 k 3 = (0.1) f (0.1 0.1,1.0666 0.1008)
1.1674
= (0.1) 3( 0.2)
2
= 0.1184
1
y [k1 2k2 2k3 k4 ]
6
1
= [0.0833 2(0.1004) 2(0.1008) 0.1184]
6
= 0.1007
ww
y 2 y1 y
= 1.1673w.E
= 1.0666 + 0.1007
y1 y0 y
= 2 + 0.4921
= 2.4921
(i.e.) y(1.2) = 2.4921
x1 x0 h
= 1 + 0.2
= 1.2
To find y(1.4)
k1 hf ( x1 , y1 ) = (0.2) ( x1 y1 ) = (0.2) [(1.2)(2.4921)]
= 0.5981
h k 0.2 0.5981
k 2 hf x1 , y1 1 = (0.2) f 1.2 , 2.4921
2 2 2 2
= (0.2) f (1.3 , 2.7912) (0.2)[ (1.3)(2.7912 )]
= 0.7257
ww
h
2
k
2
k 3 hf x1 , y1 2 = (0.2) f 1.2
0.2
2
, 2.4921
0.7257
2
asy = 0.7423
k 4 hf x1 h, y1 k 3 = (0.2) f (1.2 0.2 , 2.4921 0.7423)
En
= (0.2) f (1.4 , 3.2344) (0.2)[ (1.4)(3.2344 )]
1
y [k1 2k2 2k3 k4 ]
gin = 0.9056
6
1
ee
= [0.5981 2(0.7257) 2(0.7423) 0.9056] rin
6
= 0.74 g.n
y 2 y1 y
= 2.4921 + 0.74
= 3.2321
et
(i.e.) y(1.4) = 3.2321
x2 x1 h
= 1.2 + 0.2
= 1.4
To find y(1.6)
k1 hf ( x2 , y 2 ) = (0.2) ( x2 y 2 ) = (0.2) [(1.4)(3.2321)]
= 0.9050
h k 0.2 0.9050
k 2 hf x 2 , y 2 1 = (0.2) f 1.4 , 3.2321
2 2 2 2
= (0.2) f (1.5 , 3.6846) (0.2)[ (1.5)(3.6846)]
= 1.1054
h k 0.2 1.1054
k 3 hf x 2 , y 2 2 = (0.2) f 1.4 , 3.2321
2 2 2 2
= (0.2) f (1.5 , 3.7848) (0.2)[ (1.5)(3.7848)]
= 1.1354
k 4 hf x 2 h, y 2 k 3 = (0.2) f (1.4 0.2 , 3.2321 1.1354)
= (0.2) f (1.6 , 4.3675) (0.2)[ (1.6)(4.3675)]
= 1.3976
1
y [k1 2k2 2k3 k4 ]
6
1
= [0.9050 2(1.1054) 2(1.1354) 1.3976]
6
= 1.1307
y3 y 2 y
ww = 3.2321 + 1.1307
= 4.3628
w.E
(i.e.) y(1.6) = 4.3628
10. Given y xy y 0, y(0) 1, y(0) 0 , find the value of y(0.1) by using
asy
R-K method of fourth order.
Sol. Given y xy y 0 ---------(1)
En
Put y z --------(2) then y z --------(3)
Sub (2) and (3) in (1), we getgin
ee
z xz y 0 z xz y ---------(4)
The initial conditions are y(0) = 1, y (0) 0
rin
(i.e.) y(0) = 1, z(0) = 0 (since y z )
(i.e.) x0 0, y 0 1, z 0 0 , h = 0.1 g.n
et
Now to solve (1), it is enough if we solve the two first order differential
equations (2) and (4).
From (2), y z (i.e.) f ( x, y, z ) z
and from (4), z xz y (i.e.) g ( x, y, z) xz y
k1 hf ( x0 , y0 , z0 ) = (0.1) ( z 0 )
= (0.1)(0) = 0
l1 hg ( x0 , y 0 , z 0 ) = (0.1) ( x0 z 0 y 0 )
= (0.1)(0 – 1)
= – 0.1
h k l l
k 2 hf x0 , y 0 1 , z 0 1 = (0.1) z 0 1
2 2 2 2
0.1
= (0.1) 0
2
= – 0.005
h k l h l k
l 2 hg x0 , y 0 1 , z 0 1 = (0.1) ( x0 )(z 0 1 ) ( y 0 1 )
2 2 2 2 2 2
0.1 0.1 0
= (0.1) (0 2 )( 0 2 ) (1 2 )
= (0.1)( – 0.9975)
= – 0.0998
h k l l
k 3 hf x0 , y 0 2 , z 0 2 = (0.1) z 0 2
2 2 2 2
0.0998
= (0.1) 0
2
= – 0.0050
h k l h l k
l3 hg x0 , y 0 2 , z 0 2 = (0.1) ( x0 )(z 0 2 ) ( y0 2 )
2 2 2 2 2 2
0.0998 0.005
ww
0.1
= (0.1) (0 2 )( 0 2
) (1
2
)
11. Consider the 2nd order initial value problem y 2 y 2 y e sin t with
2t
w.E
Taylor’s series for y(t) about t t 0 is given by
asy
y (t ) y 0 (t t 0 ) y 0
(t t 0 ) 2
y 0
(t t 0 ) 3
y 0
(t t 0 ) 4 iv
y 0 .......
En2! 3! 4!
y (t ) 0.4 (t 0)( 0.6)
gin
(t 0) 2
2!
(0.4)
(t 0) 3
3!
(1.4)
(t 0) 4
4!
(7.6) .......... .
To find y(0.2)
w.E
h k l
l 2 hg t1 , y1 1 , z1 1
= – 0.0643
2 2
asy 2
h
h
2(
= (0.1) 1 2
z
l1
) 2( y1
En
k1
2
) e
2[ t1 ]
2
sin[t1
2
]
gin
0.0218
0.0632
2[ 0.1 ]
0.1
0.1
ee
2
= (0.1) {2 0. 6317 2 0. 4617 e sin[0.1 ]}
2 2 2
= (0.1) [2(– 0.6317 – 0.0109) – 2(– 0.4617 – 0.0316) + 0.2017]
= (0.1)( – 0.0969) rin
= – 0.0097 g.n
2 2
l
k 3 hf t1 , y1 2 , z1 2 = (0.1) z1 2
h k
2
l
2
et
0.0097
= (0.1) 0.6317
2
= – 0.0637
h k l
l3 hg t1 , y1 2 , z1 2
2 2 2
l2 k2
h
2[ t1 ] h
2(
= (0.1) 1 2z ) 2( y1 ) e 2
sin[t1 ]
2 2
0.1
0.0097 0.0643 2[ 0.1 ] 0.1
= (0.1) {2 0. 6317 2 0.4617 e 2
sin[0.1 ]}
2 2 2
= (0.1) [2(– 0.6317 – 0.0049) – 2(– 0.4617 – 0.0322) + 0.2017]
= (0.1)( – 0.0837)
= – 0.0084
k 4 hf t1 h, y1 k 3 , z1 l3 = (0.1) z1 l3
= (0.1) 0.6317 0.0084
= – 0.0640
l 4 hg t1 h, y1 k 3 , z1 l3
2[ t h ]
= (0.1) 2( z1 l3 ) 2( y1 k 3 ) e 1 sin[t1 h]
= (0.1) {2 0.6317 0.0084 2 0.4617 0.0637 e
2[ 0.1 0.1]
sin[0.1 0.1]}
= (0.1) [ –1.2802 + 1.0508 + 0.2964]
= (0.1) (0.067)
= 0.0067
1
y [k1 2k2 2k3 k4 ]
6
1
= [0.0632 2(0.0643) 2(0.0637) 0.0640]
6
= – 0.0639
ww
y 2 y1 y = – 0.4617 – 0.0639
= – 0.5256
w.E
(i.e.) y(0.2) = – 0.5256
12. Solve y x y ,0 x 1 , y(0) = 0, y(0.2) = 0.02, y(0.4) = 0.0795,
asy
2
= 0.2 – (0.02)2
= 0.1996
y 2 x 2 y 2
2
= 0.4 – (0.0795)2
= 0.3937
y3 x3 y3
2
= 0.6 – (0.1762)2
= 0.5690
y 4, p 0
4(0.2)
2(0.1996) (0.3937) 2(0.5690)
3
y (0.8) p 0.3049
y 4,c y 2 y 2 4 y3 y 4
h
3
Now, y 4 x 4 y 4
2
= 0.8 – (0.3049)2
= 0.7070
y 4,c 0.0795
0.2
0.3937 4(0.5690) 0.7070
wwy (0.8) c 0.3046
3
Again, w.E
y 4 x 4 y 4
2
= 0.8 – (0.3046)2
y5,c 0.1762
0.2
0.5690 4(0.7070) 0.7927
3
y(1) c = 0.4555
Again, y5 x5 y5 = 1 – (0.4555)2 = 0.7925
2
y5,c 0.1762
0.2
0.5690 4(0.7070) 0.7925
3
( 2)
y(1) c = 0.4555
dy
13. Given x 3 y, y (0) 2
dx
i) Compute y(0.2), y(0.4) and y(0.6) by R-K method of 4th order.
ii) Hence find y(0.8) by Milne’s predictor corrector method taking h = 0.2
Sol. Given f ( x, y ) x y
3
0
y
k 2
2
asy = (0.2)
0. 2
3
0.4402
En
0
2
2
2
gin
= 0.4442
k 4 hf x 0 h, y 0 k 3 = (0.2) [( x 0 h) ( y 0 k 3 )]
3
= 0.4904
ee
= (0.2) [( 0 0.2) (2 0.4442 )]
3
rin
1
y [k1 2k2 2k3 k4 ] g.n
6
1
= [0.4 2(0.4402) 2(0.4442) 0.4904]
et
6
= 0.4432
y1 y0 y = 2 + 0.4432
= 2.4432
(i.e.) y(0.2) = 2.4432
x1 x0 h
= 0 + 0.2
= 0.2
To find y(0.4)
k1 hf ( x1 , y1 ) = (0.2) ( x13 y1 )
= (0.2)[(0.2)3 + 2.4432]
= 0.4902
h k1 3
h k
k 2 hf x1 , y1 = (0.2) x1 y1 1
2 2 2 2
3
0.2 0.4902
= (0.2) 0.2 2 2.4432 2
= 0.5431
h k2 3
h k 2
k 3 hf x1 , y1 = (0.2) x1 y1
2 2 2 2
3
0 .2 0.5431
= (0.2) 0 . 2 2 . 4432
2 2
= 0.5484
k 4 hf x1 h, y1 k 3 = (0.2) [( x1 h) 3 ( y1 k 3 )]
= (0.2) [( 0.2 0.2) (2.4432 0.5484 )]
3
ww = 0.6111
1
w.E
y [k1 2k2 2k3 k4 ]
6
1
asy
= [0.4902 2(0.5431) 2(0.5484) 0.6111]
6
= 0.5474
y 2 y1 y = 2.4432 + 0.5474En
= 2.9906 gin
(i.e.) y(0.4) = 2.9906
x2 x1 h = 0.2 + 0.2 ee rin
= 0.4
g.n
To find y(0.6)
k1 hf ( x2 , y 2 ) = (0.2) ( x 2 3 y 2 ) = (0.2) [(0.4)3 + 2.9906] et
= 0.6109
h k1 h
3
k
k 2 hf x 2 , y 2 = (0.2) x 2 y 2 1
2 2 2 2
0 .2
3
0.6109
= (0.2) 0.4 2 2.9906 2
= 0.6842
h k2 3
h k 2
k 3 hf x 2 , y 2 = (0.2) x 2 y 2
2 2 2 2
0.2
3
0.6842
= (0.2) 0. 4 2. 9906
2 2
= 0.6915
k 4 hf x 2 h, y 2 k 3 = (0.2) [( x 2 h) 3 ( y 2 k 3 )]
= (0.2) [( 0.4 0.2) (2.9906 0.6915 )]
3
= (0.2)[3.8981]
= 0.7796
1
y [k1 2k2 2k3 k4 ]
6
1
= [0.6109 2(0.6842) 2(0.6915) 0.7796]
6
= 0.6903
y3 y 2 y = 2.9906 + 0.6903
= 3.6809
(i.e.) y(0.6) = 3.6809
x3 x 2 h
= 0.4 + 0.2
ww = 0.6
x0 0
w.E
To find y(0.8)
Given y x y and h = 0.2
3
y0 2
x1 0.2 asy
y1 2.4432
x2 0.4 y 2 2.9906En
x3 0.6
x4 0.8
y 3 3.6809
y4 ?
gin
By Milne’s predictor formula, we have ee rin
y n1, p y n3
4h
2 yn 2 yn 1 2 yn
3 g.n
To get y 4 , put n = 3 we get
4h
y 4, p y 0 2 y1 y2 2 y3
et
3
Now, y1 x1 y1 = (0.2)3 + 2.4432
3
= 2.4512
y 2 x2 y 2 = (0.4)3 + 2.9906
3
= 3.0546
y3 x3 y3 = (0.6)3 + 3.6809
3
= 3.8969
y 4, p 2
4(0.2)
2(2.4512) (3.0546) 2(3.8969)
3
y (0.8) p 4.5711
= 5.0831
y4,c 2.9906
0.2
3.0546 4(3.8969) 5.0831
3
y (0.8) c 4.5723
Again, y 4 x4 y 4 = (0.8)3 + 4.5723
3
ww = 5.0843
0.2
3.0546 4(3.8969) 5.0843
w.E
y4,c 2.9906
3
y(0.8) c
( 2)
4.5724
asy
En
14. Given that y xy y 0, y(0) 1, y(0) 0 . Obtain for
gin
x = 0.1, 0.2, 0.3 by Taylor’s series method and find the solution
for y(0.4) by Milne’s method.
Sol. Given y xy y 0 ---------(1) ee
Put y z --------(2) then y z --------(3) rin
Sub (2) and (3) in (1), we get
z xz y 0 z xz y ---------(4) g.n
The initial conditions are y(0) = 1, y (0) 0
(i.e.) y(0) = 1, z(0) = 0 (since y z )
et
(i.e.) x0 0, y 0 1, z 0 0 , h = 0.1
Now to solve (1), it is enough if we solve the two first order differential
equations (2) and (4).
y z z xz y
y 0 z 0 0 z 0 x0 z 0 y 0 0 1 1
y z z x.z z.1 y
y 0 z 0 1 z 0 0 0 0 0
y z z xz z .1 z y
y 0 z 0 0 z 0 0 (1) (1) (1) 3
y iv z
y 0 z 0 3
iv
ww
y (0.3) 1
(0.3) 2 (0.3) 4
2
8
........
= 0.9560 w.E
Now Taylor’s series for z(x) is
z ( x) z 0 ( x x0 ) z 0 asy
( x x0 ) 2
z 0
( x x0 ) 3
z 0 ......
En 2!
( x 0) 2
3!
( x 0) 3
z ( x) 0 ( x 0)( 1)
2!gin (0)
3!
(3) .....
z ( x) x
x3
2
.......... .. ee rin
z1 z (0.1) (0.1)
(0.1) 3
2
.......... .. g.n
= – 0.0995
(0.2) 3
et
z 2 z (0.2) (0.2) .......... ..
2
= – 0.1960
(0.3) 3
z 3 z (0.3) (0.3) .......... ..
2
= – 0.2865
(0.4) 3
z 4 z (0.4) (0.4) .......... ..
2
= – 0.3680
Hence y1 z1 0.0995
y 2 z 2 0.1960
y3 z3 0.2865
y 4 z 4 0.3680
ww
y 4 ,c y 2
h
3
y2 4 y3 y 4
w.E
y4,c 0.9802
0.2
3
0.1960 4(0.2865) 0.3680
y (0.4) c 0.9232 asy
dy En
x 2 (1 y) , y(1) = 1, y(1.1) = 1.233, y(1.2) = 1.548, y(1.3) = 1.979,
15. Given
dx
gin
evaluate y(1.4) by Adam-Bashforth method.
Sol. Given y x (1 y ) and h = 0.1
x0 1
2
y0 1
ee rin
x1 1.1 y1 1.233
g.n
x2 1.2
x3 1.3
y 2 1.548
y 3 1.979 et
x4 1.4 y4 ?
By Adam-Bashforth predictor formula, we have
y n1, p y n 55 y n 59 y n 1 37 y n 2 9 y n 3
h
24
To get y 4 , put n = 3 we get
y 4, p y3 55 y3 59 y 2 37 y1 9 y0
h
24
Now, y0 x0 (1 y0 ) = 12(1 + 1)
2
=2
y1 x1 (1 y1 ) = (1.1)2(1 + 1.233)
2
= 2.7019
y 2 x 2 (1 y 2 ) = (1.2)2(1 + 1.548)
2
= 3.6691
= 5.0345
y 4, p 1.979
0.1
55(5.0345) 59(3.6691) 37(2.7019) 9(2)
24
y (1.4) p 2.5723
ww
y4,c 1.979
0.1
= 7.0017
9(7.0017) 19(5.0345) 5(3.6691) 2.7019
y (1.4) c 2.5749
w.E
24
asy
Again, y 4 x 4 (1 y 4 ) = (1.4)2(1 + 2.5749)
2
y 4,c 1.979
0.1
E
= 7.0068
ngi
9(7.0068) 19(5.0345) 5(3.6691) 2.7019
y(1.4) c
( 2)
24
2.5751 nee
Again, y 4 x 4 (1 y 4 ) = (1.4)2(1 + 2.5751)
2
rin
= 7.0072 g.n
0.1
9(7.0072) 19(5.0345) 5(3.6691) 2.7019 e
y 4,c 1.979
y(1.4) c
(3)
24
2.5752
t
dy
16. Consider the initial value problem y x 2 1, y (0) 0.5
dx
i) Using the modified Euler method find y(0.2)
ii) Using 4th order R-K method, find y(0.4) and y(0.6)
iii) Using Adam-Bashforth predictor corrector method, find y(0.8)
Sol. Given f ( x, y ) y x 1 .
2
= 1.5
y1 0.5
0.2
1.5 f [0 0.2,0.5 (0.2)(1.5)]
2
0.5
0.2
1.5 f [0.2,0.8]
2
0.5
0.2
2
1.5 [0.8 (0.2) 2 1]
= 0.826
(i.e.) y(0.2) = 0.826
x1 x0 h
= 0 + 0.2
= 0.2
To find y(0.4)
Given f ( x, y ) y x 1
2
h k1
asy k1
k 2 hf x1 , y1 = (0.2) y1 x1 1
h
2
2 2
En
2 2
gin
2
0.3572 0. 2
= (0.2) 0 . 826 0 . 2 1
2 2
h k2
= 0.3829
ee k2 h
2
rin
k 3 hf x1 , y1 = (0.2) y1 x1 1
2 2 2 2 g.n
= (0.2)
0. 826
0.3829
2
0 . 2 et
0.2
2
2
1
= 0.3855
k 4 hf x1 h, y1 k 3 = (0.2) [( y1 k 3 ) ( x1 h) 1]
2
= 0.4103
1
y [k1 2k2 2k3 k4 ]
6
1
= [0.3572 2(0.3829) 2(0.3855) 0.4103]
6
= 0.3841
y 2 y1 y = 0.8260 + 0.3841
= 1.2101
(i.e.) y(0.4) = 1.2101
x2 x1 h
= 0.2 + 0.2
= 0.4
To find y(0.6)
k1 hf ( x2 , y 2 ) = (0.2) ( y 2 x 2 2 1)
= (0.2) [(1.2101 (0.4) 1]
2
= 0.41002
h k1 k1 h
2
k 2 hf x 2 , y 2 = (0.2) y 2 x 2 1
2 2 2 2
0.41002 0.2
2
= (0.2) 1 .2101
0 .4 1
2 2
= 0.43302
k2 k2 h
2
ww
h
k 3 hf x 2 , y 2 = (0.2) y 2 x 2 1
2 2 2 2
w.E
= (0.2)
1 .2101
0.43302
2
0 .4
0.2
2
2
1
a sy
k 4 hf x 2 h, y 2 k 3
= 0.43532
En
= (0.2) [( y 2 k 3 ) ( x 2 h) 1]
2
gin
= (0.2) [(1.2101 0.43532 ) (0.4 0.2) 1]
= 0.4571
2
1
y [k1 2k2 2k3 k4 ]
6
ee rin
1
= [0.41002 2(0.43302) 2(0.43532) 0.4571] g.n
6
= 0.4340
y3 y 2 y = 1.2101 + 0.4340
et
= 1.6441
(i.e.) y(0.6) = 1.6441
x3 x 2 h
= 0.4 + 0.2
= 0.6
To find y(0.8)
Given y y x 1 and h = 0.2
2
x0 0 y 0 0 .5
x1 0.2 y1 0.826
x2 0.4 y 2 1.2101
x3 0.6 y 3 1.6441
x4 0.8 y4 ?
= 1.5
y1 y1 x1 1 = 0.826 – (0.2)2 + 1
2
= 1.786
y 2 y 2 x 2 1 = 1.2101 – (0.4)2 + 1
2
= 2.0501
y3 y3 x3 1 = 1.6441 – (0.6)2 + 1
2
ww
y 4, p 1.6441
0.2
= 2.2841
55(2.2841) 59(2.0501) 37(1.786) 9(1.5)
w.E
y (0.8) p 2.1212
24
asy
By Adam-Bashforth corrector formula, we have
h
24 En
y n1,c y n 9 y n 1 19 y n 5 y n 1 y n 2
= 2.4812
y4,c 1.6441
0.1
9(2.4812) 19(2.2841) 5(2.0501) 1.786 et
24
y (0.8) c 2.1213
18. Using fourth order Runge kutta method, solve the following equation taking
dy 4 t
each step of h = 0.1 Given y(0) = 3, dt y t y Calculate y for
x = 0.1 and 0.2
Sol. Hint:
To find y(0.1)
k1= 0, k2 = – 0.0083, k3 = – 0.0083, k4 = – 0.0165 , y 0.0083
y(0.1) = 2.9917
To find y(0.2)
k1= – 0.0165, k2 = – 0.0246, k3 = – 0.0246, k4 = – 0.0324 , y 0.0246
y(0.2) = 2.9671
rin
To find y(0.1)
k1= 0.1 , k2 = 0.1153, k3 = 0.1169, k4 = 0.1347 , y 0.1165 g.n
y(0.1) = 1.1165
To find y(0.2)
et
k1= 0.1347, k2 = 0.1552, k3 = 0.1576, k4 = 0.1823 , y 0.1571
y(0.2) = 1.2736
21. Using Taylor series method find correct to four decimal places, the value
dy
of y(0.1) given x 2 y 2 , y (0) 1.
dx
Sol. Hint:
y 0 1, y 0 2, y 0 8, y v 0 28
4 3 7 4
y ( x) 1 x x 2 x x ..........
3 6
y(0.1) = 1.11145
22. Find by Taylor series method, the values of y at x = 0.1 and x = 0.2 to four
dy
decimal places from x 2 y 1, y(0) 1.
dx
Sol. Hint:
y 0 1, y 0 0, y 0 2, y v 0 6
x3 x4
y ( x) 1 x ..........
3 4
y(0.1) = 1.8344, y(0.2) = 0.8023
w.E dy
y y x (or ) y x
dx
asy
The solution is y e Q e dx c
Pdx Pdx
En
Here P 1, Q x
e
Pdx
gin e
dx
e x
ye x
ee
x
e x
x e dx c x
1
ex
(1)
1
rin
c
ye x
x e x
e x
c
g.n
y x 1 c ex
Given y (0) 1 et
1 0 1 c c 2
y 2ex x 1
dy
25. Find y(1.1) using Euler’s method from x 2 y 2 , y(1) 1.
dx
Sol. y1 = y0 + h f(x0,y0) = 1 + (0.1)[1+1] = 1+0.2 = 1.2
ww
4. The finite difference form of the second order partial derivative utt is ____.
Sol. utt
w.E
ui , j 1 2ui , j ui , j 1
k2
asy
5. State the condition for the equation Au xx Bu xy Cu yy Du x Eu y Fu G
En
where A,B,C,D,E,F,G are functions of x and y to be i) elliptic
ii) parabolic iii) hyperbolic.
Sol. The given equation is said to be
i) elliptic if B2-4AC < 0
ii) parabolic if B2-4AC = 0 gin
iii) hyperbolic if B2-4AC>0.
eer
6. State the condition for the equation Auxx + 2Buxy + Cuyy = f(x,y,ux,uy) to
be i) elliptic ii) parabolic iii) hyperbolic. ing
Sol. The equation is elliptic is (2B)2 – 4AC < 0
(i.e) B2 – AC < 0
.ne
It is parabolic if B2 – AC = 0
and it is hyperbolic if B2 – AC > 0.
7. 2
If b – 4ac is positive,
t
then afxx + bfxy + cfyy + g(x,y,fx,fy) = 0 is __________
Sol. hyperbolic.
8. Classify the equation fxx + 2fxy + fyy = 0.
Sol. B2 – 4AC = 4 – 4.1.1 = 0.
Hence the given equation is parabolic.
u 2 u
2
w.E
14. What is the purpose of Leibmann’s process ?
Sol. The purpose of Leibmann’s process is to improve the interior
rough values of u with accuracy.
2u 2u
asy
0 , we use Leibmann’s method. Say True or False.
15. To solve
x 2 y 2
En
Sol. True.
gin
16. State the general form of Poisson’s equation in partial derivatives.
Sol.
2u 2u
x 2 y 2
ee
F ( x, y) where F(x,y) is a given function of x and y.
rin
g.n
17. State the difference equation that approximates elliptic equation. (or)
et
Write the difference scheme for solving the Laplace’s equation (or)
State Leibmann’s iterative process formula.
Sol. ui , j
1
( n 1)
4
ui 1, j
( n 1)
ui 1, j ui , j 1 ui , j 1
(n) (n) ( n 1)
The five point finite difference formula for 0 is ______.
2
18.
Sol.
1
u i , j u i 1, j u i 1, j u i , j 1 u i , j 1
4
19. Write down the finite difference form of the equation 2u f ( x, y ).
Sol. ui 1, j ui 1, j ui , j 1 ui, j 1 4ui, j h2 f (ih, jh)
20. The boundary conditions in solving uxx + uyy = 0 are
u(0,y) = 0, 0<y<4
u(4,y) = 12 + y, 0<y<4
Sol.
y=4
0 1 4 9 16
x =0 x =4
0 3 6 9 12
y=0
22. Write down the diagonal and standard five point formula to solve the
2u 2u
equation 0.
x 2 y 2
Sol. Standard five point formula is
1
ww ui, j
4
u i 1, j u i 1, j u i , j 1 u i , j 1
ui , j w .E
Diagonal five point formula is
1
ui 1, j 1 ui 1, j 1 ui 1, j 1 ui 1, j 1
23.
4
asy
What is the error for solving Laplace and Poisson’s equation by finite
difference method?
En
Sol. Error for solving Laplace and Poisson equations is the order of h2.
gin
24. Name two methods to solve one dimensional heat equation?
Sol. i) Bender-Schmidt scheme ii) Crank Nicholson scheme.
ee
25. Write an explicit scheme to solve uxx = ut numerically (or) Write down
Bender-schmidt recurrence relation to solve uxx = ut. For what purpose
you use it.
rin
ui , j 1 ui 1, j (1 2 )ui , j ui 1, j
Sol.
k
k g.n
where
ah2 h 2
( since a = 1 )
2u 2u
equation a 2
.
x 2 t 2
Sol. ui , j 1 2(1 2 a 2 )ui , j 2 a 2 (ui1, j ui1, j ) ui, j 1
1
To get the simplest form, choose
a
u i , j 1 u i 1, j u i 1, j u i , j 1 .
1
29. What is the value of k to solve ut u xx by Bender- schmidt method
2
with h = 1 if h and k are the increments of x and t respectively?
Sol. uxx = 2 ut
h = 1, a = 2
ah 2
ww k
2
2(1) 2
1.
w.E
2
30. asy
To get the simplest explicit difference formula for the parabolic equation
1
2
ee rin
k
(i.e) 2
ah
1
2 g.n
(i.e)
ah
k
2
2. et
31. To get the simplest explicit difference formula for the parabolic
x 2
equation ut u xx , we should take _______
2
2 t
Sol.
1
u t 2 u xx a
2
To get the simplest form,
1 k 1 t 1
2
2 ah 2 ax 2 2
ax 2
2
t
x 2
2 2.
t
ui 1, j 1 ui , j 1 ui 1, j 1
The solution value at any point ( i , j+1 ) on the (j+1)th level
is dependent on the solution values at the neighbouring points
on the same level and on three values on the jth level. Hence
it is an implicit method.
34. Write a note on the stability and convergence of the solution of the
difference equation corresponding to the hyperbolic equation utt a
2
u xx .
ww
1
Sol. For , the solution is stable and coincides with the solution of the
a
differential equation.
1
w.E
For , the solution is unstable.
a
1
asy
For , the solution is stable but not convergent.
a
Sol.
x 2 c 2 t 2
1
c
ee x
rin
36. In solving the wave equation how will you express the initial condition g.n
Sol.
ut ( x,0) 0.
u i , j 1 u i , j 1
et
u t ( x,0) 0 0
2k
when j 0 (i.e) u i ,1 u i , 1 (1)
u i ,1
1
u i 1,0 u i 1,0
2
k 2
37. In the parabolic equation ut u xx if2
2 where k = t and h = x ,
h
then (a) explicit method is stable only if = ______
d2y
38. Obtain the finite difference scheme for the differential equation 2 y 5.
dx 2
d2y
Sol. Given 2 y 5.
dx 2
y y i 1 2 yi
2 i 1 yi 5
2
h
2 y i 1 (h 4) y i 2 y i 1 5h 2
2
PART B
ww
u(4,y) = 8 + 2y, u(x,0) =
x2
2
and u(x,4) = x2 taking h = k = 1.
w.E
Obtain the result correct to two decimal.
Sol. Given that u(0,y) = 0, u(4,y) = 8 + 2y,
asy
2
x
u(x,0) = and u(x,4) = x2 taking h = k = 1.
2
En
In the line x = 0, when y = 1,2,3,4 we have u = 0,0,0,0
In the line x = 4, when y = 1,2,3,4 we have u = 10,12,14,16
gin
In the line y = 0, when x = 1,2,3,4 we have u = 0.5, 1, 4.5, 8
In the line y = 4, when y = 1,2,3,4 we have u = 1,4,9,16.
0 1 4
ee 9 16
rin
0 14 u1 u2 u3
g.n
0 12
u4 u5 u6
et
0 10
u7 u8 u9
0
0.5 2 4.5 8
Let the interior values of u at the 9 grid points be u1, u2,….. u9.
Finding rough values :
1
u5 [0 4 12 2] 4.5 (SFPF)
4
1
u1 [0 0 4 4.5] 2.13 (DFPF)
4
1
u 3 [4 4.5 16 12] 9.13 (DFPF)
4
1
u 7 [0 0 4.5 2] 1.63 (DFPF)
4
1
u9 [4.5 2 12 8] 6.63 (DFPF)
4
1
u 2 [2.13 4 9.13 4.5] 4.94 (SFPF)
4
1
u 4 [0 2.13 4.5 1.63] 2.07 (SFPF)
4
1
u 6 [4.5 9.13 12 6.63] 8.07 (SFPF)
4
1
u8 [4.5 1.63 2 6.63] 3.69 (SFPF)
4
ww
Hereafter we use only SFPF.
w.E
0
u1
1
u2
4
u3
9 16
0 14 2.13
2.003 asy 4.94
4.91
9.13
8.995
1.99
1.99
En 4.92
4.92
9
8.997 = 9
0 12
u4 u5
gin u6
2.07
2.03
2.06
2.06
ee 4.5
4.68
4.70
4.69
8.07
8.08
8.07
8.07 rin
0 10 u7 u8 u9
g.n
1.63
1.56
1.57
1.57
3.69
3.72
3.71
3.71
6.63
6.58
6.57
6.57
et
0
0.5 2 4.5 8
2. Solve u xx u yy 0 for the following square mesh with boundary values as shown in the figure
below.
A 1 2 B
14
25
D 4 5 C
Sol. Evidently the boundary values are symmetrical about the diagonal
AC but not about BD. Let the values at the interior grid points be
u1, u2, u3, u4.
A 1 2 B
14 u1 u2
25
u3 u4
D 4 5 C
By symmetry, u2 = u3 , u1 u4.
We need to find u1, u2, u4.
Assume u2 = 3. ( since u2 is at 1/3 distance from the value u = 2)
Rough values
1 1
u1 [1 1 2u 2 ] [1 1 6] 2
ww 4
1
4
1
u 4 [5 5 2u 2 ] [10 6] 4
4
1
w.E 4
1
u 2 [u1 u 4 2 4] [2 4 6] 3
4 asy
4
First Iteration
1
u1 [1 1 3 3] 2En
4
1
gin
u 2 [2 4 2 4] 3
4
1
ee rin
u 4 [5 5 3 3] 4
4
g.n
et
Since the values in rough estimation and first iteration are equal, we
conclude u1 = 2, u2 = u3 = 3, u4 = 4.
3. Solve u xx u yy 0 for the following square mesh with boundary conditions as shown below.
Iterate until the maximum difference between successive values at any grid point is less than 0.001
A 1 2 B
12 u1 u2
21
u3 u4
D 2 1 C
Sol. From the above figure, we see that it is symmetrical about the
diagonals AC and BD.
Let u1, u2, u3, u4 be the values at the interior grid points.
By symmetry, u1 = u4, u2 = u3.
So, we need to find only 2 values u1 and u2.
Assume u2 = 1.6
Rough values
1
u1 [1 1 1.6 1.6] 1.3
4
1
u 2 [2 2 1.3 1.3] 1.65
4
Hereafter we use only SFPF.
A 1 2 B
u1 u2
12 1.3 1.65
1.325 1.6625
1.3313 1.6656
1.3328 1.6664
1.3332 1.6666
1.3333 1.6667
u3 u4
21
ww
D
w.E
2 1 C
asy
Hence u1 = u4 = 1.333, u2 = u3 = 1.667
D u1 E
B
ee
u2
u=0 rin
F u3 G
u4
g.n
O u=0 C
et
Given u 10 ( x y 10 ) . Here h = 1
2 2 2
u1 + 0 + 0 + u4 – 4u2 = – 10(18)
u1 + u1 – 4u2 = – 180
u1 – 2u2 = – 90 --------(3)
Applying the formula (1) at F [ i = 1, j = 1]
0 + u4 + u1 + 0 – 4u3 = – 10(12)
u1 + u1 – 4u3 = – 120
u1 – 2u3 = – 60 --------(4)
(2) 2 + (3) , we get
– 7u1 + 2u3 = – 390 ---------(5)
(4) + (5) , we get
– 6u1 = – 450
u1 = 75
Sub. u1 = 75 in (3), we get
75 – 2u2 = – 90
– 2u2 = – 165
u2 = 82.5
Sub. u1 = 75 in (4), we get
75 – 2u3 = – 60
– 2u3 = – 135
u3 = 67.5
ww u1 = u4 = 75, u2 = 82.5, u3 = 67.5
u(1,y) = ey, 0
asy
y 1 and u(x,0) = 1,u(x,1) = ex, 0 x 1 using h = k = 1 .
3
En
Sol. gin
u=1
A
D u1
u = ex
E u2 ee B
u = ey rin
F u3 G
u4
g.n
O u=1 C
et
Given 2 u e xy ( x 2 y 2 ) . Here h = k = 1
.
3
Since the differential equation is unchanged when x,y are
interchanged and boundary conditions are also same after
interchange x and y, the result will be symmetrical about the
line y = x.
u4 = u1.
Hence we need to find u1, u2, u3 only.
As per the five point formula,
ui 1, j ui 1, j ui , j 1 ui, j 1 4ui, j h2 f (ih, jh)
1 f i , j
2
=
3 3 3
1 9 i2 j2
i. j
= e
9 9 9
i. j
1 9 2
= e (i j 2 ) ------(1)
81
Applying the formula (1) at D [ i = 1, j = 2 ]
5 2/9
1 + u2 + e1/ 3 + u3 – 4u1 = e
81
5 2 / 9 1/ 3
– 4u1 + u2 + u3 = e – e –1
81
= 0.0771 – 1.3956 – 1
– 4u1 + u2 + u3 = – 2.3185 ----------------(2)
Applying the formula (1) at E [ i = 2, j = 2 ]
8 4/9
u1 + e2/3 + e2/3 + u4 – 4u2 = e
81
8 4/9
u1 + u1 – 4u2 = e – 2 e2/3
81
2u1 – 4u2 = 0.1540 – 3.8955
= – 3.7415
w.E
1 + u4 + u1 + 1 – 4u3 =
5 2/9
81
e
u1 + u1 – 4u3 =
asy 5 2/9
81
e –2
En
2u1 – 4u3 = 0.0276 – 2
= – 1.9724
gin
u1 – 2u3 = – 0.9862 --------------(4)
Solving equations (2), (3) and (4), we get
u 2 u
,0 x 1, t 0
ee
u1 = u4 = 1.2490, u2 = 1.5599, u3 = 1.1176
rin
6. Solve
t x 2
x 0.2 g.n
with u(x,0) = x(1 – x), 0 < x < 1 and
et
u(0,t) = u(1,t) = 0 for all t > 0 using explicit method with for 3 time
steps.
Sol. Here a = 1, h = 0.2
ah 2 1.( 0.2) 2
k 0.02
2 2
k 0.02 1
2 0 . 5
ah 1.( 0.2) 2 2
Explicit formula is
ui , j 1 ui 1, j (1 2 )ui , j ui 1, j
1
When , the above equation becomes
2
1
ui , j 1 [ui 1, j ui 1, j ]
2
The value of ui, j are tabulated below.
x dir
i
j 0 0.2 0.4 0.6 0.8 1
ww
Sol. Since h and k are not given we will select them properly and
use Bender-Schmidt method.
Here a = 1. Since range of x is (0,1), take h = 0.2
Hence k
2
w.E
ah 2 1.( 0.2) 2
2
0.02
2
k 0.02
0 . 5
1 asy
ah 1.( 0.2) 2
Bender-Schmidt formula is
2
En
gin
ui , j 1 ui 1, j (1 2 )ui , j ui 1, j
When
1
2
ee
, the above equation becomes
rin
ui , j 1
1
[ui 1, j ui 1, j ]
2 g.n
Since time step is not given, we will calculate upto 5 time step.
The value of ui, j are tabulated below.
x dir
et
i
j 0 0.2 0.4 0.6 0.8 1
u 2 u
8. Solve given u(0,t) = 0, u(4,t) = 0, u(x,0) = x(4 – x) assuming h = k = 1.
t x 2
Find the values of u upto t = 5 using explicit formula.
Sol. Here a = 1. Given h = k = 1
k 1
1
ah 2 1.1
Explicit formula is
ui , j 1 ui 1, j (1 2 )ui , j ui 1, j
When 1 , the above equation becomes
u i , j 1 u i 1, j u i , j u i 1, j
The value of ui, j are tabulated below.
x dir
ww j
i
0 1 2 3 4
w.E 0 0 3 4 3 0
t dir.
1
asy 0 1 2 1 0
2
En 0 1 0 1 0
3
gin
0 –1 2
–4
–1 0
ee
4 0 3 3 0
5 0 –7 10 –7 0
rin
2u
u
0
g.n
9. Solve
x 2
2
t
h = 1. Find the values of u upto t = 5 using Bender-Schmidt method.
Sol. Here a = 2. Given h = 1.
et
given u(0,t) = 0, u(4,t) = 0, u(x,0) = x(4 – x).Assume
ah 2 2.(1) 2 k 1 1
k 1 2 2
2 2 ah 2.(1) 2
Bender-Schmidt formula is ui , j 1 ui 1, j (1 2 )ui , j ui 1, j
When 1/ 2 , the above equation becomes u i , j 1 1 / 2[u i 1, j u i 1, j ]
The value of u i , j are tabulated below.
x dir
i
j 0 1 2 3 4
0 0 3 4 3 0
1 0 2 3 2 0
3 0 1 1.5 1 0
4 0 0.75 1 0.75 0
ww
Crank – Nicholson Difference Method ( Implicit method )
w.E
To solve the parabolic equation
u (0, t ) T0 , u (l , t ) Tl
u xx a ut -----(1) with boundary conditions
En
(ui 1, j 1 ui 1, j 1 ) 2( 1)ui , j 1 2( 1)ui , j (ui 1, j ui 1, j ) where
k
a h2
gin
This equation is called Crank – Nicholson Difference Method
Note: Setting 1 (i.e) k = ah2 , the Crank Nicholson formula reduces to
ui , j 1
1
ee
ui 1, j 1 ui 1, j 1 ui 1, j ui 1, j
4 rin
Problems
1. Solve by Crank Nicholson method the equation g.n
u xx u t subject to u(x,0) = 0, u(0,t) = 0 and u(1,t) = t
using h
1
4
for two time steps. et
1
Sol. Here a = 1 and given h
4
1 k
k ah 2 2 1
16 ah
Crank-Nicholson formula is
(ui 1, j 1 ui 1, j 1 ) 2( 1)ui , j 1 2( 1)ui , j (ui 1, j ui 1, j )
When 1, the above formula becomes
1
ui , j 1
4
ui 1, j 1 ui 1, j 1 ui 1, j ui 1, j (1)
x dir
i
0 0.25 0.5 0.75 1
j
0 0 0 0 0 0
t dir. 1 1
0 u1 u2 u3
16 16
2
0 u4 u5 u6
2 16
16
asy
u1 = 0.0011, u2 = 0.0045, u3 = 0.0167
2u u
2. Solve , 0 < x < 2, t > 0, u(0,t) = u(2,t) = 0, t > 0 and
x 2 t
x
u(x,0) = sin , 0 x 2 using x 0.5 and t 0.25 for 2 time steps
2
by Crank-Nicholson implicit function difference method.
Sol. Here a = 1
k 0.25
1
ah 2 1.( 0.5) 2
Crank-Nicholson formula is
(ui 1, j 1 ui 1, j 1 ) 2( 1)ui , j 1 2( 1)ui , j (ui 1, j ui 1, j )
0 0 0.7071 1 0.7071 0
t dir. 0.25 0 u1 u2 u3 0
0.5 0 u4 u5 u6 0
2u u
3. Solve in 0 x 5 , t > 0 given that u(x,0) = 20, u(0,t) = 0,
x 2 t
u(5,t) = 100. Compute u for one time step with h = 1 by Crank Nicholson method.
Sol. Here a = 1 and given h = 1.
k 1
k ah 1.1 1
2 1
ah 2 1.1
Crank-Nicholson formula is
(ui 1, j 1 ui 1, j 1 ) 2( 1)ui , j 1 2( 1)ui , j (ui 1, j ui 1, j )
When 1, the above formula becomes
ui , j 1
1
4
ui 1, j 1 ui 1, j 1 ui 1, j ui 1, j (1)
0 0 20 20 20 20 20
t dir.
1 0 u1 u2 u3 u4 100
rin
15u 2 4u3 180 (6)
g.n
u
(4) u3 10 2 4
4
u
4 et
u 1 u
u3 10 2 35 3
4 4 4
16u3 160 4u 2 140 u3
4u 2 15u3 300 (7)
Solving (6) and (7), we get
u 2 18 .6603 , u 3 24 .9761
u2 18.6603
(2) u1 5 5 9.6651
4 4
u 24.9761
(5) u 4 35 3 35 41.2440
4 4
u1 = 9.6651, u2 = 18.6603, u3 = 24.9761, u4 = 41.2440
2u u
4. Solve the equation subject to the conditions u(x,0) = sin x,0 x 1 ,
x 2
t
1 1
u(0,t) = u(1,t) = 0 using Crank-Nicholson method, taking h = ,k= . ( Do one
3 36
time step).
1 1
Sol. Here a = 1. Also given h = ,k= .
3 36
k 1 / 36 9 1
.
ah 2 1.(1 / 9) 36 4
Crank-Nicholson formula is
(ui 1, j 1 ui 1, j 1 ) 2( 1)ui , j 1 2( 1)ui , j (ui 1, j ui 1, j )
1
When , the above formula becomes
4
1 5 3 1
(ui 1, j 1 ui 1, j 1 ) ui , j 1 ui , j (ui 1, j ui 1, j ) (1)
ww
4 2
The value of u i , j are tabulated below.
2 4
w.E x dir
j
i
t dir.
0
En
0 0.8660 0.8660 0
1/36 0
gin u1 u2 0
Using (1), we
1 5 3 1
ee
(u 2 0) u1 (0.8660) (0.8660 0) rin
have
4 2 2
10u1 u 2 7(0.8660 )
4
g.n
1
10u1 u 2 6.062 (2)
5 3 1
et
(0 u1 ) u 2 (0.8660) (0 0.8660)
4 2 2 4
u1 10u 2 7(0.8660 )
u1 10u 2 6.062 (3)
Solving (2) and (3), we get
u1 = u2 = 0.6736
Crank-Nicholson formula is
(ui 1, j 1 ui 1, j 1 ) 2( 1)ui , j 1 2( 1)ui , j (ui 1, j ui 1, j )
When 1, the above formula becomes
1
ui , j 1
4
ui 1, j 1 ui 1, j 1 ui 1, j ui 1, j (1)
0 0 0 0 0 0
t dir. 0 u1 u2 u3 100
1
ww
Using (1), we have
1
u1 [0 0 0 u 2 ] 4u1 u 2 0 (2)
4
1 w.E
u 2 [0 0 u1 u3 ] u1 4u 2 u 3 0 (3)
4
1 asy
u 3 [u 2 0 0 100] u 2 4u 3 100 (4)
4
En
Solving (2), (3) and (4) we get
u1 = 1.7857, u2 = 7.1429, u3 = 26.7857
gin
6. Using Crank Nicholson scheme, solve
2u u
x 2 t
ee rin
subject to u(x,0) = 0, u(0,t) = 0,
x dir
i
0 0.5 1
j
0 0 0 0
t dir.
1/8 0 u1 1/8
asy
2(ui 1, j 1 ui 1, j 1 ) 6ui , j 1 2 ui , j 2(ui 1, j ui 1, j )
(ui 1, j 1 ui 1, j 1 ) 3 ui , j 1 ui , j (ui 1, j u i 1, j ) (1)
ui, j En
The value of
gin
are tabulated below.
x dir
j
i
0ee 0.25 0.5 0.75 1
rin
0 0 0 0 0 0
g.n
t dir.
1/8
0 u1 u2 u3 1/8
et
Using (1), we have
0 u 2 3u1 0 3u1 u 2 0 (2)
u1 u 3 3u 2 0 u1 3u 2 u 3 0 (3)
1
u 2 3u 3 0 8u 2 24u 3 1 (4)
8
Solving (2), (3) and (4) we get
u1 = 0.0060, u2 = 0.0179, u3 = 0.0476
Hyperbolic Equations
The wave equation in one dimension (vibration of strings) is
2u 2u
a 2
0 (i.e.) a 2 u xx u tt 0
x 2 t 2
Here A = a2, B = 0, C = –1
B2 – 4AC = 4a2 = +ve
Hence the equation is hyperbolic.
Using finite differences substitute the vales of uxx and utt in (1) and simplifying,
Note: ww
1. Period of vibration =
2. The initial condition.
w.E 2l
a
seconds
u t ( x,0) 0 gives
u i , j 1 u i , j 1
asy
0 En
2k
gin
when j 0 (i.e) u i ,1 u i , 1 (2)
0 0 3 4 3 0
ww 0.5 0 2 3 2 0
t dir.
w.E 1
1.5
0
0
0
–2
0
–3
0
–2
0
2 asy 0 –3 –4 –3 0
2.5
En 0 –2 –3 –2 0
3
gin 0 0 0 0 0
3.5
4
0
0
ee 2
3
3
4
2
3
0
0
rin
2. Solve 25 u xx u tt 0 for u at the pivotal points given u(0,t) = u(5,t) = 0,g.n u t ( x, o ) 0 and
2 x , for 0 x 2.5
u( x,0)
10 - 2x , for 2.5 x 5
for one half period of vibration. et
Sol. Here a2 = 25 a = 5. Take h = 1
2l 2(5)
One Period = 2 seconds
a 5
Half Period = 1 second.
Hence we want values upto t = 1 second.
h 1 k 1/ 5 1
k
a 5 h 1 5
Explicit formula for the wave equation is
ui , j 1 2(1 2 a 2 )ui , j 2 a 2 (ui1, j ui1, j ) ui, j 1
1
When a = 5 and , the above formula becomes
5
u i , j 1 u i 1, j u i 1, j u i , j 1
ui 1,0 ui 1,0
ut ( x,0) 0 ui ,1
2
The value of ui, j are tabulated below.
x dir
i
j 0 1 2 3 4 5
0 0 2 4 4 2 0
1/5 0 2 3 3 2 0
t dir. 2/5 0 1 1 1 1 0
3/5 0 –1 –1 –1 –1 0
4/5 0 –2 –3 –3 –2 0
ww 1 0 –2 –4 –4 –2 0
w.E
asy 2u 2u
3. En
Approximate the solution to the wave equation
x 2 t 2
, 0 < x < 1, t > 0,
gin
u(0,t) = 0, u(1,t) = 0, t > 0, u(x,0) = sin 2x, 0 x 1 and
Sol.
u
t
Here a2 = 1 a = 1
ee
( x,0) 0, 0 x 1 with x 0.25 and t 0.25 for 3 time steps.
rin
Also given h = k = 0.25
k 0.25
1.
g.n
h 0.25
Explicit formula for the wave equation is
et
ui , j 1 2(1 2 a 2 )ui , j 2 a 2 (ui1, j ui1, j ) ui, j 1
When a = 1 and 1 , the above formula becomes
u i , j 1 u i 1, j u i 1, j u i , j 1
ui 1,0 ui 1,0
ut ( x,0) 0 ui ,1
2
The value of ui, j are tabulated below.
x dir
i
0 0.25 0.5 0.75 1
j
0 0 1 0 –1 0
0.25 0 0 0 0 0
t dir.
0.5 0 –1 0 1 0
0.75 0 0 0 0 0
wwk
h
a
h ka (0.1).1 0.1
k 0.1
h 0.1
1.
w.E
Explicit formula for the wave equation is
yi, j 1 2(1 2 a 2 ) yi , j 2 a 2 ( yi1, j yi1, j ) yi , j 1
When a = 1 and
asy
1 , the above formula becomes
yi , j 1 yi 1, j yi 1, j yi , j 1
En
yi 1, 0 yi 1, 0
yt ( x,0) 0 yi ,1
gin 2
The value of ui, j are tabulated below.
x dir
ee rin
j
i
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
g.n
0.1
0 0 10.09 10.16 10.21 10.24 10.25 10.24 10.21 10.16 10.09 0
0.2 0 0.06 5.12 10.17 10.20 10.21 10.20 10.17 5.12 0.06 0
t dir.
0.3 0 0.04 0.08 5.12 10.15 10.16 10.15 5.12 0.08 0.04 0
0.4 0 0.02 0.04 0.06 5.08 10.09 5.08 0.06 0.04 0.02 0
0.5 0 0 0 0 0 0 0 0 0 0 0
2u 2u
5. Solve for x = 0 to 5 and t = 0 to 5 given that u(0,t) = 0, u(5,t) = 0,
x 2 t 2
x
10 , in 0 x 2.5
u x
( x,0) (5 x) in 0 x 5 and u ( x,0) 1
t 10 (5 - x), in 2.5 x 5
10
Sol. Here a2 = 1 a = 1
k 1
Assume h = k = 1 1.
h 1
Explicit formula for the wave equation is
ui, j 1 2(1 2 a 2 )ui, j 2 a 2 (ui1, j ui1, j ) ui, j 1
When a = 1 and 1 , the above formula becomes
ui , j 1 ui 1, j ui 1, j ui , j 1 (1)
x u i , j 1 u i , j 1 x
Now, u t ( x,0) (5 x) (5 x)
10 2k 10
Setting j = 0, we get
u i , 01 u i , 01 x
(5 x) ( since k = 1)
2(1) 10
x
ui ,1 ui , 1 (5 x) (2)
5
Setting j = 0 in (1), we get
ui , 01 ui 1, 0 ui 1, 0 ui , 01 ui ,1 ui 1, 0 ui 1, 0 ui , 1
ww ui ,1 ui 1,0 ui 1,0
x
(5 x) ui ,1 [using (2)]
w.E 1
5
x
ui ,1 (ui 1,0 ui 1,0 ) (5 x)
En
x dir
j
i
gin
0
0
0
ee
1
0.1
2
0.2
3
0.2
4
0.1
5
0 rin
1 0 0.5 0.75 0.75 0.5 0 g.n
t dir. 2
3
0
0
0.65 1.05 1.05
0.55
0
0
et
4 0 0.30 0.45 0.45 0.30 0
6. Evaluate the pivotal values of the following equation taking h = 1 and upto
one half of the period of the oscillation utt 16 u xx given u(0,t) = u(5,t) = 0,
2l 2(5) 5
Period of oscillation = seconds.
a 4 2
5
One half of period = seconds.
4
Explicit formula for the wave equation is
ui , j 1 2(1 2 a 2 )ui , j 2 a 2 (ui1, j ui1, j ) ui, j 1
1
When a = 4 and , the above formula becomes
4
u i , j 1 u i 1, j u i 1, j u i , j 1
ui 1,0 ui 1,0
ut ( x,0) 0 ui ,1
2
The value of ui, j are tabulated below.
x dir
ww j
i
0 1 2 3 4 5
w.E 0 0 4 12 18 16 0
1/4
asy 0 6 11 14 9 0
t dir. 2/4
En 0 7 8 2 –2 0
3/4
gin0 2 –2 –8 –7 0
5/4
0
0
ee –9
–16
–14
–18
–11
–12
–6
–4
0
rin
0
g.n
u tt u xx
x
(4 x) and
et
ut ( x, o) 0 . Take
7. Solve given u(0,t) = u(4,t) = 0, u(x,0) =
2
h = 1, find the solutions upto 5 steps in t-direction.
8. Solve u tt u xx , 0 < x < 1, t > 0 given u(x,0) = ut(x,0) = u(0,t) = 0 and
u(1,t) = 100 sin π t. Compute u for 4 time steps with h = 0.25
ww
values. (i.e.) the value of y at x = x0 , x1 , x 2 , ........ x n .
Problems
w.E
1. Using the finite difference method, find y(0.25), y(0.5) and y(0.75) satisfying the
d2y
differential equation
dx 2 asy
y x subject to the boundary conditions y(0) = 0,
y(1) = 2.
Sol. Given x (0,1) En
Here h 0.25
1 1 0
, gin then we have n = 4.
h
b a
n
Also
d2y
yx
4 4
ee
rin
dx 2
yi 1 yi 1 2 yi
yi xi g.n
h2
16 ( y i 1 y i 1 2 y i ) y i xi
et
16 y i 1 31 y i 16 y i 1 xi , i 1,2,3.
(i.e.) When i = 1,2,3 we have
16 y 2 31y1 16 y 0 x1
16 y3 31y 2 16 y1 x2
16 y 4 31y3 16 y 2 x3
Given y 0 y (0) 0, y 4 y (1) 2. Also x1 0.25, x2 0.5, x3 0.75
31 y1 16 (0) 0.25
(i.e.) 16 y 2
16 y3 31y 2 16 y1 0.5
16(2) 31y3 16 y 2 0.75
(i.e.) 31 y1 16 y 2 0.25 (1)
wwAlso xy y 0
4 4
y w.E
y
x
0
yi 1 yi 1 2 yi yi
h2
0
xi
asy
16( yi 1 yi 1 2 yi )
yi
0
En 1
xi
gin
16 yi 1 32 yi 16 yi 1 0, i 1,2,3.
xi
(i.e.) When i = 1,2,3 we have
1
ee
16 y 2 32 y1 16 y0 0 rin
x1
1
g.n
16 y3 32 y 2 16 y1 0
x2 et
1
16 y 4 32 y3 16 y 2 0
x3
Given y 0 y (1) 1, y 4 y (2) 2. Also x1 1.25, x2 1.5, x3 1.75
1
(i.e.) 16 y 2 32 y1 16 (1) 0
1.25
1
16 y3 32 y 2 16 y1 0
1.5
1
16 (2) 32 y3 16 y 2 0
1.75
(i.e.) 31 .2 y1 16 y 2 16 (1)
16 y1 31 .3333 y 2 16 y3 0 (2)
16 y 2 31 .4286 y3 16 y 2 32 (3)
En
(i.e.) 4(2) (8 0.5) y1 4(1) 0
8.5 y1 4 gin
y1 0.4706
Tabulating the values, we have ee rin
x 0 0.5 1
g.n
y –1 0.4706 2
et
4. Using finite difference method, solve for y given the differential equation
d2y
y 1 0 , x (0,1) and the boundary conditions y(0) = y(1) = 0, taking
dx 2
i) h = ½ ii) h = ¼
Sol. Hint:
7 1
i) yi 1 yi yi 1 , i 1.
4 4
y1 0.1428
31 1
ii) yi 1 yi yi 1 , i 1,2,3.
16 16
y1 y3 0.1047 , y 2 0.1403 .
d2y
5. Using finite difference method solve y in (0,2) given y(0) = 0, y(2) = 3.63
dx 2
subdividing the range of x into 4 equal parts.
9
Sol. yi 1 yi yi 1 0, i 1,2,3.
4
y1 0.5268 , y 2 1.1853 , y3 2.1401
6. Using finite difference method, solve for y given the differential equation
y 64 y 10 0 , x (0,1) given y(0) = y(1) = 0, subdividing the interval into
i) 4 equal parts ii) 2 equal parts.
5
Sol. i) yi 1 6 yi yi 1 , i 1,2,3.
8
y1 y3 0.1287 , y 2 0.1471 .
5
ii) yi 1 18 y i yi 1 , i 1.
2
ww y1 0.1389
w.E
7. Solve y y x , x (0,1) given y(0) = y(1) = 0 using finite differences dividing
the interval into 4 equal parts.
Sol.
asy
16 y i 1 33 y i 16 y i 1 xi , i 1,2,3.
y1 0.0349 , y 2 0.0563 , y3 0.05004
En
gin
ee rin
g.n
et