• 首页

  • 官方

  • 主题

  • 关注

  • 联系

泰勒公式的理解和快速推导,格雷戈里-牛顿插值公式的简单推导

泰勒公式的理解和简单推导,格雷戈里-牛顿插值公式的简单推导

前言:重在记录,可能出错。

可以直接看常用函数的泰勒公式的快速推导

一、格雷戈里-牛顿插值公式的简单推导

1.插值:函数的图像一般由点组成,那么我们可以通过已知的点来找另一个函数近似等于原函数。很明显,已知点越多,就越逼近原函数。

其实,泰勒公式本质就是用多项幂级数逼近一个单变量函数,也可以说是使任何单变量函数都可以展开成幂级数。

牛顿插值:这个一般会在大学的计算方法、数值分析等课程中学到。牛顿插值是插值方法的一种。


接下来,开始牛顿插值的无敌推导:

 (1).如果只有一个点\({A \left( x\mathop{{}}\nolimits_{{0}},f \left( x\mathop{{}}\nolimits_{{0}} \left) \right) \right. \right. }\),那么我们找的近似函数即为\({f \left( x \left) =f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }\),代入点A符合。


 (2).如果有两个点\({A \left( x\mathop{{}}\nolimits_{{0}},f \left( x\mathop{{}}\nolimits_{{0}} \left) \left) \text{、}B \left( x\mathop{{}}\nolimits_{{1}},f \left( x\mathop{{}}\nolimits_{{1}} \left) \right) \right. \right. \right. \right. \right. \right. }\),我们在\({f \left( x \left) =f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }\)的基础上再加上一项,代入点A、B均符合即可。设近似函数为:

\[{\begin{array}{*{20}{l}}{f \left( x \left) =f \left( x\mathop{{}}\nolimits_{{0}} \left) +C \left( x \right) \right. \right. \right. \right. }\\{C \left( x \left) =f \left( x \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. \right. \right. }\\{C \left( x\mathop{{}}\nolimits_{{0}} \left) =f \left( x\mathop{{}}\nolimits_{{0}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \left) =0=a\mathop{{}}\nolimits_{{1}} \left( x-x\mathop{{}}\nolimits_{{0}} \left) \text{,}\text{写}\text{出}\text{大}\text{概}\text{形}\text{式}\right. \right. \right. \right. \right. \right. \right. \right. }\\{C \left( x\mathop{{}}\nolimits_{{1}} \left) =f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \left) =a\mathop{{}}\nolimits_{{1}} \left( x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}} \right) \right. \right. \right. \right. \right. \right. }\\{a\mathop{{}}\nolimits_{{1}}=\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}}\\{C \left( x \left) =\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}\left( x-x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }\end{array}} \]

   因此,用两个点找的近似函数为:

\[f \left( x \left) =f \left( x\mathop{{}}\nolimits_{{0}} \left) +\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}} \left( x-x\mathop{{}}\nolimits_{{0}} \right) \right. \right. \right. \right. \]


 (3).同理,三个点:

\[{\begin{array}{*{20}{l}}{{\left. {\begin{array}{*{20}{l}}{{C \left( x\mathop{{}}\nolimits_{{0}} \left) =\right. \right. }f \left( x\mathop{{}}\nolimits_{{0}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \left) -\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}\left( x\mathop{{}}\nolimits_{{0}}-x\mathop{{}}\nolimits_{{0}} \left) =0\right. \right. \right. \right. \right. \right. }\\{C \left( x\mathop{{}}\nolimits_{{1}} \left) =f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \left) -\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}\left( x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}} \left) =0\right. \right. \right. \right. \right. \right. \right. \right. }\end{array}} \right\} }}\\{C \left( x \left) =a\mathop{{}}\nolimits_{{2}} \left( x-x\mathop{{}}\nolimits_{{0}} \left) \left( x-x\mathop{{}}\nolimits_{{1}} \left) \text{,}\text{写}\text{出}\text{大}\text{概}\text{形}\text{式}\right. \right. \right. \right. \right. \right. }\\{C \left( x\mathop{{}}\nolimits_{{2}} \left) =f \left( x\mathop{{}}\nolimits_{{2}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \left) -\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}\left( x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{0}} \left) =a\mathop{{}}\nolimits_{{2}} \left( x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{0}} \left) \left( x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{1}} \right) \right. \right. \right. \right. \right. \right. \right. \right. \right. \right. }\\{a\mathop{{}}\nolimits_{{2}}=\frac{{f \left( x\mathop{{}}\nolimits_{{2}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \left) -\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}\left( x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{0}} \right) \right. \right. \right. \right. }}{{ \left( x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{0}} \left) \left( x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{1}} \right) \right. \right. }}=\frac{{\frac{{f \left( x\mathop{{}}\nolimits_{{2}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{0}}}}-\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}}}{{ \left( x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{1}} \right) }}}\end{array}} \]

   因此,用三个点找的近似函数为:

\[{f \left( x \left) =f \left( x\mathop{{}}\nolimits_{{0}} \left) +\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}\left( x-x\mathop{{}}\nolimits_{{0}} \left) +\frac{{\frac{{f \left( x\mathop{{}}\nolimits_{{2}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{0}}}}-\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}}}{{x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{1}}}} \left( x-x\mathop{{}}\nolimits_{{0}} \left) \left( x-x\mathop{{}}\nolimits_{{1}} \right) \right. \right. \right. \right. \right. \right. \right. \right. } \]


 (4).总结,若有n+1个点:

\[\color{red}{a\mathop{{}}\nolimits_{{n}}=\frac{{f \left( x\mathop{{}}\nolimits_{{n}} \left) -a\mathop{{}}\nolimits_{{0}}-a\mathop{{}}\nolimits_{{1}} \left( x\mathop{{}}\nolimits_{{n}}-x\mathop{{}}\nolimits_{{0}} \left) - \cdots -a\mathop{{}}\nolimits_{{n-1}} \left( x\mathop{{}}\nolimits_{{n}}-x\mathop{{}}\nolimits_{{0}} \left) \left( x\mathop{{}}\nolimits_{{n}}-x\mathop{{}}\nolimits_{{1}} \left) \cdots \left( x\mathop{{}}\nolimits_{{n}}-x\mathop{{}}\nolimits_{{n-2}} \right) \right. \right. \right. \right. \right. \right. \right. \right. }}{{ \left( x\mathop{{}}\nolimits_{{n}}-x\mathop{{}}\nolimits_{{0}} \left) \left( x\mathop{{}}\nolimits_{{n}}-x\mathop{{}}\nolimits_{{1}} \left) \cdots \left( x\mathop{{}}\nolimits_{{n}}-x\mathop{{}}\nolimits_{{n-1}} \right) \right. \right. \right. \right. }}} \]

近似函数为:

\[\color{red}{f \left( x \left) =a\mathop{{}}\nolimits_{{0}}+a\mathop{{}}\nolimits_{{1}}\left( x-x\mathop{{}}\nolimits_{{0}} \left) +a\mathop{{}}\nolimits_{{2}} \left( x-x\mathop{{}}\nolimits_{{0}} \left) \left( x-x\mathop{{}}\nolimits_{{1}} \left) + \cdots +a\mathop{{}}\nolimits_{{n}} \left( x-x\mathop{{}}\nolimits_{{0}} \left) \left( x-x\mathop{{}}\nolimits_{{1}} \left) \cdots \left( x-x\mathop{{}}\nolimits_{{n-1}} \right) \right. \right. \right. \right. \right. \right. \right. \right. \right. \right. \right. \right. } \]

注:其中\({a\mathop{{}}\nolimits_{{0}} \cdots a\mathop{{}}\nolimits_{{n}}}\)均为常数,为了通俗一些,就不再说牛顿插值中的差商了,毕竟重点不在这儿。

这就是简化通俗版的非常出名的格雷戈里-牛顿插值公式了。


二、泰勒公式的理解和简单推导

1.泰勒公式:

 (1).假设我们在取点时,特意使任意相邻两点之间的水平间距都相等,等于\({ \Delta x}\),即\({x\mathop{{}}\nolimits_{{n+1}}-x\mathop{{}}\nolimits_{{n}}= \Delta x}\)。此时,再看\({a\mathop{{}}\nolimits_{{0}} \cdots a\mathop{{}}\nolimits_{{n}}}\)

\[{\begin{array}{*{20}{l}}{a\mathop{{}}\nolimits_{{1}}=\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}=\frac{{f \left( x\mathop{{}}\nolimits_{{0}}+ \Delta x \left) -f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. }}{{ \Delta x}}}\\{\begin{array}{*{20}{l}}{a\mathop{{}}\nolimits_{{2}}=\frac{{f \left( x\mathop{{}}\nolimits_{{2}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \left) \text{ }-\text{ }\frac{{f \left( x\mathop{{}}\nolimits_{{1}} \left) -f \left( x\mathop{{}}\nolimits_{{0}} \left) \text{ }\text{ }\text{ }\text{ }\right. \right. \right. \right. }}{{x\mathop{{}}\nolimits_{{1}}-x\mathop{{}}\nolimits_{{0}}}}\text{ } \left( x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{0}} \right) \right. \right. \right. \right. }}{{ \left( x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{0}} \left) \text{ } \left( x\mathop{{}}\nolimits_{{2}}-x\mathop{{}}\nolimits_{{1}} \right) \right. \right. }}}\\{\text{ }\text{ }\text{ }\text{ }=\frac{{f \left( x\mathop{{}}\nolimits_{{0}}+2 \Delta x \left) -f \left( x\mathop{{}}\nolimits_{{0}} \left) \text{ }-\text{ }\frac{{f \left( x\mathop{{}}\nolimits_{{0}}+ \Delta x \left) \text{ }-\text{ }f \left( x\mathop{{}}\nolimits_{{0}} \left) \text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\right. \right. \right. \right. }}{{ \Delta x}}\text{ } \left( 2 \Delta x \right) \right. \right. \right. \right. }}{{2 \Delta x\text{ } \Delta x}}}\\{\text{ }\text{ }\text{ }\text{ }=\frac{{f \left( x\mathop{{}}\nolimits_{{0}}+2 \Delta x \left) \text{ }-\text{ }2f \left( x\mathop{{}}\nolimits_{{0}}+ \Delta x \left) \text{ }+\text{ }f \left( x\mathop{{}}\nolimits_{{0}} \right) \right. \right. \right. \right. }}{{2 \Delta x\text{ } \Delta x}}}\\{\text{ }\text{ }\text{ }\text{ }=\frac{{\frac{{f \left( x\mathop{{}}\nolimits_{{0}}+2 \Delta x \left) \text{ }-\text{ }f \left( x\mathop{{}}\nolimits_{{0}}+ \Delta x \left) \text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\right. \right. \right. \right. }}{{ \Delta x}}\text{ }-\text{ }\frac{{ \left( f \left( x\mathop{{}}\nolimits_{{0}}+ \Delta x \left) \text{ }-\text{ }f \left( x\mathop{{}}\nolimits_{{0}} \left) \right) \right. \right. \right. \right. }}{{ \Delta x}}}}{{2 \Delta x}}}\end{array}}\end{array}} \]

image

image

image

注:同样,为了通俗一些,就不再说差分了,毕竟重点不在这儿。

  当$ { \Delta x \to 0}$时,我们发现(⊙ₒ⊙)!!

   \(x\mathop{{}}\nolimits_{{0}}=x\mathop{{}}\nolimits_{{1}}=x\mathop{{}}\nolimits_{{2}}=x\mathop{{}}\nolimits_{{3}}= \cdots =x\mathop{{}}\nolimits_{{n}}\)

  并且\({n!}a\mathop{{}}\nolimits_{{n}}\)就是是函数在$ {x=x\mathop{{}}\nolimits_{{0}}}$处导数的定义。

   $ a\mathop{{}}\nolimits_{{1}}\text{是}f \left( x\mathop{{}}\nolimits_{{0}} \left) \text{的}\text{一}\text{阶}\text{导},2!a\mathop{{}}\nolimits_{{2}}\text{是}f \left( x\mathop{{}}\nolimits_{{0}} \left) \text{的}\text{二}\text{阶}\text{导}, \cdots ,n!a\mathop{{}}\nolimits_{{n}}\text{是}f \left( x\mathop{{}}\nolimits_{{0}} \left) \text{的}n\text{阶}\text{导}\right. \right. \right. \right. \right. \right. $

  根据规律,我们大胆得到公式:

\[\color{red}{\begin{array}{*{20}{l}}{{f \left( x \left) =f \left( x\mathop{{}}\nolimits_{{0}} \right) +{f \prime } \left( x\mathop{{}}\nolimits_{{0}} \left) \left( x-x\mathop{{}}\nolimits_{{0}} \left) +\frac{{{f''} \left( x\mathop{{}}\nolimits_{{0}} \right) }}{{2!}} \left( x-x\mathop{{}}\nolimits_{{0}} \left) \mathop{{}}\nolimits^{{2}}+ \cdots +\frac{{f\mathop{{}}\nolimits^{{ \left( n \right) }} \left( x\mathop{{}}\nolimits_{{0}} \right) }}{{n!}} \left( x-x\mathop{{}}\nolimits_{{0}} \left) \mathop{{}}\nolimits^{{n}}+R\mathop{{}}\nolimits_{{n+1}} \left( x \left) \right. \right. \right. \right. \right. \right. \right. \right. \right. \right. \right. \right. }}\\{R\mathop{{}}\nolimits_{{n+1}} \left( x \left) \text{是}\text{余}\text{项}\right. \right. }\end{array}} \]

  这就是n阶泰勒公式


 (2).佩亚诺型余项和拉格朗日余项:

  佩亚诺型余项:泰勒公式的定性形式:用于求未定式极限及估计无穷小阶数等问题

    $ {{{R\mathop{{}}\nolimits_{{n+1}} \left( x \left) = {\rm O} \left( \left( x-x\mathop{{}}\nolimits_{{0}} \left) \mathop{{}}\nolimits^{{n}} \right) \right. \right. \right. \right. }}}$

  拉格朗日余项:泰勒公式的定量形式:用于求近似计算函数值等问题

    $ R\mathop{{}}\nolimits_{{n+1}} \left( x \left) =\frac{{f\mathop{{}}\nolimits^{{ \left( n+1 \right) }}\text{ }\text{ }\text{ } \left( \xi \right) }}{{ \left( n+1 \left) !\right. \right. }} \left( x-x\mathop{{}}\nolimits_{{0}} \left) \mathop{{}}\nolimits^{{n+1}}, \xi \text{介}\text{于}x\mathop{{}}\nolimits_{{0}}\text{和}x\text{之}\text{间}\right. \right. \right. \right. $


 (3).泰勒级数和泰勒展开式:

  根据上述推导,实际上当我们已知无数个点,即$ {n \to \infty }$时,泰勒公式具有无穷项,它就像幂级数,称之为泰勒级数。但是在得到公式的过程中,我们却没有去讨论级数的是否收敛。这里需要补充的是,泰勒展开式

\[\color{red}{{{f \left( x \left) =f \left( x\mathop{{}}\nolimits_{{0}} \right) +{f \prime } \left( x\mathop{{}}\nolimits_{{0}} \left) \left( x-x\mathop{{}}\nolimits_{{0}} \left) +\frac{{{f '' } \left( x\mathop{{}}\nolimits_{{0}} \right) }}{{2!}} \left( x-x\mathop{{}}\nolimits_{{0}} \left) \mathop{{}}\nolimits^{{2}}+ \cdots +\frac{{f\mathop{{}}\nolimits^{{ \left( n \right) }} \left( x\mathop{{}}\nolimits_{{0}} \right) }}{{n!}} \left( x-x\mathop{{}}\nolimits_{{0}} \left) \mathop{{}}\nolimits^{{n}}+ \cdots \text{ }\right. \right. \right. \right. \right. \right. \right. \right. \right. \right. }}} \]

  泰勒展开式是特殊的泰勒级数,或者说是收敛情况下的泰勒级数,其具有收敛区间,在收敛区间内,和一定存在。


 (4).麦克劳林公式:泰勒公式的一种特殊形式。

  当\({x\mathop{{}}\nolimits_{{0}}=0}\)时,泰勒公式变为:

\[\color{red}{{f \left( x \left) =f \left( 0 \right) +{f \prime } \left( 0 \left) x+\frac{{{f''} \left( 0 \right) }}{{2!}}x\mathop{{}}\nolimits^{{2}}+ \cdots +\frac{{f\mathop{{}}\nolimits^{{ \left( n \right) }} \left( 0 \right) }}{{n!}}x\mathop{{}}\nolimits^{{n}}+R\mathop{{}}\nolimits_{{n+1}} \left( x \left) \right. \right. \right. \right. \right. \right. }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }\text{ }R\mathop{{}}\nolimits_{{n+1}} \left( x \left) \text{是}\text{余}\text{项}\right. \right. } \]

  这就是麦克劳林公式,在求极限时,经常会用到。

posted @ 2022-08-26 17:05  戈小戈  阅读(1575)  评论(0编辑  收藏  举报