0% found this document useful (0 votes)
3 views

Maths

The document is a question bank for the Applied Numerical Analysis course for II year B.Tech students, covering topics such as curve fitting, solution of equations, and iterative methods. It includes definitions, formulas, and step-by-step procedures for various numerical methods like least squares, Newton's method, and Gauss elimination. Additionally, it provides example problems and solutions for practical understanding of the concepts.

Uploaded by

Sushmita N
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Maths

The document is a question bank for the Applied Numerical Analysis course for II year B.Tech students, covering topics such as curve fitting, solution of equations, and iterative methods. It includes definitions, formulas, and step-by-step procedures for various numerical methods like least squares, Newton's method, and Gauss elimination. Additionally, it provides example problems and solutions for practical understanding of the concepts.

Uploaded by

Sushmita N
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 82

Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.

: Maths Year: 2023-24


II year B.Tech. Question Bank (Chemical)

UNIT – I CURVE FITTING AND SOLUTION OF EQUATIONS


PART – A
1. What is meant by method of least squares.
The least squares method is a form of mathematical regression analysis used to determine the line
of best fit for a set of data, providing a visual demonstration of the relationship between the data
points. Each point of data represents the relationship between a known independent variable and
an unknown dependent variable.
2. Write down the steps involved in fitting a straight line by the method of least squares.

Step 1. Let ( xi , yi ) , i = 1 , 2,  , n be the ‘n’ sets of observations and let the related relation
be y = ax + b.
Step 2. The normal equations are
n n n n n
a xi + nb =  yi − − − (1) a xi2 + b xi =  xi yi − − − (2)
i =1 i =1 i =1 i =1 i =1

Step 3. Solve for a and b from (1) and (2) and obtain the best fit y = ax + b.

3. Write down the steps involved in fitting a parabola by the method of least squares.

Step 1: Let ( xi , yi ) , i = 1 , 2,  , n be the ‘n’ sets of observations and let the related relation
be y = ax 2 + bx + c.
Step 2: The normal equations are
n n n n n n n
a  xi 2 + b xi + nc =  yi − − − (1) ; a  xi2 + b xi + c  xi =  xi yi − − − (2)
i =1 i =1 i =1 i =1 i =1 i =1 i =1
n n n n
a  xi4 + b xi 3 + c xi 2 =  xi 2 yi − − − (3)
i =1 i =1 i =1 i =1

Step 3 : Solve for a and b from (1), (2) and (3) and obtain the best fit y = ax 2 + bx + c.

4. What is meant by sum of squares of residuals.


Residual, a quantitative measurement, is the vertical distance between the observed and the
estimated using estimated parameters.
Locate the Negative root of x – 2 x + 5 = 0 approximately.
5. 3

Let f ( x) = x3 – 2 x + 5
f( – 1) = 6 = positive ; f( – 2) = 1 = positive ; f( – 3) = – 16 = Negative
Hence the root lies between – 3 and – 2
6. State Fixed point theorem.
Suppose the equation f ( x) = 0 can be written in the form x = g ( x ) . Let ‘ a’ be a root of f ( x) = 0
and let I be the interval containing ‘a’. If g ( x) and g '( x) are continuous in I and
g '( x)  a  1, x , then the sequence of successive approximations x0 , x1 ,... converges to ‘a’.

St. Joseph’s College of Engineering Page No.1


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
7. If g ( x ) is continuous in [a, b], then under what condition the iteration method x = g ( x ) . has
a unique solution in [a,b]?

i) If g ( x )   a, b ,  x   a, b , then g ( x) has a fixed point in [a, b].


ii) In addition g '( x ) exists in (a, b) and a positive constant k < 1 exists with g '( x)  k ,
 x  (a, b) , then the fixed point in [a, b] is unique.
8. Write down the Newton’s iterative formula.
f ( xn )
Newton’s iterative formula is xn+1 = xn − , n = 0,1, 2...
f '( xn )
9. State the order of convergence and convergence condition of Newton-Raphson method.
Answer: In Newton-Raphson method, order of convergence is two and convergence condition is
f ( x) f ''( x)  | f '( x) 2

10. What are the merits of Newton’s method of iteration?


Merits:
1) Newton’s method is successfully used to improve the result obtained by other methods.
2) It is applicable to the solution of equations involving algebraic functions as well as
transcendental functions.
11. Derive a formula to find the value of N , where N is a real number, by Newton’s method.

Let x = N  x 2 = N .
Take f ( x) = x 2 − N  f '( x) = 2 x
f ( xn ) xn2 − N
xn+1 = xn − = xn −
f '( xn ) 2 xn
1 N
 xn+1 =  xn + 
2 xn 

12. Evaluate 15 using Newton – Raphson’s method

1 N
The Newton’s algorithm for N is x n+1 =  xn +  .
2 xn 
Let f ( x) = x 2 − 15.
f (3) = 9 − 15 = −6 (−ve) ; f (4) = 16 − 15 = 1 (+ve)
 The root lies between 3and 4.
Let x0 = 3, N = 15
1 N  1  15 
x1 =  x0 +  = 3 +  = 4
2 x0  2  3

St. Joseph’s College of Engineering Page No.2


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

1  15 
x2 = 4 +  = 3.875
2  4
1 15 
x3 =  3.875 + = 3.873
2 3.875 
1 15 
x4 =  3.873 + = 3.873
2 3.873 
Hence x3 = x4
The value of 15 is 3.873
13. Find an iterative formula to the reciprocal of a given number N, by Newton’s method
1 1
Let x = N=
N x
1 −1
f ( x) = − N ; f '( x) = 2
x x
1
−N
f ( xn ) xn 1 
Now xn +1 = xn − = xn − = xn + xn2  − N 
f ( xn ) −1  xn 
2
xn
 xn +1 = xn (2 − Nxn )
14. Distinguish between direct and iterative method of solving simultaneous equation.

S.No Direct Method Indirect Method


1. We get exact solution Approximate solution
2. Simple, take less time Time consuming and laborious

15. Write the procedure to solve AX = B by Gauss Elimination method.

In this method the augmented matrix [A , B] is transformed into an equivalent upper triangular
matrix by elementary row operations, and then by back substitution we get the solution.

16. By Gauss elimination method solve x + 2 y = 1, 3x − 2 y = 7


 1 2  x   1 
The given system equations can be written as AX = B     =  
 3 −2  y   7 
1 2 1  1 2 1
  A, B =     R2 → R2 − 3R1
 3 −2 7   0 −8 4 
Now x + 2 y = 1 − − − −(1)
1
& − 8 y = 4  y = − − − − −(2)
2
1 1
Substitute y = − in (1) , we get x = 2. Hence x = 2 , y = − .
2 2
17. Which of the iteration method for solving linear system of equations converge faster? Why?

St. Joseph’s College of Engineering Page No.3


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

Gauss Seidel method is faster. In this method, the latest values of unknowns at each stage of
iterations are used in preceding to the next stage of iteration.

18. What is meant by Diagonally Dominant matrix?

A matrix is diagonally dominant if the numerical value of the leading diagonal element in each
row is greater than or equal to the sum of the numerical values of the other element in that row.
i.e. a1  b1 + c1 ; b2  a2 + c2 ; c3  a3 + b3

19. State the condition for the convergence of Gauss Seidel technique.

Let the system of equations be a1 x + b1 y + c1 z = d1 , a2 x + b2 y + c2 z = d 2 &


a3 x + b3 y + c3 z = d3 . The given system of equation should be diagonally dominant.
i.e. a1  b1 + c1 ; b2  a2 + c2 ; c3  a3 + b3

20. Find the first iteration values of x , y , z satisfying 28 x + 4 y − z = 32, x + 2 y + 10 z = 24


and 2 x + 17 y + 4 z = 35 by Gauss – Seidel method.

Given equation are not diagonally dominant in the current form. Interchanging the equations, it
becomes diagonally dominant.
Let the equation be 28 x + 4 y − z = 32, 2 x + 17 y + 4 z = 35 , x + 2 y + 10 z = 24 .
1 1
Now it is diagonally dominant: x = ( 32 − 4 y + z ) , y = ( 35 − 2 x − 4 z ) ,
28 17
1
z= ( 24 − x − 2 y )
10
First iteration: Let y = 0, z = 0

( 32 − 4 y + z ) = ( 32 − 4 ( 0 ) + 0 ) = ( 32 ) = 1.142
1 1 1
x=
28 28 28

( 35 − 2 x − 4 z ) = ( 35 − 2 (1.142 ) − 4 ( 0 ) ) = ( 32.716 ) = 1.924


1 1 1
y=
17 17 17

( 24 − x − 2 y ) = ( 24 − 1.142 − 2 (1.924 ) ) = (19.01) = 1.901


1 1 1
z=
10 10 10
PART - B
1. By the method of least squares, find the best fitting straight line to the data given below:
x: 5 10 15 20 25
y: 15 19 23 26 30
Solution : Let the straight line be y = ax + b. Here n =5
The normal equations are
n n n n n
a xi + nb =  yi − − − (1) a xi2 + b xi =  xi yi − − − (2)
i =1 i =1 i =1 i =1 i =1

To calculate x, x 2 , xy, y form the table


x y x2 xy
5 16 25 80

St. Joseph’s College of Engineering Page No.4


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
10 19 100 190
15 23 225 345
20 26 400 520
25 30 625 750
Total 75 114 1375 1885
 The normal equations are 75a + 5b = 114 ------(1)
1375a + 75b = 1885 -----(2)
To eliminate b, multiply (1) by 15, we get, 1125a + 75b = 1710 -----(3)
(2) – (3)  250a = 175  a = 0.7
 b = 12.3
Hence, the best fitting line is y = 0.7x + 12.3
2. Fit a second degree parabola to the following data:
x: 1929 1930 1931 1932 1933 1934 1935
y: 352 356 357 358 360 361 361
Solution: By Shifting the origin, Take X = x – 1932, Y = y – 357
Let Y = aX 2 + bX + C be the best fit.
The normal equations are
n n n n n n n
a xi 2 + b xi + nc =  yi − − − (1) a xi2 + b xi + c xi =  xi yi − − − (2)
i =1 i =1 i =1 i =1 i =1 i =1 i =1
n n n n
a xi4 + b xi 3 + c xi 2 =  xi 2 yi − − − (3)
i =1 i =1 i =1 i =1

x y X Y X2 X3 X4 XY X2 Y
1929 352 –3 –5 9 –27 81 15 –45
1930 356 –2 –1 4 –8 16 2 –4
1931 357 –1 0 1 –1 1 0 0
1932 358 0 1 0 0 0 0 0
1933 360 1 3 1 1 1 3 3
1934 361 2 4 4 8 16 8 16
1935 361 3 4 9 27 81 12 36
Total 0 6 28 0 196 40 6
Hence, the normal equations become,
28a + 7c = 6 − − − − − ( 4 ) ; 28b = 40 − − − − − (5 ) 196a + 28c = 6 − − − − − ( 6 )
From (5), b = 1.4286
Substitute the value of b in (4) and (6), we get, a = –0.21429 and c = 1.7143
 The equation is Y = – 0.21429 X 2 + 1.4286 X + 1.7143
y – 357 = –0.21429 ( x –1932 ) + 1.4286 ( x –1932 ) + 1.7143
2

 y = –0.21429 x 2 + 829.445 x – 802265.33


3. Fit a straight line and a parabola to the following data
x: 1 2 3 4 5 6
y: 4 8 10 12 16 20
Solution: (i) Fitting Straight Line
Let the straight line be y = ax + b. Here n =5
n n n n n
The normal equations are a xi + nb =  yi − − − (1) a xi2 + b xi =  xi yi − − − (2)
i =1 i =1 i =1 i =1 i =1

St. Joseph’s College of Engineering Page No.5


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

x y x2 x3 x4 xy x2y y2
1 4 1 1 1 4 4 16
2 8 4 8 16 16 32 64
3 10 9 27 81 30 90 100
4 12 16 64 256 48 192 144
5 16 25 125 625 80 400 256
6 20 36 216 1296 120 720 400
Total 21 70 91 441 2275 298 1438 980
 The normal equations are 21a + 7b = 70 -----(1) & 91a + 21b = 298 -----(2)
Solving (1) and (2), we get, a = 3.1428 and b = 0.5714
The best straight line fit is y = 3.1428 x + 0.5714
(ii) Fitting Parabola Equation
The normal equations are
n n n n n n n
a  xi 2 + b xi + nc =  yi − − − (1) a  xi2 + b xi + c xi =  xi yi − − − (2)
i =1 i =1 i =1 i =1 i =1 i =1 i =1
n n n n
a  xi4 + b xi 3 + c xi 2 =  xi 2 yi − − − (3)
i =1 i =1 i =1 i =1

 91a + 21b + 5c = 70 -----(4)


 441a + 91b + 21c = 298 -----(5)
 2275a + 441b + 91c = 1438 -----(6)
Solving (4), (5), (6), we get, A = -0.1298, B = 4.1558, c = –1.0910
The best parabola fit is y = –0.1299 x2 +4.1558 x –1.0910.
4. Fit a straight line and a parabola to the following data and find out the most appropriate fit.
Justify.
x: 0 1 2 3 4
y: 1 1.8 1.3 2.5 6.3
Solution : (i) Fitting Straight Line
Let the straight line be y = ax + b. Here n =5
The normal equations are
n n n n n
a x + b xi =  xi yi
2
i − − − (1) a xi + nb =  yi − − − (2)
i =1 i =1 i =1 i =1 i =1

x y x2 x3 x4 xy x2y y2
0 1 0 0 0 0 0 1
1 1.8 1 1 1 1.8 1.8 3.24
2 1.3 4 8 16 2.6 5.2 1.69
3 2.5 9 27 81 7.5 22.5 6.25
4 6.3 16 64 256 25.2 100.8 39.69
Total 10 12.9 30 100 354 37.1 130.3 51.87
 The normal equations are 10a + 5b = 12.9 -----(1)
30a + 10b = 37.1 -----(2)
Solving (1) and (2), we get, a = 1.33 and b = 0.32
The best straight line fit is y = 1.33x + 0.32
Error: E1 = y 2
− a xy − b y = 51.87 − 1.33(37.1) − 0.32(12.9) = −1.60
(ii) Fitting Parabola Equation

St. Joseph’s College of Engineering Page No.6


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
The normal equations are
n n n n n n n
a  xi 2 + b xi + nc =  yi − − − (1) a  xi2 + b xi + c xi =  xi yi − − − (2)
i =1 i =1 i =1 i =1 i =1 i =1 i =1
n n n n
a  xi4 + b xi 3 + c xi 2 =  xi 2 yi − − − (3)
i =1 i =1 i =1 i =1

 30a + 10b + 5c = 12.9 -----(4)


 100a + 30b + 10c = 37.1 -----(5)
 354a + 100b + 30c = 130.3 -----(6)
Solving (4), (5), (6), we get, a = 0.55, b = –1.07, c = 1.42
Error: E2 = y 2
− a x 2 y − b xy − c y = 51.87 − 0.55(130.3) + 1.07(37.1) − 1.42(12.9) = 1.584
|E2|<|E1|
 The parabola fit is better.
5. Find the real root of the equation x 3 + x 2 − 1 = 0 using fixed point iteration.
Solution: Let f ( x ) = x3 + x 2 − 1
Now f ( 0 ) = 0 + 0 − 1 = −1( −ve ) f (1) = 1 + 1 − 1 = 1( +ve ) .
Hence a real root lies between 0 and 1
Now x 3 + x 2 − 1 = 0 can be written as x 2 ( x + 1) − 1 = 0
1 1
x2 = x=
x +1 x +1
1
Let  ( x ) =
x +1
−1
−1
Therefore  ' ( x ) = 2 x + 1 =
x +1 2 ( x + 1)
3/2

1
Clearly  ' ( x ) =  1 in ( 0,1)
2 ( x + 1)
3/2

1
For when x = 0.5,  ' ( 0.5) = 1
2 (1.5)
3/2

The initial value is x0 = 0.5.


1 1
Now x1 =  ( x0 ) = = = 0.8165 ,
x0 + 1 0.5 + 1
1 1 1 1
x2 =  ( x1 ) = = = 0.7420 , x3 =  ( x2 ) = = = 0.7577 ,
x1 + 1 0.8165 + 1 x2 + 1 0.7420 + 1
1 1 1 1
x4 =  ( x3 ) = = = 0.7543 , x5 =  ( x4 ) = = = 0.7550
x3 + 1 0.7577 + 1 x4 + 1 0.7543 + 1
1 1 1 1
x6 =  ( x5 ) = = = 0.7548 , x7 =  ( x6 ) = = = 0.7549
x5 + 1 0.7550 + 1 x6 + 1 0.7548 + 1

St. Joseph’s College of Engineering Page No.7


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
1 1
x8 =  ( x7 ) = = = 0.7549
x7 + 1 0.7549 + 1
Two successive iteration values are equal stop the process. Hence the root is 0.7549

6. Find a positive root of the equation cos x − 3 x + 1 = 0 by the method of fixed point iteration.

Solution: Let f ( x ) = cos x − 3x + 1


f ( 0 ) = cos ( 0 ) − 3 ( 0 ) + 1 = 1 − 0 + 1 = 2 ( +ve ) ; f (1) = cos (1) − 3 (1) + 1 = −1.000 = ( −ve )
Therefore a root lies between 0 and 1.
1
The given equation can be written as x = (1 + cos x )
3
1 − sin x
Let  ( x ) = (1 + cos x )   '( x) =
3 3
− sin x 1
Clearly,  ' ( x ) = = sin x  1 in ( 0,1) .
3 3
The initial value is x0 = 0.
The successive approximation are as follows:
1 1
x1 =  ( x0 ) = (1 + cos x0 ) = (1 + cos 0 ) = 0.6667
3 3
1 1
x2 =  ( x1 ) = (1 + cos x1 ) = (1 + cos 0.6667 ) = 0.5953
3 3
1 1 1
x3 = (1 + cos x2 ) = 0.6093 , x4 = (1 + cos x3 ) = 0.6067 , x5 = (1 + cos x4 ) = 0.6072
3 3 3
1 1
x6 = (1 + cos x5 ) = 0.6071 , x7 = (1 + cos x6 ) = 0.6071
3 3
Two successive iteration values are equal stop the process. Hence the root is 0.6071

Find the approximate root of e = 3 x by fixed point iteration method correct to four
x
7.
decimal places.
Solution: Let f ( x) = e x − 3x
f ( 0 ) = e0 − 3(0) = 1( +ve ) ; f (1) = e1 − 3 (1) = −0.2817 = ( −ve )
Therefore a root lies between 0 and 1.
ex
The given equation can be written as x =
3
ex ex
Let  ( x) = ,  ' ( x) =
3 3
Here  ' ( x)  1 in the interval [0,1]
By fixed point iteration method, xn +1 =  ( xn )

St. Joseph’s College of Engineering Page No.8


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
Take x0 = 0.5
x1 =  ( x0 ) = 0.5496, x2 =  ( x1) = 0.5775, x3 = 5939, x4 = 0.6037 ,
x5 = 0.6096, x6 = 0.6132, x7 = 0.6155, x8 = 0.6168
continuing we get x14 = 0.6189, x15 = 0.6189. The required root is x = 0.6189.
8. Using Newton Raphson method, find the real root of the equation f ( x) = 3x + sin x − e x ,
By choosing initial approximation x0 = 0.5
Solution: Given f ( x ) = 3x + sin x − e x
Therefore f ' ( x ) = 3 + cos x − e x
Now f ( 0.5) = 3 ( 0.5) + sin ( 0.5) − e0.5 = 0.3307 ( +ve ) ; f ( 2 ) = 3 ( 2 ) + sin ( 2 ) − e2 = −0.4798 ( −ve )
Therefore the root lies between 0.5 and 2. Since f ( 2 )  f ( 0.5) , we can take the initial
approximation x0 = 0.5.
f ( xn )
We know that Newton’s formula is xn +1 = xn −
f ' ( xn )
The first approximation to the root is given by
f ( x0 ) 3 ( 0.5 ) + sin ( 0.5 ) − e0.5
x1 = x0 − = 0.5 − = 0.3516
f ' ( x0 ) 3 + cos ( 0.5 ) − e0.5
The second approximation to the root is given by
f ( x1 ) 3 ( 0.3516 ) + sin ( 0.3516 ) − e0.3516  −0.02214 
x2 = x1 − = 0.3516 − = 0.3516 −  = 0.3604
f ' ( x1 ) 3 + cos ( 0.3516 ) − e  2.5175 
0.3516

The third approximation to the root is given by


f ( x2 ) 3 ( 0.3604 ) + sin ( 0.3604 ) − e0.3604
x3 = x2 − = 0.3604 − = 0.3604 −  −0.0000217  = 0.3604
f ' ( x2 ) 3 + cos ( 0.3604 ) − e0.3604
Hence the real root of f ( x ) = 0, correct to three decimal places is 0.3604
9. Find a root of x log10 x – 1.2 = 0 using Newton Raphson method correct to three
decimal places.
Solution: Given f ( x ) = x log10 x − 1.2
Now f ( 2 ) = 2log10 2 − 1.2 = 2 ( 0.3010 ) − 1.2 = −0.5980 ( −ve )
f ( 3) = 3log10 3 − 1.2 = 3 ( 0.4771) − 1.2 = 0.2313 ( +ve )
therefore the root lies between 2 and 3. Here f ( 3)  f ( 2 ) . Therefore we can take the initial
approximation to the root is x0 = 3.
Now f ( x ) = x log10 x − 1.2
1  d 1 
f ' ( x ) = log10 x + x log10 e  dx log a x = x log a e 
x
= log10 x + 0.4343  log10 e = 0.4343

St. Joseph’s College of Engineering Page No.9


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

f ( xn )
We know that Newton’s formula is xn +1 = xn −
f ' ( xn )
The first approximation to the root is given by
f ( x0 ) x log x − 1.2 3log10 3 − 1.2
x1 = x0 − = x0 − 0 10 0 = 3− = 2.746
f ' ( x0 ) log10 x0 + 0.4343 log10 3 + 0.4343
The second approximation to the root is given by
f ( x1 ) x log x − 1.2 2.746log10 2.746 − 1.2
x2 = x1 − = x1 − 1 10 1 = 2.746 − = 2.741
f ' ( x1 ) log10 x1 + 0.4343 log10 2.746 + 0.4343
The third approximation to the root is given by
f ( x2 ) x log x − 1.2 2.741log10 2.741 − 1.2
x3 = x2 − = x2 − 2 10 2 = 2.741 − = 2.741
f ' ( x2 ) log10 x2 + 0.4343 log10 2.741 + 0.4343
Hence the real root of f ( x ) = 0, correct to three decimal places is 2.741
10. Find Newton’s iterative formula to find the reciprocal of a given number N and hence find
1
the value of
19
1 1
Solution : Let x =  =N
N x
1 −1
Let f ( x ) = − N = 0; f '( x) =
x x2
f ( xn )
We know that Newton’s iterative formula is xn +1 = xn −
f ' ( xn )
1
−N
xn 1 
= xn − = xn + xn2  − N  = xn + xn − Nxn2
−1  xn 
2
x
= xn  2 − Nxn  − − − − − − (1)

, Substitute N = 19 and n = 0 in (1) we get x1 = x0  2 − 19 x0 


1
To find
19
Choose x0 = 0.06
The first approximation is given by x1 = x0  2 − 19 x0  = 0.06 2 − 19 ( 0.06 ) = 0.0516
The second approximation is given by x2 = x1  2 − 19 x1  = 0.0516 2 − 19 ( 0.0516 ) = 0.0526
The third approximation is given by x3 = x2  2 − 19 x2  = 0.0526 2 − 19 ( 0.0526 ) = 0.0526
1
Therefore the value of x2 and x3 are equal. Hence the value of = 0.0526
19
11. Apply Gauss Elimination method, find the solution of the following system:
2 x − y + 3z = 8 , – x + 2 y + z = 4 , 3 x + y – 4z = 0 .

St. Joseph’s College of Engineering Page No.10


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

 2 −1 3   x
   
Solution: The given system is equivalent to AX = B, where A =  −1 2 1  , X =  y  ,
 3 1 −4  z
   
8
 
B =  4 .
0
 
 2 −1 3 8
 
The augmented matrix is [A|B] =  −1 2 1 4
 3 1 −4 0 

2 −1 3 8 
 
0 3/ 2 5/ 2 8  R2 → R2 + (1/ 2) R1
0 5/ 2 −17 / 2 −12  R3 → R3 − (3 / 2) R1

2 −1 3 8 
 
0 3/ 2 5/ 2 8 
0 0 −38 / 3 −76 / 3  R3 → R3 − (5 / 3) R2

Using Back substitution method, we get


3 5 38 76
2x – y + 3z = 8 -----(1) ; y+ z =8 -----(2); − z = −  z=2
2 2 3 3
Subs. in (2), y = 2 and Subs. in (1), x = 2. Therefore x = y = z =2.

12. Solve the system of equations by Gauss Elimination method: x + 2y + z = 3, 2x + 3y + 3z = 10,


3x – y + 2z = 13
1 2 1  x
   
Solution: The given system is equivalent to AX = B, where A =  2 3 3  , X =  y  ,
 3 −1 2  z
   
3
 
B = 10  .
 13 
 

St. Joseph’s College of Engineering Page No.11


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

1 2 1 3
 
The augmented matrix is [A|B] =  2 3 3 10 
3 −1 2 13 

1 2 1 3
 
0 −1 1 4 R2 → R2 − 2 R1
0 −7 1 4  R3 → R3 − 3R1

1 2 1 3 
 
 0 −1 1 4 
 0 0 −8 −24  R → R − 7 R
  3 3 2

Using Back substitution method, we get


x + 2y + z = 3 ----(1) –y + z = 4 ---(2) –8z = –24  z = 3
Subs. in (2)  y = –1, Subs. in (1)  x = 2. Therefore x =2, y = –1, z =3.
13. Find the solution of the system of following equations by Gauss - Seidel method
x − 2 y + 5 z = 12, 5 x + 2 y − z = 6, 2 x + 6 y − 3 z = 5 .

Solution: The given system is x − 2 y + 5 z = 12 ; 5 x + 2 y − z = 6 ; 2 x + 6 y − 3 z = 5 .


In the current form, the equations are not diagonally dominant. Interchange the equation , it
becomes diagonally dominant.
Now 5 x + 2 y − z = 6 − −(1); 2 x + 6 y − 3z = 5 − − − (2) ; x − 2 y + 5 z = 12 − − − (3)
From (1), (2) and (3) we get
1 1 1
x = ( 6 − 2 y + z ) ---- (4) ; y= ( 5 − 2 x + 3z ) ------ (5) z= (12 − x + 2 y ) -------- (6)
5 6 5
Iterat 1 1 1
ion x= (6 − 2 y + z ) y= ( 5 − 2 x + 3z ) z= (12 − x + 2 y )
5 6 5
1 1 1
x1 = ( 6 − 2 y0 + z0 ) y1 = ( 5 − 2 x1 + 3z0 ) z1 = (12 − x1 + 2 y1 )
5 6 5
= ( 5 − 2 (1.200 ) + 0 ) = (12 − 1.200 + 2 ( 0.433) )
I 1 1 1
= ( 6 − 0 + 0)
5 6 5
= 1.200 = 0.433 = 2.333
1 1 1
x2 = ( 6 − 2 y1 + z1 ) y2 = ( 5 − 2 x2 + 3z1 ) z2 = (12 − x2 + 2 y2 )
5 6 5
II
= ( 6 − 2 ( 0.433) + 2.333) = ( 5 − 2 (1.493) + 3 ( 2.333) ) = (12 − 1.493 + 2 (1.502 ) )
1 1 1
5 6 5
= 1.493 = 1.502 = 2.702
1 1 1
x3 = ( 6 − 2 y2 + z2 ) y3 = ( 5 − 2 x3 + 3z2 ) z3 = (12 − x3 + 2 y3 )
5 6 5
III
= ( 6 − 2 (1.502 ) + 2.702 ) = ( 5 − 2 (1.140 ) + 3 ( 2.702 ) ) = (12 − 1.140 + 2 (1.804 ) )
1 1 1
5 6 5
= 1.140 = 1.804 = 2.894

St. Joseph’s College of Engineering Page No.12


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

1 1 1
x4 = ( 6 − 2 y3 + z3 ) y4 = ( 5 − 2 x4 + 3z3 ) z4 = (12 − x4 + 2 y4 )
5 6 5
IV
= ( 6 − 2 (1.804 ) + 2.894 ) = ( 5 − 2 (1.057 ) + 3 ( 2.894 ) ) = (12 − 1.057 + 2 (1.928 ) )
1 1 1
5 6 5
= 1.057 = 1.928 = 2.960
1 1 1
x5 = ( 6 − 2 y4 + z4 ) y5 = ( 5 − 2 x5 + 3z4 ) z5 = (12 − x5 + 2 y5 )
5 6 5
V
= ( 6 − 2 (1.928 ) + 2.960 ) = ( 5 − 2 (1.021) + 3 ( 2.960 ) ) = (12 − 1.021 + 2 (1.973) )
1 1 1
5 6 5
= 1.021 = 1.973 = 2.985
1 1 1
x6 = ( 6 − 2 y5 + z5 ) y6 = ( 5 − 2 x6 + 3z5 ) z6 = (12 − x6 + 2 y6 )
5 6 5
VI
= ( 6 − 2 (1.973) + 2.985 ) = ( 5 − 2 (1.008 ) + 3 ( 2.985 ) ) = (12 − 1.008 + 2 (1.990 ) )
1 1 1
5 6 5
= 1.008 = 1.990 = 2.994
1 1 1
x7 = ( 6 − 2 y6 + z6 ) y7 = ( 5 − 2 x7 + 3z6 ) z7 = (12 − x7 + 2 y7 )
5 6 5
VII
= ( 6 − 2 (1.990 ) + 2.994 ) = ( 5 − 2 (1.003) + 3 ( 2.994 ) ) = (12 − 1.003 + 2 (1.996 ) )
1 1 1
5 6 5
= 1.003 = 1.996 = 2.998
1 1 1
x8 = ( 6 − 2 y7 + z7 ) y8 = ( 5 − 2 x8 + 3z7 ) z8 = (12 − x8 + 2 y8 )
5 6 5
VIII
= ( 6 − 2 (1.996 ) + 2.998 ) = ( 5 − 2 (1.001) + 3 ( 2.998 ) ) = (12 − 1.001 + 2 (1.999 ) )
1 1 1
5 6 5
= 1.001 = 1.999 = 2.999
1 1 1
x9 = ( 6 − 2 y8 + z8 ) y9 = ( 5 − 2 x9 + 3z8 ) z9 = (12 − x9 + 2 y9 )
5 6 5
IX
= ( 6 − 2 (1.999 ) + 2.999 ) = ( 5 − 2 (1.000 ) + 3 ( 2.999 ) ) = (12 − 1.000 + 2 ( 2.000 ) )
1 1 1
5 6 5
= 1.000 = 2.000 = 3.000
1 1 1
x10 = ( 6 − 2 y9 + z9 ) y10 = ( 5 − 2 x10 + 3z9 ) z10 = (12 − x10 + 2 y10 )
5 6 5
= ( 6 − 2 ( 2.000 ) + 3.000 )
1
= ( 5 − 2 (1.000 ) + 3 ( 3.000 ) ) = (12 − 1.000 + 2 ( 2.000 ) )
X 1 1
5
6 5
= 1.000
= 2.000 = 3.000

Hence x = 1, y = 2, z = 3
14. Solve by Gauss Seidal method, the following system: 20 x + y – 2 z = 17,
3 x + 20 y – z = – 18, 2 x – 3 y + 20z = 25.

St. Joseph’s College of Engineering Page No.13


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
Solution : Clearly the system is diagonally dominant,
1 1 1
Therefore x = (17 − y + 2 z ), y = ( −18 − 3 x + z ), z = (25 − 2 x + 3 y)
20 20 20
Take y = z =0,
Itera 1 1 1
tion x= (17 − y + 2 z ) y= (−18 − 3 x + z ) z= (25 − 2 x + 3 y )
20 20 20
1 1 1
x1 = (17 − y + 2 z ) y1 = (−18 − 3 x + z ) z1 = (25 − 2 x + 3 y)
20 20 20
I 1 1 1
= (17 − 0 + 0 ) = (−18 − 3(0.85) + 0) = (25 − 2(0.85) + 3(−1.0275))
20 20 20
= 0.85 = −1.0275 = 1.0109
II x2 = 1.0025 y2 = −0.9998 z2 = 0.9998
III x3 = 1.0000 y3 = −1.0000 z3 = 1.0000
IV x4 = 1.0000 y4 = −1.0000 z4 = 1.0000

Hence x = 1, y = –1, z = 1 .

Solve the system, starting with initial vector of 0,0,0 using Gauss – Seidal method,
T
15.
6 x1 − 2 x2 + x3 = 11, − 2 x1 + 7 x2 + 2 x3 = 5, x1 + 2x2 − 5x3 = −1 .
Solution : The given system of equation 6 x1 − 2 x2 + x3 = 11, − 2 x1 + 7 x2 + 2 x3 = 5,
x1 + 2 x2 − 5 x3 = −1 is diagonally dominant.
1
6 x1 − 2 x2 + x3 = 11  x1 = (11 + 2 x2 − x3 ) − − − −(1)
6
1
−2 x1 + 7 x2 + 2 x3 = 5  x2 = (5 + 2 x1 − 2 x3 ) − − − −(2)
7
1
x1 + 2 x2 − 5 x3 = −1 x3 = (1 + x1 + 2 x2 ) − − − −(3)
5
since the initial vector[0, 0, 0].
1 1
First iteration : x1(1) = [11 + 2(0) − 0] = 1.833 x2(1) = [5 + 2(1.833) − 2(0)] = 1.2380
6 7
1
x3(1) = [1 + 1.833 + 2(1.2380)] = 1.06190
5
Second iteration : x1(2) = 2.0690, x2(2) = 1.0020, x3(2) = 1.0146
Third iteration : x1(3) = 1.9982, x2(3) = 0.9953, x3(3) = 0.9977
Fourth iteration : x1(4) = 1.9988, x2(4) = 1.0002, x3(4) = 0.9998
Fifth iteration : x1(5) = 2.0001, x2(5) = 1.0000, x3(5) = 1.0000
sixth iteration : x1(6) = 2.0001, x2(6) = 1.0000, x3(6) = 1.0000
The required solution is x1 = 2.0001, x2 = 1, x3 = 1

St. Joseph’s College of Engineering Page No.14


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

UNIT II – INTERPOLATION AND APPROXIMATION


PART – A
1. What is meant by Interpolation and Extrapolation?

Interpolation is the process of finding the values of f(x) for intermediate values of x in the given
interval. Extrapolation is the process of finding the values of f(x) for values of x lying outside the
given interval.
2. What is the use of Newton’s forward formula and Newton’s Backward formula?

Newton’s forward formula is used to interpolate value of y nearer to the beginning value of the
table. Newton’s Backward formula is used to interpolate value of y nearer to the end of set of
tabular values.
3. State any two properties of Divided difference.
(i) The divided differences are symmetrical in all their arguments. i.e. the value of any difference
is independent of the order of the arguments.
(ii) The divided differences of the sum or difference of two functions is equal to the sum or
difference of the corresponding separate divided differences.

4. What is the relationship between the Newton’s Divided Difference and Newton’s forward
Difference?

 n f ( xo )
If the arguments are equally spaced, then  n f ( xo ) =
n !hn
5. Construct a linear interpolation polynomial given the points ( xo , y o ) and ( x1 , y1 )
( x − xo )
y = f ( x) = yo + yo
h
6. State Lagrange’s Interpolation formula, given ( x0 , y 0 ) , ( x1 , y 1 ) , ( x 2 , y 2 ) .
( x − x1 )( x − x2 ) ( x − xo )( x − x2 ) ( x − x0 )( x − x1 )
f ( x) = yo + y1 + y2
( xo − x1 )( xo − x2 ) ( x1 − xo )( x1 − x2 ) ( x2 − xo )( x2 − x1 )
7. Using Lagrange’s interpolation formula find y value when x=1 from the following data
x: 0 –1 2 3
y: –8 3 1 12

( x + 1)( x − 2)( x − 3) x( x − 2)( x − 3) x( x + 1)( x − 3) x( x + 1)( x − 2)


y= (−8) + (3) + (1) + 12
(1)(−2)(−3) (−1)(−1 − 2)(−1 − 3) (2 + 1)(2)(2 − 3) (3 + 1)(3)(3 − 2)
Put x = 1
4 2 4 −16 1 2 −14 5 −43
 y ( x = 1) = ( − 8)+ (3)+ − 2 = − + −2 = − =
6 −12 6 3 2 3 3 2 6
8. State Inverse Lagrange’s Interpolation formula.

St. Joseph’s College of Engineering Page No.15


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

( y − y1 )( y − y2 )....( y − yn ) ( y − y0 )( y − y2 )....( y − yn )
x= xo + x1 + ......
( y0 − y1 )( y0 − y2 )....( y0 − yn ) ( y1 − y0 )( y1 − y2 )....( y1 − yn )
( y − y0 )( y − y1 )....( y − yn −1 )
+ xn
( yn − y0 )( yn − y1 )....( yn − yn −1 )
1
9. Find the second order divided difference with arguments a, b, c if f(x) =
x
1 1
− f (c) − f (b) −1
f (b) − f (a ) b a −1
f ( a, b) = = = Similarly, f (b, c) = =
b−a b − a ab c −b bc
−1 −1

f (b, c) − f (a, b) bc ab 1
Now f (a, b, c) = = =
c−a c−a abc
10. State Newton’s forward formula
Newton’s forward formula is
u (u − 1) 2 u (u − 1)(u − 2) 3 u (u − 1)....(u − (n − 1)) n
y ( x) = yo + u yo +  yo +  yo + ... +  yo + ...
2! 3! n!
x − x0
where u =
h
11. State Newton’s Backward formula
Newton’s Backward formula is
v(v + 1) 2 v(v + 1)(v + 2) 3 v(v + 1)....(v + (n − 1)) n
y ( x) = yn + vyn +  yn +  yn + ..... +  yn + ...
2! 3! n!
x − xn
where v =
h
12. State the Error in Newton’s Backward formula
p( p + 1)( p + 2)......( p + n) n+1 n+1
Error = f ( x) − pn ( x) = h y (c)
(n + 1)!
13. Show that the second divided difference  x0 , x1 , x2  is independent of the order of the
arguments.

f ( x0 ) f ( x1 ) f ( x2 )
f ( x0 , x1, x2 ) = + +
( x0 − x1 )( x0 − x2 ) ( x1 − x0 )( x1 − x2 ) ( x2 − x0 )( x2 − x1 )
 f ( x0 , x1, x2 ) = f ( x1 , x2 , x0 ) = f ( x2 , x0 , x1 )
 f ( x0 , x1 , x2 ) is independent of the order of the arguments.

14. State the Newton’s divided difference formula


Newton Divided difference formula is

St. Joseph’s College of Engineering Page No.16


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
f ( x) = f ( xo ) + ( x − x0 ) f ( x0 , x1 ) + ( x − x0 )( x − x1 ) f ( x0 , x1, x2 ) + .
.... + ( x − x0 )( x − x1 ).......( x − xn−1 ) f ( x0 , x1, x2 ,....xn )
15. Find the divided difference table for the following data
X: 2 5 10
Y: 5 29 109
Divided difference table
x y  2
2 5
8
5 29 1
10 109 16

16. Given y 0 = 3 , y1 = 12 , y 2 = 81 , y 3 = 200 , y 4 = 100. Find 4y0

x y Δ Δ2 Δ3 Δ4
0 3
9
1 12 60
69 –10
2 81 50 –259(4y0)
119 –269
3 200 –219
–100
4 100

17. If f(x) = 12 , find f(a, b) and hence f( 2, 3).


x
1 1
− 2
f (b) − f (a) b 2
a = −(a + b)  f (2,3) = −5
f ( a, b) = =
b−a b−a a 2b 2 36
18. Find the divided difference of f(x) = x3 + x + 2 for the arguments 1, 3, 6, 11.
Divided difference table is

x f(x)  2 3
1 4
16
3 32 0.67
69.33 1.2533
6 224 23.2
254.33
11 1344

St. Joseph’s College of Engineering Page No.17


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

19. What is a cubic spline and natural cubic spline?

Third degree polynomial employed to connect each pair of data points are called cubic spline. If
the second order derivative at its end points is equal to zero (i.e.,M0=0 &Mn=0), then the cubic
spline is called as natural cubic spline.

20. State the properties of the cubic spline.


If ( xi , yi ) , i= 0,1,2,3,… n are the set of n points, the cubic spline S(x) is defined by the following
properties.
1) S ( xi ) = yi , I = 0, 1, …, n
2) S ( x ) , S ' ( x ) , S '' ( x ) are continuous in [a, b]
3) S (x) is a cubic polynomial in each subinterval ( xi , xi +1 ) , i = 0, 1, …, n–1
PART B
1. Find the expression f(x) and hence find f(3) using Lagrange’s formula for the following data
x 0 1 4 5
y= f(x) 4 3 24 39

Solution: Lagrange’s Interpolation formula is


( x − x1 )( x − x2 )( x − x3 ) ( x − x0 )( x − x2 )( x − x3 )
y = f ( x) = y0 + y1 +
( x0 − x1 )( x0 − x2 )( x0 − x3 ) ( x1 − x01 )( x1 − x2 )( x1 − x3 )
( x − x0 )( x − x1 )( x − x3 ) ( x − x0 )( x − x1)( x − x2 )
y2 + y3
( x2 − x0 )( x2 − x1 )( x2 − x3 ) ( x3 − x0 )( x3 − x1 )( x3 − x2 )
( x − 1)( x − 4)( x − 5) ( x − 0)( x − 4)( x − 5) ( x − 0)( x − 1)( x − 4) ( x − 0)( x − 1)( x − 4)
= (4) + (3) + (24) + (39)
(0 − 1)(0 − 4)(0 − 5) (1 − 0)(1 − 3)(1 − 5) (4 − 0)(4 − 1)(4 − 5) (5 − 0)(5 − 1)(5 − 4)

f ( x) = 2 x 2 − 3x + 4
When x = 3, f (3) =18 − 9 + 4 = 13
2. Using Lagrange’s interpolation formula, calculate the profit in the year 2000 from the
following table.
Year 1997 1999 2001 2002
Profit (in lakhs) 43 65 159 248

Solution: Lagrange’s Interpolation formula is


( x − x1 )( x − x2 )( x − x3 ) ( x − x0 )( x − x2 )( x − x3 )
y = f ( x) = y0 + y1 +
( x0 − x1 )( x0 − x2 )( x0 − x3 ) ( x1 − x01 )( x1 − x2 )( x1 − x3 )
( x − x0 )( x − x1 )( x − x3 ) ( x − x0 )( x − x1)( x − x2 )
y2 + y3
( x2 − x0 )( x2 − x1 )( x2 − x3 ) ( x3 − x0 )( x3 − x1 )( x3 − x2 )
Substitute the given data in the above formula
x0 = 1997, x1 = 1999, x2 = 2001, x3 = 2002, y0 = 43, y1 = 65, y2 = 159, y3 = 248

St. Joseph’s College of Engineering Page No.18


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
(2000 − 1999)(2000 − 2001)(2000 − 2002) (2000 − 1997)(2000 − 2001)(2000 − 2002)
= (43) + (65) +
(1997 − 1999)(1997 − 2001)(1997 − 2002) (1999 − 1997)(1999 − 2001)(1999 − 2002)
(2000 − 1997)(2000 − 1999)(2000 − 2002) (2000 − 1997)(2000 − 1999)(2000 − 2001)
(159) + (248)
(2001 − 1997)(2001 − 1999)(2001 − 2002) (2002 − 1997)(2002 − 1999)(2002 − 2001)
y = f(2000) = 100
Therefore, the profit in year 2000 = Rs. 100
3. Apply Lagrange’s interpolation formula, to find x (60) to the data given below.
X 14 17 31 35
y =f(x) 68.8 64 44 39.1
Solution: Lagrange’s Interpolation formula is
( y − y1 )( y − y2 )....( y − yn ) ( y − y0 )( y − y2 )....( y − yn )
x= xo + x1 + ......
( y0 − y1 )( y0 − y2 )....( y0 − yn ) ( y1 − y0 )( y1 − y2 )....( y1 − yn )
( y − y0 )( y − y1 )....( y − yn−1 )
+ xn
( yn − y0 )( yn − y1 )....( yn − yn−1 )
(60 − 64)(60 − 44)(60 − 39.1) (60 − 68.8)(60 − 44)(60 − 39.1)
x(60) = 14 + 17 +
(68.8 − 64)(68.8 − 44)(68.8 − 39.1) (64 − 68.8)(64 − 44)(64 − 39.1)
(60 − 68.8)(60 − 64)(60 − 39.1) (60 − 68.8)(60 − 64)(60 − 44)
+ .31 + 35
(44 − 68.8)(44 − 64)(44 − 39.1) (39.1 − 68.8)(39.1 − 64)(39.1 − 44)
= − 5.2967 + 20.9280 + 9.3837 − 5.4397 = 19.5753
x ( 60 ) = 19.5753
4. Using Lagrange’s inverse interpolation formula, find the value of x when y = 13.5 from
the given data
x 93.0 96.2 100.0 104.2 108.7
y 11.38 12.80 14.70 17.07 19.91

Solution: The Lagrange’s inverse interpolation formula is,


( y − y1 )( y − y2 )( y − y3 )( y − y4 ) ( y − y0 )( y − y2 )( y − y3 )( y − y4 )
x= xo + x1
( yo − y1 )( yo − y2 )( y0 − y3 )( y0 − y4 ) ( y1 − y0 )( y1 − y2 )( y1 − y3 )( y1 − y4 )
( y − y0 )( y − y1 )( y − y3 )( y − y4 ) ( y − y0 )( y − y1 )( y − y2 )( y − y4 )
+ x2 + x3
( y2 − y0 )( y2 − y1 )( y2 − y3 )( y2 − y4 ) ( y3 − y0 )( y3 − y1 )( y3 − y2 )( y3 − y4 )
( y − y0 )( y − y1 )( y − y2 )( y − y3 )
+ x4
( y4 − y0 )( y4 − y1 )( y4 − y2 )( y4 − y3 )
Here x0 = 93.0 ; x1 = 96.2 ; x2 = 100; x3 = 104.2 ; x4 = 108.7 ;
y = 13.5 ; y0 = 11.38 ; y1 = 12.80 ; y2 = 14.70 ; y3 = 17.07 ; y4 = 19.91
(13.5 − 12.80)(13.5 − 14.70)(13.5 − 17.07)(13.5 − 19.91)
x= 93.0
(11.38 − 12.80)(11.38 − 14.70)(11.38 − 17.07)(11.38 − 19.91)
(13.5 − 11.38)(13.5 − 14.70)(13.5 − 17.07)(13.5 − 19.91)
+ 96.0
(12.80 − 11.38)(12.80 − 14.70)(12.80 − 17.07)(12.80 − 19.91)

St. Joseph’s College of Engineering Page No.19


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
(13.5 − 11.38)(13.5 − 12.80)(13.5 − 17.07)(13.5 − 19.91)
+ 100
(14.70 − 11.38)(14.70 − 12.80)(14.70 − 17.07)(14.70 − 19.91)
(13.5 − 11.38)(13.5 − 12.80)(13.5 − 14.70)(13.5 − 19.91)
+ 104.2
(17.07 − 11.38)(17.07 − 12.80)(17.07 − 14.70)(17.07 − 19.91)
(13.5 − 11.38)(13.5 − 12.80)(13.5 − 14.70)(13.5 − 17.07)
+ 108.7
(19.91 − 11.38)(19.91 − 12.80)(19.91 − 14.70)(19.91 − 17.07)
Therefore x (13.5 ) = 97.656
5. Using Newton’s divided difference formula compute f(5) from the data
x 1 2 4 7 12
y =f(x) 22 30 82 106 216

Solution: Divided difference table is


x y Δ Δ2 Δ3 Δ4
1 22
8
2 30 6
26 –1.6
4 82 –3.6 0.194
8 0.535
7 106 1.75
22
12 216

y = f ( x) = f ( x0 ) + ( x − x0 ) f ( x0 , x1 ) + ( x − x0 )( x − x1 ) f ( x0 , x1 , x2 ) +
( x − x0 )( x − x1 )( x − x2 ) f ( x0 , x1 , x2 , x3 ) + ( x − x0 )( x − x1 )( x − x2 )( x − x3 ) f ( x0 , x1 , x2 , x3 , x4 )
Here x = 1, x = 2, x = 4 , x = 7 , x = 12 ,
f ( x0 ) = 22, f ( x0 , x1 ) = 8, f ( x0 , x1 , x2 ) = 6, f ( x0 , x1 , x2 , x3 ) = −1.6, f ( x0 , x1 , x2 , x3 , x4 ) = 0.194
Take x = 5,
y (5) = 22 + (5 − 1)(8) + (5 − 1)(5 − 2)(6) + (5 − 1)(5 − 2)(5 − 4)(−1.6) + (5 − 1)(5 − 2)(5 − 4)(5 − 7)(0.194)
= 102.144
6. Evaluate f ( 9 ) using Newton’s divided difference formula from the given data
x 5 7 11 13 17
y=f(x) 150 392 1452 2366 5202
Solution: Newton Divided difference formula is
y = f ( x) = f ( x0 ) + ( x − x0 ) f ( x0 , x1 ) + ( x − x0 )( x − x1 ) f ( x0 , x1 , x2 ) +
( x − x0 )( x − x1 )( x − x2 ) f ( x0 , x1 , x2 , x3 ) + ( x − x0 )( x − x1 )( x − x2 )( x − x3 ) f ( x0 , x1, x2 , x3 , x4 )

St. Joseph’s College of Engineering Page No.20


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

x y Δ Δ2 Δ3 Δ4
5 150
121
7 392 24
265 1
11 1452 32 0
457 1
13 2366 42
709
17 5202
Here x1 = 5, x2 = 7, x3 = 11 , x4 = 13 , x5 = 17 , x = 9
f ( x0 ) = 121, f ( x0 , x1 ) = 24, f ( x0 , x1 , x2 ) = 1, f ( x0 , x1 , x2 , x3 ) = 0
y (9) = 150 + (9 − 5)(121) + (9 − 5)(9 − 7)(24) + (9 − 5)(9 − 7)(1) + (9 − 5)(9 − 7)(9 − 11)(9 − 13)(0)
y (9) = 150 + 484 + 192 -16 = 810
7. If f ( 1) = 1, f ( 2 ) = 5 , f ( 7 ) = 5 and f ( 8 ) = 4 , find a polynomial that satisfies this data using
Newton’s divided difference formula. Hence, find f(6).
Solution: The divided difference table is

x y Δ Δ2 Δ3
1 1
4
2 5 −4
6
0 1
14
7 5 −1
6
–1
8 4
f ( x) = f ( x0 ) + ( x − x0 ) f ( x0 , x1 ) + ( x − x0 )( x − x1 ) f ( x0 , x1, x2 ) + ( x − x0 )( x − x1 )( x − x2 ) f ( x0 , x1, x2 , x3 ) + ....
 −4  1
= 1 + ( x − 1)4 + ( x − 1)( x − 2)   + ( x − 1)( x − 2)( x − 7)  
 6   14 
2 1
= 1 + 4 x − 4 − ( x − 1)( x − 2) + ( x − 1)( x − 2)( x − 7)
3 14
1
= 168 x − 126 − 28 x 2 + 84 x − 56  + 3  x 3 − 3 x 2 + 2 x − 7 x 2 + 21x − 14 
42 

St. Joseph’s College of Engineering Page No.21


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
1
=  −28 x 2 + 252 x − 182 + 3x3 − 9 x 2 + 6 x − 21x 2 + 63x − 42 
42
1
= 3x3 − 58 x 2 + 321x − 224
42
1
f (6) = 3(6)3 − 58(6) 2 + 321(6) − 224  = 6.2381
42
8. Using Newton’s forward interpolation formula, find the cubic polynomial which takes the
following values.
x 0 1 2 3
y 1 2 1 10
x − x0 x − 0
Solution: Here u = = =x
h 1
x y Δ Δ2 Δ3
0 1
1
1 2 –2
–1 12
2 1 10
9
3 10
By Newton’s forward interpolation formula
u (u − 1) 2 u (u − 1)(u − 2) 3 u (u − 1)(u − 2)(u − 3) 4
y = y0 + u y0 +  y0 +  y0 +  y0 + ...
2 6 12
Substitute u = x, y0 = 2, y0 = 1, 2 y0 = −2, 3 y0 = 12
x( x − 1) x( x − 1)( x − 2)
y = 2 + x(1) + (−2) + (12) = 2 x3 − 7 x 2 + 6 x + 1
2 6
9. Using Newton’s forward interpolation formula, find the cubic polynomial which takes the
following values. Hence find f ( 3 ) .
x 0 2 4 6
f ( x) -14 6 18 118

Solution: The forward difference table is


x y Δ Δ2 Δ3
0 –14
20
2 6 –8
12 96
4 18 88
100
6 118
By Newton’s forward interpolation formula
u u (u − 1) 2 u (u − 1)(u − 2) 3
y( x) = y0 + y0 +  y0 +  y0 + ...
1! 2! 3!

St. Joseph’s College of Engineering Page No.22


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
x − x0 x − 0 x
Here x0 = 0 ; y0 = −14 ; h = 2 ; u = = =
h 2 2
u u (u − 1) u (u − 1)(u − 2)
y ( x) = −14 + (20) + ( −8) + 96 + ...
1! 2! 3!
= − 14 + 20u − 4u 2 + 4u + 16u 3 − 48u 2 + 32u = 16u 3 − 52u 2 + 56u − 14
3 2
x  x  x  x
Put u = , we get y ( x) = 16   − 52   + 56   − 14 = 2 x3 − 13x 2 + 28 x − 14
2 2 2 2
Put x = 3, y(3) = 2(3)3 − 13(3) 2 + 28(3) − 14 = 7
10. From the following table find the value of tan 45 15'
x : 45 46 47 48 49 50
tan x : 1 1.03553 1.07237 1.11061 1.15037 1.19175
x − x 0 45o15 − 45o
0
1
Solution: Here h = 1, u = = = 15 = = 0.25 (u is dimensionless)
h 1 4
The difference table is
x y y 2 y 3 y 4 y 5 y

45 1.0000
0.03553
0.00131
46 1.03553 0.0009
0.03684 0.00003
0.00140 –0.00005
47 1.07237 0.00012
0.03824 -0.00002
0.00152
48 1.11061 0.00010
0.03976
0.00162
49 1.15037
0.04138

50 1.19175
u u(u − 1) 2 u(u − 1)(u − 2) 3 u(u − 1)(u − 2)(u − 3) 4
y ( x) = y0 + y0 +  y0 +  y0 +  y0
1! 2! 3! 4!
u(u − 1)(u − 2)(u − 3)(u − 4) 5
+  y0
5!
1 3 1  3  7 
 −   −  − 
1 4 4 4  4  4 
= 1.0000 + (0.03553) + (0.00131) + (0.00009)
4 2 6

St. Joseph’s College of Engineering Page No.23


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
1  3  7  11  1  3  7  11  15 
 −  −  −   −  −  −  − 
4  4  4  4  4  4  4  4  4 
+ (0.00003) + (−0.00005)
24 120
= 1.0000 + 0.0088825 − 0.0001228 + 0.0000049
y (45o15) = 1.00876
11. Find the value of y at x = 21 and x = 28 from the data given below
x 20 23 26 29
y 0.3420 0.3907 0.4384 0.4848

x − x0 21 − 20
Solution : Here u = = = 0.33333
h 3
x y Δ Δ2 Δ3
20 0.3420
0.0487
23 0.3907 –0.0010
0.0477 –0.0003
26 0.4384 –0.0013
0.0464
29 0.4848
(i) By Newton’s forward interpolation formula
u (u − 1) 2 u (u − 1)(u − 2) 3 u (u − 1)(u − 2)(u − 3) 4
y = y0 + uy0 +  y0 +  y0 +  y0
2 6 12
0.3333(0.3333 − 1)
y = 0.3420 + (0.3333)(0.0487) + (−0.0010)
2
0.3333(0.3333 − 1)(0.3333 − 2)
+ (−0.0003)
6
y(21) = 0.3583
(ii) By Newton’s backward interpolation formula
v(v + 1) 2 v(v + 1)(v + 2) 3
y = yn + vyn +  yn +  yn + ...... …..
2 6
x − xn 28 − 29
Where v = = = − 0.33333
h 3
(−0.3333)(−0.3333 + 1)
y = 0.4848 + (−0.3333)(0.0464) + (−0.0013)
2
−0.3333(−0.3333 + 1)(−0.3333 + 2)
+ (−0.0003)
6
y(28) = 0.4695
12. From the given data, find θ at x = 43 and x = 84
X 40 50 60 70 80 90
θ 184 204 226 250 276 304

St. Joseph’s College of Engineering Page No.24


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
Solution: Since six data are given, P( x) is of degree 5.
x − x0 43 − 40
To find  at x = 84, use backward interpolation formula where u = = = 0.3
h 10
X  Δ Δ2  Δ3  Δ4 
40 184
20
50 204 2
22 0
60 216 2 0
24 0
70 250 2 0
26 0
80 276 2
28
90 304

(i) By Newton’s forward interpolation formula


u u (u − 1) 2 u (u − 1)(u − 2) 3
 ( x ) =  o +  o +  o +   o + ...
1! 2! 3!
(0.3)(−0.7)
 (43) =184 + (0.3)20 + (2) =189.79
2
(ii) By Newton’s backward interpolation formula
v(v + 1) 2 v(v + 1)(v + 2) 3 x − xn 84 − 90
 ( x) =  n + v n +  n +  n + where v = = = −0.6
2! 3! h 10
(−0.6)(0.4)
 (84) = 304 + (−0.6)28 + (2) = 286.96
2
13. From the following table, estimate the number of students who obtained marks between 40
and 45.
Marks 30-40 40-50 50-60 60-70 70-80
No.of Students 31 42 51 35 31
Solution: Forward difference table is
x y Δ Δ2 Δ3 Δ4
Below 40 31
42
Below 50 73 9
51 –25
Below 60 124 –16 37
35 12
Below 70 159 –4
31
Below 80 190

x − x0 45 − 40
Here u = = = 0.5
h 10

St. Joseph’s College of Engineering Page No.25


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
By Newton’s forward interpolation formula
u( u − 1 ) 2 u( u − 1 )( u − 2 ) 3 u( u − 1 )( u − 2 )( u − 3 ) 4
y = y 0 + uy 0 +  y0 +  y0 +  y0
2 3 34
No.of students with the marks less than 45 = 48

No.of students with the marks less than 40 = 31

Therefore No.of students who obtained marks between 40 and 45 = 48 – 31 = 17.


14. The following values of x and y are given in the table
x 1 2 3 4
f(x) 1 2 5 11
Find the cubic splines and evaluate y(1.5)
Here h = 1, n = 3
Assume M0 = 0, M3 = 0
6
M i −1 + 4 M i + M i +1 = 2  yi −1 − 2 yi + yi +1  , − − − −(1)
h
where i = 1, 2
1 1  h2 
S ( x) = ( xi − x)3 M i −1 + ( x − xi −1 )3 M i  + ( xi − x)  yi −1 − M i −1 
6h h  6 
1  h2 
+ ( x − xi −1 )  yi − M i  − − − (2)
h  6 
where i = 1,2,3
Subs i = 1 in (1)
M0 + 4M1 + M2 = 6(y0 – 2y1 + y2)
4M1 + M2 = 12 -------(3)
Subs i = 2 in (1)
M1 + 4M2 = 18 -------(4)
Solving (3) and (4) we get M1 = 2, M2 = 4
The cubic spline in the interval [1 , 2] is obtained by substituting i = 1 in (2)
1 1  h2  1  h2 
S ( x) = ( x1 − x)3 M 0 + ( x − x0 )3 M 1  + ( x1 − x)  y0 − M 0  + ( x − x0 )  y1 − M 1 
6 h  6  h  6 
1
(
S ( x) = x 3 − 3x 2 + 5 x
3
)
S (1.5) = 1.375
The cubic spline in the interval [2 , 3] is obtained by substituting i = 2 in (2)
1 1  h2  1  h2 
S ( x) = ( x2 − x)3 M 1 + ( x − x1 )3 M 2  + ( x2 − x)  y1 − M 1  + ( x − x1 )  y2 − M 2 
6 h  6  h  6 
S ( x) =
1 3
3
(
x − 3x 2 + 5 x )
The cubic spline in the interval [3 , 4] is obtained by substituting i = 3 in (2)
1 1  h2  1  h2 
S ( x) = ( x3 − x)3 M 2 + ( x − x2 )3 M 3  + ( x3 − x)  y2 − M 2  + ( x − x2 )  y3 − M 3 
6 h  6  h  6 
1
(
S ( x) = −2 x 3 + 24 x 2 − 76 x + 81
3
)

St. Joseph’s College of Engineering Page No.26


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
15. Using cubic spline, find y(0.5) and y’(1) given M0 = M2 = 0 and the table
x 0 1 2
y –5 –4 3
Here h = 1, n = 2
Assume M0 = 0, M2 = 0
6
M i −1 + 4 M i + M i +1 = 2  yi −1 − 2 yi + yi +1  , − − − −(1)
h
where i = 1
1 1  h2 
S ( x) = ( xi − x)3 M i −1 + ( x − xi −1 )3 M i  + ( xi − x)  yi −1 − M i −1 
6h h  6 
1  h2 
+ ( x − xi −1 )  yi − M i  − − − (2)
h  6 
where i = 1,2
Subs i = 1 in (1)
M0 + 4M1 + M2 = 6(y0 – 2y1 + y2)
4M1 = 36 M1 = 9
The cubic spline in the interval [0 , 1] is obtained by substituting i = 1 in (2)
1 1  h2  1  h2 
S ( x) = ( x1 − x)3 M 0 + ( x − x0 )3 M 1  + ( x1 − x)  y0 − M 0  + ( x − x0 )  y1 − M 1 
6 h  6  h  6 
3 x
S ( x) = x 3 − − 5
2 2
81
S (0.5) = −
16
9 2 1
S '( x) = x −
2 2
S '(1) = 4
16. If f(0)=1, f(1)=2, f(2)=33 and f(3)=244 find a cubic spline approximation. Assuming
M ( 0 ) = M ( 3 ) = 0. Al so find f ' (1.5 ) and f ( 0.35 )
Solution: Given
0 1 2 3
x
(x0) (x1) (x2) (x3)
1 2 33 244
y
(y0) (y1) (y2) (y3)
Here h = 1; n = 3
6
Let M o = M 3 = 0 , We have M i −1 + 4M i + M i +1 = [ yi −1 − 2 yi + yi +1 ] for i = 1, 2
h2
M 0 + 4M 1 + M 2 = 6[ y0 − 2 y1 + y2 ]

M1 + 4M 2 + M 3 = 6[ y1 − 2 y2 + y3 ]
This reduces to, (taking M 0 , M 3 = 0)
4 M1 + M 2 = 180 → (1)
M1 + 4M 2 = 1080 → (2)

St. Joseph’s College of Engineering Page No.27


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
solving (1) & (2) we get M1 = −24 , M 2 = 276
The cubic spline for x i −1  x  x i is given by
1 1 h2  1  h2 
f ( x) = y ( x) = ( xi − x)3 M i −1 + ( x − xi −1 )3 M i  + ( xi − x)[ yi −1 − M i −1  + ( x − xi −1 )  yi − M i  → (3)
6h h 6  h  6 

For i = 1 , f(x) = −4 x 3 + 5 x + 1 ; 0  x  1 → (4)


For i = 2 , f ( x) = 50 x3 − 162 x 2 + 167 x − 53 ; 1  x  2 → (5)
For i = 3 , f ( x) = −46 x3 + 414 x 2 − 985x − 715 ; 2  x  3 → (6)
Equation(4), (5) & (6) give the cubic spline in each sub− interval
 −4 x 3 + 5 x + 1 ; 0  x  1 
 
Hence f ( x) =  50 x3 − 162 x 2 + 167 x − 53 ; 1  x  2 
−46 x3 + 414 x 2 − 985 x − 715 ; 2  x  3 
 
f ( x) = 50 x3 − 162 x 2 + 167 x − 53 ; 1  x  2
f '( x) = 150 x 2 − 324 x + 167
f '(1.5) = 150(1.52 ) − 324(1.5) + 167 = 18.5
f ( x) = −4 x 3 + 5 x + 1 ; 0  x  1
f (0.35) = −4(0.353 ) + 5(0.35) + 1 = 2.26

UNIT-III NUMERICAL DIFFERENTIATION AND INTEGRATION


PART – A
1. Define Numerical Differentiation.
dy d 2 y
Numerical differentiation is the process of computing the values of , …. for some
dx dx 2
particular values of x from the given data ( xi , yi ) where y is not known explicitly.

dy d 2 y
State Newton’s formula to find the derivatives , using forward differences when
2. dx dx 2
x  x0 .
When x  x0
dy 1  (2u − 1) 2 (3u 2 − 6u + 2) 3 (4u 3 − 18u 2 + 22u − 6) 4 
y ' = f '( x) = =  yo +  yo +  yo +  yo + ...
dx h  2! 3! 4! 
d2y 1  2  6u 2 − 18u + 11  4  x − xo
y '' = f ''( x) = 2
= 2 
 yo + (u − 1)  3
yo +    yo + ... where u =
dx h   12   h

St. Joseph’s College of Engineering Page No.28


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

dy d 2 y
State Newton’s formula to find the derivatives , using forward differences when
3. dx dx 2
x = x0 .

When x = x0 ,
dy 1  1 1 1 
y ' = f '( x) = = yo −  2 yo + 3 yo −  4 yo + ...
dx h  2 3 4 
d2y 1  2 11 
y '' = f ''( x) = = 2   yo −  3 yo +  4 yo + ...
dx 2
h  12 
dy d 2 y
State Newton’s formula to find the derivatives , using backward differences when
4. dx dx 2
x  xn .
When x  xn
dy 1  (2v + 1) 2 (3v 2 + 6v + 2) 3 (4v3 + 18v 2 + 22v + 6) 4 
y ' = f '( x) = = yn +  yn +  yn +  yn + ...
dx h  2! 3! 4! 
d2y 1  2  6v 2 + 18v + 11  4  x − xn
y '' = f ''( x) = =   y + (v + 1) 3
y +    y + ... where v =
dx 2 h2 
n n   n
 12   h

dy d 2 y
State Newton’s formula to find the derivatives , using backward differences when
5. dx dx 2
x = xn .
When x = xn ,
dy 1  1 1 1 
y ' = f '( x) = = yn + 2 yn + 3 yn + 4 yn + ...
dx h  2 3 4 
d2y 1  2 11 
y '' = f ''( x) = = 2 
 yn + 3 yn + 4 yn + ...
dx 2
h  12 
6. Define Numerical Integration
xn

The process of computing the value of a definite integral  y dx from a set of values
x0

( xi , yi ) , i = 0,1,2,…,n of the function y = f(x) is called Numerical integration.


7. Define Quadrature.
The process of evaluating a definite integral from a set of tabulated values of function is called as
quadrature.
8. What is the Geometrical interpretation of Trapezoidal rule?

St. Joseph’s College of Engineering Page No.29


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
The area of the region enclosed by the curve y = f(x), the x – axis, the ordinates x = a and x = b is
approximated by the sum of the area of n trapeziums.
9. What approximation is used in deriving Simpson’s rule of integration?
Answer : Simpson’s one third rule approximates the area of two adjacent strips by the area under
quadratic polynomials (i.e.) parabola.
10. Why Simpson’s one third rule is called a closed formula and when Simpson’s rule gives the
exact result?
Since the end point ordinates yo and yn are included in the Simpson’s one third rule, then it is
called closed formula. Simpson’s rule gives the exact result when the given curve is a parabola
11. 1
dx
Evaluate  1+ x with h = 0.5 using Trapezoidal rule
0

x 0 0.5 1
y 1 0.6666 0.5
1
h
 ydx = ( y0 + y n ) + 2 ( y1 + y 2 + .... + y n −1 )  = (1 + 0.5 ) + 2 ( 0.6666 )  = 0.7083
2
0

12. What is the error in Trapezoidal rule and Simpson’s rules also write down its order.
Trapezoidal rule
( xn − x0 ) 2
Error : E  h y ''(  ), x0    xn ; Order of the error = h2
12
Simpson’s rule:
( xn − x0 ) 4 iv
Error : E  h y (  ), x0    xn ; Order of the error = h4
180
4

13. Using Simpson’s rule find  e x dx, given e0 = 1, e1 = 2.72, e2 = 7.39, e3 = 20.09 & e4 = 54.6
0

4
h
 e dx = 3 ( y0 + y4 ) + 2y 2 + 4 ( y1 + y3 )  = (1 + 54.6 ) + 2 ( 7.39 ) + 4 ( 2.72 + 20.09 )  = 53.8733
x

0
14. Compare Trapezoidal rule and Simpson’s 1/3 rule for evaluating numerical
Integration.

S.No. Trapezoidal Rule Simpson’s 1/3 rule


Number of intervals may be even or
1. Number of intervals is even
odd
2. Order of error = h2 Order of error = h4

St. Joseph’s College of Engineering Page No.30


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
Principal part of the error in the Principal part of the error in the
3. − h 2 '' − h5 iv
interval (x1,x2) = y1 interval(x1,x2) = y1
12 90

15. State Gaussian 2 point and 3 point formula.


1
 1   1 
Two point formula:  f (x) dx = f  − +f 
3  3

−1

5  3  3  8
1
Three point formula:  f (x)dx =  f  − +f    + f (0)
−1
9 
  5   5   9
1
1
16. Evaluate  x + 3 dx by Gaussian two-point formula
−1

 1   1 
1
1 1 1
I=  x + 3 dx = f  −
−1
+f  =  +
3   3   3 − 1   3 + 1 
= 0.6903
   
 3  3
1
dt
17. Evaluate I =  by using three point Gaussian quadrature formula.
0 1+ t
2

5  3  3  8
1
 f (x)dx = 9 f  − +f    + f (0)
−1   5  5   9
1 1
1
dt dt 1  1 
I= =  = [1.5833] = 0.79165  1 + t 2 is an even function 
01+ t
2 2 −1 1 + t 2
2


2
18. Change the limits of  sin x dx in to (–1, 1).
0

b−a b+a
By Substituting x= z +   , we get
 2   2 

 b−a   1

b 1 2
a f (x) dx =  2 −1 g(z) dz   sin x dx = sin ( z + 1) dz
0
4  −1
4
b d
19. State Trapezoidal rule for evaluating   f ( x, y )dxdy.
a c

hk
I= [ (Sum of values of ‘f ’ at the four corners ) + 2(Sum of values of ‘f ’ at the
4
remaining nodes on the boundary) + 4(Sum of the values of ‘f ’ at the interior nodes)]

St. Joseph’s College of Engineering Page No.31


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
b d
20. State Simpson’s rule for evaluating   f (x, y)dxdy.
a c
hk
I= [( Sum of the values of ‘f ’ at the four corners) + 2 (Sum of the values of ‘f ’ at the odd
9
positions on the boundary except the corners) + 4 (Sum of the values of ‘f ’ at the even positions
on the boundary) + { 4 (Sum of the values of ‘f ’ at odd positions) + 8 (Sum of the values of ‘f ’
at even positions) on the odd row of the matrix except boundary rows} + { 8 (Sum of the values of
‘f ’ at the odd positions) + 16 (Sum of the values of ‘f ’ at the even positions) on the even rows of
the matrix} ]
PART B

1. Find the first, second derivatives of the function f(x) at x = 1.5


X 1.5 2.0 2.5 3.0 3.5 4.0
f(x) 3.375 7.0 13.625 24.0 38.875 59.0

Solution: Here x 0 = 1.5,h = 0.5 and Forward difference table is


x Y ∆y ∆2y ∆3y ∆4y
1.5 3.375
3.625
2.0 7.0 3.0
6.625 0.75
2.5 13.625 3.75 0
10.375 0.75
3.0 24.0 4.5 0
14.875 0.75
3.5 38.875 5.25
20.125
4.0 59
1 1 1  1  1 1 
f  (1.5) =  y0 −  2 y0 + 3 y0 − ...... = 3.625 − (3.0) + (0.75)  = 4.75
h 2 3  0.5  2 3
 2
1 11 4  1
f  (1.5) =  y0 −  y0 + 12  y0 − ...... = (0.5)2 3 − 0.75 = 9
3

h2
1  3  1
3
f  (1.5) = 3 3 y0 −  4 y0 ...... = 0.75 = 6
h  2  (0.5)
2. 1
Find the first two derivatives of ( x ) 3 at x=50 and x= 56, for the following table.
X 50 51 52 53 54 55 56
1
y = ( x) 3 3.6840 3.7084 3.7325 3.7563 3.7798 3.8030 3.8259

Solution: Here x 0 = 50, h = 1 and difference table is


x y ∆y ∆2y ∆3y
50 2.6840
0.0244

St. Joseph’s College of Engineering Page No.32


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
51 3.7084 –0.0003
0.0241 0
52 3.7325 –0.0003
0.0238 0
53 3.7563 –0.0003
0.0235 0
54 3.7798 –0.0003
0.0232 0
55 3.8030 –0.0003
0.0229
56 3.8259
For x= 50, we use Newton forward differentiation formula,
 dy   dy  1 1 1
  =   = [y 0 −  2 y 0 +  3 y 0 + .........]
 dx  x = x 0  dx  u =0 h 2 3
 dy  1 1 1
  = [0.0244 − (−0.0003) + (0)] = 0.02455
 dx  x =50 1 2 3
 d2y  1
 2 = 2 [−0.0003] = −0.0003
 dx  x =50 (1)
For x= 56, we use Newton backward differentiation formula
 dy   dy  1 1 1
  =  = [y n +  2 y n + 3 y n + .........]
 dx  x =56  dx  v =0 h 2 3
1 1 1
= [0.0229 + (−0.0003) + (0)] = 0.02275
1 2 3
d y
2
1 1
 2 = 2 [ 2 y n + 3 y n .........] = [ −0.0003] = −0.0003
 dx  x =56 h (1) 2

3. d2y
Given the following values of x and y, find dy and 2 at x = 1.05
dx dx
X 1 1.05 1.10 1.15 1.20 1.25 1.30
f(x) 1 1.025 1.049 1.072 1.095 1.118 1.140

Solution: Here x0 = 1, h = 0.05 and Forward difference table is

x y ∆y ∆2y ∆3y ∆4y ∆5y ∆6y


1 1
0.025
1.05 1.025 –0.001
0.024 0
1.1 1.049 –0.001 0.001
0.023 0.001 –0.002

1.15 1.072 0 –0.001 0.002

St. Joseph’s College of Engineering Page No.33


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

0.023 0 0
1.2 1.095 0 –0.001
0.023 –0.001
1.25 1.118 –0.001
0.022
1.3 1.14

 dy  1 1 1
  = [y0 −  2 y0 + 3 y0 + .........]
 dx  x = x0 h 2 3

 dy  1 1 1 1
  = [0.024 − (−0.001) + (0.001) − (−0.001)] = 0.4717
 dx  x =1.05 0.05 2 3 4

 d2 y  1  2 11 4 
 2 = 2   y0 −  y0 + 12  y0 − ......
3

 dx  x = x0 h

 d2 y  1  11 
 2 = 2  −0.001 − 0.001 + 12 (−0.001)  = 0.0333
 dx  x =1.05 h
4. Find f ’(10) from the following data:
x 3 5 11 27 34
y=f(x) –13 23 899 17315 35606
Solution: Since table values of x are not equally spaced, we use Newton divided difference
table.
x y =f(x) ∆y ∆2y ∆3y ∆4y
3 –13
18
5 23 16
146 1
11 899 40 0
1026 1
27 17315 69
2613
34 35606

By Newton’s divided difference interpolation formula,


y = f ( x0 ) + ( x – x0 ) f ( x0 ) + ( x – x0 )( x – x1 )  2 f ( x0 ) + ( x – x0 )( x – x1 )( x – x2 ) 3 f ( x0 ) +
= ( −13) + ( x – 3)(18 ) + ( x – 3)( x – 5 )(18 ) + ( x – 3)( x – 5 )( x –11)(16 ) + ( x – 3 )( x – 5 )( x –11)( x – 27 )(1)
y = x3 – 3x 2 – 7 x + 8
y ' ( x ) = 3x 2 – 6 x – 7
y ' (10 ) = 233

St. Joseph’s College of Engineering Page No.34


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
5. The table given below reveals the velocity v of a body during the time ‘t’. Find its
acceleration at t = 1.1
t 1.0 1.1 1.2 1.3 1.4
V 43.1 47.7 52.1 56.4 60.8
Solution: Difference table is
t V ∆v ∆2v ∆3v ∆4v
1.0 43.1
4.6
1.1 47.7 -0.2
4.4 0.1
1.2 52.1 -0.1 0.1
4.3 0.2
1.3 56.4 -0.1
4.4
1.4 60.8
dv
Acceleration =
dt
 dy  1 1 1
Use Newton’s forward difference formula   = [y0 −  2 y0 + 3 y0 + .........]
 dx  x = x0 h 2 3
dv 1  (−0.1) (0.2) 
= 4.4 − + = 44.7167 Acceleration when t = 1.1 is 44.9167
dt 0.1  2 3 

Find the value of x for which y=f(x) is minimum and find the minimum value from the table
6. x 0.6 0.65 0.7 0.75
y= f(x) 0.6221 0.6155 0.6138 0.617
Solution : Newton’s Difference table is
X Y ∆y ∆2y ∆3 y
0.60 0.6221
-0.0066
0.65 0.6155 0.0049
-0.0017 0
0.7 0.6138 0.0049
0.0032
0.75 0.617
Newton’s formula for derivative is
dy 1 (2u − 1) 2 (3u 2 − 6u + 2) 3 (4u 3 − 18u 2 + 22u − 6) 4 
= y '( x) =  yo +  yo +  yo +  yo + ...
dx h 2! 3! 4! 
x − x0
Where u =
h
x − 0.60
Here x0 = 0.60 , so u =
0.05

St. Joseph’s College of Engineering Page No.35


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

dy 1  2u − 1 
=  −0.0066 + (0.0049) 
dx 0.05  2 
1  2u − 1   dy 
0=  −0.0066 + (0.0049)   for max or min dx = 0
0.05  2 
(2u − 1)(0.0049) = 0.0132
u = 1.8469
We have
x − 0.60
u=
0.05
1.8469(0.05) = x − 0.60
x = 0.6923
To find the value of y at x=0.6923
u (u − 1) 2 u (u − 1)(u − 2) 3
y ( x) = y0 + u y0 +  y0 +  y + ...
2 3
(1.8469)(1.8469 − 1)
y (0.6923) = 0.6221 + (1.8469)(−0.0066) + (0.0049)
2
= 0.6137 − 0.0066(1.8469) + 0.00245(1.8469)(0.8469)
= 0.6137426
7. 6
1 1 rd 3 th
Evaluate  1 + x2 dx by i) Trapezoidal rule (ii) Simpson’s
3
rule (iii) Simpson’s
8
rule
0
and also by actual integration.
1 6−0
Solution : Let y = . Divide the intervals into 6 equal parts i.e. h = =1
1+ x 2
6
x 0 1 2 3 4 5 6
y 1.000 0.5000 0.20000 0.10000 0.058824 0.038462 0.27027

(i) By trapezoidal rule


h
 ydx = 2 [( y 0 + y6 ) + 2( y1 + y2 + ... + y5 )]

6
1 1
I = dx = [(1 + 0.027027) + 2(0.5 + 0.2 + 0.1 + 0.058824 + 0.038462)] = 1.4107
0
1+ x 2
2
(ii) By Simpson’s 1/3rd rule
h
 ydx = 3 [( y 0 + y6 ) +4( y1 + y3 + y5 ) + 2( y2 + y4 )]

6
1 1
I = dx = [(1 + 0.027027) + 2(0.5 + 0.058824) + 4(0.2 + 0.1 + 0.038462)] = 1.36617
0
1+ x 2
3
(iii) By Simpson’s 3/8th rule

St. Joseph’s College of Engineering Page No.36


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

3h
 ydx = 8 [( y 0 + y6 ) +3( y1 + y2 + y4 + y5 ) + 2( y3 )]

6
1 3
I = dx = [(1 + 0.027027) + 3(0.5 + 0.2 + 0.058824 + 0.038462) + 2(0.1)] = 1.35708
0
1+ x 2
8
(iv) By actual integration
6
1
I = dx =  tan −1 x  = tan −1 ( 6 ) = 1.4056
6

0
1+ x 2 0

8. The velocity v of a particle at a distance S from a point on its path is given by the table :
S (ft.) 0 10 20 30 40 50 60
V (ft. / sec) 47 58 64 65 61 52 38
1
Estimate the time taken to travel 60 feet by using Simpson’s rule. Compare the result
3
with Simpson’s three-eighth rule.
ds 1
Solution: We know that = v  dt = ds
dt v
60
1
t =  v ds
0

x 0 10 20 30 40 50 60
y=1/v 0.02127 0.01724 0.01563 0.01538 0.01640 0.01923 0.0263
( y0 ) ( y1 ) ( y2 ) ( y3 ) ( y4 ) ( y5 ) ( y6 )
Here h =10
(i) Simpson’s 1/3rd rule
h
 yds = 3 [( y0 + y6 ) +4( y1 + y3 + y5 ) + 2( y2 + y4 )]
10
= [(0.02127 + 0.0263) + 4(0.01724 + 0.01538 + 0.01923) + 2(0.01563 + 0.01640)]
3
= 3.75[0.04757+0.2054+0.03076] = 1.064
ii) Simpson’ 3/8th rule
3h
 yds = 8 [( y 0 + y6 ) +3( y1 + y2 + y4 + y5 ) + 2( y3 )]

30
= [(0.02127 + 0.0263) + 3(0.01724 + 0.01563 + 0.01923 + 0.01640) + 2(0.01538)]
8
= 3.75[0.0475+0.2055+0.03076] = 1.0641
1
x2 1
0 1 + x 3 dx using Simpson’s 3 rule with h = 0.25
1/3
9. Find the value of log 2 from

x2
Solution: Here y = , h = 0.25
1 + x3
x 0 0.25 0.5 0.75 1

St. Joseph’s College of Engineering Page No.37


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
y 0 0.0615 0.2222 0.3956 0.5

h
By Simpson’s rule, I =  ( y0 + y4 ) + 2( y2 ) + 4( y1 + y3 )
3
0.25
= (0 + 0.5) + 2(0.2222) + 4(0.0615 + 0.3956)  = 0.2311
3
Actual Integration:
1
1 3  1  1
1
x2
0 1 + x3 =  3 log(1 + x )0 =  3 log(1 + (1) ) − log(1 + (0) )  = 3 log 2 = 0.2311
3 3


By dividing the range into 10 equal parts, evaluate  sin x dx by using Trapezoidal rule
10. 0

Verify your results by actual integration.

Solution: Here a = 0 ; b =  ; n =10


b−a  −0 
h= = =
n 10 10
x 0  2 3 4 5 6 7 8 9 π
10 10 10 10 10 10 10 10 10
y = sin x 0 0.3090 0.5878 0.8090 0.9511 1 0.9511 0.8090 0.5878 0.3090 0
xn
h
By Trapezoidal rule,  f (x)dx = [(y0 + yn ) + 2(y1 + y 2 + y3 + ... + y n −1 )]
x0
2
xn
h (0 + 0) + 2(0.3090 + 0.5878 + 0.8090 
 y( x) dx = 2 +0.9511 + 1 + 0.9511 + 0.8090 + 0.5878 + 0.3090 = 1.9843
xo

 sin x dx =  − cos x =  − cos  + cos 0 = 2



Actual Integration: 0
0
1
dx
11. Evaluate  1+ x
0
2
using Romberg’s method. Hence obtain an approximate value for .

1
Solution: h = 0.5 y = ,
1+ x2
x 0 0.5 1
y 1 0.80 0.50
using Trapezoidal rule,

0.5
I= 1.5 + 2(0.8) = 0.775
2

St. Joseph’s College of Engineering Page No.38


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
h = 0.25 x 0 0.25 0.5 0.75 1
y 1 0.9412 0.8 0.64 0.5
0.25
I= 1.5 + 2(0.9412 + 0.8 + 0.64)  = 0.78280
2
h = 0.125
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
0.125
I= 1.5 + 2(0.9846 + 0.9412 + 0.8767 + 0.8 + 0.7191 + 0.64 + 0.5664) = 0.7848
2
I −I 
Using Romberg’s formula for I1 and I 2 , I = I 2 +  2 1  = 0.7854 − − − (1)
 3 
I −I 
Using Romberg’s formula for I 2 and I3 , I = I3 +  3 2  = 0.7854 − − − (2)
 3 
1
dx
From (1) and (2)  1+ x
0
2
= 0.7854

Evaluation:
1
dx
 1+ x
1
2
= 0.7854   tan −1 x  = 0.7854
0
0

 tan −1 1 − tan −1 0  = 0.7854



= 0.7854   = 3.1416
4
1.5

 e − x dx
2
12. Evaluate using three point Gaussian Quadrature formula
0.2

b−a b+a
Solution : Transform the variable from x to z by the transformation x =  z +  
 2   2 
 1.5 − 0.2   1.5 + 0.2 
Here a=0.2 , b=1.5, x =  z +   = 0.65 z + 0.85, dx = 0.65 dz
 2   2 
Limit :
x 0.2 1.5
z -1 1

St. Joseph’s College of Engineering Page No.39


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

Here f (t ) = e− (0.65 t +0.85)


1.5 1 2

e dx =  e
− x2 − (0.65 z + 0.85) 2
(0.65)dt
0.2 −1
 3
1
f  −  = 0.8869;
= (0.65)  e − (0.65 t + 0.85) 2
dt  5
−1
 3
5  3  3  8  f   = 0.1601;
= (0.65)   f  −  + f   + f (0)   5 
9  5  5   9 
   f (0) = 0.4855
= (0.65)(1.0133) = 0.65865
1.5
  e − x dx = (0.65)(1.0133) = 0.65865
2

0.2

2
x2 + 2 x + 1
13. Using Gaussian three point quadrature formula, evaluate  1 + ( x + 1) 2
dx
0

b−a b+a
Solution : Transform the variable from x to z by the transformation x =  z +  
 2   2 
b−a  b+a   2−0  2+0
Let x =  z +  = z +  = z + 1; dx = dz
 2   2   2   2 

Limits x 0 2
z -1 1

2
x2 + 2 x + 1 ( z + 1)2 + 2( z + 1) + 1
1
( z + 2)2
0 1 + ( x + 1)2 dx = −1 1 + [( z + 1) + 1]2 dz Here  f ( z ) =
( z + 2)4 + 1
z2 + 4z + 4
1
= dz f (0) =
4
−1
( z + 2) 4 + 1 17
2
z2 + 4z + 4 ( z + 2)2  3 
 f ( z) = = − + 2
( z + 2)4 + 1 ( z + 2)4 + 1
(
f − 3 = 
5
5 
 3 
4) = 0.4614
5   3  8
3 − + 2 + 1
1

 f ( z )dz = 9  f  − f
 5
+
  + f (0)
  9
5
 5 
−1 
2
5 8 4   3 
=  0.4614 + 0.12774 +    + 2
9
= 0.5365
9  17 
f ( ) 3 = 
5  3
5

4
 = 0.12774

 + 2 + 1
 5 

St. Joseph’s College of Engineering Page No.40


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
1 1
dx dy
Using Trapezoidal rule, evaluate   with h = 0.5 along x-direction and k = 0.25
14.
0 0
x + y +1
along y-direction.
1
Solution: Here f ( x, y) = h = 0.5, k = 0.25; x : 0 to 1, y : 0 to 1
1+ x + y
y\x 0 0.5 1
0 1 0.6667 0.5
0.25 0.8 0.5714 0.4444
0.5 0.6667 0.5 0.4
0.75 0.5714 0.4444 0.3636
1 0.5 0.4 0.3333
By Trapezoidal rule
hk
I= [ (Sum of values of f at the four corners ) + 2(Sum of values of f at the remaining nodes
4
on the boundary) + 4(Sum of the values of f at the interior nodes)]
(0.5)(0.25) (1 + 0.5 + 0.5 + 0.3333) + 2(0.6667 + 0.4444 + 0.4 + 0.3636
=  
4  0.4 + 0.5714 + 0.6667 + 0.8) + 4 ( 0.5714 + 0.5 + 0.4444 ) 
= 0.5319
 4  4
15. Evaluate   sin( x + y ) dx dy by Simpson’s rule.
0 0
   
Solution: Here f ( x, y) = sin( x + y) Limits x : 0 to , y : 0 to ; Take h = ,k = ;
4 4 8 8
 
y\x 0
8 4
0 0 0.3827 0.7071

0.3827 0.7071 0.9239
8

0.7071 0.9239 1
4

Simpson’s Rule
hk
I= [( Sum of the values of ‘f ’ at the four corners) + 2 (Sum of the values of ‘f ’ at the odd
9
positions on the boundary except the corners) + 4 (Sum of the values of ‘f ’ at the even positions
on the boundary) + { 4 (Sum of the values of ‘f ’ at odd positions) + 8 (Sum of the values of ‘f ’
at even positions) on the odd row of the matrix except boundary rows} + { 8 (Sum of the values
of ‘f ’ at the odd positions) + 16 (Sum of the values of ‘f ’ at the even positions) on the even
rows of the matrix} ]

St. Joseph’s College of Engineering Page No.41


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

    
  
I =    [(0.7071 + 0.7071 + 1) + 4(0.3827 + 0.3827 + 0.9239 + 0.9239) + 16(0.7071)]
8 8
9
= 0.4143

1.4 2.4
dx dy
16. Evaluate 
1 2
xy
by using Trapezoidal rule, verify your results by actual integration.

1
Solution: Let f ( x, y ) = ; Limits : x = 2 to 2.4; y = 1 to 1.4; h = 0.1, k = 0.1
xy

y/x 2 2.1 2.2 2.3 2.4


1 0.5 0.4762 0.4545 0.4348 0.4167
1.1 0.4545 0.4329 0.4132 0.3953 0.3788
1.2 0.4167 0.3968 0.3788 0.3623 0.3472
1.3 0.3846 0.3663 0.3497 0.3344 0.3205
1.4 0.3571 0.3401 0.3247 0.3106 0.2976

By Trapezoidal rule
hk
I= [ (Sum of values of f at the four corners ) + 2(Sum of values of f at the remaining nodes
4
on the boundary) + 4(Sum of the values of f at the interior nodes)]
  0.4762 + 0.4545 + 0.4348  
  
( 0.5 + 0.4167 + 0.2976 + 0.3571) + 2  +0.3788 + 0.3472 + 0.3205  
dx dy 0.1 0.1   +0.3106 + 0.3247 + 0.3401  
1.4 2.4

1 2 xy = 4   
 +0.3846 + 0.4167 + 0.4545  
  0.4329 + 0.4132 + 0.3953 + 0.3968 +  
 +4  
  0.3788 + 0.3623 + 0.3663 + 0.3497 + 0.3344  
1.4 2.4
dx dy

1 2
xy
= 0.0614
1.4 2.4 1.4 2.4
dx dy dy dx
Actual Integration 
1 2
xy
= 
1
y 
2
x
=  log y 1 log x 2 = (log1.4 − log1)(log 2.4 − log 2)
1.4 2.4

= (log1.4)(log1.2)
1.4 2.4
dx dy

1 2
xy
= 0.0613

St. Joseph’s College of Engineering Page No.42


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
2 4
dxdy
17. Evaluate 1 3 ( x + y ) 2 by using Trapezoidal and Simpson’s rule with h = k = 0.5

1
Solution: Let f ( x, y ) = ; Limits : x = 3 to 4; y = 1 to 2; h = 0.5, k = 0.5
( x + y) 2

y\x 3 3.5 4
1 0.0625 0.0494 0.04
1.5 0.0494 0.04 0.0331
2 0.04 0.0331 0.0278
Trapezoidal rule:
hk
I= [ (Sum of values of f at the four corners ) + 2(Sum of values of f at the remaining nodes
4
on the boundary) + 4(Sum of the values of f at the interior nodes)]
0.5  0.5
= [(0.0625 + 0.04 + 0.04 + 0.0278) + 2(0.0494 + 0.0331 + 0.0331 + 0.0494) + 4(0.04)]
4
= 0.0413
Simpson’s rule:
hk
I= {sum of values of f at the four corners+2(sum of the values of f at odd position on the
9
boundary except corners) + 4(sum of the values of f at even position on the boundary except
corners) + 4(sum of the values of f at odd position on odd row) + 8(sum of the values of f at even
position on odd row) + 8(sum of the values of f at odd position on even row) + 16(sum of the
values of f at even position on even row)}
0.5  0.5
= [(0.0625 + 0.04 + 0.04 + 0.0278) + 4(0.0494 + 0.0331 + 0.0331 + 0.0494) + 16(0.04)]
9
I = 0.0408
UNIT IV INITIAL VALUE PROBLEMS FOR ORDINARY DIFFERENTIAL EQUATIONS

PART - A
1. Compare Single-step method and Multi-step method.

S.No Single-step method Multi-step method


1 It requires only yi in order to It requires not only yi but also at least one
compute the next value yi +1 of the past values yi −1 , yi −2 …,
2 Taylor series, Euler’s and R-K Milne’s, Adam’s methods are multi step
methods are single step methods methods

2. Write down the Taylor series formula for solving first order ODE.

St. Joseph’s College of Engineering Page No.43


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

h h2 h3
yn+1 = yn + yn + yn + yn + .......
1! 2! 3!
h h2 h3
When n = 0, y1 = y0 + y0 + y0 + y0+ .......
1! 2! 3!

dy
3. Find by Taylor series method, the value of y at x = 0.1 from = y 2 + x and y(0) = 1 correct
dx
to 4 decimal places
Let h = 0.1
x0 = 0, y0 =1, y = y 2 + x , y0 =1
y = 2 yy + 1 , y0'' = 3
y = 2 yy + 2( y) 2 , y0''' = 8
y iv = 2 yy + 6 yy , y0iv = 34
(0.1)2 (0.1)3 (0.1)4
y ( 0.1) = 1 + (0.1)(1) + (3) + (8) + (34) = 1.1165
2! 3! 4!
4. Write the merits and demerits of the Taylor’s series method of solution.
Merits:
(i) Taylor formula is easily derived for any order according to our interest
(ii) The values of y(x) for any x (x need not be at grid points) are easily obtained.
Demerits: This method suffers from the time consumed in calculating the higher derivatives
5. What is the truncation error in Taylor’s series method?
( x − xo )n n
Error = y ( )
n!
6. Write down the Euler’s formula.
y n+1 = y n + h f ( x n , y n ) , n = 0,1, 2,... where h = x − x0
dy
7. Using Euler’s method find y (0.1) given that = x + y , y (0) = 1.
dx
y n +1 = yn + h f(x n ,yn )  y1 = y 0 + h f ( x 0 , y 0 ) , let h = 0.1
y1 = 1 + (0.1)(0 + 1) = 1.1
8. What is the error of Euler’s method?
h2 ''
Error at ( x = x1) = y ( x1, y1)
2!
9. What are the limitations of Euler’s method?

(i) The attainable accuracy is limited by length of step ‘ h ’


(ii) The method is slow and has limited accuracy.
10. Write the formula for Modified Euler’s method.

St. Joseph’s College of Engineering Page No.44


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

 1 1 
yn +1 = yn + h f  xn + h, yn + h f ( xn , yn )  , n = 0,1, 2,...
 2 2 
dy 2 2
11. Use Modified Euler’s method to y(0.1) given = x + y , y(0) = 1
dx
= x 2 + y 2 (i.e) f ( x, y) = x 2 + y 2 and y (0) = 1 (i.e) x0 = 0, y0 = 1
dy
Solution: Given
dx
Tofind y (0.1) (i.e) y1 at x1 = 0.1for h = 0.1
 h h 
Modified Euler’s formula: y( xn+1 ) = yn+1 = yn + h f  xn + , yn + f ( xn , yn ) 
 2 2 
 h h 
Put n = 0  y(0.1) = y1 = y0 + h f  x0 + , y0 + f ( x0 , y0 ) 
 2 2 
 0.1 
f (0,1)  = 1 + 0.1 f ( 0.05,1 + 0.05(02 + 12 ) )
0.1
y(0.1) = 1 + 0.1 f  0 + ,1 +
 2 2 
= 1 + 0.1 f ( 0.05,1.05) ) = 1 + 0.1(0.052 + 1.052 ) = 1.1105
12. Write down 4th order Runge-Kutta formula to solve first order differential equation.
We have y ' = f ( x, y ) , y(x 0 ) = y0
k1 = h f ( x0, y0 )
 h k 
k2 = h f  x0 + , y0 + 1 
 2 2
 h k 
k3 = h f  x0 + , y0 + 2 
 2 2
k4 = h f ( x0, + h, y0 + k3 )
1
y = (k1 + 2(k2 + k3 ) + k4 ), y1 = y0 + y
6
13. What is the truncation error in Fourth order Runge-kutta method?
y (5) ( ) h5
Truncation Error value = , x    x + h and the order of error is O (h5).
5!
14. What are the advantages of R-K method over Taylor series method?
The Runge Kutta methods are designed to give greater accuracy and they possess the advantage of
requiring only the function values at some selected points on the sub interval..

15. Compare Taylor series method and Runge Kutta method.


(i) The use of R-K method gives quick convergence to the solutions of the differential
equations than Taylor’s series method.
(ii) The labour involved in R-K method is comparatively lesser.
In R-K method, the derivatives of higher order are not required for calculation as in Taylor series

St. Joseph’s College of Engineering Page No.45


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
method.

16. Are the multistep methods self-starting? Give reason.


Multistep methods are not self-starting, since a k – step multi step method requires the ‘ k ’ previous
values. The k values that are required for starting the application of the method are obtained by
using single step methods.
17. Write down the error in Adam’s predictor and corrector formulas.
251 5 (v)
Order of error is h5 ; Error in predictor : h y ( ) ;
720
19 5 (v)
Error in corrector : h y ( )
120
18. Write down the error in Milne’s predictor and corrector formulas.
14 5 ( v )
Order of error is h5 ; Error in predictor : h y ( ) ;
45
1 5 (v)
Error in corrector : h y ( )
90
19. Write down the Milne’s predictor and corrector formulas.

The predictor formula is y


n +1, P
= y n−3 +
4h
3
(
2 y ' n−2 − y ' n−1 + 2 y ' n )
The corrector formula is y
n +1,C
= y n−1 +
h
(
y ' + 4 y ' n + y ' n+1
3 n−1
)
20. State Adam’s predictor and corrector formula.
h
The predictor formula is yi +1 = yi +[55 y 'i − 59 y 'i −1 + 37 y 'i −2 − 9 y 'i −3 ]
24
h
The corrector formula is yi +1 = yi + [9 y 'i +1+ 19 y 'i − 5 y 'i − 2 + y 'i −3 ]
24
PART B
1. Using Taylor’s series method up to fourth order find 𝒚 at 𝒙 = 𝟏. 𝟏 and 1.2 by solving the
dy
equation = x 2 + y 2 , y(1) = 2 with 𝒉 = 𝟎. 𝟏 up to four decimals.
dx
dy
Solution: Given: = x 2 + y 2 , y(1) = 2 (i.e) x0 = 1 , y0 = 2 whereℎ = 0.1
dx
x0 = 1 x1 = 1.1 x2 = 1.2
y0 = 2 y1 = ? y2 = ?
h h2 h3 hiv iv
Taylor’s series expansion is yn +1 = yn + yn + yn + yn + yn + ...
1! 2! 3! 4!
h h2 h3 hiv iv
For n = 0 , y1 = y0 + y0 + y0 + y0 + y0 + ... → (1)
1! 2! 3! 4!

St. Joseph’s College of Engineering Page No.46


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

h h2 h3 hiv
For n = 1, y2 = y1 + y1 + y1 + y1+ y1iv + ... → (2)
1! 2! 3! 4!
To Find y(1.1):
x0 = 1, y0 = 2, h = 0.1 and y = x 2 + y 2

y = x2 + y 2 y0 = x02 + y02 = 12 + 22 = 5


y = 2x + 2 yy y0 = 2x 0 + 2 y0 y0 = 2 (1) + 2 ( 2 )( 5 ) = 22

( ( )) 
( ) 
2
y = 2+2 y y +y y y 0 = 2+2  y 0 y 0 + y 0 
 

= 2+2  y y + ( y ) 
 
= 2+2 ( ( 2 )( 22 ) +52 ) = 140
2

 

(
yiv = 2 yy + y y + 2 y y ) (
y0iv = 2 y0 y0 + 3 y0 y0 )
(
= 2 yy + 3 y y ) = 2 ( ( 2 )(140 ) + 3 ( 5 )( 22 ) ) = 1220

Substituting the values in (1),


(0.1)2 (0.1)3 (0.1)4
y (0.1) = 2 + (0.1)(5) + (22) + (140) + (1220) + ...
2 6 24
= 2 + 5.5 + 0.11 + 0.0466 + 5.083333333 10−3 + ... = 7.6616
∴ y1 = y(1.1)=7.6616
To Find y(1.2):
x1 = 1.1, y1 = 7.6616, h = 0.1 and y = x 2 + y 2

y = x2 + y 2 y1 = x12 + y12 = 1.12 + ( 7.6616 ) = 59.9101


2

y (x) = 2x + 2 yy y1 = 2x1 + 2 y1 y1 = 2 (1.1) + 2 ( 7.6616 )(59.9101) = 920.2144

( ( )) 
( )

2
y (x) = 2+2 y y +y y y1 = 2+2  y1 y1 + y1 
 

= 2+2  y y + ( y )  ( )
 2

= 2+2 ( 7.6616 )( 920.2144 ) + ( 59.9101)
2

 
= 21281.0694

(
yiv (x) = 2 yy + y y + 2 y y ) (
y1iv = 2 y1 y1 + 3 y1 y1 )
= 2 ( yy + 3 y y ) = 2 ( ( 7.6616 )( 21281.0694 ) + 3 ( 59.9101)( 920.2144 ) )
= 656874.903
Substituting the values in (2),
h  h 2  h3  h 4 iv
y2 = y1 + y1 + y1 + y1 + y1 + ...
1! 2! 3! 4!

St. Joseph’s College of Engineering Page No.47


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

(0.1) 2 (0.1)3 (0.1) 4


= 7.6616 + (0.1)(59.9101) + (920.2144) + (21281.0694) + (656874.903)
2 6 24

= 7.6616 + 5.99101 + 4.6010 + 3.5468 + 2.7369

 y (1.2) = 24.5373
2. Obtain the approximate value of y at x = 0.1 & 0.2 for the differential equation
dy
= 2 y + 3e x , y(0) = 0. by Taylor’s Series method. Compare the numerical solution
dx
obtained with the exact solution.
Given x0 = 0, y0 = 0, h = 0.1 and y = 2 y + 3ex
h h2 h3
Taylor’s series expansion is y n +1 = y n + yn + yn + yn + ...... .
1! 2! 3!
h h2 h3
For n = 0 , y1 = y 0 + y0 + y0 + y0 + .......
1! 2! 3!
dy
= y' (x) = 2y + 3e x , y0 ' = 3
dx
Differentiating y / ( x) = 2 y + 3e x successively three times and putting x = y = 0, we get
y '' ( x) = 2 y '+ 3e x y0 ' ' = 9
y '''( x) = 2 y ''+ 3e x y 0 ' ' ' = 21
yiv ( x) = 2 y ''' + 3e x y 0 = 45
iv

Putting the values in (1)


9 21 45 4
y ( x) = 0 + 3h + h 2 + h3 + h + ..
2 6 24
= 3(0.1) + 4.5(0.1) 2 + 3.5(0.1) 3+ 1.875(0.1) 4 = 0.3486875
Exact Solution:
dy
The given differential equation can be written as − 2 y = 3e x which is Leibnitz’s linear
dx
differential equation. Its I.F. is I.F = e  = e−2 x
− 2 dx

Therefore the general solution is, ye


−2 x
=  3e x (e−2 x )dx + c = −3e− x + c  y = −3ex + ce2 x -- (2)
Using the given initial condition y = 0 when x = 0 in (3) we get c = 3.
Thus the exact solution is y = 3 e − e ( 2x x
)
When x = 0.1, the exact solution is y(0.1) = 0.348695
3. Using Taylor’s series method up to fourth order find 𝒚 at 𝒙 = 𝟎. 𝟏 and 0.2 by solving the
dy
equation = 1 − 2 xy, y(1) = 2 with 𝒉 = 𝟎. 𝟏 up to four decimals.
dx
Given x 0 = 0, y0 = 0, h = 0.1 and y = 1 − 2xy
h h2 h3
Taylor’s series expansion is y n +1 = y n + yn + yn + yn + ...... .
1! 2! 3!

St. Joseph’s College of Engineering Page No.48


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

h h2 h3
For n = 0 , y1 = y0 + 
y0 + 
y0 + y0 + ....... → (1)
1 ! 2 ! 3 !
At (x 0 , y0 ) = (0,0)
y = 1 − 2xy y'0 = 1
y'' = −2(xy '+ y) y''0 = 0
y''' = −2(xy ''+ y '+ y ') y'''0 = −4
Putting the values in (1)
0.1 (0.1)2 (0.1)3
y1 = (0) + (1) + (0) + (−4) + .......= 0.0993
1! 2 ! 3!

y1 = y(0.1)=0.0993

h h2 h3
For n = 1 , y2 = y1 + y1 + y1 + y1+ ....... → (1)
1! 2 ! 3!
At (x 0 , y0 ) = (0.1,0.0993)
y = 1 − 2xy y1' = 0.9801
y'' = −2(xy '+ y) y1'' = −0.3947
y''' = −2(xy ''+ y '+ y ') y1''' = −3.8416
Putting the values in (1)
0.1 (0.1)2 (0.1)3
y1 = (0.0993) + (0.9801) + (−0.3946) + (−3.8412) + .......=0.1954
1! 2 ! 3!
y2 = y(0.2)=0.1954
4. Using Taylor’s series method up to fourth order find 𝒚 at 𝒙 = 𝟎. 𝟏 by solving the equation
dy
= x 2 − y, y (0) = 1 with 𝒉 = 𝟎. 𝟏 up to four decimals.
dx
Given, y ' = x 2 − y, y ( 0 ) = 1( i.e ) x0 = 0, y0 = 1
WKT , xn = xn−1 + h  h = xn − xn−1
for n = 1, h = x1 − x0 = 0.1 − 0 = 0.1
 x0 = 0 ; y0 = 1; x1 = 0.1; y1 = ?
h h2 h3 h iv iv
Taylor’s series expansion is yn +1 = yn + yn + yn + yn + yn + ...
1! 2! 3! 4!
h h2 h3 h iv
For n = 0 , y1 = y0 + y0 + y0 + y0 + y0iv + ... → (1)
1! 2! 3! 4!
We have y ' = x2 − y, x0 = 0, y0 = 1, h = 0.1
y ' = x2 − y y0 ' = x0 2 − y0 = ( 0 ) − 1 = −1
y '' = 2 x − y ' y0 '' = 2 x0 − y0' = 2 ( 0 ) − ( −1) = 1
y ''' = 2 − y '' y0''' = 2 − y0'' = 2 − (1) = 1
y iv = − y ''' y0iv = − y0''' = −1

St. Joseph’s College of Engineering Page No.49


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
From (1),
( 0.1) 1 + ( 0.1) 1 + ( 0.1) −1 + ...
2 3 4
0.1
y1 = y ( 0.1) = 1 + ( −1) + () () ( )
1 2 3! 4!
= 1− 0.1+ 0.005 + 0.0001666 − 0.00000416 = 0.9052
5. dy
Solve = log10 ( x + y ), y(0) = 2 by Euler’s method by choosing h = 0.2, find
dx
y (0.2) & y (0.4).
Given Data is : x 0 = 0, y0 = 2, h = 0.2 and f(x,y) = log10 (x + y)

Euler’s Formula is y n +1 = y n + hf(x n , y n ), n = 0,1,2,3,


Put n = 0 we get, y1 = 2.0 + 0.2 log 10 (0 + 2 ) = 2.0602

Put n = 1 we get, y 2 = 2.0656 + 0.2 log 10 (0.2 + 2.0656 ) = 2.1366


dy y2
6. Solve =− , y(0) = 1 by Euler’s method, choosing h = 0.1, find y(0.1) and y(0.2)
dx 1+ x
𝑑𝑦 𝑦2 𝑦2
Solution: Given: =− (𝑖. 𝑒) 𝑓(𝑥, 𝑦) = − and 𝑦(0) = 1 (i.e) 𝑥0 = 0,𝑦0 = 1
𝑑𝑥 1+𝑥 1+𝑥
xn = xn−1 + h  h = xn − xn−1
for n = 1, h = x1 − x0  h = 0.1 − 0 = 1
 x0 = 0 x1 = 0.1 x2 = 0.2
y0 = 1 y1 = ? y1 = ?
Euler’s Formula is yn +1 = yn + h f ( xn , yn )
For n = 0 , y1 = y0 + h f ( x0 , y0 ) → (1)
For n = 1, y2 = y1 + h f ( x1, y1 ) → (2)
 y0 2   y2 
From (1) y1 = y0 + h f ( x0 , y0 ) = y 0 + h  −   f ( x, y ) = − 
 1 + x0   1+ x 
 12 
y1 = 1 + 0.1 −  = 1 − 0.1(1) = 0.9
 1+ 0 
 x1 = 0.1, y1 = 0.9
 y12   y2 
From (2) y 2 = y1 + h f ( x1, y1 ) = y1 + h  −   f ( x, y ) = − 
 1 + x1   1+ x 
 0.92 
y2 = 0.9 + 0.1 −  = 0.9 + 0.1( 0.7363 ) = 0.82636
 1 + 0.1 
 x2 = 0.2, y2 = 0.82636
Hence y (0.1) = 0.9 and y (0.2) = 0.82636
7. Compute y(4.1), y(4.2) by using Euler method given that 5 xy ' + y 2 − 2 = 0, y(4) = 1 .
2 − y2 2 − y2
Solution: Given: 5xy + y − 2 = 0  5xy = 2 − y  y = (i.e) f (x, y) =
' 2 ' 2 '
&
5x 5x

St. Joseph’s College of Engineering Page No.50


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
y (4) = 1 (i.e) x0 = 4, y0 = 1
W.K.T, xn = xn −1 + h  h = xn − xn −1
For n = 1, h = 4.1 − 4 = 0.1
x0 = 4 x1 = 4.1 x2 = 4.2
y0 = 1 y1 = ? y2 = ?
Euler’s Formula is yn +1 = yn + h f ( xn , yn )
For n = 0 , y1 = y0 + h f ( x0 , y0 ) → (1)
For n = 1, y2 = y1 + h f ( x1, y1 ) → (2)
From (1), y1 = y0 + hf ( x0 , y0 )
 2 − 12   2 − y0 2 
y1 = 1 + 0.2 f (4,1) = 1 + (0.1)    f ( x0 , y0 ) = 
 5 ( 4)   5 x0 
 2 − 1 1
= 1 + (0.1)  = 1 + (0.1)
 20   20 
y1 = y (4.1) = 1.005
 x1 = 4.1 and y1 = 1.005
From (2),
y2 = y1 + hf ( x1 , y1 ) = 1.005 + 0.2 f (4.1,1.005)
 2 − (1.005 )2   2 − y2 
= 1.005 + (0.1)    f ( x, y) = 
 5(4.1)   5x 

 2 − 1.010025 
= 1.005 + (0.1)  
 20.5
= 1.005 + 0.004829
y2 = y (4.2) = 1.0098
dy
8. Solve = sin x + cos y, y(2.5) = 0 by Modified Euler’s method with h = 0.5, find y(3.5)
dx
Given Data is : x 0 = 2.5, y 0 = 0, h = 0.5 and f(x, y) = sin x + cos y
 h h 
y n +1 = y n + h f  x n + , y n + f ( x n , y n ) 
 2 2 
 0.5 0.5 
Put n = 0, we get y1 = y 0 + 0.5 f ( x 0 + , y0 + [f ( x 0 , y 0 )]
 2 2 
y = 0 + 0.5 f (2.5 + 0.25,0 + 0.25[ f (2.5,0)] = 0.6354
1
 0.5 0.5 
Put n = 1 , we get y2 = y1 + h  f ( x1 +, y1 + [ f ( x1, y1)]
 2 2 
y2 = 0.6354 + 0.5  f (3 + 0.25,0.6354 + 0.25 [ f (3,0.6354)] = 0.93155

St. Joseph’s College of Engineering Page No.51


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
9. dy 2x
Solve = y − , given y(0) = 1 and find values of y(0.1) and y(0.2) using Modified Euler’s
dx y
method, correct to four decimal places.
𝑑𝑦 2𝑥 2𝑥
Solution: Given: =𝑦− (𝑖. 𝑒) 𝑓(𝑥, 𝑦) = 𝑦 − and 𝑦(0) = 1 (i.e) 𝑥0 = 0,𝑦0 = 1
𝑑𝑥 𝑦 𝑦
We need to find the values of 𝑦(0.1) = 𝑦1and 𝑦(0.2) = 𝑦2
WKT , xn = xn−1 + h  h = xn − xn−1
for n = 1, h = x1 − x0  h = 0.1 − 0 = 0.1
 x0 = 0 x1 = 0.1 x2 = 0.2
y0 = 1 y1 = ? y2 = ?
 h h 
Euler’s Modified Formula is yn +1 = yn + h f  xn + , yn + f ( xn , yn )  ………..(1)
 2 2 
 h h 
For 𝑛 = 0, y1 = y0 + h f  x0 + , y0 + f ( x0 , y0 ) 
 2 2 
 0.1 0.1   2 x0 
y1 = 1 + ( 0.1) f  0 + , 1 + f ( 0,1)   f ( x0 , y0 ) = y0 − 
 2 2   y0 
  2 ( 0)  
y1 =1 + ( 0.1) f  0.05, 1.05 1 − 
 1  
 
 2 ( 0.05 ) 
=1 + ( 0.1) f ( 0.05, 1.05 ) = 1 + 0.11.05 − 
 1.05 
y1 =1 + 0.1(1.05 − 0.0952 ) = 1 + 0.1( 0.954761) = 1.095476
 y1 = 1.0955 when x1 = 0.1 ( i.e ) y ( 0.1) = 1.0955

 h h 
Put 𝑛 = 1 in (1), y2 = y1 + h f  x1 + , y1 + f ( x1 , y1 ) 
 2 2 
 0.1 0.1 
y2 = 1.0955 + 0.1 f  0.1 + , 1.0955 + f ( 0.1,1.0955) 
 2 2 
  2 ( 0.1)  
y 2 = 1.0955 + 0.1 f  0.15, 1.1455 1.0955 − 
 1.0955  
 
y2 = 1.0955 + 0.1 f ( 0.15, 1.1455 ( 0.9129 ) ) = 1.0955 + 0.1 f ( 0.15, 1.0458)
 2 ( 0.05 ) 
y 2 =1.0955 + 0.11.0458 −  = 1.0955 + 0.1( 9502 ) = 1.1905
 1.0458 
 y ( 0.2 ) = 1.1905 ( i.e ) y 2 = 1.1905 when x1 = 0.2
10. Apply Runge – Kutta method, to find an approximate value of y when x = 0.2 given that
dy
= x + y, y(0) = 1
dx
Given: x0 = 0, y 0 = 1, h = 0.2 and f ( x, y ) = x + y
Finding y1 = y (0.2) :

St. Joseph’s College of Engineering Page No.52


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

1
R – K method (for n = 0) is: y1 = y(0.2) = y0 + ( k1 + 2k2 + 2k3 + k4 ) -------- (1)
6
k1 = h f ( x 0 , y 0 ) = 0.2  [0 + 1] = 0.2 ;
 h k   0.2   0.2 
k 2 = h f  x 0 + , y 0 + 1  = 0.2   0 +  + 1 +  = 0.2400
 2 2  2   2 
 h k   0.2   0.24 
k 3 = h f  x 0 + , y 0 + 2  = 0.2   0 +  + 1 +  = 0.2440
 2 2   2   2 
k 4 = h f (x 0 + h, y 0 + k 3 ) = 0.2  (0 + 0.2) + (1 + 0.2440) = 0.2888
Using the values of k1 , k 2 , k 3 and k 4 in (1), we get
1
y1 = y (0.2) = 1 + ( 0.2 + 2(0.24 + 0.244) + 0.2888 ) = 1.2468
6
Hence the required approximate value of y is 1.2468.
11. Compute y(0.2) given y ' + y + xy 2 = 0, y(0) = 1 by taking h = 0.1 using Runge Kutta
method.

(
Given: x0 = 0, y0 = 1, h = 0.1and f ( x, y) = − xy 2 + y )
Finding y1 = y (0.1) :
1
R – K method (for n = 0) is: y1 = y(0.1) = y0 + ( k1 + 2k2 + 2k3 + k4 ) -------- (1)
6
k1 = h f ( x0 , y0 ) = 0.1 [−1] = −0.1
 k 
k2 = h f  x0 + , y0 + 1  = 0.1 − ( 0.05  0.952 + 0.95) = −0.0995
h
 2 2
 k 
h
(
k3 = h f  x0 + , y0 + 2  = 0.1 − 0.05  0.950252 + 0.95025  = −0.0995
 2 2
)
k4 = h f ( x0 + h, y0 + k3 ) = 0.1 − ( 0.1 0.90052 + 0.9005) = −0.0982
Using the values of k1 , k 2 , k 3 and k 4 in (1), we get
y1 = y (0.1) = 0.9006
(
x1 = 0.1, y1 = 0.9006, h = 0.1and f ( x, y) = − xy 2 + y )
Finding y2 = y (0.2) :
1
R – K method (for n = 0) is: y2 = y(0.2) = y1 + ( k1 + 2k2 + 2k3 + k4 ) -------- (2)
6
( )
k1 = h f ( x1 , y1 ) = 0.1 − 0.1 0.90062 + 0.9006  = −0.0982
 k 
h
( )
k2 = h f  x1 + , y1 + 1  = 0.1 − 0.15  0.85152 + 0.8515  = −0.0960
 2 2
 k 
h
( )
k3 = h f  x1 + , y1 + 2  = 0.1 − 0.15  0.85262 + 0.8526  = −0.0962
 2 2
( )
k4 = h f ( x1 + h, y1 + k3 ) = 0.1 − 0.2  0.80442 + 0.8044  = −0.0934
Using the values of k1 , k 2 , k 3 and k 4 in (2), we get
y2 = y (0.2) = 0.8046

St. Joseph’s College of Engineering Page No.53


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

y −x
2 2
dy
12. Using Runge – Kutta method of 4th order, solve = , y (0) = 1 at x = 0.2 & 0.4
y +x
2 2
dx

Solution: Given: dy = y − x (i.e) f ( x, y) = y − x , y(0) = 1 ( i.e) x0 = 0, y0 = 1


2 2 2 2

dx y 2 + x 2 y 2 + x2
WKT , xn = xn−1 + h
 h = xn − xn−1 for n = 1, h = x1 − x0  h = 0.2 − 0 = 0.2
To Find y(0.2) by R.K Method:
1
R – K method (for n = 0) is : y1 = y0 + y where y = (k1 + 2(k2 + k3 ) + k4 )
6

(i.e) y1 = y (0.2) = y 0 + (k1 + 2k 2 + 2k 3 + k 4 )


1
-------- (1)
6
y 2 − x2
We have f ( x, y ) = , x0 = 0, y0 = 1 & h = 0.2
y 2 + x2
 12 − 02 
k1 = h f ( x0, y0 ) = 0.2 f ( 0,1) = 0.2  2  = 0.2
1 + 0
2

 h k   0.2 0.2 
k2 = h f  x0 + , y0 + 1  = 0.2 f 0+ ,1 + 
 2 2  2 2 
 1.12 − 0.12   1.2 
= 0.2 f ( 0.1,1.1) = 0.2  2 2 
= 0.2   = 0.1967
 1.1 + 0.1   1.22 
 h k   0.2 0.1967 
k3 = h f  x0 + , y0 + 2  = 0.2 f 0+ ,1 + 
 2 2  2 2 
 1.09832 − 0.12   1.1963 
= 0.2 f ( 0.1,1.0983) = 0.2  2 
= 0.2   = 0.1967
 1.0983 + 0.1   1.2163 
2

k4 = h f ( x0, + h, y + k3 ) = 0.2 f ( 0 + 0.2,1 + 0.1967 )


 1.1967 2 − 0.22   1.3921 
= 0.2 f ( 0.2,1.1967 ) = 0.2  2 
= 0.2   = 0.1891
 1.1967 + 0.2   1.4721 
2

Substituting the values of k1 , k2 , k3 and k4 in (1), we get


1
y1 = y (0.2) = 1 + (0.2 + 2(0.19672) + 2(0.1967) + 0.1891) = 1+0.19599 = 1.19598
6
Hence the required approximate value of y(0.2) is 1.19599.
To Find y(0.4) by R-K Method:
R – K method (for n = 1) is: y 2 = y (0.4) = y1 + (k1 + 2k 2 + 2k 3 + k 4 )
1
-------- (2)
6
y 2 − x2
We have f ( x, y) = 2 2 , x1 = 0.2, y1 = 1.19599 & h = 0.2
y +x

St. Joseph’s College of Engineering Page No.54


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

 1.195992 − 0.22   1.3904 


k1 = h f ( x1, y1 ) = 0.2 f ( 0.2,1.19599 ) = 0.2  2 
= 0.2   = 0.1891
 1.19599 + 0.2   1.4704 
2

 h k   0.2 0.1891 
k2 = h f  x1 + , y1 + 1  = 0.2 f  0.2 + ,1.19599 + 
 2 2  2 2 
 1.29062 − 0.32   1.5756 
= 0.2 f ( 0.3,1.2906 ) = 0.2  2 
= 0.2   = 0.1795
 1.2906 + 0.3   1.7556 
2

 h k   0.2 0.1795 
k3 = h f  x1 + , y1 + 2  = 0.2 f  0.2 + ,1.19599 + 
 2 2  2 2 
 1.285742 − 0.32   1.5631 
= 0.2 f ( 0.3,1.28574 ) = 0.2  2 
= 0.2   = 0.1793
 1.28574 + 0.3   1.7431 
2

k4 = h f ( x1 + h, y1 + k3 ) = 0.2 f ( 0.2 + 0.2,1.19599 + 0.1793)


 1.37532 − 0.42   1.7315 
= 0.2 f ( 0.4,1.3753) = 0.2   = 0.2   = 0.1688
 1.3753 + 0.4  2.0515 
2 2

Using the values of k1 , k 2 , k 3 and k 4 in (2), we get
1
y2 = y (0.4) = 1.19599 + ( 0.1891 + 2(0.1795) + 2(0.1793) + 0.1688)
6
= 1.19599 + 0.1792 = 1.37519
Hence the required approximate value of y(0.4) is 1.37519.
13. Compute y(0.1) and y(0.2) by Runge – kutta method of fourth order for the differential
dy
equation = xy + y 2 with y(0)=1.
dx
dy
Solution: Given: = xy + y 2 (i.e) f ( x, y ) = xy + y 2 , y ( 0 ) = 1 ( i.e ) x0 = 0, y0 = 1
dx
WKT , xn = xn−1 + h  h = xn − xn−1
for n = 1, h = x1 − x0  h = 0.1 − 0 = 0.1
 x0 = 0 x1 = 0.1 x2 = 0.2
y0 = 1 y1 = ? y1 = ?
To find y(0.1) = y1 by R-K method:
1
R – K method (for n = 0) is: y1 = y0 + y where y = (k1 + 2(k2 + k3 ) + k4 )
6
1
 y1 = y (0.1) = y0 + ( k1 + 2k 2 + 2k3 + k 4 ) …………………..(1)
6
We have f ( x, y) = xy + y 2 , x0 = 0, y0 = 1, h = 0.1
k1 = h f ( x0 , y0 ) = (0.1)[ x0 y0 + y02 ] = (0.1)[0 +1] = 0.1
 h k   0.1 0.1
k2 = h f  x0 + , y0 + 1  = (0.1) f 0 + 2 , 1 + 2 
 2 2
= (0.1) f  0.05, 1.05 = (0.1) (0.05) (1.05) + (1.05) 2 
= (0.1)  0.0525 + 1.1025 = (0.1) (1.155) = 0.1155

St. Joseph’s College of Engineering Page No.55


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

 h k   0.1 0.1155 
k3 = h f  x0 + , y0 + 2  = (0.1) f 0 + , 1+
 2 2  2 2 
= (0.1) f  0.05, 1.05775 = (0.1)[(0.05) (1.05775) + (1.05775) 2 ]
= (0.1)  0.0528875 + 1.118835
= (0.1) (1.1717225) = 0.11717
k4 = h f  x0 + h, y0 + k3  = (0.1) f 0 + 0.1, 1 + 0.11717 
= (0.1) f  0.1, 1.11717  = (0.1)[(0.1) (1.11717) + (1.11717)2 ]
= (0.1)  0.111717 + 1.24807  = 0.13598
Substituting the values of k1 , k 2 , k 3 and k 4 in (1), we get
1
y (0.1) = 1 + 0.1 + 2(0.1155) + 2(0.11717) + (0.13598) 
6
1
y (0.1) = 1 +  0.70132  = 1 + 0.11689 = 1.11689
6
To find y2 = y(0.2) by 4thRunge-kutta method:
1
R – K method (for n = 1) is: y2 = y1 + y where y = (k1 + 2(k2 + k3 ) + k4 )
6
1
 y1 = y (0.2) = 1.11689 + ( k1 + 2k2 + 2k3 + k4 ) …………………..(2)
6
We have f ( x, y) = xy + y 2 , x1 = 0.1, y1 = 1.11689 and h = 0.1

k1 = h f ( x1 , y1 ) = (0.1) f (0.1,1.11689) = (0.1) [(0.1) (1.11689) + (1.11689)2 ]


= (0.1) [0.111689 + 1.24744] = 0.1359
 h k   0.1 0.1359 
k2 = h f  x1 + , y1 + 1  = (0.1) f 0.1 + 2 , 1.11689 + 2 
 2 2
= (0.1) f  0.15, 1.18484 = (0.1) (0.15) (1.18484) + (1.18484) 2 
= (0.1) 0.177726 + 1.403846  = 0.1582
 h k   0.1 0.1582 
k3 = h f  x1 + , y1 + 2  = (0.1) f 0.1 + 2 , 1.11689 + 2 
 2 2
= (0.1) f 0.15, 1.19599 = (0.1)[(0.15) (1.19599) + (1.19599) 2 ]
= (0.1)  0.1793985 + 1.43039208 = 0.16098
k4 = h f  x1 + h, y1 + k3  = (0.1) f  0.1 + 0.1, 1.11689 + 0.16098
= (0.1) f  0.2, 1.27787  = (0.1)[(0.2) (1.27787) + (1.27787) 2 ]
= (0.1)  0.255574 + 1.63295 = 0.1889
Substituting the values of k1 , k 2 , k 3 and k 4 in (2), we get
1
y (0.2) = 1.11689 + 0.1359 + 2(0.1582) + 2(0.16098) + (0.1889)
6

St. Joseph’s College of Engineering Page No.56


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
1
y (0.2) = 1.11689 0.96316 = 1.11689 + 0.16053 = 1.2774
6
14. dy
Given = x − y2 , y(0) = 0 , y (0.2) = 0.02, y (0.4) = 0.0795 and y (0.6) = 0.1762. Compute
dx
y (0.8) using Milne’s Method.

Given:
x0 = 0, y0 = 0 and f 0 = f ( x0 , y0 ) = 0 ;
x1 = 0.2, y1 = 0.02 and f1 = f ( x1, y1 ) = 0.1996
x2 = 0.4, y2 = 0.0795 and f 2 = f ( x2 , y2 ) = 0.3937

x3 = 0.6, y3 = 0.1762 and f3 = f ( x3 , y3 ) = 0.56895

To Find : y 4 = y(x 4 ) = y(0.8)


Predictor Method

y4
(P)
= y(0.8) = y 0 +
4h
2f1 − f 2 + 2f 3  = 0 + 4(0.2)  (2  0.1996) − 0.39372 + 2  0.56895  =
3 3
0.30491
Now we compute f 4 = f (0.8,0.30491) = 0.7070
Corrector Method

y (4C) = y(0.8) = y 2 +
h
f 2 + 4f 3 + f 4  = 0.0795 + 0.2 0.3937 + 4  0.56895 + 0.7070 = 0.3046
3 3
dy
Given 5 x + y 2 − 2 = 0 , y(4) = 1, y(4.1) = 1.0049, y(4.2) = 1.0097, y(4.3) = 1.0143. Compute
15. dx
y(4.4) by Milne’s Predictor-Corrector Method.
dy 2 − y2
Solution: Given = y = , y(4) = 1, y(4.1) = 1.0049, y(4.2) = 1.0097, y(4.3) = 1.0143
dx 5x

x0 = 4 x1 = 4.1 x 2 = 4.2 x 3 = 4.3 x 4 = 4.4,


(i.e) Here ℎ = 0.1
y0 = 1 y1 = 1.0049 y 2 = 1.0097 y3 = 1.0143 y4 = ?
4h
Milne’s predictor formula: y 4,p = y 0 +  2y1' − y '2 + 2y3'  ………………….. (1)
3
2 − y2 2 − y12 2 − 1.00492
We have y = , y1' = = = 0.0483,
5x 5x1 5 ( 4.1)
2 − y2 2 2 − 1.00972 2 − y32 2 − 1.01432
y =
'
= = 0.0467, y3 =
'
= = 0.0452
5 ( 4.2 ) 5 ( 4.3)
2
5x 2 5x1
Substitute the values of 𝑦1′ , 𝑦2′ , 𝑦3′ in (1)
4 ( 0.1)
y 4,p = 1 +  2 ( 0.0483) − ( 0.0467 ) + 2 ( 0.0452 )  = 1.018706
3

St. Joseph’s College of Engineering Page No.57


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
h '
By Milne’s corrector formula: y 4,c = y 2 +  y 2 + 4y3' + y '4 
3
2 − y 4 2 2 − 1.0187062
y'4 = = = 0.0437
5x 4 5 ( 4.4 )
0.1
y 4,c = 1.0097 + 0.0467 + 4 ( 0.0452 ) + 0.0437  = 1.01874
3 
 y4,c = y(4.4) = 1.01874

dy
16. Given = x 2 (1 + y ) , y(1) = 1, y(1.1) = 1.233, y(1.2) = 1.548, y(1.3) = 1.979 . Evaluate
dx
y(1.4) by Adam’s – Bashforth method.
dy
Solution: Given = y = x 2 (1 + y ) , y (1) = 1, y (1.1) = 1.233, y (1.2) = 1.548, y (1.3) = 1.979
dx
x0 = 1 x1 = 1.1 x2 = 1.2 x3 = 1.3 x4 = 1.4
(i.e) Where, ℎ = 0.1
y0 = 1 y1 = 1.233 y2 = 1.548 y3 = 1.979 ?
we have y = x 2 (1 + y )
y0' = x02 (1 + y0 ) = 12 (1 + 1) = 2
y1' = x12 (1 + y1 ) = 1.12 (1 + 1.233) = 2.70193
y2' = x22 (1 + y2 ) = 1.22 (1 + 1.548) = 3.66912
y3' = x32 (1 + y3 ) = 1.32 (1 + 1.979 ) = 5.03451
Adam’s – Bashforth Predictor Method:
h
y4, P = y (1.4) = y3 + 55 y3 − 59 y2 + 37 y1 − 9 y0 
24
(0.1)
y4, P = 1.979 + (55  5.03451) − (59  3.66912) + (37  2.70193) − (9  2) = 2.57277
24
Now we compute y4' = x4 2 (1 + y4 ) = 1.42 (1 + 2.57277 ) = 7.0027
Adam’s – Bashforth Corrector Method:
h
y4,C = y (1.4) = y3 + 9 y4 + 19 y3 − 5 y2 + y1 
24
0.1
= 1.979 + (9  7.0027) + (19  5.03451) − (5  3.66912) + 2.70193 = 2.57498
24
 y4 = 2.57498
Determine the value of y(0.4) by Milne’s method given that y ' = xy + y 2 , y(0)=1. Use Taylor
17.
series method to get the values of y(0.1), y(0.2) and y(0.3)

Given x0 = 0, y0 = 1, x1 = 0.1, x 2 = 0.2, x3 = 0.3, x 4 = 0.4,h = 0.1 and y = xy + y 2


h h2 h3
Taylor’s series expansion is y n +1 = y n + yn + yn + yn + ...... .
1! 2! 3!

St. Joseph’s College of Engineering Page No.58


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

h h2 h3
For n = 0 , y1 = y 0 + y0 + y0 + y0 + .......(1)
1! 2! 3!
dy
= y'(x) = xy + y 2 , y0' = 1
dx
Differentiating y / ( x) = xy + y 2 successively three times and putting x = 0, y = 1, we get
y'' (x) = xy' + y+2yy' y 0 '' = 3

y'''(x) = xy'' + 2y'+2yy''+ ( 2y')


2
y 0 ''' = 10
Putting the values in (1)
y1 = 1.1167
h h2 h3
For n =1, y2 = y1 + y1 + y1 + y1+ ....... (2)
1! 2! 3!
y1' = 1.3587 , y1'' = 4.2871 , y1''' = 16.4131
Putting the values in (2)
y 2 = 1.2767
h h2 h3
For n = 2, y3 = y 2 + y2 + y2 + y2 + ....... (3)
1! 2! 3!
y 2' = 1.8853 , y 2 '' = 6.4677 , y 2 ''' = 28.6875
Putting the values in (3)
y3 = 1.5023
By Milne’s Predictor formula
4h
y 4, P = y 0 + (2 y '1 − y ' 2 + 2 y ' 3 )
3
y 4, P = 1.83297
y'4, p = x4 y4 + y4' = 4.09296
By Milne’s Corrector formula
h
y 4,c = y 2 + ( y ' 2 + 4 y ' 3 + y ' 4 )
3
y 4,c = 1.83698

Find y (0.1), y (0.2), y (0.3) from y ' = x 2 − y ; y (0) = 1 using Taylor’s series method
18.
and hence obtain y (0.4) using Adams-Bashforth method.
Solution:
Given, y ' = x 2 − y, y ( 0 ) = 1( i.e ) x0 = 0, y0 = 1
WKT , xn = xn−1 + h  h = xn − xn−1
for n = 1, h = x1 − x0 = 0.1 − 0 = 0.1
 x0 = 0 x1 = 0.1 x2 = 0.2 x3 = 0.3
y0 = 1 y1 = ? y2 = ? y3 = ?

St. Joseph’s College of Engineering Page No.59


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

h h2 h3 h iv iv
Taylor’s series expansion is yn +1 = yn + yn + yn + yn + yn + ...
1! 2! 3! 4!
h h2 h3 h iv
For n = 0 , y1 = y0 + y0 + y0 + y0 + y0iv + ... → (1)
1! 2! 3! 4!
h h2 h3 h iv
For n = 1, y2 = y1 + y1 + y1 + y1+ y1iv + ... → (2)
1! 2! 3! 4!
h h2 h3 h iv iv
For n = 2, y3 = y2 + 
y2 + 
y2 + 
y2 + y2 + ... → (3)
1! 2! 3! 4!
We have y ' = x2 − y, x0 = 0, y0 = 1, h = 0.1
y ' = x 2 − y y0 ' = x0 2 − y0 = ( 0 ) − 1 = −1
y '' = 2 x − y ' y0 '' = 2 x0 − y0' = 2 ( 0 ) − ( −1) = 1
y ''' = 2 − y '' y0''' = 2 − y0'' = 2 − (1) = 1
y iv = − y ''' y0iv = − y0''' = −1
From (1),
( 0.1) 1 + ( 0.1) 1 + ( 0.1) −1 + ...
2 3 4
0.1
y1 = y ( 0.1) = 1 + ( −1) + () () ( )
1 2 3! 4!
= 1− 0.1+ 0.005 + 0.0001666 − 0.00000416
y (0.1) = 0.9052
Now, x1 = 0.1, y1 = 0.9052, h = 0.1
y ' = x 2 − y y1 ' = x12 − y1 = ( 0.1) − 0.9052 = −0.8952
2

y '' = 2 x − y ' y1 '' = 2 x1 − y1' = 2 ( 0.1) − ( −0.8952 ) = 1.0952

y ''' = 2 − y '' y1''' = 2 − y1'' = 2 − (1.0952 ) = 0.9048

y iv = − y ''' y1iv = − y1''' = −0.9048

From (2),

h h2 h3 h iv
y2 = y1 + y1 + y1 + y1+ y1iv + ...
1! 2! 3! 4!
( 0.1) 1.0952 + ( 0.1) 0.9048 + ( 0.1) −0.9048 + ...
2 3 4
0.1
y2 = y ( 0.2 ) = 0.9052 + ( −0.8952) + ( ) ( ) ( )
1 2 3! 4!
y2 = y ( 0.2 ) = 0.9052 − 0.08952 + 0.0055 + ... = 0.8213
Now, x2 = 0.2, y2 = 0.8213, h = 0.1
y ' = x 2 − y y2 ' = x2 2 − y2 = ( 0.2 ) − 0.8213 = −0.7813
2

y '' = 2 x − y ' y2 '' = 2 x2 − y2' = 2 ( 0.2 ) − ( −0.7813) = 1.1813

St. Joseph’s College of Engineering Page No.60


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

y ''' = 2 − y '' y2''' = 2 − y1'' = 2 − (1.1813) = 0.8187


y iv = − y ''' y2iv = − y1''' = −0.8187
h h2 h3 h iv
y3 = y 2 + y2 + y2 + y2 + y2iv + ...
1! 2! 3! 4!
( 0.1) 1.1813 + ( 0.1) 0.8187 + ( 0.1) −0.8187 + ...
2 3 4
0.1
y3 = y ( 0.2 ) = 0.8213 + ( −0.7813) + ( ) ( ) ( )
1 2 3! 4!
y3 = y ( 0.2 ) = 0.8213 − 0.0781 + 0.0059 + ... = 0.7492
 y3 ' = x32 − y3 = ( 0.3) − 0.7492 = −0.6592
2

h
Adam’s predictor formula is yn +1 , p = yn + 55 y 'n − 59 yn' −1 + 37 yn' − 2 − 9 yn' −3 
24
h
Put n = 3 , y4 , p = y3 + 55 y 3' − 59 y2' + 37 y1' − 9 y0' 
24 
y0 ' = x0 2 − y0 = ( 0 ) − 1 = −1

y1 ' = x12 − y1 = ( 0.1) − 0.9052 = −0.8952


2

y2 ' = x2 2 − y2 = ( 0.2 ) − 0.8213 = −0.7813


2

y3 ' = x32 − y3 = ( 0.3) − 0.7492 = −0.6592


2

h
y4 , p = y3 + 55 ( −0.6592 ) − 59 ( y − 0.7813) + 37 ( −0.8952 ) − 9 ( −1) 
24 
0.1
y4 , p = 0.7492 + (−36.256 + 46.0967 − 33.1224 + 9)
24
y4 , p = 0.6897
 y4 ' = x4 2 − y4 = ( 0.4 ) − 0.6897 = −0.5297
2

h
Adam’s Corrector formula: yn +1 , c = yn + 9 y 'n +1 + 19 yn' − 5 yn' −1 + yn' − 2 
24
h
Put n = 3 , y4 , c = y3 + 9 y 4' + 19 y3' − 5 y2' + y1' 
24 
0.1
= 0.7492 + 9 ( −0.5297 ) + 19 ( −0.6592 ) − 5 ( −0.7813) − 0.8952 
24 
0.1
= 0.7492 + ( −4.7672 ) − 12.5248 + 3.9065 − 0.8952 
24 
y4,c = 0.6897
19. dy
Consider the initial value problem = y − x 2 + 1, y(0) = 0.5
dx

(a) Using the Modified Euler method, find y(0.2) ;

(b) Using R.K. Method of order 4, find y(0.4) and y(0.6) ;

St. Joseph’s College of Engineering Page No.61


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
(c) Using Adam- Bashforth predictor corrector method, find y(0.8)

dy
Solution: Given = y − x 2 + 1 x0 = 0, y0 = 0.5, h = 0.2, f ( x, y ) = y − x 2 + 1
dx
To find y(0.2) by modified Euler’s method:
 1 1 
y1 = y0 + hf  x0 + h, y0 + h f ( x0 , y0 )  − − − −(1)
 2 2 
 1
y1 = 0.5 + 0.2 f  0 + (0.2),0.5 +
 2
0.2
2

 y0 − x02 + 1 

( f ( x, y) = y − x 2 + 1 )

= 0.5 + 0.2 f ( 0.1,0.65) = 0.5 + 0.2 0.65 − ( 0.1) + 1 = 0.5 + 0.2 0.65 − 0.01 + 1
2
 
= 0.5 + 0.328 = 0.828  y1 = y ( 0.2 ) = 0.828
To find y(0.4) by 4thorder Runge-kutta method:
dy
= y − x 2 + 1 = f ( x, y ) , x1 = 0.2, y1 = 0.828, h = 0.2
dx
k1 = hf ( x1 , y1 ) = ( 0.2 )  y1 − x 2 + 1 = ( 0.2 ) 0.828 − ( 0.2 ) + 1
2
 
= ( 0.2 )  0.828 − 0.04 + 1 = 0.358
 h k   0.2 0.358 
k2 = hf  x1 + , y1 + 1  = ( 0.2 ) f 0.2 + 2 ,0.828 + 2 
 2 2
= ( 0.2 ) f 0.3,1.007 = ( 0.2 ) 1.007 − 0.09 + 1 = 0.383
 h k   0.2 0.383 
k3 = hf  x1 + , y1 + 1  = ( 0.2 ) f 0.2 + ,0.828 +
 2 2  2 2 
= ( 0.2 ) f 0.3,1.0195 = ( 0.2 ) 1.0195 − 0.09 + 1 = 0.386
k4 = hf ( x1 + h, y1 + k3 ) = ( 0.2 ) f 0.2 + 0.2,0.828 + 0.386
= ( 0.2 ) 1.214 − 0.16 + 1 = 0.4108 = 0.411
1 1
y =  k1 + 2k2 + 2k3 + k4  = 0.358 + 2 ( 0.383) + 2 ( 0.386 ) + 0.411
6 6
1
=  0.358 + 0.766 + .772 + 0.411 = 0.385
6
y2 = y ( 0.4 ) = 0.828 + y = 0.828 + 0.385 = 1.213
To find y(0.6) by 4th order Runge-kutta method:
Now x2 = 0.4, y2 = 1.213, h = 0.2 y3 = ?
k1 = hf ( x2 , y2 ) = ( 0.2 ) f 0.4,1.213 = ( 0.2 ) 1.213 − 0.16 + 1
= ( 0.2 ) 1.213 − 0.16 + 1 = 0.411
 h k   0.2 0.411
k2 = hf  x2 + , y2 + 1  = ( 0.2 ) f 0.4 + ,1.213 +
 2 2  2 2 
= ( 0.2 ) f 0.5,14185 = ( 0.2 ) 1.4185 − 0.25 + 1 = 0.4337

St. Joseph’s College of Engineering Page No.62


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

 h k   0.2 0.4337 
k3 = hf  x2 + , y2 + 2  = ( 0.2 ) f 0.4 + ,1.213 +
 2 2  2 2 
= ( 0.2 ) f 0.5,1.4298 = ( 0.2 ) 1.4298 − 0.25 + 1 = 0.436
k4 = hf ( x2 + h, y2 + k3 ) = ( 0.2 ) f 0.4 + 0.2,1.213 + 0.436
= ( 0.2 ) 1.649,1.649 = ( 0.2 ) 1.649 − 0.36 + 1 = 0.458
1 1
y =  k1 + 2k2 + 2k3 + k4  = 0.411 + 2 ( 0.4337 ) + 2 ( 0.436 ) + 0.458
6 6
1
=  0.411 + .8674 + .872 + 0.458 = 0.4347
6
y3 = y ( 0.6 ) = y2 + y = 1.213 + 0.4347 = 1.6477
To find y(0.8) by Adam-Bash forth predictor corrector method:
x0 = 0 x1 = 0.2 x2 = 0.4 x3 = 0.6 x4 = 0.8
y0 = 0.5 y1 = 0.828 y2 = 1.213 y3 = 1.6477 y4 = ?
h
Adam’s predictor formula is yn +1 , p = yn + 55 y 'n − 59 yn' −1 + 37 yn' − 2 − 9 yn' −3 
24
h
Put n = 3 , y4 , p = y3 + 55 y 3' − 59 y2' + 37 y1' − 9 y0' 
24 
y0' = y0 − x02 + 1 = 0.5 − 0 2 + 1 = 1.5
y1' = y1 − x12 + 1 = 0.828 − ( 0.2 ) + 1 = 0.828 − 0.04 + 1 = 1.828 − 0.04 = 1.788
2

y2' = y2 − x22 + 1 = 1.213 − ( 0.4 ) + 1 = 2.213 − 0.16 = 2.053


2

y3' = y3 − x32 + 1 = 1.6477 − ( 0.6 ) + 1 = 2.6477 − .36 = 2.2877


2

0.2
y4 , p = 1.6477 + 55. ( 2.2877 ) − 59 ( 2.053 ) + 37 (1.788 ) − 9 (1.5 ) 
24 
0.2
= 1.6477 + 125.8235 − 121.127 + 66.156 − 13.5
24
= 1.6477 + 0.4779375
= 2.1256
 y4' = y4 − x42 + 1 = 2.1256 − ( 0.8) + 1 = 3.1256 − 0.64 = 2.4856
2

h
Adam’s Corrector formula yn +1 , c = yn + 9 y 'n +1 + 19 yn' − 5 yn' −1 + yn' − 2 
24 
h
Put n = 3 , y4 , c = y3 + 9 y 4' + 19 y3' − 5 y2' + y1' 
24
0.2
= 1.6477 + 9 ( 2.4856 ) + 19 ( 2.2877 ) − 5 ( 2.053) + 1.788
24 
0.2
= 1.6477 +  22.3704 + 43.4663 − 10.265 + 1.788
0.4
= 1.6477 + 0.477975 = 2.1256975
y4 , c = 2.1257

St. Joseph’s College of Engineering Page No.63


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
 x0 = 0 x1 = 0.2 x2 = 0.4 x3 = 0.6 x4 = 0.8
y0 = 0.5 y1 = 0.828 y2 = 1.213 y3 = 1.6477 y4 = 2.1257
dy xy
Given = , y(0) = 1, y(0.1) = 1.01, y(0.2) = 1.022, y(0.3) = 1.023. Compute y(0.4) by
20. dx 2
Milne’s Predictor-Corrector Method and Adams.

dy xy
Solution : given = = f ( x, y ) . To find y(0.4)
dx 2
x0 = 0, y0 = 1 and f 0 = f ( x0 , y0 ) = 0
x1 = 0.1, y1 = 1.01 and f1 = f ( x1, y1 ) = 0.0505
x2 = 0.2, y2 = 1.022 and f 2 = f ( x2 , y2 ) = 0.1022
x3 = 0.3, y3 = 1.023 and f3 = f ( x3 , y3 ) = 0.1534
To Find : y4 = y ( x4 ) = y (0.4)
(i) Milline’s Predictor and Corrector Method
4h
Milne’s predictor formula: y4, p = y0 +  2 y1 − y2 + 2 y3 
3
4 (0.1)
= 1+  2(0.0505) − (0.1022) + 2(0.1534)  = 1.0408
3
1 1
y4 = [ x 4 . y4 ] = [( 0.4 ) . (1.0408 )] = 0.2082
2 2
h
Milne’s corrector formula: y4, c = y2 +  y2 + 4 y3 + y4 
3
0.1
= 1.022 + 0.1022 + 4(0.1534) + 0.2082 =1.0528
3
 y (0.4) = 1.0528
(ii) Adams Bash forth Predictor Corrector Method
h
y4( P ) = y (0.4) = y3 + 55 f 3 − 59 f 2 + 37 f1 − 9 f 0 
24
0.1
= 1.023 + 55(0.1534) − 59(0.1022) + 37(0.0505) − 9(0) = 1.0408
24
Now we compute f 4 = f (0.4,1.0408) = 0.2082
h
y4(C ) = y (0.4) = y2 + 9 f4 + 19 f3 − 5 f2 + f1 
24
0.1
= 1.023 + 9(0.2082) + 19(0.1534) − 5(0.1022) + (0.0505) = 1.041
24
UNIT-V BOUNDARY VALUE PROBLEMS IN ORDINARY & PARTIAL DIFFERENTIAL
EQUATIONS
PART - A
1. Solve xy”+y=0, y(1) =1, y(2)=2 with h=0.5.

St. Joseph’s College of Engineering Page No.64


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

 y + y − 2 yi 
xi  i −1 i2+1
 h  + yi = 0  4 xi ( yi −1 + yi +1 − 2 yi ) + yi = 0
When i = 1, y 1 = y (1.5) = 1.6364
2. Write the forward, central and backward finite difference formula for ux.
ui +1, j − ui , j ui +1, j − ui −1, j ui , j − ui −1, j
ux = , ux = , ux =
h 2h h
3. State the central difference approximations for yi' and yi'' .
y −y y − 2yi + yi −1
yi = i +1 i −1 and yi = i +1
2h h2
4. State the Forward difference approximations for yi' and yi'' .
yi +1 − yi  y -2yi +1 + yi
yi = and yi = i + 2
h h2
5. State the Backward difference approximations for yi' and yi'' .

 y − yi-1  y -2yi-1 + yi-2


yi = i and yi = i
h h2
6. State the general form of Poisson’s equation in partial derivatives.
2 u 2 u
The Poiss on equation is + = G ( x, y )
x 2 y2
ui +1, j − 2ui , j + ui −1, j ui , j +1 − 2ui , j + ui , j −1
+ = G( xi , y j )
h2 k2
7. State Crank-Nicholson’s implicit scheme for one dimensional heat equation.
k
(u i+1, j+1 + u i−1, j+1 ) − 2(1 + )u i, j+1 = 2( − 1) u i, j −  (u i +1, j + u i −1, j ), where  =
ah 2
8. State Bender-Schmidt formula for solving one dimensional heat equation.
ka 2
u i, j+1 =  u i +1, j + (1 − 2) u i, j +  ui −1, j where  =
h2
9. Write down the simplest form of Crank-Nicholson’s formula.
h2 u i−1, j+1 + u i+1, j+1 + u i+1, j + u i−1, j
When  =1, k = 2  u i, j+1 =
a 4
10. Write down the simplest form of Bender-Schmidt formula.
1  h2  u i +1, j + u i −1, j
If  =  i.e, k = 2  then u i, j+1 =
2  2a  2
11. Write the explicit formula to solve one dimensional wave equation.
u i, j+1 = 2(1 − 2a 2 )u i, j +  2 a 2 (u i +1, j + u i −1, j ) − u i, j−1

St. Joseph’s College of Engineering Page No.65


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

1  h
If  2 = 2 
i.e, k =  then u i, j+1 = u i+1, j + u i−1, j − u i, j−1
a  a 
12. Write down the classification of linear second order partial differential equation.
The linear second order partial differential equation
Auxx + Buxy + Cu yy + Du x + Eu y + Fu + G = 0 can be classified as
(i) Elliptic if B 2 – 4 AC < 0 (ii) Parabolic if B 2 – 4 AC = 0
(iii) Hyperbolic if B 2 – 4 AC > 0
13. Classify the following equation u xx + 4u xy + 4u yy − u x + 2u y = 0
Comparing with general equation of second
order partial differential equation
Auxx + Buxy + Cu yy + Dux + Eu y + Fu + G = 0 , we get A= 1, B = 4, C = 4
B 2 – 4 AC = 16-4(1)(4 )= 0
Therefore, the given partial differential equation is parabolic.
x
14. Classify u xx + yuxy + uyy − ux + u = 0.
4
Here B 2 – 4 AC = y 2 – x
i) PDE is Elliptic if y 2  x ii) PDE is Parabolic if y 2 = x
iii) PDE is Hyperbolic if y2  x
15. Write down the centre finite difference formula for uyy.
ui , j +1 − 2ui , j + ui , j −1
u yy =
k2
16. Write down the Standard five point formula
ui , j −1 + ui , j +1 + ui−1, j + ui+1, j
ui , j =
4
17. Write down the Diagonal five point formula
1
ui , j = u i −1, j−1 + u i −1, j+1 + u i +1, j−1 + u i +1, j+1 
4 
18. Write down the Liebmann’s iteration process formula:
+1) 1  (n +1) (n +1) 
u i(n
,j =  u i −1, j + u i(n
+1, j + u i , j−1 + u i , j+1 
) (n )
4
19. Write down the centre finite difference formula for uxx.
ui+1,j − 2u i,j + ui−1,j
u xx =
h2
20. Obtain the finite difference scheme for the differential equation 2 y '' ( x) + y ( x) = 5

 y + yi +1 − 2yi 
2  i −1  + yi − 5 = 0  2( yi −1 + yi +1 ) + yi (h − 4) − 5h = 0
2 2

 2
h 

St. Joseph’s College of Engineering Page No.66


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

1. Solve y'' − y = 0 , with y(0)=0, y(1)=1 using finite difference method with h=0.2.

The given differential equation can be written as y" (x ) − y (x ) = 0 (1)


using the central difference approximation, we have
y − 2 y k + y k +1
y " = k −1 (2)
h2
substituting (2) in (1)
y − 2 y k + y k +1
we have k −1 − yk = 0
h2
yk −1 − 2 yk + yk +1 − h 2 yk = 0
substituting h=0.2 we get
y k −1 − 2 y k + y k +1 − (0.2) y k = 0
2

yk −1 − 2 yk + yk +1 − 0.04 yk = 0

yk −1 − 2 yk + yk +1 − 0.04 yk = 0
yk −1 − 2.04 yk + yk +1 = 0

put k=1, 2 ,3and 4 we get the following equations


y0 − 2.04 y1 + y2 = 0
y1 − 2.04 y2 + y3 = 0
y2 − 2.04 y3 + y4 = 0
y3 − 2.04 y4 + y5 = 0
but x0 = y0 = 0 , x5 = y5 = 1 , x1 = 0.2 , x1 = 0.4 , x1 = 0.6 , x1 = 0.8
− 2.04 y1 + y2 = 0
y1 − 2.04 y2 + y3 = 0
y2 − 2.04 y3 + y4 = 0
y3 − 2.04 y4 + 1 = 0  y3 − 2.04 y 4 = −1
solving the above equations we get,
y1 = 0.1714 , y2 = 0.349 , y3 = 0.5419 , y4 = 0.7558

2. Solve y'' − y = x, x  (0,1) , with y(0)=y(1)=0 using finite differences by dividing the interval
into four equal parts.
The given differential equation can be written as y" (x ) − y (x ) = x (1)
using the central difference approximation, we have
y − 2 y k + y k +1
y " = k −1 (2)
h2
substituting (2) in (1)
y − 2 y k + y k +1
we have k −1 − y k = xk
h2
yk −1 − 2 yk + yk +1 − h 2 yk = h 2 xk

St. Joseph’s College of Engineering Page No.67


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
1
here h = , so we get 16 y k −1 − 33 y k + 16 y k +1 = xk (3)
4
put k=1,2 and 3 in (3)
16 y0 − 33y1 + 16 y2 = x1
16 y1 − 33y 2 + 16 y3 = x2 (4)
16 y 2 − 33 y 3 + 16 y 4 = x3
it is given that y 0 = 0 and y 4 = 0
1 1 1 3
since h = we have x0 = 0, x1 = , x2 = , x3 = , x4 = 1
4 4 2 4

substituting the above values in (4), we get


1
0 − 33 y1 + 16 y 2 =
4
1
16 y1 − 33 y 2 + 16 y 3 =
2
3
16 y 2 − 33 y 3 + 0 =
4
by solving the above equations we get
y1 = −0.03488, y2 = −0.05632, y3 = −0.05004 .
(i). Using the finite difference method, Solve y" + y = x subject to y(0) = 0, y(1) = 2 at 0.25,
0.5 & 0.75
Solution:
x0 =0 x1= 0.25 x2= 0.5 x3=0.75 x4= 1
y0 =0 y1=? y2=? y3=? y4= 2
1
Rewrite the equation as yi + yi = xi & h = 0.25 =
4
yi+1 − 2 yi + yi −1 y −y
Substitute yi = 2 & yi = i i −1 and simplify we get
h h
yi+1 − 2 yi + yi −1  1
+ yi = xi  h = 4 
h2
yi+1 − 2 yi + yi −1
2
+ yi = xi
1
 
4
16(yi+1 − 2 yi + yi −1 ) + yi = xi
16 yi+1 − 32 yi +16 yi −1 + yi = xi
16 yi −1 − 31yi + 16 yi +1 = xi
31 x
yi −1 − yi + yi +1 = i
16 16
yi −1 − 1.9375 yi + yi +1 = 0.0625 xi

St. Joseph’s College of Engineering Page No.68


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
Put i =1 we get
y0 − 1.9375 y1 + y2 = 0.0625 x1
0 − 1.9375 y1 + y2 = 0.0625(0.25)
−1.9375 y1 + y2 = 0.0156 (1)
Put i =2 we get
y1 − 1.9375 y2 + y3 = 0.0625 x2
y1 − 1.9375 y2 + y3 = 0.0625(0.5)
y1 − 1.9375 y2 + y3 = 0.0313 (2)
Put i =3 we get
y2 − 1.9375 y3 + y4 = 0.0625 x3
y2 − 1.9375 y3 + 2 = 0.0625(0.75)
y2 − 1.9375 y3 = − 1.9531 (3)
Solving (1), (2) and (3) we get y1 = 0.5443, y2 = 1.0701 and y3 = 1.5604
Using the finite difference method, Solve (1 + x ) y + 4 xy + 2 y = 2 given that y(0)=0, y(1)=
2

3. 1 1
, take h =
2 3
Solution:
x0 =0 x1=1/3 x2=2/3 x3=1
y0 =0 y1=? y2=? y3=1/2

Rewrite the equation as (1 + xi 2 ) yi + 4 xi yi + 2 yi = 2


yi+1 − 2 yi + yi −1 y − yi −1
Substitute yi = 2
& yi = i
h h
 y − 2 yi + yi −1   y − yi −1 
(1 + xi 2 )  i+1  + 4 xi  i  + 2 yi = 2
   h 
2
h
   
   yi − yi −1 
y − 2 yi + yi −1 
(1 + xi 2 )  i+1 + 4 x  1  + 2 yi = 2
 1
2
 i
 
     3 
 3 
9(1 + xi 2 ) ( yi+1 − 2 yi + yi-1 ) + 12 xi ( yi − yi −1 ) + 2 yi = 2 (1)
Put i = 1 in (1), we get
9(1 + x12 ) ( y2 − 2 y1 + y0 ) + 12 x1 ( y1 − y0 ) + 2 y1 = 2
  1 2  1
9 1 +    ( y 2 − 2 y1 + 0 ) + 12   ( y1 − 0 ) + 2 y1 = 2
  3    3

St. Joseph’s College of Engineering Page No.69


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

 1
9 1 +  ( y 2 − 2 y1 ) + 4 ( y1 − 0 ) + 2 y1 = 2
 9
 10 y 2 − 20 y1 + 6 y1 = 2
 −14 y1 + 10 y2 = 2
(−14)  y1 − 0.7143 y2 = −0.1429 → (1)
Put i = 2 in (1), we get
9(1 + x2 2 ) ( y3 − 2 y 2 + y1 ) + 12 x2 ( y2 − y1 ) + 2 y2 = 2
  2 2   1  2
9 1 +     − 2 y 2 + y1  + 12   ( y2 − y1 ) + 2 y2 = 2
  3    2   3
 4 1   24 
9 1 +   − 2 y2 + y1  +   ( y2 − y1 ) + 2 y2 = 2
 9 2   3 
13 ( 0.5 − 2 y 2 + y1 ) + 8 ( y2 − y1 ) + 2 y2 = 2
6.5 − 26 y2 + 13 y1 + 8 y2 − 8 y1 + 2 y2 = 2
5 y1 − 16 y2 = −4.5
(5)  y1 − 3.2 y2 = −0.9 → (2)
(1) − (2)  2.4857 y2 = 0.7571  y2 = 0.30458
y1 − 3.2 y2 = −0.9  y1 − 3.2(0.30458) = −0.9
y1 = 0.07466
Evaluate the pivotal values of the equation u tt = 16u xx taking x = 1 upto t = 1.25. The
4.
boundary conditions are u(0, t) = u(5, t) = u t (x, 0) = 0 and u(x, 0) = x 2 ( 5 − x )
 2u  2u h 1
Solution: The given equation is 2 = 16 2 , here  =4, h=1 we get k = = .
t x  4
From the initial conditions u(0,t)=0 and u(5,t)=0 we get the values of u along the entire line
x=0and x=5 as zero. In difference form these initial conditions becomes
u0, j = 0 and u5, j = 0 for all values of j.

St. Joseph’s College of Engineering Page No.70


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
ui , j +1 − ui , j −1
The condition ut (x,0) = 0  = 0  ui , j +1 − ui , j −1 = 0 ,
2k
when j=0 we have ui ,1 − ui , −1 = 0  ui ,1 = ui , −1 for all values of j
The given condition is u(x, 0) = x 2 ( 5 − x ) .
In difference form this becomes ui ,0 = i 2 (5 − i ) for different values of i.
when i=0,1,2,3,4,5 we have u0,0 = 0, u1,0 = 4, u2,0 = 12, u3,0 = 18, u4,0 = 16, u5,0 = 0

Explicit formula is ui, j+1 = 2(1 − λ 2 2 )u i, j + λ 2 2 (u i −1, j + ui +1, j ) - ui, j−1

1
Put  = in above formula we get the simplest form ui, j+1 = (ui+1, j + ui−1, j ) − ui, j-1
4

Remaining values we can calculate using the above formula

x 0 1 2 3 4 5

i
t 0 1 2 3 4 5
j
0 0 0 4 12 18 16 0
0.25 1 0 6 11 14 9 0
0.5 2 0 7 8 2 –2 0
0.75 3 0 2 –2 –8 –7 0
1 4 0 –9 –14 –11 –6 0
1.25 5 0 –16 –18 –12 –4 0

Solve u xx = 4utt , given that u( x ,0) = x(4 − x ), u(0, t ) = 0, u(4, t ) = 0 and ut ( x ,0) = 0 by
5.
Explicit formula. Compute u up to t = 4 (taking h=1, k = 1/2).
Solution:

Explicit formula is u i, j + 1 = 2(1 − λ 2  2 )u i, j + λ 2  2 (u i − 1, j + u i + 1, j ) - u i, j − 1


The given wave equation is u xx = 4utt
1 1 1 h 1
ut t = u x x here a 2 =  a = , let h = 1, k = = =2
4 4 2 a (1 / 2)
t = 0, 2, 4 and h = 0, 1, 2, 3, 4
u (0, t ) = 0, u (4, t ) = 0 for all values of t.
u( x, 0) = x(4 − x)
u(0, 0) = 0, u(1, 0) = 1(4 − 1) = 3, u(2, 0) = 2(4 − 2) = 4, u(3, 0) = 3(4 − 3) = 1, u (4, 0) = 0
u i, j+1 = (u i+1, j + u i−1, j ) − u i, j
u i +1, j + u i −1, j
Condition ut(x,0) = 0 is equivalent to u i,j+1 =
2

St. Joseph’s College of Engineering Page No.71


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

x
0 1 2 3 4
t

0 0 3 4 3 0
2 0 2 3 2 0
4 0 0 0 0 0

 2u  2uu
Solve by explicit difference method 25 =
, given that ( x ,0) = 0, u(0, t ) = 0,
x 2 t 2 t
6.
 2 x, when 0  x  2.5
u(5, t ) = 0, u( x ,0) =  taking h = 1. Find u( x , t ) upto t = 2.
10 − 2 x , when 2.5  x  5

2 2 2 2
Solution: Explicit formula is u i, j + 1 = 2(1 − λ  )u i, j + λ  (u i − 1, j + u i + 1, j ) - u i, j − 1

i.e. H = 2(1 − λ α )E + λ α (D + F) - B
2 2 2 2

1 1
Here 2 = 25 , h =1 =2 =
 2
25
2l 2(5)
One period of oscillation = = = 2 sec .
 5
Hence k = h/a = 1/5
Put  = 1/5 in above formula we get the simplest form
u i, j+1 = (u i+1, j + u i−1, j ) − u i, j
i.e) H = (D+F) – B
(A + C)
Condition ut(x,0) = 0 is equivalent to E =
2
x
0 1 2 3 4 5
t

0 0 2 4 4 2 0
1/5 0 2 3 3 2 0
2/5 0 1 1 1 1 0
3/5 0 –1 –1 –1 –1 0
4/5 0 –2 –3 –3 –2 0
5/5 = 1 0 –2 –4 –4 –2 0
6/5 0 –2 –3 –3 –2 0
7/5 0 –1 –1 –1 –1 0
8/5 0 1 1 1 1 0
9/5 0 2 3 3 2 0
10/5 = 2 0 2 4 4 2 0

St. Joseph’s College of Engineering Page No.72


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
Solve uxx = 2ut, given that u(0,t) = 0, u(4,t) = 0, u(x,0) = x (4 - x) taking h = 1.
7.
Find u(x, t) up to t = 5.
Solution: Given uxx = 2ut :
uxx = au t  a = 2 Take h = 1 and a = 2
ah 2
To use Bender-Schmidt recurrence relation, we have k = =1
2
From the given condition u(0, t) = 0 and u(4, t) = 0 , we have the values of u along the line x = 0,
and x = 4 are zero.
u ( x,0 ) = x ( 4 – x ) , we get
u ( 0,0 ) = 0 ( 4 – 0 ) = 0, u (1,0 ) = 1( 4 – 1) = 3, u ( 2,0 ) = 2 ( 4 – 2 ) = 4,
u ( 3,0 ) = 3 ( 4 – 3) = 3, u ( 4,0 ) = 4 ( 4 – 4 ) = 0
Simplest form of Bender Schmidt’s
(u i+1, j + u i−1, j )
u i, j+1 =
2

x
t 0 1 2 3 4

0 0 3 4 3 0
1 0 2 3 2 0
2 0 1.5 2 1.5 0
3 0 1 1.5 1 0
4 0 0.75 1 0.75 0

5 0 0.5 0.75 0.5 0

 2 f f
8. Given = , f (0, t ) = 0 = f (5, t ), f (x,0) = x 2 (25 − x 2 ) , find f in the range taking h = 1
x 2
t
and upto 5 seconds.
h 2 k 1
Here  = 1, h=1, k=0.5 ( k = ) ,we get  = 2 = ,
2 h 2
u(x,0) = x 2 (25 − x 2 ), u(0,0)=0,u(1,0)=24, u(2,0)=84, u(3,0)=144, u(4,0)=144.
we know that Schmidt relation is u i, j+1 = λ(u i +1, j + u i −1, j ) + (1 − 2)u i, j
(u i+1, j + u i−1, j )
in the above equation we get u i, j+1 =
1
substituting  =
2 2 ,
remaining values are calculated by using the above formula

St. Joseph’s College of Engineering Page No.73


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

x 0 1 2 3 4 5

i
t 0 1 2 3 4 5
j

0 0 0 24 84 144 144 0
0.5 1 0 42 84 114 72 0
1 2 0 42 78 78 57 0
1.5 3 0 39 60 67.5 39 0
2 4 0 30 53.25 49.5 33.75 0
2.5 5 0 26.625 39.75 43.5 24.75 0
3 6 0 19.875 35.063 32.250 21.750 0
3.5 7 0 17.531 26.063 28.406 16.125 0
4 8 0 13.031 22.969 21.094 14.203 0
4.5 9 0 11.484 17.063 18.586 10.547 0
5 10 0 8.531 15.035 13.805 9.293 0

Using Bender Schmidt’s method solve u t = u xx subject to the condition, u(0,t)=0, u(1,t)=0,
9.
u(x,0) = sin x, 0<x<1 and h=0.2, Find the value of u upto t=0.1.

h 2
Here  = 1, h=0.2, k=0.02 ( k = )
2
k 1
we get  = = ,
h 2
2

u(x,0) = sin x, u(0,0)=0,u(0.2,0)=0.5878, u(0.4,0)=0.9511, u(0.6,0)=0.9511, u(0.8,0)=0.5878.


we know that Schmidt relation is u i, j+1 = λ(u i +1, j + u i −1, j ) + (1 − 2)u i, j
(u i+1, j + u i−1, j )
in the above equation we get u i, j+1 =
1
substituting  =
2 2 ,
remaining values are calculated by using the above formula
x 0 0.2 0.4 0.6 0.8 1
i
t 0 1 2 3 4 5
j
0 0 0 0.5878 0.9511 0.9511 0.5878 0
0.02 1 0 0.4755 0.7695 0.7695 0.4755 0
0.04 2 0 0.3848 0.6225 0.6225 0.3848 0
0.06 3 0 0.3112 0.5036 0.5036 0.3112 0
0.08 4 0 0.2518 0.4074 0.4074 0.2518 0
0.10 5 0 0.2037 0.3296 0.3296 0.2037 0

Solve u t = u xx , for 0<x<1, t>0 given that u(x,0) = 100x (1 − x ) , u(0,t)=0,u(1,t)= 0 by Crank
10.
Nicholson formula. Compute u for 1 time step. (taking h=1/4, k=1/64)

St. Joseph’s College of Engineering Page No.74


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
1 1 k 1
Here  = 1, h = ,k= = 2 =
4 64 h 4
 (ui +1, j +1 + ui −1, j +1 ) − 2(1 +  )ui , j +1 = 2( − 1)ui , j −  (ui +1, j + ui −1, j )
1 1 3 5
substituting  = , we get (ui +1, j +1 + ui −1, j +1 + ui +1, j + ui −1, j ) + ui , j = ui , j +1
4 4 2 2
1 3 5
put i=1 , j=0 we get (u2,1 + u0,1 + u2,0 + u0,0 ) + u1,0 = u1,1
4 2 2
 10u11 − u21 = 137.5 (1)
put i=2 , j=0
 10u21 − u11 − u31 = 187.5 (2)
put i=3, j=0
 10u31 − u21 = 137.5 (3)
Solving (1),(2) and (3) we get  u11 = 15.9438, u21 = 21.93877, u31 = 15.943877
11. Solve uxx + u yy = 0 whose boundary values are as shown in the following figure.

0 11.1 17 19.7 18.6

0 u1 u2 u3 21.9

0 u4 u5 u6 21.0

0 u7 u8 u9 17.0

0 9.0
8.7 12.1 12.8
Solution: Let the values of u at the interior lattice points be u1, u2, …, u9. Now the initial values
of ‘u’ are calculated either by using standard five point formula or diagonal five point formula.
Rough values :
1
ui, j =  u i −1, j + u i +1, j + u i , j−1 + u i , j+1  for the grid point u5,
4
Applying SFPF

we get
1
u5 =  0 + 17 + 21 + 12.1 = 12.5
4
1
 
Applying DFPF ui , j = ui −1, j −1 + ui −1, j + ui +1, j −1 + ui +1, j +1 for the grid points u1, u3, u7, u9
4
we get
1 1
u1 = 0 + 12.5 + 0 + 17 = 7.4; u3 = 12.5 + 18.6 + 17 + 21 = 17.3;
4 4
1 1
u7 = 12.5 + 0 + 0 + 12.1 = 6.2; u9 = 12.5 + 9 + 21 + 12.1 = 13.7;
4 4

St. Joseph’s College of Engineering Page No.75


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
1
Applying SFPF u i , j =  u i −1, j + u i +1, j + u i , j−1 + u i , j+1  for the grid points u2, u4, u6, u8
4
we get ,
1 1
u2 = 17 + 12.5 + 7.4 + 17.3 = 13.6; u4 = 7.4 + 6.2 + 0 + 12.5 = 6.5;
4 4
1 1
u6 = 17.3 + 13.7 + 12.5 + 21 = 16.1; u8 = 12.5 + 12.1 + 6.2 + 13.7 = 11.1;
4 4
We will now improve the values by using always SFPF
1
ui, j =  u i −1, j + u i +1, j + u i , j−1 + u i , j+1 
4
SFPF formula for u \ Iterations 1 2 3

1
u1 = 0 + 11.1 + u4 + u2  u1 = 7.8 u1 = 7.9 u1 = 7.9
4
1
u2 = u1 + 17 + u5 + u3  u2 = 13.7 u2 = 13.7 u2 = 13.7
4
1
u3 = u2 + 19.7 + u6 + 21.9  u3 = 17.9 u3 = 17.9 u3 = 17.9
4
1
u4 =  0 + u1 + u7 + u5  u4 = 6.6 u4 = 6.6 u4 = 6.6
4
1
u5 = u4 + u2 + u8 + u6  u5 = 11.9 u5 = 11.9 u5 = 11.9
4
1
u6 = u5 + u3 + u9 + 21 u6 = 16.1 u6 = 16.3 u6 = 16.3
4
1
u7 =  0 + u4 + 8.7 + u8  u7 = 6.6 u7 = 6.6 u7 = 6.6
4
1
u8 = u7 + u5 + 12.1 + u9  u8 = 11 u8 = 11.2 u8 = 11.2
4
1
u9 = u8 + u6 + 12.8 + 17  u9 = 14.2 u9 = 14.3 u9 = 14.3
4

Second and third iteration values are same.


Final values : u1 = 7.9, u2= 13.7, u3 = 17.9, u4 = 6.6, u5 = 11.9, u6= 16.3, u7 = 6.6, u8 = 11.2
& u9 = 14.3
12. Solve u xx + u yy = 0 , for the following square mesh with boundary condition as shown below.

Iterate until the maximum difference between successive values at any grid point is less than
0.001

St. Joseph’s College of Engineering Page No.76


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

The diagram is symmetrical about the diagonals AC and BD.


Let u1 , u2 , u3 and u4 be the values at the interior grid points.
By symmetry u1 = u4 , u2 = u3 . So we should find only two values u1 and u2 .

ui , j −1 + ui , j +1 + ui−1, j + ui+1, j
Standard five point formula is ui , j =
4
Let u2 =1.6
1
u1 = (1 + 1 + 1.6 + 1.6) = 1.3 (by using standard five point formula)
4
1
u2 = ( 2 + 2 + 1.3 + 1.3) = 1.65
4
I iteration:
1 1
u1 = ( 2 + 2u2 ) = 1.325 , u2 = ( 4 + 2u1 ) = 1.6625
4 4
II iteration
1 1
u1 = (1 + u2 ) = 1.33125 , u2 = ( 2 + u1 ) = 1.6656
2 2
III iteration
1 1
u1 = (1 + 1.6656) = 1.3328, u2 = (3.3328) = 1.6664
2 2
IV iteration
1 1
u1 = (1 + 1.6664) = 1.3332 , u2 = (3.3332) = 1.6666
2 2
We conclude that u1 =1.3332 , u2 = 1.6666 , u3 = 1.3332 , u4 = 1.6666

St. Joseph’s College of Engineering Page No.77


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
13. Solve the Laplace equation u xx + u yy = 0 for the following square mesh with the boundary

values as shown.
0 500 1000 500 0

1000 u1 u2 u3 1000

2000 u4 u5 u6 2000

1000 u7 u8 u9 1000

0 0
500 1000 500
Solution: Let the values of u at the interior lattice points be u1, u2, …, u9. Now the initial values of
‘u’ are calculated either by using standard five point formula or diagonal five point formula.
Rough values :
1
ui, j =  u i −1, j + u i +1, j + u i , j−1 + u i , j+1  for the grid point u5,
4
Applying SFPF

By SFPF
u5 = (2000+2000+1000+1000) / 4 = 1500

Applying DFPF ui , j =
1
4
 
ui −1, j −1 + ui −1, j + ui +1, j −1 + ui +1, j +1 for the grid points u1, u3, u7, u9

By DFPF
u1 = (0+1000+2000+1500) / 4 = 1125
u3 = (0+1000+1500+2000) /4 = 1125
u7 = (2000+1500+0+1000) /4 = 1125
u9 = (1500+2000+1000+0) / 4 = 1125
By SFPF
u2 = (1125+1125+1000+1500) / 4 = 1188
u4 = (2000+1500+1125+1125) / 4 = 1438
u6= (1500+2000+1125+1125) /4 = 1438
u8 = (1125+1125+1500+1000) / 4 = 1188
For the forthcoming iterations, SFPF will be applied

u1 u2 u3 u4 u5 u6 u7 u8 u9

I 1031 1164 1025 1414 1300 1362 1025 1113 994

II 1020 1086 987 1336 1225 1301 987 1051 963

III 981 1048 962 1298 1174 1275 962 1025 950

IV 962 1024 950 1275 1150 1262 950 1012 944


Proceeding this process, we get the solution in X and XI iteration

St. Joseph’s College of Engineering Page No.78


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
u1 = u3 = u7 = u9 =938, u2 = u8 = 1000, u4 = u6 = 1250, u5 = 1125
14. Solve  u = − 10( x + y + 10) over the square mesh with sides x = 0, y = 0, x = 3, and y = 3
2 2 2

with u = 0 on the boundary and mesh length is 1.


Solution:

Here h = 1 and f(x,y) = –10(x2 + y2 + 10) …(1)


Since f(x,y) is symmetrical about the line x = y , we get u1 = u 4
 It is enough to find u1 , u 2 and u 3
u i −1, j + u i +1, j + u i, j−1 + u i, j+1 − 4 u i, j = h 2 f (ih, jh) = f (i, j) ( h = 1)
u i −1, j + u i +1, j + u i, j−1 + u i, j+1 − 4 u i, j = − 10(i 2 + j2 + 10)
Put i = 1 and j = 2 in above formula we get, – 4u1 + u2 + u3 = – 150 … ……….(1)
Put i = 2 and j = 2 in above formula we get, u1 – 4u2 + u4 = – 180
u1 – 4u2 + u1 = – 180
2u1 – 4u2 = – 180
u1 – 2u2 = – 90 ………....(2)
Put i = 1and j = 1 in above formula we get, u1 – 4u3 + u4 = – 120
u1 – 4u3 + u1 = – 120
2u1 – 4u3 = – 120
u1 – 2u3 = – 60 ..………..(3)
Put i = 2and j = 1 in above formula we get, u2 + u3 – 4 u4= – 150
u2 + u3 – 4 u1 = – 150
– 4 u1 + u2 + u3 = – 150 ..………..(4)
(2) – (3) gives – 2u2 + 2u3 = – 30
– u2 + u3 = – 15 …(5)
Multiply 4 in equation (3) and adding with equation (4), we get
u2 – 7u3 = – 390 …(6)
Adding (5) and (6), we get u3 = 67.5
Substituting u3 in (5), we get u2 = 82.5

Substituting u3 in (3), we get u1 = 75 = u4

St. Joseph’s College of Engineering Page No.79


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)
15. Solve the Poisson equation uxx + uyy = − 81xy , 0 < x < 1, 0 < y < 1, given that u(0, y) = 0,
1
u(x, 0) = 0, u(1, y) = 100, u(x, 1) =100 and h =
3
Solution: The equation is symmetrical about x and y. When x and y are interchanged, it is
unaffected and so symmetric about y = x. The boundary conditions are also symmetric about y = x

Let u1, u2, u3,u4 be the values of at the mesh points.

The standard five point formula for Poisson equation is


u i −1, j + u i +1, j + u i, j−1 + u i, j+1 − 4u ij = h 2f (ih, jh)
= h 2  −81( ih )( jh ) 
= −81h 4ij
4
1  1
= −81  ij  h = 3 
3
1
= −81  ij
 81 
u i −1, j + u i +1, j + u i, j−1 + u i, j+1 − 4u ij = −ij ....... (1)
Applying the formula (1) at A ( i = 1/ 3, j = 2 / 3)
1 2
0 + u 2 + u 4 + 100 − 4u1 = − .
3 3
−902
− 4u1 + u 2 + u 4 =
9
902
4u1 − u 2 − u 4 = .......... ( 2 )
9

St. Joseph’s College of Engineering Page No.80


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

 2 2
Applying the formula (1) at B  i = , j = 
 3 3
2 2
u1 + 100 + u 3 + 100 − 4u 2 = − .
3 3
−4
u1 − 4u 2 + u1 = − 200 ( u1 = u 3 )
9
−1804
2u1 − 4u 2 =
9
−902
u1 − 2u 2 =
9
902
2u 2 − u1 = .......... ( 3)
9
 1 1
Applying the formula (1) at C  i = , j = 
 3 3
1 1
u1 + 0 + 0 + u 3 − 4u 4 = − .
3 3
−1
u1 + u1 − 4u 4 = ( u1 = u 3 )
9
−1
2u1 + = 4u 4
9
1 1
u 4 =  2u1 + 
4 9
Substitute for u 4 in (1), we get
1 1  902
4u1 − u 2 −  2u1 +  =
4 9 9
7 1 902 3609
u1 − u 2 = + =
2 36 9 36
3609
7u1 − 2u 2 = (4)
18
6314
(2)  7  −7u1 + 14u 2 =
9
Adding,
3609 6314 16237
12u 2 = + =
18 9 18
u 2 = 75.17 75.2
Substituting u 2 in ( 2 ) we get,
902
u1 = 2(75.2) − = 50.18
9

St. Joseph’s College of Engineering Page No.81


Sub. Name & Code: Applied Numerical Analysis (MA1353) Dept.: Maths Year: 2023-24
II year B.Tech. Question Bank (Chemical)

Substituting u1 in ( 3) we get,
1 1
u4 =  2(50.8) +  = 25.12
4 9
 u1 = 50.18 = u 3 , u 2 = 75.2, u 4 = 25.12

St. Joseph’s College of Engineering Page No.82

You might also like