lectures:台形公式の誤差

# 台形公式の誤差

## 1

また、 \begin{align} I_0&\equiv\int_a^b f(x)\mathrm{d}x=\sum_{k=0}^{N-1}\int_{x_{k}}^{x_{k+1}}f(x)\mathrm{d}x\\ I_n&\equiv\int_a^b f^{(n)}(x)\mathrm{d}x=f^{(n-1)}(b)-f^{(n-1)}(a) \end{align} と定義する。

$f(x)$を$x=x_k$の周りでテーラー展開したものを$[{x_{k}},\,{x_{k+1}}]$で積分し、和をとると、 \begin{align} f(x)&=f(x_k)+\sum_{n=1}^{\infty}\frac{1}{n!}f^{(n)}(x_k)(x-x_k)^n\\ \int_{x_{k}}^{x_{k+1}}f(x)\mathrm{d}x&=f(x_k)\left({x_{k}}-{x_{k+1}}\right)+\sum_{n=1}^{\infty}\frac{1}{n!}f^{(n)}(x_k)\int_{x_{k}}^{x_{k+1}}(x-x_k)^n\mathrm{d}x\\ &=hf(x_k)+\sum_{n=1}^{\infty}\frac{h^{n+1}}{(n+1)!}f^{(n)}(x_k)\\ I_0&=h\sum_{k=0}^{N-1}f(x_k)+\sum_{n=1}^{\infty}\frac{h^{n+1}}{(n+1)!}\sum_{k=0}^{N-1}f^{(n)}(x_k) \end{align} 同様に$f(x)$を$x=x_{k+1}$の周りでテーラー展開したものを$[{x_{k}},\,{x_{k+1}}]$で積分し、和をとると、

\begin{align} I_0&=h\sum_{k=0}^{N-1}f(x_{k+1})-\sum_{n=1}^{\infty}\frac{(-h)^{n+1}}{(n+1)!}\sum_{k=0}^{N-1}f^{(n)}(x_{k+1}) \end{align}

## 2

\begin{align} I_0&=h\sum_{k=0}^{N-1}f(x_k)+\sum_{n=1}^{\infty}\frac{h^n}{(n+1)!}\left(h\sum_{k=0}^{N-1}f^{(n)}(x_k)\right)\\ I_0&=h\sum_{k=1}^{N}f(x_{k})+\sum_{n=1}^{\infty}\frac{h^n}{(n+1)!}\left((-1)^{n}h\sum_{k=1}^{N}f^{(n)}(x_{k})\right) \end{align}

$n=2m-1$のとき、 \begin{align} \sum_{k=0}^{N-1}f^{(n)}(x_k)+(-1)^{n}\sum_{k=1}^{N}f^{(n)}(x_k) &=\sum_{k=0}^{N-1}f^{(2m-1)}(x_k)-\sum_{k=1}^{N}f^{(2m-1)}(x_k)\\ &=f^{(2m-1)}(x_0)-f^{(2m-1)}(x_N) =-\left(f^{(2m-1)}(b)-f^{(2m-1)}(a)\right)\\ &=-\int_a^b f^{(2m)}(x)\mathrm{d}x=-I_{2m} \end{align}

$n=2m$のとき、 \begin{align} \frac{h}{2}\left(\sum_{k=0}^{N-1}f^{(n)}(x_k)+(-1)^{n}\sum_{k=1}^{N}f^{(n)}(x_k)\right) &=\frac{h}{2}\left(\sum_{k=0}^{N-1}f^{(2m)}(x_k)+\sum_{k=1}^{N}f^{(2m)}(x_k)\right)\\ &=\frac{h}{2}\left(f^{(2m)}(x_0)+2\sum_{k=1}^{N-1}f^{(2m)}(x_k)+f^{(2m)}(x_N)\right)\\ &=h\left(\frac{f^{(2m)}(a)}{2}+\sum_{k=1}^{N-1}f^{(2m)}(x_k)+\frac{f^{(2m)}(b)}{2}\right)\\ &\equiv T_{2m} \end{align}

$$I_0=T_{0} -\sum_{m=1}^{\infty}\frac{h^{2m-1}}{(2m)!}\frac{h}{2}I_{2m} +\sum_{m=1}^{\infty}\frac{h^{2m}}{(2m+1)!}T_{2m}$$

## 3

\begin{align} I_0&=T_{0} -\sum_{m=1}^{\infty}\frac{h^{2m}}{2(2m)!}I_{2m} +\sum_{m=1}^{\infty}\frac{h^{2m}}{(2m+1)!}T_{2m}\\ I_{2\ell}&=T_{2\ell} -\sum_{m=1}^{\infty}\frac{h^{2m}}{2(2m)!}I_{2(m+\ell)} +\sum_{m=1}^{\infty}\frac{h^{2m}}{(2m+1)!}T_{2(m+\ell)}\\ T_{2\ell}&=I_{2\ell} +\sum_{m=1}^{\infty}\frac{h^{2m}}{2(2m)!}I_{2(m+\ell)} -\sum_{m=1}^{\infty}\frac{h^{2m}}{(2m+1)!}T_{2(m+\ell)} \end{align}

\begin{align} I_0&=T_{0} -\frac{h^{2}}{2(2!)}I_{2}+\frac{h^{2}}{3!}T_{2} -\frac{h^{4}}{2(4!)}I_{4}+\frac{h^{4}}{5!}T_{4} -\frac{h^{6}}{2(6!)}I_{6}+\frac{h^{6}}{7!}T_{6} -\cdots\\ T_{2}&=I_{2} +\frac{h^{2}}{2(2!)}I_{4}-\frac{h^{2}}{3!}T_{4} +\frac{h^{4}}{2(4!)}I_{6}-\frac{h^{4}}{5!}T_{6} +\cdots\\ T_{4}&=I_{4} +\frac{h^{2}}{2(2!)}I_{6}-\frac{h^{2}}{3!}T_{6} +\cdots\\ T_{6}&=I_{6} +\cdots \end{align}

\begin{align} I_0&=T_{0} -\frac{h^{2}}{2(2!)}I_{2} +\frac{h^{2}}{3!}\left( I_{2} +\frac{h^{2}}{2(2!)}I_{4}-\frac{h^{2}}{3!}T_{4} +\frac{h^{4}}{2(4!)}I_{6}-\frac{h^{4}}{5!}T_{6} +\cdots\right)\\ &-\frac{h^{4}}{2(4!)}I_{4}+\frac{h^{4}}{5!}T_{4} -\frac{h^{6}}{2(6!)}I_{6}+\frac{h^{6}}{7!}T_{6} -\cdots\\ &=T_{0} -\frac{h^{2}}{12}I_{2} +\frac{h^{4}}{48}I_{4} -\frac{7h^{4}}{360}T_{4} +\frac{h^{6}}{360}I_{6} -\frac{6h^{6}}{7!}T_{6} -\cdots\\ &=T_{0} -\frac{h^{2}}{12}I_{2} +\frac{h^{4}}{48}I_{4} -\frac{7h^{4}}{360}\left(I_{4} +\frac{h^{2}}{2(2!)}I_{6}-\frac{h^{2}}{3!}T_{6} +\cdots\right)\\ &+\frac{h^{6}}{360}I_{6} -\frac{6h^{6}}{7!}T_{6} -\cdots\\ &=T_{0} -\frac{h^{2}}{12}I_{2} +\frac{h^{4}}{720}I_{4} -\frac{h^{6}}{480}I_{6}+\frac{31h^{6}}{15120}T_{6} +\cdots\\ &=T_{0} -\frac{h^{2}}{12}I_{2} +\frac{h^{4}}{720}I_{4} -\frac{h^{6}}{480}I_{6}+\frac{31h^{6}}{15120}\left(I_{6}+\cdots\right) +\cdots\\ &=T_{0} -\frac{h^{2}}{12}I_{2} +\frac{h^{4}}{720}I_{4} -\frac{h^{6}}{30240}I_{6}+o(h^8) \end{align}

\begin{align} h\left(\frac{f(a)}{2}+\sum_{k=1}^{N-1}f(x_{k})+\frac{f(b)}{2}\right)&=\int_a^b f(x)\mathrm{d}x +\frac{h^{2}}{12}\left(f'(b)-f'(a)\right)\\ &-\frac{h^{4}}{720}\left(f^{(3)}(b)-f^{(3)}(a)\right) +\frac{h^{6}}{30240}\left(f^{(5)}(b)-f^{(5)}(a)\right)+o(h^8) \end{align}

lectures/台形公式の誤差.txt · 最終更新: 2022/11/21 14:37 by kimi