By the end of this chapter, you will be able to:
Mastering these skills will help you solve real-world engineering problems involving complex numbers with confidence and precision.
In industrial control and installation, engineers frequently encounter situations where values must be estimated between measured data points or forecasted beyond available data. Numerical methods such as interpolation and extrapolation are essential tools for process monitoring, calibration, and predictive maintenance. Mastery of these techniques enables Kenyan professionals to make accurate decisions in automation, instrumentation, and system optimization for factories, water treatment plants, and other industrial environments.
Interpolation is a numerical method used to estimate unknown values that fall within the range of known data points. In industrial control, this technique is valuable for calibrating sensors, adjusting set points, and predicting intermediate readings when direct measurement is not possible.
The basic formula for linear interpolation between two points \((x_0, y_0)\) and \((x_1, y_1)\) is:$$ y = y_0 + \frac{(x, x_0)(y_1 - y_0)}{x_1 - x_0} $$
Example 1:
A temperature sensor in a Nairobi bottling plant records 22°C at 10:00 and 28°C at 12:00. Estimate the temperature at 11:00.
Given: \(x_0 = 10\), \(y_0 = 22\)°C, \(x_1 = 12\), \(y_1 = 28\)°C, \(x = 11\)$$ y = y_0 + \frac{(x, x_0)(y_1 - y_0)}{x_1 - x_0} $$$$ y = 22 + \frac{(11 - 10)(28 - 22)}{12 - 10} $$$$ y = 22 + \frac{1 \times 6}{2} $$$$ y = 22 + 3 $$ Answer: 25°C
Example 2:
A pressure gauge in a water treatment plant reads 150 kPa at 8:00 and 210 kPa at 10:00. Find the pressure at 9:00.
Given: \(x_0 = 8\), \(y_0 = 150\) kPa, \(x_1 = 10\), \(y_1 = 210\) kPa, \(x = 9\)$$ y = 150 + \frac{(9 - 8)(210 - 150)}{10 - 8} $$$$ y = 150 + \frac{1 \times 60}{2} $$$$ y = 150 + 30 $$ Answer: 180 kPa
Example 3:
A voltage sensor in a university lab records 4.5 V at 2 seconds and 6.0 V at 5 seconds. Estimate voltage at 3 seconds.
Given: \(x_0 = 2\), \(y_0 = 4.5\) V, \(x_1 = 5\), \(y_1 = 6.0\) V, \(x = 3\)$$ y = 4.5 + \frac{(3 - 2)(6.0 - 4.5)}{5 - 2} $$$$ y = 4.5 + \frac{1 \times 1.5}{3} $$$$ y = 4.5 + 0.5 $$ Answer: 5.0 V
Example 4:
A SACCO office’s air conditioning system records humidity levels of 55% at 14:00 and 65% at 16:00. Estimate humidity at 15:00.
Given: \(x_0 = 14\), \(y_0 = 55\)%, \(x_1 = 16\), \(y_1 = 65\)%, \(x = 15\)$$ y = 55 + \frac{(15 - 14)(65 - 55)}{16 - 14} $$$$ y = 55 + \frac{1 \times 10}{2} $$$$ y = 55 + 5 $$ Answer: 60%
Example 5:
A hospital generator’s fuel consumption is 15 L at 10:00 and 22 L at 13:00. Estimate consumption at 11:30.
Given: \(x_0 = 10\), \(y_0 = 15\) L, \(x_1 = 13\), \(y_1 = 22\) L, \(x = 11.5\)$$ y = 15 + \frac{(11.5 - 10)(22 - 15)}{13 - 10} $$$$ y = 15 + \frac{1.5 \times 7}{3} $$$$ y = 15 + 3.5 $$ Answer: 18.5 L
Extrapolation estimates values outside the range of known data points. This method is useful for predicting future trends, forecasting maintenance schedules, and anticipating system performance in Kenyan industrial settings.
The formula for linear extrapolation using two points \((x_0, y_0)\) and \((x_1, y_1)\) is:$$ y = y_0 + \frac{(x, x_0)(y_1 - y_0)}{x_1 - x_0} $$ where \(x\) is outside the interval \([x_0, x_1]\).
Example 1:
A Nairobi factory records machine vibration levels of 80 units at 8:00 and 120 units at 10:00. Predict the vibration level at 12:00.
Given: \(x_0 = 8\), \(y_0 = 80\) units, \(x_1 = 10\), \(y_1 = 120\) units, \(x = 12\)$$ y = 80 + \frac{(12 - 8)(120 - 80)}{10 - 8} $$$$ y = 80 + \frac{4 \times 40}{2} $$$$ y = 80 + 80 $$ Answer: 160 units
Example 2:
A water treatment plant’s chlorine levels are 2 mg/L at 6:00 and 5 mg/L at 8:00. Forecast the level at 9:00.
Given: \(x_0 = 6\), \(y_0 = 2\) mg/L, \(x_1 = 8\), \(y_1 = 5\) mg/L, \(x = 9\)$$ y = 2 + \frac{(9 - 6)(5 - 2)}{8 - 6} $$$$ y = 2 + \frac{3 \times 3}{2} $$$$ y = 2 + 4.5 $$ Answer: 6.5 mg/L
Example 3:
A university lab records a voltage of 10 V at 1 s and 18 V at 3 s. Estimate the voltage at 4 s.
Given: \(x_0 = 1\), \(y_0 = 10\) V, \(x_1 = 3\), \(y_1 = 18\) V, \(x = 4\)$$ y = 10 + \frac{(4 - 1)(18 - 10)}{3 - 1} $$$$ y = 10 + \frac{3 \times 8}{2} $$$$ y = 10 + 12 $$ Answer: 22 V
Example 4:
A county government office’s power consumption is 50 kWh at 10:00 and 90 kWh at 13:00. Predict consumption at 15:00.
Given: \(x_0 = 10\), \(y_0 = 50\) kWh, \(x_1 = 13\), \(y_1 = 90\) kWh, \(x = 15\)$$ y = 50 + \frac{(15 - 10)(90 - 50)}{13 - 10} $$$$ y = 50 + \frac{5 \times 40}{3} $$$$ y = 50 + 66.67 $$ Answer: 116.67 kWh
Example 5:
A retail business tracks refrigeration temperature: 3°C at 6:00 and 7°C at 8:00. Estimate the temperature at 10:00.
Given: \(x_0 = 6\), \(y_0 = 3\)°C, \(x_1 = 8\), \(y_1 = 7\)°C, \(x = 10\)$$ y = 3 + \frac{(10 - 6)(7 - 3)}{8 - 6} $$$$ y = 3 + \frac{4 \times 4}{2} $$$$ y = 3 + 8 $$ Answer: 11°C
Polynomial interpolation estimates values using higher-order polynomials, especially when more than two data points are available. Lagrange interpolation is commonly used in industrial calibration and control when precision is required.
For three points \((x_0, y_0)\), \((x_1, y_1)\), \((x_2, y_2)\), the Lagrange formula is:$$ y(x) = y_0 \frac{(x, x_1)(x, x_2)}{(x_0 - x_1)(x_0 - x_2)} + y_1 \frac{(x, x_0)(x, x_2)}{(x_1 - x_0)(x_1 - x_2)} + y_2 \frac{(x, x_0)(x, x_1)}{(x_2 - x_0)(x_2 - x_1)} $$
Example 1:
A water treatment plant’s sensor records 10 ppm at 8:00, 15 ppm at 9:00, and 20 ppm at 10:00. Estimate at 8:30.
Given:
\(x_0 = 8\), \(y_0 = 10\) ppm
\(x_1 = 9\), \(y_1 = 15\) ppm
\(x_2 = 10\), \(y_2 = 20\) ppm
\(x = 8.5\)$$
y(8.5) = 10 \frac{(8.5 - 9)(8.5 - 10)}{(8 - 9)(8 - 10)} + 15 \frac{(8.5 - 8)(8.5 - 10)}{(9 - 8)(9 - 10)} + 20 \frac{(8.5 - 8)(8.5 - 9)}{(10 - 8)(10 - 9)}
$$$$
y(8.5) = 10 \frac{(-0.5)(-1.5)}{(-1)(-2)} + 15 \frac{(0.5)(-1.5)}{(1)(-1)} + 20 \frac{(0.5)(-0.5)}{(2)(1)}
$$$$
y(8.5) = 10 \frac{0.75}{2} + 15 \frac{-0.75}{-1} + 20 \frac{-0.25}{2}
$$$$
y(8.5) = 10 \times 0.375 + 15 \times 0.75 + 20 \times -0.125
$$$$
y(8.5) = 3.75 + 11.25 - 2.5
$$
Answer: 12.5 ppm
Example 2:
A university lab records voltages: 2 V at 1 s, 5 V at 2 s, 10 V at 4 s. Estimate at 3 s.
Given:
\(x_0 = 1\), \(y_0 = 2\) V
\(x_1 = 2\), \(y_1 = 5\) V
\(x_2 = 4\), \(y_2 = 10\) V
\(x = 3\)$$
y(3) = 2 \frac{(3-2)(3-4)}{(1-2)(1-4)} + 5 \frac{(3-1)(3-4)}{(2-1)(2-4)} + 10 \frac{(3-1)(3-2)}{(4-1)(4-2)}
$$$$
y(3) = 2 \frac{(1)(-1)}{(-1)(-3)} + 5 \frac{(2)(-1)}{(1)(-2)} + 10 \frac{(2)(1)}{(3)(2)}
$$$$
y(3) = 2 \frac{-1}{3} + 5 \frac{-2}{-2} + 10 \frac{2}{6}
$$$$
y(3) = 2 \times -0.333 + 5 \times 1 + 10 \times 0.333
$$$$
y(3) = -0.666 + 5 + 3.33
$$
Answer: 7.66 V
Example 3:
A county government office measures power consumption: 100 kWh at 8:00, 150 kWh at 10:00, 250 kWh at 14:00. Estimate at 12:00.
Given:
\(x_0 = 8\), \(y_0 = 100\) kWh
\(x_1 = 10\), \(y_1 = 150\) kWh
\(x_2 = 14\), \(y_2 = 250\) kWh
\(x = 12\)$$
y(12) = 100 \frac{(12-10)(12-14)}{(8-10)(8-14)} + 150 \frac{(12-8)(12-14)}{(10-8)(10-14)} + 250 \frac{(12-8)(12-10)}{(14-8)(14-10)}
$$$$
y(12) = 100 \frac{(2)(-2)}{(-2)(-6)} + 150 \frac{(4)(-2)}{(2)(-4)} + 250 \frac{(4)(2)}{(6)(4)}
$$$$
y(12) = 100 \frac{-4}{12} + 150 \frac{-8}{-8} + 250 \frac{8}{24}
$$$$
y(12) = 100 \times -0.333 + 150 \times 1 + 250 \times 0.333
$$$$
y(12) = -33.33 + 150 + 83.33
$$
Answer: 200 kWh
Newton’s forward difference interpolation is used for equally spaced data points, often in industrial automation logs. The formula for Newton’s forward difference is:$$
y(x) = y_0 + p \Delta y_0 + \frac{p(p-1)}{2!} \Delta^2 y_0 + \frac{p(p-1)(p-2)}{3!} \Delta^3 y_0 + \ldots
$$
where
\(p = \frac{x, x_0}{h}\),
\(h =\) interval between \(x\) values.
Example 1:
A factory automation log records temperature: 20°C at 0 min, 22°C at 10 min, 25°C at 20 min, 29°C at 30 min. Estimate temperature at 15 min.
Given:
\(x_0 = 0\), \(y_0 = 20\)°C
\(h = 10\) min
\(x = 15\), \(p = \frac{15-0}{10} = 1.5\)
First differences:
\(\Delta y_0 = 22 - 20 = 2\)
\(\Delta y_1 = 25 - 22 = 3\)
\(\Delta y_2 = 29 - 25 = 4\)
Second differences:
\(\Delta^2 y_0 = 3 - 2 = 1\)
\(\Delta^2 y_1 = 4 - 3 = 1\)
Third difference:
\(\Delta^3 y_0 = 1 - 1 = 0\)$$
y(15) = 20 + 1.5 \times 2 + \frac{1.5 \times 0.5}{2} \times 1 + \frac{1.5 \times 0.5 \times -0.5}{6} \times 0
$$$$
y(15) = 20 + 3 + 0.375 + 0
$$
Answer: 23.375°C
Example 2:
A university lab records voltages: 2 V at 0 s, 4 V at 1 s, 7 V at 2 s, 11 V at 3 s. Estimate voltage at 1.5 s.
Given:
\(x_0 = 0\), \(y_0 = 2\) V
\(h = 1\) s
\(x = 1.5\), \(p = 1.5\)
First differences:
\(\Delta y_0 = 4 - 2 = 2\)
\(\Delta y_1 = 7 - 4 = 3\)
\(\Delta y_2 = 11 - 7 = 4\)
Second differences:
\(\Delta^2 y_0 = 3 - 2 = 1\)
\(\Delta^2 y_1 = 4 - 3 = 1\)
Third difference:
\(\Delta^3 y_0 = 1 - 1 = 0\)$$
y(1.5) = 2 + 1.5 \times 2 + \frac{1.5 \times 0.5}{2} \times 1 + \frac{1.5 \times 0.5 \times -0.5}{6} \times 0
$$$$
y(1.5) = 2 + 3 + 0.375 + 0
$$
Answer: 5.375 V
Example 3:
A county government office measures power: 100 kWh at 0 hr, 120 kWh at 2 hr, 155 kWh at 4 hr, 210 kWh at 6 hr. Estimate at 3 hr.
Given:
\(x_0 = 0\), \(y_0 = 100\) kWh
\(h = 2\) hr
\(x = 3\), \(p = 1.5\)
First differences:
\(\Delta y_0 = 120 - 100 = 20\)
\(\Delta y_1 = 155 - 120 = 35\)
\(\Delta y_2 = 210 - 155 = 55\)
Second differences:
\(\Delta^2 y_0 = 35 - 20 = 15\)
\(\Delta^2 y_1 = 55 - 35 = 20\)
Third difference:
\(\Delta^3 y_0 = 20 - 15 = 5\)$$
y(3) = 100 + 1.5 \times 20 + \frac{1.5 \times 0.5}{2} \times 15 + \frac{1.5 \times 0.5 \times -0.5}{6} \times 5
$$$$
y(3) = 100 + 30 + 3.75 + (-0.3125)
$$$$
y(3) = 100 + 30 + 3.75 - 0.3125
$$$$
y(3) = 133.4375
$$
Answer: 133.44 kWh
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter explored the concepts and practical uses of numerical methods in civil engineering, focusing on interpolation and extrapolation. Students learned how interpolation estimates unknown values within a range of known data, while extrapolation predicts values outside that range. Several methods were applied to real-world scenarios, such as calculating material quantities and predicting measurements for construction projects. The chapter also covered interactive techniques for solving equations, demonstrating how iterative approaches like the bisection and Newton-Raphson methods are used to find roots of complex engineering equations. Additionally, interactive methods were applied to determine areas and volumes, which is essential for tasks like earthworks and concrete calculations. Through extensive worked examples and calculation-based practice, students gained proficiency in applying these numerical tools to engineering challenges. By mastering these methods, learners are equipped to handle both routine and advanced computational tasks in civil engineering projects.
Given:
At \(40^\circ C\), \(R_1 = 420\,\Omega\); at \(50^\circ C\), \(R_2 = 380\,\Omega\).
\(T_1 = 40^\circ C\), \(T_2 = 50^\circ C\), \(T = 45^\circ C\)
Formula:
Linear interpolation:$$
R = R_1 + \frac{(T - T_1)}{(T_2 - T_1)} \times (R_2 - R_1)
$$
Substitute:$$ R = 420 + \frac{(45 - 40)}{(50 - 40)} \times (380 - 420) $$
Calculate numerator and denominator:$$ R = 420 + \frac{5}{10} \times (-40) $$
Calculate fraction:$$ R = 420 + 0.5 \times (-40) $$
Multiply:$$ R = 420 - 20 $$
Final answer:$$ \boxed{R = 400\,\Omega} $$
Given:
At \(t_1 = 10:00\), \(P_1 = 2.1\) MPa;
At \(t_2 = 14:00\), \(P_2 = 2.9\) MPa;
\(t = 12.5\) (12:30 pm)
Formula:$$ P = P_1 + \frac{(t, t_1)}{(t_2 - t_1)} \times (P_2 - P_1) $$
Convert times to hours:
\(t_1 = 10\), \(t_2 = 14\), \(t = 12.5\)
Substitute:$$ P = 2.1 + \frac{(12.5 - 10)}{(14 - 10)} \times (2.9 - 2.1) $$
$$ P = 2.1 + \frac{2.5}{4} \times 0.8 $$
$$ P = 2.1 + 0.625 \times 0.8 $$
$$ P = 2.1 + 0.5 $$
Final answer:$$ \boxed{P = 2.6\,\text{MPa}} $$
At a cement packaging plant in Athi River, the temperature of a control room is recorded at 8 am as 22°C and at 12 pm as 30°C. Use linear interpolation to estimate the temperature at 10 am. (4 marks)
The resistance values of a thermistor in an industrial oven are recorded as follows: at 40°C, \(R = 320 \ \Omega\); at 60°C, \(R = 210 \ \Omega\). Estimate the resistance at 50°C using interpolation. (4 marks)
At the start of this chapter we promised you would be able to:
Tick each one you can genuinely do.
So, are you there yet?
You're competent when you can confidently do 50% or more of what this chapter promised.
Sign in to record how you're doing.