From 297711b38cb19a183fd0ccb89ee063f4bdf4030d Mon Sep 17 00:00:00 2001 From: Andrew Cumming Date: Sun, 17 Sep 2023 12:58:09 -0400 Subject: [PATCH] Clarifies that the last exervise in integration.md is for 3D --- integration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration.md b/integration.md index ac83d1a..20b44ee 100644 --- a/integration.md +++ b/integration.md @@ -152,11 +152,11 @@ Another example is $W(x)=e^{-x}$ with integration limits $0$ to $\infty$. In thi ```{admonition} Exercise: Average velocity of the Maxwell-Boltzmann distribution. -Use Simpson's rule, Gaussian quadrature, and the general purpose integrator [`scipy.integrate.quad`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.quad.html) to evaluate the average velocity $\langle\left|v\right|\rangle$ for the [Maxwell-Boltzmann distribution](https://en.wikipedia.org/wiki/Maxwell–Boltzmann_distribution). +Use Simpson's rule, Gaussian quadrature, and the general purpose integrator [`scipy.integrate.quad`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.quad.html) to evaluate the average velocity $\langle\left|v\right|\rangle$ for the 3D [Maxwell-Boltzmann distribution](https://en.wikipedia.org/wiki/Maxwell–Boltzmann_distribution). For each method, check the numerical error comparing to the analytic result. How many points do you need to get to $0.1$% accuracy? -For Simpson's rule you can use your own implementation from above or you could try [`scipy.integrate.simpson`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.simpson.html)). +For Simpson's rule you can use your own implementation from above or you could try [`scipy.integrate.simpson`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.simpson.html). For Gaussian quadrature, try both Gauss-Hermite and Gauss-Laguerre. Which one is best? ```