puolisuunnikassääntöjä
Puolisuunnikassääntöjä, known in English as the trapezoidal rule, is a numerical method for approximating the definite integral of a function. It is based on approximating the region under the curve of a function as a series of trapezoids rather than rectangles, as is done in the simpler rectangular rule.
The basic idea of the trapezoidal rule is to divide the interval of integration [a, b] into
The formula for the trapezoidal rule is given by:
Integral from a to b of f(x) dx ≈ (h/2) * [f(x₀) + 2f(x₁) + 2f(x₂) + ... + 2f(x<0xE2><0x82><0x99>₋₁) + f(x<0xE2><0x82><0x99>)]
where xᵢ = a + i*h for i = 0, 1, ..., n.
The accuracy of the approximation generally increases as the number of subintervals (n) increases, meaning h