Trapezoidal Rule
∫ f(x)dx ≈ (h/2) [f(x0) + 2f(x1) + 2f(x2) + ... + 2f(xn-1) + f(xn)]
where h = (b - a) / n
Numerically integrate f(x) = ax² + bx + c using the trapezoidal rule and compare with the exact result.
Was könnten wir verbessern?
∫ f(x)dx ≈ (h/2) [f(x0) + 2f(x1) + 2f(x2) + ... + 2f(xn-1) + f(xn)]
where h = (b - a) / n