From c75c1293dbbf864e0f3762af275794798cf08b00 Mon Sep 17 00:00:00 2001 From: Andrew Cumming Date: Thu, 14 Sep 2023 11:44:16 -0400 Subject: [PATCH] Updates integration.md --- integration.md | 62 +++++++++++++++++++++++++++++++++++ interpolation_solutions.ipynb | 2 +- 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/integration.md b/integration.md index 9ea70c6..edecc66 100644 --- a/integration.md +++ b/integration.md @@ -1,2 +1,64 @@ # Integration +## Newton-Cotes methods + +A related problem to interpolation is when we need to calculate the integral of a function + +$$I = \int_{x_1}^{x_N} f(x) dx$$ + +given values of the function at a discrete set of points $x_1\dots x_N$, which we'll write as $f_i\equiv f(x_i)$. For simplicity here we'll assume that the spacing between points on the grid is constant $x_{i+1}-x_i = \Delta x$, but it's straighforward to generalize to non-uniform sampling if you need to. + +To estimate the value of the integral, we need to model how the function behaves in each interval $x_i