You are on page 1of 10

B. M. S.

COLLEGE OF ENGINEERING, BENGALURU – 560019


DEPARTMENT OF MATHEMATICS
UNIT 2: NUMERICAL METHODS
Branches: EEE/ECE/TCE/ML/IT
Solution of Algebraic and transcendental equations:
 Intermediate Value Theorem :
If f is a function which is continuous at every point of the interval a, b
and f a   0 & f b  0 or f a   0 & f b 0 , then f (x) = 0 at some point x ∈ (a, b).
Therefore, there exists at least one root between ‘ a ’ and ‘ b ’.
 Newton-Raphson method

f  xn 
The iterative formula is xn 1  xn  .
f   xn 
If a root exists in the interval  a, b  then x0  a or x0  b or x0  any point between a and b or
ab
x0  could be taken as the initial approximation.
2
f x0 
For n  1, x1  x0  1st approximation/iteration
f ' x0 
f x1  nd
For n  2 , x 2  x1  2 approximation/iteration
f ' x1 
.
.
.
Proceeding like this until desired accuracy.

1. Find the roots of the following equations by Newton-Raphson method


a. x3  3x  1  0 near a) x  0.5 . Ans: 0.347 b) x  2 Ans: 1.532
b. x log10 x  1.2 in  2,3 correct to 4 decimal places. Ans: 2.7406

c. 3x  cos x  1in the interval  0,1 correct to 4 decimal places. Ans: 0.6071

d. xe x  2  0 near x  0.5 Ans: 0.853

Page 1 of 10
Dept. of Mathematics, BMSCE Unit 2: Numerical Methods

e. 3sin x  2 x  5  0 near x  3 . Ans: 0.684


f. x sin x  cos x  0 near x   . Ans: 2.7985

Interpolation: Newton’s forward and backward interpolation:


 Newton’s Forward Interpolation Formula

p  p  1 p  2 3 p  p  1 p  2 p  3 4


y  y0  p y0  p  p  1 2 y 0   y0   y 0  ...  ...
2! 3!

x  x0
Where p 
h

 Newton’s Backward Interpolation Formula

q q  1q  2 3 q q  1q  2q  3 4


y  y n  q y n  q q  1 2 y n   yn   y n  ...  ...
2! 3!

x  xn
Where q 
h
1. Fit a polynomial of degree three which takes the following values. Ans: x3  3x 2  2 x .
x: 3 4 5 6
y 6 24 60 120
2. Using Newton’s forward formula, compute the pressure of the steam at temperature 1420 from the
following steam table.
Temperature 140 150 160 170 180
Pressure 3.685 4.854 6.302 8.076 10.225
3. The following table give the values of tan x for 0.10 0.30. Find tan (0.26).
x 0.10 0.15 0.20 0.25 0.30
tan x 0.1003 0.1511 0.2027 0.2553 0.3093
4. The area of a circle (A) corresponding to diameter (D) is given below:
D 80 85 90 95 100
A 5026 5674 6362 7088 7854
Find the area corresponding to diameter 105 using an appropriate interpolation formula.
5. Find u0.5 from the data u0  225 , u1  238 , u2  320 , u3  340 .
6. Extrapolate for25.4 given the data
x 19 20 21 22 23
y 91 100.25 110 120.25 131
7. Given f(40) = 184, f(50) = 204, f(60) = 226, f(70) = 250, f(80) = 276, f(90) = 304, find f(38) and
f(85) using suitable interpolation formulae.
8. Given sin450=0.7071, sin 500=0.7660 sin 550 = 0.8192,sin 600 = 0.8660, find sin 570 using an
appropriate interpolation formula.
9. From the following table find the number of students who obtained less than 45 marks.
Marks 30-40 40-50 50-60 60-70 70 –80
No. of students 31 42 51 35 31
10. If the number of persons earning below 1000 is 6000, estimate the number of persons having incomes
between 2000 and 2500 from the following data:
Income 1000-2000 2000-3000 3000-4000 4000-5000

Page 2 of 10
Dept. of Mathematics, BMSCE Unit 2: Numerical Methods

No. of persons 4250 3600 1500 650

11. Asurvey conducted in a slum locality reveals the following information as classified below.
Income per day (Rs) under10 10-20 20-30 30-40 40-50
Number of persons 20 45 115 210 115
Estimate the probable number of persons in the income group 20 to 25.
12. Compute u14.2 from the following table by applying Newton’s backward interpolation formula.
x 10 12 14 16 18
ux 0.240 0.281 0.381 0.352 0.384
13. Use Newton’s forward interpolation formula to find y35 given y20  512 , y30  439 , y40  346 , and
y50  243 .
14. Find f  2.5 byusing Newton’s backward interpolationformulagiven that f  0   7.4720 ,
f 1  7.5854 , f  2   7.6922 , f  3  7.8119 , f  4   7.9252 .
15. Apply Newton’s backward formula to find the cubic polynomial satisfying f  4   25 , f  2   1 ,
f  0   3 , f  2   29 , f  4   127 and hence find f(3) and f(5).
16. Compute f(1.22) with the help of forward difference table for the following data.
x 1.0 1.1 1.2 1.3 1.4
f  x  0.841 0.891 0.932 0.963 0.985
17. From the following data estimate the number of students scoring marks more than 40 but less than 45.
Marks 30-40 40-50 50-60 60-70 70-80
No. of students 31 42 51 35 31
18. From the following data estimate the numbers of students who have scored less than 70 marks.
Marks 0-20 20-40 40-60 60-80 80-100
No. of students 41 62 65 50 17

INTERPOLATION FOR UNEQUAL/EQUAL INTERVALS


 Lagrange’s Interpolation:
If y  f x  takes the values y0 , y1 ,..., y n corresponding to x  x0 , x1 ,..., xn , then the Lagrange’s
Interpolation formula is as follows:

y
 x  x1  x  x2  ...  x  xn  y   x  x0  x  x1  ...  x  xn  y
 x0  x1  x0  x2  ...  x0  xn  0  x1  x0  x1  x2  ...  x1  xn  1
 ... 
 x  x1  x  x2  ...  x  xn1  y
 xn  x1  xn  x2  ...  xn  xn  n

 Lagrange’s Inverse Interpolation:


Lagrange’s formula is a relation between two variables either of which may be taken as the independent
variable. Therefore, on interchanging x and y in the Lagrange’s formula, we obtain

x
 y  y1  y  y2  ...  y  yn  x   y  y0  y  y1  ...  y  yn  x
 y0  y1  y0  y2  ...  y0  yn  0  y1  y1  y1  y2  ...  y1  yn  1
 ... 
 y  y0  y  y1  ...  y  yn1  x
 yn  y1  yn  y2  ...  yn  yn1  n
1. Use Lagrange’s interpolation formula to fit a polynomial to the following data. Hence find y ( – 2), y(1)
and y(4).

Page 3 of 10
Dept. of Mathematics, BMSCE Unit 2: Numerical Methods

x -1 0 2 3
y -8 3 1 2
2. Find the distance moved by a particle and its acceleration at the end of 4 seconds, if the time verses
velocity data is as follows:
t 0 1 3 4
v 21 15 12 10
3. The following are the measurements T made on a curve recorded by oscillograph representing a change
of current I due to a change in the conditions of an electric current.
T 1.2 2.0 2.5 3.0
I 1.36 0.58 0.34 0.20
Using Lagrange’s formula, find I at T  1.6 .
4. Fit a polynomial of third degree and find y(0.2) from the following data.
x 0 0.1 0.3 0.5
y -0.5 0 0.2 1
5. By using the Lagrange’s interpolation formula, find f(11) from the following data:
x 2 5 8 14
y 94.8 87.9 81.3 68.7
6. Certain corresponding values of x and log10 x are: (300, 2.4771),(304, 2.4829), (305, 2.4843) and
(307, 2.4871). Find log10 301 by using Lagrange’s interpolation formula.
7. Use Lagrange’s interpolation formula to find y at x  10 given
x 5 6 9 11
y 12 13 14 16
8. The observed values of a function are respectively 168, 120, 72 and 63 at the four positions 3, 7, 9, 10
of the independent variable. What is the best estimate you can give for the value of the function at the
position 6 of the independent variable?
9. Given u0  707 , u2  819 , u3  866 and u6  966 compute using Lagrange’s interpolation
formula.
10. Fit the Lagrange’s interpolating polynomial of the form x  f  y  for the data and hence find x 5 &
y 5 .
x 2 10 17
y 1 3 4
11. Applying Lagrange’s formula inversely to find x when y  6 given the data
x 20 30 40
y 2 4.4 7.9
12. Use Lagrange’s inverse interpolation formula to find the value of x for y = 100 given y(3) = 6, y(5) =
24, y(7) = 58, y(9) = 108, y(11) = 174.
13. Apply Lagrange’s formula inversely to find a root of the equation f  x   0 given that f  30   30 ,
f  34   13 , f  38  3 , f  42   18 .
14. Compute the value of x, when y = 8 by inverse interpolation using Lagrange’s formula
x -2 -1 1 2
y -7 2 0 11

15. Find the missing term in the following table using interpolation
x 0 2 4 5 6
y 14 15 5 ? 9
16. Using Lagrange’s interpolation, calculate the profit in the year 2000 from the following data:

Page 4 of 10
Dept. of Mathematics, BMSCE Unit 2: Numerical Methods

Year 1997 1999 2001 2002


Profit in Lakh of Rupees 43 65 159 248
17. A curve passes through the point (0,18), (1,10), (3,-18) and (6, 90). Find the slope of the curve at x  2 .
18. Find the polynomial f x  by using Lagrange’s formula and hence find f 3 for the following data:
x 0 1 2 5
f x  2 3 12 147
19. If y1  3, y3  9, y4  30, y6  132, find the Lagrange’s interpolation polynomial that takes
the same values as y at the given points.
x2  6 x 1
as a sum of partial fractions, using Lagrange’s formula.
 x  1  x  4 x  6
20. Express the function 2

21. The following table gives the values of x and y :


x 1.2 2.1 2.8 4.1 4.9 6.2
y 4.2 6.8 9.8 13.4 15.5 19.6
Find the value of x corresponding to y  12 , using Lagrange’s interpolation formula.
22. Apply Lagrange’s interpolation formula to obtain a root of the equation f x   0 , given that
f 30  30, f 34  13, f 38  3 and f 42  18 .
23. Apply Lagrange’s interpolation to find the value of x when f x   15 from the given data:
x 5 6 9 11
f x  12 13 14 16
24. Obtain the value of t when A  85 from the following table using Lagrange’s interpolation.
t 2 5 8 14
A 94.8 87.9 81.3 68.7

Numerical Integration:
b x0  nh

I   y dx 
a
 f x  dx
x0

where f x  takes the values y0 , y1 ,..., y n corresponding to x  x0 , x1 ,..., xn , then


 Simpson’s 1/3 rd Rule ( n is multiple of 2 )
x0  nh

x f x  dx  3  y0  yn   2 y2  y4  ...  yn2   4 y1  y3  ...  yn1 


h
0

 Simpson’s 3/8 th Rule ( n is multiple of 3 )


x0  nh

 f x  dx  8  y  y n   3 y1  y 2  ...  y n 1   2 y3  y 6  ...  y n 3 
3h
0
x0

 Weddle’s Rule ( n is multiple of 6 )


x0  nh

 f x  dx  10 y  5 y1  y 2  6 y3  y 4  5 y5  2 y 6  5 y 7  y8  ...
3h
0
x0

 When n  6 ,
x0  nh

 f x  dx  10 y  5 y1  y 2  6 y3  y 4  5 y5  y 6 
3h
0
x0

Page 5 of 10
Dept. of Mathematics, BMSCE Unit 2: Numerical Methods

 When n  12
x0  nh

 f x dx  10 y  5 y1  y 2  6 y3  y 4  5 y5  2 y 6  5 y 7  y8  6 y9  y10  5 y11  y12 


3h
0
x0

1
dx
1. Weddle’s rule evaluate 1 x
0
2
by using Simpson’s 1/3rd rule taking four equal strips and hence

deduce an approximate value of . Ans 0.7854 = 3.1416

 sin x  log x  e dx using Simpson’s 3/8


1.4
x th
2. Compute the value of rule.
0.2
1
dx
 1  x taking seven ordinates by applying Simpson’s 3/8
th
3. Evaluate rule. Hence deduce the value of
0

log e 2 . Ans: 0.6932 log e 2 = 0.6932


4

e
th 1/ x
4. Use Simpson’s 3/8 rule to evaluate dx . Ans 4.9257
1

1
xdx
5. Evaluate  1 x
0
2
by Weddle’s rule taking seven ordinates and hence find log e 2.

 /2
6. Find the approximate value of  cos  d  by Simpson’s 1/3rd rule by dividing 0,   into 6
 2
1
equal parts. Ans: 1.1873
 /2
7. By using Simpson’s 3/8th rule, evaluate 
0
esin  d . Ans:3.1028

 /2
8. Compute 
0
sin xdx by using Weddle’s rule.
8
dx
9. Use Simpson’s 1/3 rule with seven ordinates to evaluate
rd
 log
2 10 x
Ans: 9.7203

0.6

e
 x2
10. Use Simpson’s 1/3 rule to findrd
dx by taking 6 sub-intervals. Ans: 0.5351
0
11. Given that y = log x and
x 4.0 4.2 4.4 4.6 4.8 5.0 5.2
y 1.3863 1.4351 1.4816 1.5261 1.5686 1.6094 1.6487
5.2

Evaluate I   log xdx by


4
a) Simpson’s 1/3rd rule, b) Simpson’s 3/8th rule, and

c) Weddle’s rule. Also compare it with exact value.


Ans: a) 1.8278472, b) 1.8278470, c)1.8278474, Exact: 1.827822556
6
sin x
12. Evaluate  dx using Weddle’s rule. Ans: 1.42479
0
x
x2 1
13. By using Simpson’s 3/8th rule with h= 0.2 find the approximate area under the curve y 
x2  1
between the ordinates x = 1 and x = 2.8. Compare the result with the exact result.
Ans: 0.9152 Exact: 0.9152
14. Find the distance travelled by a train between 8.20 AM and 9 AM from the following data.
Time 8.20 am 8.30 am 8.40 am 8.50 am 9 am
Speed(miles/hour) 24.2 35 41.3 42.8 39.4

Page 6 of 10
Dept. of Mathematics, BMSCE Unit 2: Numerical Methods
Ans: 25.411 miles
15. A plane area is bounded by a curve, the x – axis and two extreme ordinates. The area is divided into six
figures by equidistant ordinates 2 inches apart, the heights of the ordinates being 21.65, 21.04, 20.35,
19.61, 18.75, 17.80 and 16.75 respectively. Find the approximate value of the areas by numerical
integration. `
16. Ans: 233.616 sq. inches
17. Use Weddle’s rule to compute the area bounded by the curve y = f(x), x – axis and the extreme
ordinates from the following table.
x: 0 1 2 3 4 5 6
y: 0 2 2.5 2.3 2 1.7 1.5 Ans:11.49sq units
18. A solid of revolution is formed by rotating about the x – axis the area between the x – axis, the lines x =
0 and x = 1 and a curve through the points with the following co-ordinates.
x: 0.00 0.25 0.50 0.75 1.00
y: 1.0000 0.9896 0.9589 0.9089 0.8415
Using the Simpson’s rule, find the volume of the solid formed. Ans: (0.897395)
19. A river is 80 feet wide. The depth d in feet at a distance x feet from one bank is given by
x: 0 10 20 30 40 50 60 70 80
d: 0 4 7 9 12 15 14 8 3
Find approximately the area of cross section of the river. Ans: 710 sq. feet
20. The velocity ‘ v ’ of a particle at distance ‘ s ’ from a point on its path is given by the table:
s  ft  0 10 20 30 40 50 60
v  ft s 1  47 58 64 65 61 52 38

Estimate the time taken to travel 60 ft by using Simpsom’s 1 rd rule. Ans:


3
Numerical Solution of Ordinary differential equations
 Euler’s Modified Method
 Runge-Kutta Method of 4th order
Euler’s Modified Method:

Geometrical Interpretation :

Page 7 of 10
Dept. of Mathematics, BMSCE Unit 2: Numerical Methods

 f x, y  with yx0   y 0 and taking h as the step length.


dy
Consider
dx
Then x1  x0  h , y1  ?
To find y1 use Euler’s modified formula which is given below:
y1E  y0  h f  x0 , y0 

y11  y 0 
h
2
  
f x0 , y 0   f x1 , y1E where y11 is known as the first modified value of y1

y12    
 y 0  f x0 , y 0   f x1 , y11 , y12  is known as the second modified value of y1
h
2
y13   
 y 0  f x0 , y 0   f x1 , y12  , y13  is known as the third modified value of y1
h
2
.
.
.

y1n   y 0 
h
2
  
f x0 , y 0   f x1 , y1n 1 , y13  is known as the n th modified value of y1
-------------------------------------------------------------------------------------------------------------------------------
Then, x2  x1  h , y 2  ?
To find y 2 use Euler’s modified formula which is given below:
y2E  y1  h f  x1 , y1  ,

y 21  y1 
h
2
  
f x1 , y1   f x2 , y 2E , y 21 is known as the first modified value of y 2

y 22    
 y1  f x1 , y1   f x2 , y 21 , y22  is known as the second modified value of y 2
h
2
y 23   
 y1  f x1 , y1   f x2 , y 22  , y23  is known as the third modified value of y 2
h
2
.
.
.
h
y 2n   y1 
2
  
f x1 , y1   f x2 , y 2n 1 , y2n  is known as the n th modified value of y 2

Similarly, we can find the values of y3 , y 4 , ...

Solve the following differential equations using Euler’s modified method:


1. y  log  x  y  , y 1  2 at x  1.2 and 1.4 . Take h  0.2 .
2. y  x  sin y , y  0   1 . Compute y  0.2  and y  0.4  .
dy y  x
3.  with the boundary conditions y  1 when x  0 , find approximately y for
dx y  x
x  0.1 by Euler’s modified method (5 steps).
dy
4. For x  0.3 given  x  y and y  1 when x  0 Take h  0.1 .
dx
5. y  x  y and y  1 when x  0 for 0.2  0.2  0.6 .
6. y  1  xy , y  0   1 . Find y  0.075 .

Page 8 of 10
Dept. of Mathematics, BMSCE Unit 2: Numerical Methods
Runge-Kutta Method of 4th order Method:

Geometrical Interpretation :

 f x, y  with y  x0   y0 and taking h as the step length.


dy
Consider
dx
Then, x1  x0  h , y1  ?
To find y1 use the Runge-Kutta formula which is given below:

y1  y0  k where k 
1
k1  2k 2  2k3  k 4  ,
6
k1  h f x0 , y0  ,
 h k 
k 2  h f  x0  , y 0  1  ,
 2 2
 h k 
k 3  h f  x0  , y 0  2  ,
 2 2
k 4  h f  x0  h , y 0  k 3  .
----------------------------------------------------------------------------------------
Then, x2  x1  h , y 2  ?
To find y 2 use the Runge-Kutta formula which is given below:
y 2  y1  k

Where k  k1  2k 2  2k 3  k 4  ,
1
6
k1  h f x1 , y1  ,
 h k 
k 2  h f  x1  , y1  1  ,
 2 2

Page 9 of 10
Dept. of Mathematics, BMSCE Unit 2: Numerical Methods
 h k 
k 3  h f  x1  , y1  2  ,
 2 2
k 4  h f x1  h , y1  k 3  .
Similarly, we can find the values of y3 , y 4 , ...

Solve the following differential equations by fourth order Runge-Kutta method:


1.  x  y  y  1 , y  0.4  1 at x  0.5

2. y  xy , y 1  2 at x  1.1

3. y  x  y 2 , y  0   1 at x  0.2 in steps of 0.1

dy y 2  x 2
4.  with y  0   1 at x  0.2 and 0.4 .
dx y 2  x 2
dy y  x
5.  , y  0   1 at the point x  0.2 , taking h  0.1
dx y  x

dy 1
6.  , y  0   1 for x  0  0.51 .
dx 1  x

Page 10 of 10

You might also like