Smallest number of points required to estimate value of integral

72 Views Asked by At

Find the smallest number of points required to estimate the value of $$\int_{0}^{1} sin(x^2\pi)dx$$ with error less than $10^{-8}$ using the Composite Simpson method. In the estimation n, use the absolute maximum of the corresponding derivative of $(1+x^2)^{-1}$


In this case I would find the maximum of the fourth derivative of $sin(x^2\pi)$ and then plug it into the following formula for Composite Simpson error: $ 10^{-8} ≥ $ $\dfrac {|f^4|(b-a)h^4}{180} $ and solve for h. Then, I would use $h= \dfrac{(b-a)}{n}$ where n is the number of points, and solve for n to get the number of points.

HOWEVER, the last sentence of the question confuses me because I do not know what it means to use the absolute maximum of the corresponding derivative for n.

1

There are 1 best solutions below

0
On

It might be easier than a direct computation of the sequence of derivative expressions to find the coefficient of $s^4$ in $f(x+s)=\sin(\pi(x+s)^2)$. \begin{align} \sin(\pi x^2 + \pi(2x+s)s) &=\sin(\pi x^2)\cos(\pi(2x+s)s)+\cos(\pi x^2)\sin(\pi(2x+s)s) \\ &=\sin(\pi x^2)\left[1-\frac12\pi^2(2x+s)^2s^2+\frac1{24}\pi^4(2x)^2s^4+O(s^5)\right] \\&\qquad +\cos(\pi x^2)\left[\pi(2x+s)s-\frac16\pi^3(2x+s)^3s^3+O(s^5)\right] \end{align} Thus \begin{align} \frac1{24}f^{(4)}(x) &=\sin(\pi x^2)\left[-\frac12\pi^2+\frac1{24}\pi^4(2x)^2\right] +\cos(\pi x^2)\left[-\frac12\pi^3(2x)^2\right] \\ |f^{(4)}(x)|&\le4\pi^2\sqrt{(3-\pi^2x^2)^2+(12\pi x^2)^2} \\ &\le4\pi^2\sqrt{9+138\pi^2+\pi^4}\le160\pi^2\le1600 \end{align} giving $n\sim \sqrt[4]{10^8\cdot 1600/180}\le100\cdot\sqrt{3}\le 175$. An adaptive strategy finds a sequence of $147$ nodes with a minimal step of $0.00390625$ ($n=256$ if filled out) sufficient to get this accuracy.

plots of the adaptive strategy