SME
Numerical Methods for Engineers · Problem type
Integrating tabulated data
Use this for “A car’s speed, read every 10 s, is 4, 12, 20 and 24 m/s. Estimate the distance it covers with the trapezoid rule.”
Table
Time step (h)
(s)
Distance (D)
(m)
This is an example. Type your own values to start a new problem.
D (m)
=
h (s)
×
v₀ (m/s)
+
v₃ (m/s)
2
+
h (s)
×
(
v₁ (m/s)
+
v₂ (m/s)
)
Formulas
D
=
h
×
(
v₀
2
+
v₁
+
v₂
+
v₃
2
)
460
=
10
×
(
4
2
+
12
+
20
+
24
2
)
Assumptions
•
Four speeds read h apart; the trapezoid rule joins them with straight lines.
•
The distance is the area under the speed–time curve, the speed never below 0.
•
With uneven spacing, add each strip’s own trapezoid instead.
Step-by-step
WE KNOW
v₀ = 4 m/s, v₁ = 12 m/s, v₂ = 20 m/s, v₃ = 24 m/s, h = 10 s
FIND
distance (D)
Step 1 · Find distance (D)
Use D = h × (v₀ ÷ 2 + v₁ + v₂ + v₃ ÷ 2)
Each
strip
is
a
trapezoid,
h
times
the
mean
of
its
end
speeds:
the
ends
count
half,
the
inner
speeds
whole.
D
=
10
×
(
4
2
+
12
+
20
+
24
2
)
D
=
10
×
(2
+
12
+
20
+
12)
D
=
10
×
46
D
=
460
m
Check
Put the numbers back in. Both sides should match.
460
=
10
×
(
4
2
+
12
+
20
+
24
2
)
✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.
Related lessons
Numerical integration
Main lesson
Error of the trapezoid rule
Use this for “Estimate the trapezoid rule’s error for x³ from 0 to 2 with 4 panels, taking the average f″ as 6.”
Two-point Gauss quadrature
Use this for “Estimate the integral of x³ from 0 to 2 with two-point Gauss quadrature and compare it with the exact value.”