{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Tutorial 09 - Quadrature" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Numerical integration of functions, rectangular rule, trapezoidal rule, Simpson's rule, Romberg's method, Gaussian quadrature, Monte-Carlo integration and random number generators. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import random as rnd\n", "import matplotlib.pyplot as plt\n", "from scipy import integrate, interpolate, special" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Newton-Cotes Formulas" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Midpoint rule" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[Midpoint rule](https://en.wikipedia.org/wiki/Riemann_sum#Midpoint_rule)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "