Back to section

NavArch Handbook

Chapter 1 / Section 1.3

Numerical integration: trapezoidal and Simpson's rules

Ship curves are given as tabulated ordinates; their areas, moments and volumes are found numerically. The full treatment of Simpson's rules with multipliers, half-stations and a worked waterplane example is in Section 4.5; this section gives the mathematical basis, the error behaviour, Tchebycheff's rule and the rules of choice.

Trapezoidal rule

Joins successive ordinates by straight lines:

A=h(12y0+y1+⋯+yn−1+12yn)A = h\left(\tfrac{1}{2}y_0 + y_1 + \dots + y_{n-1} + \tfrac{1}{2}y_n\right)A=h(21​y0​+y1​+⋯+yn−1​+21​yn​)

Error of order h2h^2h2: E≈−(b−a) h212 f′′‾E \approx -\dfrac{(b-a)\,h^2}{12}\,\overline{f''}E≈−12(b−a)h2​f′′​. Exact for straight lines; underestimates areas under convex (concave-down) curves such as GZ curves and waterlines — therefore conservative for stability areas.

Simpson's first rule

Fits a parabola through each three consecutive ordinates:

A=h3(y0+4y1+2y2+⋯+4yn−1+yn),n evenA = \frac{h}{3}\left(y_0 + 4y_1 + 2y_2 + \dots + 4y_{n-1} + y_n\right), \quad n \text{ even}A=3h​(y0​+4y1​+2y2​+⋯+4yn−1​+yn​),n even

Error of order h4h^4h4: E≈−(b−a) h4180 f(4)‾E \approx -\dfrac{(b-a)\,h^4}{180}\,\overline{f^{(4)}}E≈−180(b−a)h4​f(4)​. Exact for polynomials up to the third degree.

Simpson's second rule

Cubic through four ordinates; nnn a multiple of 3:

A=3h8(y0+3y1+3y2+2y3+⋯+yn)A = \frac{3h}{8}\left(y_0 + 3y_1 + 3y_2 + 2y_3 + \dots + y_n\right)A=83h​(y0​+3y1​+3y2​+2y3​+⋯+yn​)

Combining rules

For an awkward number of intervals, split the range: e.g. 7 intervals = 4 (first rule) + 3 (second rule). The 5–8–minus-1 rule gives the area between the first two of three ordinates (Section 4.5).

Tchebycheff's rule

Ordinates are placed at prescribed unequal positions so that all multipliers are equal to one; the area is simply the mean ordinate times the length:

A=Ln∑i=1nyiA = \frac{L}{n}\sum_{i=1}^{n} y_iA=nL​i=1∑n​yi​

with the ordinates at the positions ±xi\pm x_i±xi​ (as a fraction of the half-length, measured from the midpoint) given in the table. Used for displacement and GZ-area checks where few ordinates are available, and historically in stability cross-curve work.

Which rule to use

SituationRule
Waterplanes, sectional area curves, Bonjean areasSimpson's first (10 or 20 intervals, half-stations at the ends)
GZ-curve areas for IS Code criteria (10° steps)Simpson's second for 0–30°, first for 0–40° (Section 5.5)
GZ-curve areas at 5° or finer stepsTrapezoidal is acceptable (and conservative)
Rapid check with few ordinatesTchebycheff
Strongly curved ends (bow, stern)Half-stations or separate integration of the end portions

Moments and centroids by the same table

Multiplying each product SMi yiSM_i\,y_iSMi​yi​ by the lever iii (and i2i^2i2) gives first and second moments — Section 4.6.

Formulas

01Trapezoidal rule
A=h(y0+yn2+∑i=1n−1yi)A = h\left(\frac{y_0 + y_n}{2} + \sum_{i=1}^{n-1} y_i\right)A=h(2y0​+yn​​+i=1∑n−1​yi​)
SymbolDescriptionUnit
AAAArea under the curve(unit of y) × m
hhhCommon intervalm
yiy_iyi​Ordinate im (or as given)
nnnNumber of intervals-

Result unit m²

02Trapezoidal rule error estimate
E≈−(b−a) h212 f′′‾E \approx -\frac{(b-a)\,h^2}{12}\,\overline{f''}E≈−12(b−a)h2​f′′​
SymbolDescriptionUnit
b−ab-ab−aLength of the integration rangem
f′′‾\overline{f''}f′′​Mean second derivative of the curve1/m

Result unit m²

Negative error (underestimate) for concave-down curves.

03Simpson's first rule
A=h3∑i=0nSMi yi,SM=1,4,2,4,…,2,4,1(n even)A = \frac{h}{3}\sum_{i=0}^{n} SM_i\, y_i, \qquad SM = 1,4,2,4,\dots,2,4,1 \quad (n \text{ even})A=3h​i=0∑n​SMi​yi​,SM=1,4,2,4,…,2,4,1(n even)

Result unit m²

Full treatment and worked example: Section 4.5.

04Simpson's first rule error estimate
E≈−(b−a) h4180 f(4)‾E \approx -\frac{(b-a)\,h^4}{180}\,\overline{f^{(4)}}E≈−180(b−a)h4​f(4)​

Result unit m²

Exact for cubic polynomials.

05Simpson's second rule
A=3h8∑i=0nSMi yi,SM=1,3,3,2,3,3,2,…,3,3,1(n=3k)A = \frac{3h}{8}\sum_{i=0}^{n} SM_i\, y_i, \qquad SM = 1,3,3,2,3,3,2,\dots,3,3,1 \quad (n = 3k)A=83h​i=0∑n​SMi​yi​,SM=1,3,3,2,3,3,2,…,3,3,1(n=3k)

Result unit m²

06Tchebycheff's rule
A=Ln∑i=1nyi,yi read at xi=±ci⋅L2 from the midpointA = \frac{L}{n}\sum_{i=1}^{n} y_i, \qquad y_i \text{ read at } x_i = \pm c_i \cdot \frac{L}{2} \text{ from the midpoint}A=nL​i=1∑n​yi​,yi​ read at xi​=±ci​⋅2L​ from the midpoint
SymbolDescriptionUnit
LLLTotal length of the rangem
nnnNumber of ordinates-
cic_ici​Tchebycheff spacing coefficients (table)-

Result unit m²

Tables

Tchebycheff ordinate positions (fraction of the half-length from the midpoint)

Number of ordinates nPositions ± c_i
20.5773
30, 0.7071
40.1876, 0.7947
50, 0.3745, 0.8325
60.2666, 0.4225, 0.8662
70, 0.3239, 0.5297, 0.8839
90, 0.1679, 0.5288, 0.6010, 0.9116
100.0838, 0.3127, 0.5000, 0.6873, 0.9162
Source: Rawson & Tupper, Basic Ship Theory, 5th ed. (2001), Vol. 1 Ch. 2 (Tchebycheff's rules). Values to 4 decimals; verify against the source before use in approval work.

No equal-weight (Tchebycheff) rule with real ordinate positions exists for n = 8; use 7 or 9 ordinates.

Comparison of integration rules on the test curve y = x(10 − x), 0 ≤ x ≤ 10 (exact area 166.667)

RuleOrdinates usedResultError
Trapezoidal, h = 50, 25, 0125.0−25.0 %
Trapezoidal, h = 2.50, 18.75, 25, 18.75, 0156.25−6.25 %
Trapezoidal, h = 111 ordinates165.0−1.0 %
Simpson first, h = 50, 25, 0166.6670 (exact: parabola)
Simpson second, h = 10/30, 22.22, 22.22, 0166.6670
Tchebycheff, n = 2y at x = 5 ± 2.887: 16.667, 16.667166.6670
Source: Computed; demonstrates that Simpson's rules are exact for parabolas and that the trapezoidal rule converges as h².

Examples

#01

Displacement by Tchebycheff's 5-ordinate rule

Worked example

Problem

The sectional area curve of a 60 m barge-like hull is read at the five Tchebycheff positions. With the midpoint at x=30x = 30x=30 m and half-length 30 m, the positions are 30±0.3745×30=18.7730 \pm 0.3745 \times 30 = 18.7730±0.3745×30=18.77 and 41.2441.2441.24 m, 30±0.8325×30=5.0330 \pm 0.8325 \times 30 = 5.0330±0.8325×30=5.03 and 54.9854.9854.98 m, and 30 m. Areas read [m²]: 12.4 (5.03 m), 36.8 (18.77 m), 40.8 (30 m), 35.9 (41.24 m), 9.6 (54.98 m). Find the displacement volume.

Solution

∇=Ln∑yi=605 (12.4+36.8+40.8+35.9+9.6)=12×135.5=1626 m3\nabla = \frac{L}{n}\sum y_i = \frac{60}{5}\,(12.4 + 36.8 + 40.8 + 35.9 + 9.6) = 12 \times 135.5 = 1626\ \text{m}^3∇=nL​∑yi​=560​(12.4+36.8+40.8+35.9+9.6)=12×135.5=1626 m3

ΔSW=1.025×1626=1667\Delta_{SW} = 1.025 \times 1626 = 1667ΔSW​=1.025×1626=1667 t. Compare with the Simpson result for the same hull in Example 4.10 (1595 m³ at a different, trimmed waterline) — the two are not directly comparable, but the order of magnitude confirms the reading. Tchebycheff is quick but gives no centroid; for LCB use Simpson's rule with levers.

References

Rawson & Tupper, Basic Ship Theory, 5th ed. (2001)Clause Vol. 1, Ch. 2 (Approximate integration: trapezoidal, Simpson, Tchebycheff, error analysis)Textbook
Barrass & Derrett, Ship Stability for Masters and Mates, 7th ed. (2012)Clause Ch. 10 (Simpson's Rules)Textbook
Press et al., Numerical Recipes, 3rd ed. (2007)Clause Ch. 4 (Integration of functions — error terms of Newton–Cotes formulas)Textbook
NavArch Handbook · Chapter 1 · printed on —