zoukankan      html  css  js  c++  java
  • 辛普森三八律

    $f$在$(x_0,x_3)$上四阶可导,且在$[x_0,x_3]$上三阶导函数连续.

    \begin{align*}
    \int_{x_0}^{x_3}f(x)dx=\frac{3h}{8}[f(x_0)+3f(x_1)+3f(x_2)+f(x_3)]-\frac{3h^5}{80}f^{(4)}(\xi)
    \end{align*}其中$h=x_1-x_0=x_2-x_1=x_3-x_2$.

    下面先给出一种失败的方法.

    证明:我们对$f(x)$进行牛顿插值.设立插值点
    \begin{align*}
    x_0,x_1,x_2,x_3
    \end{align*}
    则经过这几个插值点的牛顿插值多项式为

    \begin{align*}
    f(x_0)+(x-x_0)f[x_0,x_1]+(x-x_0)(x-x_1)f[x_0,x_1,x_2]+(x-x_0)(x-x_1)(x-x_2)f[x_0,x_1,x_2,x_3]
    \end{align*}

    插值余项为
    \begin{align*}
    (x-x_0)(x-x_1)(x-x_2)(x-x_3)f[x,x_0,x_1,x_2,x_3]
    \end{align*}
    我们先来计算
    \begin{align*}
    \int_{x_0}^{x_3}\{f(x_0)+(x-x_0)f[x_0,x_1]+(x-x_0)(x-x_1)f[x_0,x_1,x_2]+(x-x_0)(x-x_1)(x-x_2)f[x_0,x_1,x_2,x_3]\}dx
    \end{align*}
    易得
    \begin{align*}
    \int_{x_0}^{x_3}f(x_0)dx=3hf(x_0)
    \end{align*}
    \begin{align*}
    \int_{x_0}^{x_3}(x-x_0)f[x_0,x_1]dx=f[x_0,x_1][\frac{1}{2}(x_3-x_0)^2]=\frac{9h}{2}(f(x_1)-f(x_0))
    \end{align*}

    \begin{align*}
    \int_{x_0}^{x_3}(x-x_0)(x-x_1)f[x_0,x_1,x_2]dx=(\frac{f(x_0)}{(-h)\times
    (-2h)}+\frac{f(x_1)}{h\times (-h)}+\frac{f(x_2)}{2h\times
    h})\int_{x_0}^{x_3}(x^2-(x_0+x_1)x+x_0x_1)dx
    \end{align*}
    我们知道,
    \begin{align*}
    \int_{x_0}^{x_3}[x^2-(x_0+x_1)x+x_0x_1]dx&=[\frac{1}{3}x_3^3-\frac{1}{2}(x_0+x_1)x_3^2+x_0x_1x_3]-[\frac{1}{3}x_0^3-\frac{1}{2}(x_0+x_1)x_0^2+x_0x_1x_0]\\&=\frac{1}{6}[2(x_3-x_0)(x_3^2+x_0^2+x_0x_3)-3(x_0x_3^2+x_1x_3^2-x_0^3-x_1x_0^2)+6x_0x_1(x_3-x_0)]\\&=\frac{1}{6}[2(x_3-x_0)(x_3^2+x_0^{2}+x_0x_3)-3[(x_0+x_1)(x_3^2-x_0^2)]+6x_0x_1(x_3-x_0)]\\&=\frac{1}{6}(x_3-x_0)(2x_3^2+2x_0^2+2x_0x_3-3(x_0+x_1)(x_3+x_0)+6x_0x_1)\\&=\frac{1}{6}(x_3-x_0)(2x_3^2-x_0^2-x_0x_3-3x_1x_3+3x_0x_1)\\&=\frac{1}{6}(x_3-x_0)^2(2x_3+x_0-3x_1)=\frac{9}{2}h^3
    \end{align*}
    因此,
    \begin{align*}
    \int_{x_0}^{x_3}(x-x_0)(x-x_1)f[x_0,x_1,x_2]dx&=(\frac{f(x_0)}{(-h)\times
    (-2h)}+\frac{f(x_1)}{h\times (-h)}+\frac{f(x_2)}{2h\times
    h})\int_{x_0}^{x_3}(x^2-(x_0+x_1)x+x_0x_1)dx\\&=\frac{9}{2}h^3(\frac{f(x_0)}{2h^2}-\frac{f(x_1)}{h^2}+\frac{f(x_2)}{2h^2})=\frac{9}{4}hf(x_0)-\frac{9}{2}hf(x_1)+\frac{9}{4}hf(x_2)
    \end{align*}

    \begin{align*}
    \int_{x_0}^{x_3}(x-x_0)(x-x_1)(x-x_2)f[x_0,x_1,x_2,x_3]dx
    \end{align*}
    我们来计算

    \begin{align*}
    &\int_{x_0}^{x_3}(x-x_0)(x-x_1)(x-x_2)dx=\int_{x_0}^{x_1}(x-x_0)(x-x_1)(x-x_2)dx+\int_{x_1}^{x_2}(x-x_0)(x-x_1)(x-x_2)dx+\int_{x_2}^{x_3}(x-x_0)(x-x_1)(x-x_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=\frac{1}{12}(x_3-x_2)^2[3(x_0+3h)^2+(x_0+2h)^2+2(x_0+3h)(x_0+2h)\\&-4x_0(x_0+3h)-2x_0(x_0+2h)-4(x_0+h)(x_0+3h)-2(x_0+h)(x_0+2h)+6x_0(x_0+h)]=\frac{9}{4}h^4
    \end{align*}


    \begin{align*}
    f[x_0,x_1,x_2,x_3]=\frac{f(x_0)}{(-h)(-2h)(-3h)}+\frac{f(x_1)}{h(-h)(-2h)}+\frac{f(x_2)}{2h\times
    h(-h)}+\frac{f(x_3)}{3h\times 2h\times h}
    \end{align*}

    可见,
    \begin{align*}
    \int_{x_0}^{x_3}(x-x_0)(x-x_1)(x-x_2)f[x_0,x_1,x_2,x_3]=\frac{9h}{4}[\frac{f(x_0)}{-6}+\frac{f(x_1)}{2}+\frac{f(x_2)}{-2}+\frac{f(x_3)}{6}]
    \end{align*}

    综上所述,

    \begin{align*}
    \int_{x_0}^{x_3}\{f(x_0)+(x-x_0)f[x_0,x_1]+(x-x_0)(x-x_1)f[x_0,x_1,x_2]+(x-x_0)(x-x_1)(x-x_2)f[x_0,x_1,x_2,x_3]\}dx=\frac{3}{8}hf(x_0)+\frac{9}{8}hf(x_1)+\frac{9}{8}hf(x_2)+\frac{3}{8}hf(x_3)
    \end{align*}


    下面我来证明
    \begin{align*}
    \int_{x_0}^{x_3} (x-x_0)(x-x_1)(x-x_2)(x-x_3)f[x,x_0,x_1,x_2,x_3]dx=\frac{-3}{80}h^5f^{(4)}(\xi)
    \end{align*}

    由于
    \begin{align*}
    f[x,x_0,x_1,x_2,x_3]=\frac{f''''(\xi(x))}{4!}
    \end{align*}

    下面我们来看
    \begin{align*}
    &\int_{x_0}^{x_3}(x-x_0)(x-x_1)(x-x_2)(x-x_3)dx\\&=\int_{x_0}^{x_3}[x^4-(x_0+x_1+x_2+x_3)x^3+(x_0x_1+x_1x_2+x_2x_3+x_3x_0+x_3x_1+x_0x_2)x^2-(x_1x_2x_3+x_0x_2x_3+x_0x_1x_3+x_0x_1x_2)x+x_0x_1x_2x_3]dx
    \end{align*}

    这么麻烦的计算,只有傻瓜才会手工计算下去.反正我相信这样子继续算下去,再用一下加权积分中值定理,就能得出题目中的结论.这个结论和数值积分中的梯形法则在方法上没有任何区别.

    下面给出另一种失败方案:

    \begin{align*}
    \int_{x_0}^{x_3} (x-x_0)(x-x_1)(x-x_2)(x-x_3)f[x,x_0,x_1,x_2,x_3]dx=\frac{-3}{80}h^5f^{(4)}(\xi)
    \end{align*}

     我曾经想用数值积分中的辛普森方法及其误差估计 里的方法,即如下.

     令

    \begin{align*}
    g(t)=\int_{x_0}^t(x-x_0)(x-x_1)(x-x_2)(x-x_3)f[x,x_0,x_1,x_2,x_3]dx
    \end{align*}
    则根据微积分第一基本定理,
    \begin{align*}
    g'(x_0)=g'(x_1)=g'(x_2)=g'(x_3)
    \end{align*}
    且$g(x_0)=0$.我们进行牛顿插值,设立插值点
    \begin{align*}
    x_0,x_0',x_1,x_1',x_2,x_2',x_3,x_3'
    \end{align*}

    经过这几个插值点的牛顿插值多项式为
    \begin{align*} p(x)= g(x_0)&+(x-x_0)g[x_0,x_0']\\&+(x-x_0)(x-x_0')g[x_0,x_0',x_1]\\&+(x-x_0)(x-x_0')(x-x_1)g[x_0,x_0',x_1,x_1']\\&+(x-x_0)(x-x_0')(x-x_1)(x-x_1')g[x_0,x_0',x_1,x_1',x_2]\\&+(x-x_0)(x-x_0')(x-x_1)(x-x_1')(x-x_2)g[x_0,x_0',x_1,x_1',x_2,x_2']\\&+(x-x_0)(x-x_0')(x-x_1)(x-x_1')(x-x_2)(x-x_2')g[x_0,x_0',x_1,x_1',x_2,x_2',x_3] \\&+(x-x_0)(x-x_0')(x-x_{1})(x-x_{1}')(x-x_2)(x-x_2')(x-x_3)f[x_0,x_0',x_1,x_1',x_2,x_2',x_3,x_3']\end{align*}

    令$x_0'\to x_0,x_1'\to x_1,x_2'\to x_2,x_3'\to x_3$,可得相应的Hermite
    插值多项式为
    \begin{align*}
    q(x)=g(x_0)&+(x-x_0)g[x_0,x_0]\\&+(x-x_0)^2g[x_0,x_0,x_1]\\&+(x-x_0)^2(x-x_1)g[x_0,x_0,x_1,x_1]\\&+(x-x_0)^2(x-x_1)^2g[x_0,x_0,x_1,x_1,x_2]\\&+(x-x_0)^2(x-x_1)^2(x-x_2)g[x_0,x_0,x_1,x_1,x_2,x_2]\\&+(x-x_0)^2(x-x_1)^2(x-x_2)^2g[x_0,x_0,x_1,x_1,x_2,x_2,x_3]\\&+(x-x_0)^2(x-x_1)^2(x-x_2)^2(x-x_3)g[x_0,x_0,x_1,x_1,x_2,x_2,x_3,x_3] \end{align*}

    \begin{align*}
    k(x)=g(x)-q(x)
    \end{align*}
    可得
    \begin{align*}
    k(x_0)=k(x_1)=k(x_2)=k(x_3)=k'(x_0)=k'(x_1)=k'(x_2)=k'(x_3)=0
    \end{align*}

    于是使用Rolle定理数次可得
    \begin{align*}
    k^{(5)}(\xi)=0
    \end{align*}
    也就是
    \begin{align*}
    g^{(7)}(\xi)=q^{(7)}(\xi)=7!g[x_0,x_0,x_1,x_1,x_2,x_2,x_3,x_3]
    \end{align*}
    由于
    \begin{align*}
    g^{(7)}(\xi)=f^{(6)}(\xi)
    \end{align*}
    因此
    \begin{align*}
    f^{(6)}(\xi)=7!g[x_0,x_0,x_1,x_{1},x_2,x_2,x_3,x_3]
    \end{align*}

    但是到这里就放弃了,因为按照题目的意思,【$f$在$(x_0,x_3)$上四阶可导,且在$[x_0,x_3]$上三阶导函数连续.】

    正确做法请见


  • 相关阅读:
    faster rcnn学习(三)
    too many values to unpack (expected 2)
    RuntimeWarning: overflow encountered in ubyte_scalars
    C#中excel读取和写入
    C#中使用Sql对Excel条件查询
    IIS上部署MVC网站,打开后ExtensionlessUrlHandler-Integrated-4.0解决方法IIS上部署MVC网站,打开后500错误
    C#微信公众平台账号开发,从零到整,步骤详细。
    VS快捷键大全
    ASP.NET将文件写到另一服务器
    开放api接口签名验证
  • 原文地址:https://www.cnblogs.com/yeluqing/p/3827548.html
Copyright © 2011-2022 走看看