CPB 20203 NUMERICAL METHOD
TUTORIAL 2
CURVE FITTING, INTERPOLATION & NUMERICAL DIFFERENTIATION
Curve Fitting : Linear Least-Squares & Nonlinear Regression
1) Fit a parabola to the data below.
x 0.75 2 2.5 4 6 8 8.5
y 0.8 1.3 1.2 1.6 1.7 1.8 1.7
2) The heat transfer coefficient (ℎ) in a forced convection heat transfer in cross-flow
past a cylinder at room temperature is found to vary with the velocity of the fluid
(𝑣) flowing past the cylinder as follows :
𝑣𝑖 (𝑚/𝑠) 2 4 6 8
𝑤 6000 10000 13000 15000
ℎ𝑖 ( 2 )
𝑚 −𝐾
i. Find a linear equation between ℎ & 𝑣.
ii. Find the least-squares quadratic equation.
3) The efficiency (𝜂) of a reaction turbine is found to vary with the output power
(𝑝) and the head (ℎ) as follows :
𝑝𝑖 (1000ℎ𝑝) 21 30 42 32 43 54 52 62 80
ℎ𝑖 (𝑚𝑒𝑡𝑒𝑟) 240 240 240 330 325 325 430 430 430
𝜂𝑖 (%) 75 80 85 75 80 84 75 80 85
Develope a linear relationship between the variables 𝜂, ℎ & 𝑝.
Lagrange and Newton Interpolations Method
1. Given 𝑔(𝑥) = 𝑒 −𝑥 and
𝑥 0.90 0.91 0.92 0.93 0.94
𝑔(𝑥) 0.4066 0.4025 0.3985 0.3946 0.3906
use the linear interpolation to estimate 𝑒 −0.912 𝑎𝑛𝑑 𝑒 −0.934.
2. Find a quadratic polynomial using the given points :
(𝑥1 , 𝑦1 ) = (−2,4), (𝑥2 , 𝑦2 ) = (0,2) & (𝑥3 , 𝑦3 ) = (2,8).
Then estimate the value of y for x=1.
CPB 20203 NUMERICAL METHOD
TUTORIAL 2
CURVE FITTING, INTERPOLATION & NUMERICAL DIFFERENTIATION
1
3. Given a simple function 𝑦 = 𝑥. Compute the values of y at 𝑥 = 3.35, 3.4, 3.5 & 3.6.
Then use
(a) Newton interpolating polynomials of degree 1, 2 & 3,
(b) Lagrange interpolating polynomials of degree 1, 2 & 3,
1
to interpolate 𝑦 = 𝑥 at 𝑥 = 3.44 respectively.
4. Given these data
𝑥 1.6 2 2.5 3.2 4 4.5
𝑓(𝑥) 2 8 14 15 8 2
Calculate 𝑓(2.8) using Lagrange’
Numerical Differentiation
5. Given
𝑥 1.8 1.9 2.0 2.1 2.2
𝑓(𝑥) 10.8894 12.7032 14.7781 17.1489 19.8550
Use forward and backward difference approximations of 𝑂(ℎ) and a cntered
difference of 𝑂(ℎ2 ) to estimate 𝑓 ′ (2.0) using step size of ℎ = 0.1 𝑎𝑛𝑑 ℎ = 0.1.
6. Use centered difference approximation to estimate the first and second derivatives
of 𝑓(𝑥) = 𝑒 𝑥 at 𝑥 = 1 for ℎ = 0.1.
7. Given 𝑓(𝑥) = 𝑥𝑒 𝑥 & ℎ = 0.1. Approximate 𝑓"(2.0) using centered difference of
accuracy 𝑂(ℎ4 ).
8. Given the following data
𝑥 1.00 1.05 1.10 1.15 1.20 1.25 1.30
𝑓(𝑥) 1.00000 1.02470 1.04881 1.07238 1.09545 1.11803 1.14018