B. M. S.
COLLEGE OF ENGINEERING, BENGALURU – 560019
Autonomous college, affiliated to VTU
DEPARTMENT OF MATHEMATICS
(AY 2024-25)
Course: Mathematical Foundation for Computer Science Stream-II (23MA2BSMCS)
Mathematical Foundation for Mechanical and Civil Engineering Stream -II (23MA2BSMCM)
Mathematical Foundation for Electrical Stream-II (23MA2BSMES)
UNIT-4: NUMERICAL METHODS-1
Solution of Algebraic and transcendental equations:
An expression of the form 𝑓(𝑥) = 𝑎0 𝑥 𝑛 + 𝑎1 𝑥 𝑛−1 +. . . +𝑎𝑛−1 𝑥 + 𝑎𝑛 , 𝑎0 ≠ 0 is called a polynomial
of degree ' n ' and the polynomial f x 0 is called an algebraic equation of nth degree. If f x
contains trigonometric, logarithmic or exponential functions, then f x 0 is called a transcendental
equation. For example, x2 2sin x e x 0 is a transcendental equation.
Intermediate Value Theorem:
If f is a function which is continuous at every point of the interval a , b with f a and f b
having opposite signs, then there exists at least one root between ‘ a ’ and ‘ b ’.
Newton-Raphson method
Figure: Typical iteration of NR method. (Differs from problem to problem)
f xn
The iterative formula is xn1 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
ab
or x0 could be taken as the initial approximation.
2
f x0
For n 1, x1 x0 1st approximation/iteration
f ' x0
f x1
For n 2 , x2 x1 2nd approximation/iteration
f ' x1
The iterations can be continued like this until desired accuracy.
Page 1 of 8
Unit-4: Numerical Methods-1
1. Approximate 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. 3 x cos x 1 in the interval 0,1 correct to 4 decimal places. Ans: 0.6071
d. xe 2 0 near x 0.5
x
Ans: 0.853
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
2. Find the fourth root of 32 using Newton-Raphson method. (Hint: x4 32 0 ) . Ans: 2.3784
Finite differences and interpolation for equal intervals
Forward difference: ∆𝑦𝑛 = 𝑦𝑛+1 − 𝑦𝑛
Backward difference: ∇𝑦𝑛 = 𝑦𝑛 − 𝑦𝑛−1
k th forward difference: ∆𝑘 𝑦𝑛 = ∆𝑘−1 𝑦𝑛+1 − ∆𝑘−1 𝑦𝑛
k th backward difference: ∇𝑘 𝑦𝑛 = ∇𝑘−1 𝑦𝑛 − ∇𝑘−1 𝑦𝑛−1
Interpolation: Newton’s forward and backward interpolation:
Newton’s Forward Interpolation Formula
p p 1 p p 1 p 2 p p 1 p 2 p 3
y x y0 p y0 2 y0 3 y0 4 y0 ..... .
2! 3! 4!
where x x0 ph .
Newton’s Backward Interpolation Formula
q q 1 2 q q 1 q 2 3 q q 1 q 2 q 3 4
y yn q yn yn yn yn ...... .
2! 3! 4!
where x xn qh .
Problems on Newton’s Forward and Backward Interpolation:
1. The following data gives the melting point of an alloy of lead and zinc, where t is the
temperature in C and p is the percentage of lead in the alloy.
p % 60 70 80 90
t 226 250 276 304
Find the melting point of the alloy containing 84% of lead, using Newton’s interpolation
formula.
Ans: t=286.96 at p=84%
2. The current in a wire is measured with great precision as a function of time:
t 0 0.1250 0.25 0.375 0.5
i 0 6.24 7.75 4.85 0
Determine i at t 0.23s .
Ans: i=7.8386 at t=0.23s
Dept. of Mathematics, BMSCE Page 2 of 8
Unit-4: Numerical Methods-1
3. 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
Ans: 3.8987
Pr essure 3.685 4.854 6.302 8.076 10.225
4. The following table gives the values of tan x for 0.10 x 0.30 . Find tan 0.26 .
x 0.10 0.15 0.20 0.25 0.30
Ans: tan(0.26) is 0.2659
tan x 0.1003 0.1511 0.2027 0.2553 0.3093
5. 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.
Ans: 8666
6. Distance in nautical miles of the visible horizon for given heights in metres above the surface
of the earth are given by the following table:
x heights 100 150 200 250 300 350 400
y dis tan ce 12 16 21 27 36 50 72
Find the value of y when x 225 metres. Ans: 23.7588
7. Extrapolate for 25.4 given the data
x 19 20 21 22 23
y 91 100.25 110 120.25 131
Ans: 158.84
8. From the following table find the number of students who obtained less than 45 marks. Also,
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
Ans: For <45 marks, no. of students= 48, and for 40-45 marks, number of students=17.
9. 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
No. of Persons 4250 3600 1500 650
Ans: For income<2500, no. of persons= 12286 and for income 2000-2500, no. of
persons=2036.
10. A survey conducted in a slum locality reveals the following information as classified below.
Income per day Rs under 10 10 20 20 30 30 40 40 50
No. of Students 20 45 115 210 115
Estimate the probable number of persons in the income group 20 to 25.
Ans: For <25, No. of students= 108 and for 20-25, no. of students=43.
11. Compute u14.2 from the following table by applying Newton’s backward interpolation formula.
x 10 12 14 16 18
ux 0.24 0.281 0.381 0.352 0.384
Ans: u14.2 is 0.3837
Dept. of Mathematics, BMSCE Page 3 of 8
Unit-4: Numerical Methods-1
12. 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
Ans: 196
No. of Students 41 62 65 50 17
13. Given sin450 = 0.7071, sin 500 = 0.7660, sin 550 = 0.8192, sin 600 = 0.8660, find sin 570 using
an appropriate interpolation formula.
Ans: sin 570 is 0.8387
14. Use Newton’s forward interpolation formula to find y35 given y20 512 , y30 439 , y40 346 ,
and y50 243 . Ans: y35 =394.375
15. Find the interpolating polynomial by using Newton’s backward interpolation formula given that
f 0 7.4720 , f 1 7.5854 , f 2 7.6922 , f 3 7.8119 , f 4 7.9252 . Hence determine
f 2.5 Ans: f 2.5 is 7.7507
16. Find the interpolating polynomial satisfying 𝑓(0) = 0, 𝑓(2) = 4, 𝑓(4) = 56, 𝑓(6) = 204,
𝑓(8) = 496, 𝑓(10) = 980, and hence determine 𝑓(3), 𝑓(5) and 𝑓(7) using Newton’s forward
interpolation formula. Ans: f(x)= x3-2x and f(3)=21, f(5)=115, f(7)=329.
17. Find the interpolating polynomial satisfying 𝑓(0) = 1, 𝑓(1) = 2, 𝑓(2) = 4, 𝑓(3) = 7,
𝑓(4) = 11, 𝑓(5) = 16, 𝑓(6) = 22, 𝑓(7) = 29. Hence determine 𝑓(1.5).
Ans: f(x)= x2/2+x/2+1 and f(1.5)=2.875
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 x2 ... x xn y
x0 x1 x0 x2 ... x0 xn 0 x1 x0 x1 x2 ... x1 xn 1
.
...
x x0 x x1 ... x xn 1
y
xn x0 xn x1 ... xn xn1 n
Problems on Lagrange’s Interpolation:
x 5 6 9 11
1. Use Lagrange’s interpolation formula to find y at x 10 given
y 12 13 14 16
Ans: 14.6667
2. The following table gives the viscosity of an oil as a function of temperature. Use Lagrange’s
formula to find viscosity of oil at a temperature of 140 .
Temp 110 130 160 190
Ans: at ( 140 ) viscosity= 7.03331
Vis cos ity 10.8 8.1 5.5 4.8
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 Ans: at T=1.6, I=0.8946
4. 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
Ans: d=54.9, a=-3.4
Dept. of Mathematics, BMSCE Page 4 of 8
Unit-4: Numerical Methods-1
5. Using Lagrange’s interpolation, calculate the profit in the year 2000 from the following data:
Year 1997 1999 2001 2002
Profit in Lakh of Rupees 43 65 159 248
Ans: 100
6. 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
v 12 -6 24
Ans: d=50.667 and a=59.
7. Given log10 654 2.8156 , log10 658 2.8182 , log10 659 2.8189 , log10 661 2.8202 , find by
using Lagrange’s formula, the value of log10 656. Ans: log10 656 2.8168
8. 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. Ans: y x3 3x2 5x 6
9. 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.
Ans: log10 301 2.4786
10. A curve passes through the point (0, 18), (1, 10), (3, -18) and (6, 90). Find the slope of the
curve at x 2 . Ans: -16.
11. Apply appropriate Lagrange formula to find a root of the equation f(x)=0 given that
f(30)= -30, f(34)= -13, f(38)= 3, f(42)=18. Ans: x=37.23
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 y2 ... y yn x ...
y0 y1 y0 y2 ... y0 yn 0 y1 y0 y1 y2 ... y1 yn 1
y y0 y y1 ... y yn1 x
yn y0 yn y1 ... yn yn1 n
Problems on inverse Lagrange’s Interpolation:
1. Applying Lagrange’s formula inversely find x when y 6 given the data
x 20 30 40
y 2 4.4 7.9
Ans: 32.246
2. 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
Ans: -3.421
3. 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 . Ans: 37.2304
Dept. of Mathematics, BMSCE Page 5 of 8
Unit-4: Numerical Methods-1
4. 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
Ans: 11.5
5. 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
Ans: 6.3038
6. 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. Ans: 8.6557
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
rd
Simpson’s 1 3 Rule (n is multiple of 2)
x0 nh
h
f x dx 3 y0 yn 2 y2 y4 ... yn2 4 y1 y3 ... yn1 .
x 0
th
Simpson’s 3 8 Rule (n is multiple of 3)
x0 nh
3h
f x dx y0 yn 3 y1 y2 ... yn 1 2 y3 y6 ... yn 3 .
x0
8
Weddle’s Rule (n is multiple of 6 )
x6
3h
f x dx 10 y0 5 y1 y2 6 y3 y4 5 y5 y6 .
x0
When n 12
x0 nh
f x dx 10 y 5 y1 y 2 6 y 3 y 4 5 y 5 2 y 6 5 y 7 y8 6 y 9 y10 5 y11 y12
3h
0
x0
Problems on Numerical Integration:
/2
1. Find the approximate value of cos d by Simpson’s 1/3rd rule by dividing 0, into 6
2
0
equal parts. Ans: 68.023
8
dx
2. Apply Simpson’s 1/3rd rule with seven ordinates to evaluate log
2 10 x
Ans: 9.3848
0.6
e
x2
3. Apply Simpson’s 1/3 rule to find rd
dx by taking 6 sub-intervals. Ans: 0.5351
0
4
e
1/ x
4. Apply Simpson’s 3/8 rule to evaluate th dx . Ans: 4.9257
1
Dept. of Mathematics, BMSCE Page 6 of 8
Unit-4: Numerical Methods-1
/2
5. By using Simpson’s 3/8 rule, evaluate
th
0
esin d . Ans: 177.8673
x2 1
6. 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
1
dx
7. Evaluate 1 x
0
taking seven ordinates by applying Simpson’s 3/8th rule. Hence deduce the
value of loge 2 . Ans: 0.6932; loge 2 = 0.6932
1
dx
8. Evaluate 1 x
0
2 using
(i) Simpson’s 1/3rd rule taking four equal strips
(ii) Simpson’s 3/8th rule taking six equal strips
(iii) Weddle’s rule taking six equal strips
Hence compute an approximate value of in each case. Ans: 0.7854, 3.14156
1
xdx
1 x
th
9. Evaluate 2
by Simpson’s 1 3 rule and 3 8 rule taking seven ordinates and hence find
0
th
loge 2. Ans: 0.3287 using 3 8 rule
6
dx
th
10. Find the value of by Simpson’s 1 3 rule (or 3 8 ), Hence obtain approximate value of
2
x
loge 2 . Ans: 0.693
11. Given that
x 4 4.2 4.4 4.6 4.8 5 5.2
y log e x 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.
Also compare it with the exact value. Ans: a)1.8278472, b) 1.8278, Exact: 1.827822556
12. 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
Ans: 25.411 miles
13. Apply Simpson’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
Ans:11.5125 sq.units
y 0 2 2.5 2.3 2 1.7 1.5
14. A river is 80 feet wide. The depth d in feet at a distance ‘x’ foot 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
Dept. of Mathematics, BMSCE Page 7 of 8
Dept. of Maths., BMSCE Unit 2: Vector Calculus
15. 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 fts 1
47 58 64 65 61 52 38
Estimate the time taken to travel 60 ft by using Simpson’s 1 3 rd rule. Ans: 1.0635s
16. The velocity v(km/min) of a moped which starts from rest, is given at fixed intervals of time
t(min) as follows:
t 2 4 6 8 10 12 14 16 18 20
v 10 18 25 29 32 20 11 5 2 0
Estimate approximately the distance covered in 20 minutes. Ans: 292 km
17. A curve is drawn to pass through the points given by the following table:
x 1 1.5 2 2.5 3 3.5 4
y 2 2.4 2.7 2.8 3 2.6 2.1
th
Apply Simpson’s 1 3 rule (or 3 8 ) estimate the area bounded by the curve, the x-axis and the
lines x 1, x 4 . Ans: 7.8375
18. The following table gives the velocity v of a particle at time t :
t sec 0 2 4 6 8 10 12
v m / sec 4 6 16 34 60 94 136
Find the distance moved by the particle in 12 seconds.
Ans: 552 m.
19. Given that
x 4 4.2 4.4 4.6 4.8 5 5.2
y log e x 1.3863 1.4351 1.4816 1.5261 1.5686 1.6094 1.6487
5.2
Evaluate I log xdx by Weddle’s rule.
4
Ans: 1.8278
20. A curve is drawn to pass through the points given by the following table:
x 1 1.5 2 2.5 3 3.5 4
y 2 2.4 2.7 2.8 3 2.6 2.1
Apply Weddle’s rule, estimate the area bounded by the curve, the x-axis and the lines x 1, x 4
. Ans:7.74 sq.units
21. A river is 80 feet wide. The depth d in feet at a distance x feet from one bank is given by
𝑥 0 10 20 30 40 50 60 70 80
Find approximately the area of cross section of
𝑦 0 4 7 9 12 15 14 8 3
the river. Ans: 710 sq.feet
22. 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. ` Ans: 233.616 sq. inches
Page 8 of 8