trapezoidal rule
1. approximate integrals
\[ \int_{t_{n}}^{t_{n+1}} f(x_t) dt \approx \frac{(t_{n+1} - t_{n})}{2} (f(x_{t+1}) + f(x_{t})) \]
2. solving differential equations
- solving
- \(x'_t = f(t,x)\)
- And solving it gives:
\[ x_{t+1} = x_{t} + \int_{t_{n}}^{t_{n+1}} f(t, x(t)) dt \]
- kind of like euler's method, but we're using more (2) points to approximate the integral
\[ x_{t+1} = x_{t} + \frac{1}{2}(t_{n+1} - t_{n}) (f(t_{n+1}, x_{n+1}) + f(t_{n}, x_{n})) \]