Saturday, November 29, 2025

Weddle integration rule


I used to be studying about Shackleton’s unimaginable expedition to Antarctica, and the Weddell Sea options prominently. That title sounded acquainted, and I used to be attempting to recollect the place I’d heard of Weddell in math. I found out that it wasn’t Weddell precisely however Weddle I used to be pondering of.

The Weddell Sea is called after James Weddell (1787–1834). Weddle’s integration rule is called after Thomas Weddle (1817–1853).

I wrote about Weddle’s integration rule a pair years in the past. Weddle’s rule, also called Bode’s rule, is as follows.

Let’s do that on integrating sin(x) from 1 to 2.

If we divide the interval [1, 2] into 6 subintervals, h = 1/6. The eighth spinoff of sin(x) can be sin(x), so it’s bounded by 1. So we might count on absolutely the worth of the error to be bounded by

9 / (69 × 1400).

Let’s see what occurs in apply.

import numpy as np

x = np.linspace(1, 2, 7)
h = (2 - 1)/6
weights = (h/140)*np.array([41, 216, 27, 272, 27, 216, 41])
approx = np.dot(weights, np.sin(x))
precise = np.cos(1) - np.cos(2)
print("Error:          ", abs(approx - precise) )
print("Anticipated error: ", 9/(1400*6**9))

Right here’s the output:

Error:           6.321198009473505e-10
Anticipated error:  6.379009079626363e-10

Associated posts

Related Articles

Latest Articles