Question Bank: Numerical methods and programming(ES ME401)
Error and Interpolation
1. Find the interpolating polynomial from the given values, f(-1)=9, f(0)=5, f(2)=3,
f(5)=15 by using Lagrange’s interpolation formula.
2. Given some values of the function f(x)=1/x. Find 1/2.72 from f(2.7)=0.3704,
f(2.8)=0.3571, f(2.9)=0.3448 by using some suitable interpolation formula.
3. Evaluate the missing term from the following table
x 1 2 3 4 5
F(x) 7 --- 27 40 55
4. Define absolute error, relative error, and percentage error.
5. Evaluate the missing terms from the following table
x 0 1 2 3 4 5
F(x) 0 --- 8 15 ---- 35
6. Find the Equation of the curve passes through the point (0,3), (1,6), (2,11), (3,18).
7. the values of f(5.5) and f(7.2) from the following
x 5 6 7 8
f(x) 12 13 14 16
8. Use the following table to find 𝑙𝑜𝑔10 2.91 if 𝑓 𝑥 = 𝑙𝑜𝑔10 𝑥
x 2.0 2.2 2.4 2.6 2.8 3.0
f(x) 0.30103 0.34242 0.38021 0.41497 0.44716 0.47721
9. The speed of a rotating machine is measured as 1450 rpm, while the true speed is 1500 rpm.
On the basis of the measurement, calculate the absolute error, relative error, and percentage
error.
10. Find the missing terms in the following table
x 2 4 6 8 10
y 5.6 8.6 13.9 ------ 35.6
11. Evaluate 𝑓(1) if 𝑓 0 = 2, 𝑓 2 = 6, 𝑓 4 = 10, 𝑓 6 = 15 .
12. By using appropriate interpolation formula find f(5.5) from the following data table.
x 3 4 5 6
f(x) 6 24 60 120
13. Applying Lagrange’s interpolation formula find the functional value at x=4 using following
table.
x -1 0 2 3
f(x) -8 3 1 2
14. Show that ∆ − ∇ 𝑓 𝑥 = ∆∇𝑓 𝑥 . symbols obey their usual meaning.
∆f(x)
15. Show that, ∆ log f x = log 1 + f(x)
; symbols obey their usual meaning.
16. Find Lagrange’s interpolation polynomial passing through the set of points.
x 0 1 2
f(x) 4 3 6
∆2
17. Evaluate E
x 4 , when h = 1.
18. The values of f(x) corresponding to x are provided in the following table. By applying
Newton’s forward and backward interpolation formulas find the values of f(1.02) and f(1.28)
respectively.
x 1.00 1.10 1.20 1.30
f(x) 0.8415 0.8912 0.9320 0.9636
𝑑
19. Prove that 𝐸 ≡ 𝑒 𝐷 , 𝐷 ≡ 𝑑𝑥 .
Integrations
0
1) Evaluate −1
𝑥 𝑒 𝑥 𝑑𝑥 , by Trapezoidal rule taking 6 equal intervals correct to 4 decimal
places.
6 𝑑𝑥
2) Evaluate 0 1+𝑥 2
, by Trapezoidal rule taking 6 equal intervals.
4 2
3) Integrate numerically 0
𝑥 𝑑𝑥 by Simpson’s 1/3rd rule with 4 sub-intervals.
4) In a mechanical system, the non-dimensional velocity profile of a fluid flowing through a
channel is given by 𝑣 𝑥 = 1 − 𝑥 3 , where 𝑥 is the normalized position along the channel
length. Using the trapezoidal rule with 6 equal intervals, estimate the average velocity
1
integral: 0
1 − 𝑥 3 𝑑𝑥.
5
5) Find the value of 1 log10 𝑥 𝑑𝑥 taking eight equal sub-intervals correct upto 4-decimal place
by (i) Simpson 1/3 rule and by (ii) Trapezoidal rule.
1.6 1
6) Find the value of 1.2
𝑥 + 𝑥 𝑑𝑥, taking 4 equal subintervals correct upto 5-decimal place by
(i) Simpson 1/3 rule and by (ii) Trapezoidal rule.
0.6 𝑑𝑥
7) Evaluate 0
𝑑𝑥 , taking 6 equal intervals by (i) Simpson’s 1/3 rule and by (ii)
1−𝑥 2
Trapezoidal rule.
8) Compute 𝑥𝑒 𝑥 𝑑𝑥 where the interval is (-1,0) using Trapezoidal rule with taking n=6.
6 𝑑𝑥
9) Use Simpson’s 1/3rd rule to evaluate 0 (1+𝑥)2
taking 6 equal sub intervals of [0,6]
correct to three decimal places.
4 2
10) Integrate numerically 0
𝑥 𝑑𝑥 by Simpson’s 1/3 rd rule taking n=4.
1
11) Applying Trapezoidal rule, evaluate 0
𝑥 𝑑𝑥 taking 12 subintervals. State
geometrical representation of Trapezoidal rule.
1 1
12) Evaluate 0 1+𝑥
𝑑𝑥 by simpson’s 1/3rd rule taking eleven ordinates and hence find the
value of log 𝑒 2 correct up to four significant figures.
5
13) Find the value of 1
log10 𝑥 𝑑𝑥 taking four equal sub-intervals correct upto 4-decimal
place by (i) Simpson 1/3 rule and by (ii) Trapezoidal rule.
14) The speed, v meters per second, of a car, t seconds after it starts, is shown in the following
table:
t 0 12 24 36 48 60 72 84 96 108 120
v 0 3.60 10.08 18.90 21.60 18.54 10.26 5.40 4.50 5.40 9
Algebric equations
1) Using Newton-Raphson method, find a real root of the equation x4-x-1=0 correct to three
decimal places.
2) Using the method of bisection to compute a real root of x3-4x-1=0 between 2 and 3 upto 4
significant figures.
3) Find the smallest root of x3-3x-5=0 by Regula-Falsi method, correct to three significant
figure.
4
4) Using Newton-Raphson method, find the value of 13 correct upto four significant figures.
5) Give geometrical interpretation of Newton-Raphson method. Find the root of x4 + 12x + 7 = 0
in -2 and -3 correct to 4-decimal places by Newton-Raphson method.
6) Give geometrical interpretation of Regula-Falsi method. Find a root of x3 – 5x – 7= 0 that lies
between 2 and 3 by Regula-Falsi method.
7) Discuss geometrical interpretation of Bisection method. Using the method of bisection
compute a root of x3 – x2 – 1= 0 .
3
8) Evaluate 21 using Newton-Raphson method.
9) Using Bisection method and Regula Falsi method compute a root of 𝑥 3 − 9𝑥 + 1 = 0
between 2 and 3.
10) Find the root of 𝑥 3 − 4 = 0 in the interval (1,2) using the bisection method.
11) Find a root of 𝑥 3 − 4𝑥 + 1 = 0 by Regula-Falsi method correct upto three decimal
places.
12) Find a root of 𝑥 3 − 5𝑥 − 7 = 0 by Regula-Falsi method, correct upto 4 decimal
places. State geometrical representation of Regula-Falsi method.
13) Find a root of 𝑥 4 − 𝑥 − 1 = 0 by Newton-Raphson method.
14) Find a root of the equation by bisection method𝑥 3 − 𝑥 − 2 = 0
15) Find a root of𝑥 3 − 𝑥 − 1 = 0 by Regula-Falsi method.
16) Find a root ofx 2 − 2 = 0by Newton-Raphson method.
System of linear equations
1) Solve 3x+2y=9.8; 2x + y = 5.5 by Gauss elimination method.
2) Solve 4x + 3y =20.91; 3x – y=6.94 by matrix inversion method.
3) Solve x+3y=5; 7x+2y= -3 by Gauss -seidel method.
4) Solve the following system of equations by Gauss-elimination method.
x + 2y+z =0, 2x + 2y +3z= 3, -x -3y = 2
5) Solve the system of equations – 2x + 3y +10z = 22, 10x + 2y + z = 9, 2x + 20y –2z = –44,
by Gauss-seidel method.
6) Solve the system of equations x + y +z = 9, 2x – 3y + 4z = 13, 3x + 4y +5z = 40, by Gauss
elimination method.
7) Solve by Gauss-Seidal iterative method:8x + y + z = 10, 2x + 7y + z = 8, x + y + 6z
=7
8) Solve the system by Gauss Elimination method:x+4y – 3z=0,2x - 3y + z = -1, 3x – y
=3
9) Solve using matrix inversion metod: 3x + y + z = 5, x + 4y + z = 6, x + y + 5z = 7
10) Solve the system by Gauss Elimination method: x + 4y – 3z = 0, 2x - 3y + z
= -1, 3x – y = 3
11) Check whether the following system of linear equations is solvable by Gauss-Seidel
method or not. If possible solve by Gauss-Seidal iterative method correct up to three
significant figure.
12) x +6y-2z=-1, 3x + y + 5z = 13, 5x-2y+z=-4
13) Solve the system by Gauss Elimination method:x +y+z=3, 2x+3y+z=7,
x+y+2z=4.
Solve using matrix inversion method:x+y+z=6, 2x+y+z=8, x+2y+z=9
Ordinary differential equations
1) Compute y(0.2), by Runge- Kutta method of 4th order from the differential equation
dy
dx
= x 2 + y, y(0) = 0.8 taking h= 0.2.
dy
2) Compute y(0.1), y(0.2), from the equation dx − 1 = y 2 , y(0) = 0 taking h=0.1 by Euler’s
method.
dy
3) Use Runge- Kutta method of 2nd order, to calculate y(0.2) for = x + y 2 , y 0 = 1, taking
dx
h=0.1.
dy
4) Compute y(0.05), y(0.10) from the equation dx − x 2 − y = 4 , y(0)=1, taking h=0.05 by
Euler’s method.
𝑑𝑦 𝑦−𝑥
5) Given 𝑑𝑥 = 𝑦+𝑥 , y(0)=1, find y(0.1) by Euler’s method, correct to 4 decimal places taking
step length h = 0.02.
6) Compute y(0.4), by Runge- Kutta method of 4th order from the differential equation
dy
dx
= x 2 + y, y(0)=0.8 taking h=0.2.
𝑑𝑦
7) Compute y(0.1), by Runge- Kutta method of 4th order from the equation = 𝑥2 +
𝑑𝑥
𝑦 2 , y(0)=1
𝑑𝑦
8) Use Runge- Kutta method of order 2 to calculate 𝑦(0.2) for the equation =𝑥+
𝑑𝑥
𝑦 2 , 𝑦 0 = 1, taking h=0.1.
𝑑𝑦
9) Compute 𝑦(0.1), 𝑦(0.2), 𝑦(0.3) from the equation − 1 = 𝑦 2 , 𝑦 0 = 0 taking
𝑑𝑥
= 0.1by Euler’s method.
10) Compute 𝑦 for 𝑥 = 0.1 by Euler’s method correct upto 4 decimal places taking step
𝑑𝑦 𝑦 −𝑥
length h=0.02 from the equation = 𝑦 +𝑥 , 𝑦 0 = 1
𝑑𝑥
11)
𝑑𝑦
Compute 𝑦(1.2), by Runge- Kutta method of 4th order from the equation = 𝑦2 +
𝑑𝑥
𝑥𝑦, 𝑦 1 = 1, taking h=0.1.
12) Compute 𝑦 0.1 , by Runge- Kutta method of 2nd order and 4th order from the
𝑑𝑦
equation = 𝑦 − 𝑥, 𝑦 0 = 2taking n=1.
𝑑𝑥
Programming
6 2
1) Write a C-Program to compute the value of definite integration 0
𝑥 𝑑𝑥 , using
Trapezoidal rule, taking six equal sub-intervals.
2) Write a C-Program to find a root of the equation x3-2x-5=0 , using Bisection method, that lies
in the interval (2, 3).
3) Write a C-Program to find a root of the equation x3-x-4=0 , using Regula-Falsi method, that
lies in the interval (1, 2).
𝑑𝑦
4) Write a C-Program to find the value of y(1) for the differential equation = 𝑥𝑦,
𝑑𝑥
y(0) = 1 using Euler’s method with a step length h=0.2.
5) Write an algorithm and a C-Program to find a root of the equation x3-9x+1=0 , using Newton-
Raphson method, that lies in the interval (2, 3).
6) Write an algorithm and a C-Program to compute the value of definite integration
1 1
0 1+𝑥 2
𝑑𝑥 , using Simpson’s one third rule, taking 12 equal subintervals.
1 3
7) Write program in ‘C’ to evaluate 0
(𝑥 + 1) 𝑑𝑥 taking n=5 by using Trapezoidal
rule.
𝑑𝑦
8) Write C program to compute 𝑦(1), from = 𝑥𝑦 + 𝑥 , 𝑦 0 = 1 taking = 0.1 by
𝑑𝑥
Euler’s method.
9) Write a program in ‘C’ to find a root of the equation 3𝑥 2 + 2𝑥 − 9 = 0by Newton
Raphson method.
10) Write a program in ‘C’ to find a root of the equation 𝑥 3 − 4𝑥 + 1 = 0 by bisection
method.
2 2 𝑥 1
11) Write algorithm and program in ‘C’ to evaluate 1
𝑥 𝑒 𝑑𝑥 using Simpson’s 3rd rule
for 𝑛 = 6.
12) Write algorithm and program in ‘C’ toCompute 𝑦(1.3), by Runge- Kutta method of
𝑑𝑦 𝑦 1
4th order from the equation𝑑𝑥 + 𝑥 = 𝑥 2 , 𝑦 1 = 1 taking h=0.1.
13) Find the positive real root of method 𝑥 3 − 𝑥 − 1 = 0 using Newton Raphson method correct
up to four decimal places.