<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>求导 &#8211; 编码无悔 /  Intent &amp; Focused</title>
	<atom:link href="https://www.codelast.com/tag/%e6%b1%82%e5%af%bc/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codelast.com</link>
	<description>最优化之路</description>
	<lastBuildDate>Mon, 27 Apr 2020 17:25:36 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>[原创]Ridders求导算法</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9bridders%e6%b1%82%e5%af%bc%e7%ae%97%e6%b3%95/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9bridders%e6%b1%82%e5%af%bc%e7%ae%97%e6%b3%95/#comments</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Thu, 31 Mar 2011 06:03:01 +0000</pubDate>
				<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[Neville]]></category>
		<category><![CDATA[Ridders]]></category>
		<category><![CDATA[求导]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=1419</guid>

					<description><![CDATA[<p>
	N年前，当我还是一个在校学生的时候，有一次到工厂里实习，看到某系统上运行的一个软件中显示的一条条曲线，以及其下的一些参数值，我问旁边开发那款软件的老师：某某值是怎么求出来的？老师说，是对曲线求导算出来的。当时我就心想，一个人开发出这款软件得综合多少个领域的知识才能做得到啊。从那时起，我的心中就埋下了一颗种子。时光匆匆，一眨眼就到了今天，因为学习其他算法的原因，涉及到了一些求导算法的编程，于是，本文必须得写。</p>
<p>
	求导算法应用广泛，例如，在<a href="http://www.codelast.com/?p=29" target="_blank" rel="noopener noreferrer">LM算法</a>中，需要对函数求导（但是，使用数值求导的方法来求导数值，会不会对LM算法的整个过程的效率造成较大影响，我不清楚，还没有试验），可以考虑使用数值求导算法来实现。</p>
<div>
	如何用程序实现求一个数学函数在某一点的导数值？由于计算机的舍入误差的存在，如果按导数的定义来求，精度将比较差。 我们先来看一下导数的定义：<br />
	<span id="more-1419"></span></div>
<p style="text-align: center;">
	<img decoding="async" alt="Definition" height="74" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_1.png" width="354" /></p>
<p>
	即：</p>
<p style="text-align: center;">
	<strong><span style="color: rgb(255, 0, 0); "><span style="font-family: arial, helvetica, sans-serif; "><span style="font-size: 16px; "><img decoding="async" alt="formula A" height="62" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_9.png" width="240" />&#8230;&#8230;&#8230;&#8230;（A）</span></span></span></strong></p>
<p>
	使用该式来求导时，由于在计算机内以二进制表示的数值不是一个精确值，而是一个有舍入误差的值，所以这样求出来的导数值，最多能精确到计算机精度的平方根&#8212;&#8212;具体的推导过程这里就不写了。例如，你的计算机精度为10<sup>-12</sup>，则使用这种方法求导的精度只能达到10<sup>-6</sup>&#8212;&#8212;即使你使用了一个10<sup>-12</sup>数量级的△x。可能你会觉得△x每减小一点，求出的导数就更精确一点，可惜，舍入误差会让你的期望落空。在很多场合下，这样大的计算误差是无法接受的。</p>
<p>
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: left; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p>
	我们现在考虑这样一种导数计算方法：</p>
<p style="text-align: center; ">
	<img decoding="async" alt="Definition" height="63" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_3.png" style="cursor: default; " width="380" /></p>
<p>
	即：</p>
<p style="text-align: center; ">
	<strong><span style="color:#f00;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:16px;"><img loading="lazy" decoding="async" alt="formula B" height="59" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_10.png" width="270" />&#8230;&#8230;&#8230;&#8230;（B）</span></span></span></strong></p>
<p>
	这个式子是怎么来的？由泰勒展式，可得：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="Taylor" height="57" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_4.png" style="cursor: default; " width="500" /></p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="Taylor" height="57" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_5.png" style="cursor: default; " width="500" /></p>
<p>
	两式相减，得：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="minus" height="60" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_6.png" style="cursor: default; " width="470" /></p>
<p>
	即：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="divide" height="58" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_7.png" width="400" /></p>
<p>
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: left; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p>
	可见，用（B）式来求导时，截断误差为：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="truncation error" height="56" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_8.png" width="140" /></p>
<p>
	&#160;</p>
<div>
	用同样的方法，我们也可以计算出（A）式的截断误差，可以发现（A）式的截断误差比（B）式大。</div>
<div>
	&#160;</div>
<div>
	截断误差与舍入误差之和，即为总误差，而舍入误差对（A）、（B）两式都是不变的，因此，我进进而可以计算出（A）、（B）两式的总误差，并对比，然后可以得到一个结论：<span style="color:#ff0000;">（B）式的精度比（A）式的精度至少要高一个数量级</span>&#8212;&#8212;在这个结论的推导过程中，由于h是一个变量，因此需要用到线性最小二乘的方法来确定&#8220;最优&#8221;的h（即：使总误差最小的h），这里我就省略掉这一段推导过程了。<br />
	既然有了这个更胜一筹的求导式子，我们仅仅通过不断减小该式中的h的值来求导就行了吗？还是不行，因为我们仍然不知道一个合适的h是多大。</div>
<p>
	&#160;</p>
<div>
	这个时候，我们需要的是Ridders算法&#8212;&#8212;一种通过&#8220;<a href="http://www.codelast.com/?page_id=963" target="_blank" rel="noopener noreferrer">外推</a>&#8221;（extrapolation）来得到&#8220;最合适&#8221;的h所对应的导数值的算法。 而Ridders算法的核心，是Neville算法。这再一次验证了一个真理：数学算法互相之间的环环相扣，不胜其多。</div>
<div>
	&#160;</div>
<div>
	Neville算法是一种常用的优秀的内插/外推算法（其实都一样，因为内插方法确定的同时，其实也就可以扩展到外推（超过已知点的范围）。这就好比你在平面上对三个点(x<sub>1</sub>, y<sub>1</sub>)、(x<sub>2</sub>, y<sub>2</sub>)、(x<sub>3</sub>, y<sub>3</sub>)（其中x1&#60;x2&#60;x3）使用样条曲线来确定[x1, x3]区间内的插值点时，你同时也就可以在样条曲线延长到的地方，得到区间[x1, x3]之外的点）。</div>
<div>
	&#160;</div>
<div>
	说到Neville算法，既然它是一种内插/外推算法，我们就不得不说到拉格朗日插值法&#8212;&#8212;一种多项式插值方法。可能看本文的人觉得被绕晕了，从求导算法一步一步绕到了这里，为了说清楚算法的前因后果，我写得也不容易。</div>
<div>
	&#160;</div>
<div>
	下面，就来看看拉格朗日插值公式吧：</div>
<p style="text-align: center;">
	<img loading="lazy" decoding="async" alt="Lagrange interpolation" height="305" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_2.png" style="cursor: default;" width="398" /></p>
<p>
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: left; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9bridders%e6%b1%82%e5%af%bc%e7%ae%97%e6%b3%95/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<p>
	N年前，当我还是一个在校学生的时候，有一次到工厂里实习，看到某系统上运行的一个软件中显示的一条条曲线，以及其下的一些参数值，我问旁边开发那款软件的老师：某某值是怎么求出来的？老师说，是对曲线求导算出来的。当时我就心想，一个人开发出这款软件得综合多少个领域的知识才能做得到啊。从那时起，我的心中就埋下了一颗种子。时光匆匆，一眨眼就到了今天，因为学习其他算法的原因，涉及到了一些求导算法的编程，于是，本文必须得写。</p>
<p>
	求导算法应用广泛，例如，在<a href="http://www.codelast.com/?p=29" target="_blank" rel="noopener noreferrer">LM算法</a>中，需要对函数求导（但是，使用数值求导的方法来求导数值，会不会对LM算法的整个过程的效率造成较大影响，我不清楚，还没有试验），可以考虑使用数值求导算法来实现。</p>
<div>
	如何用程序实现求一个数学函数在某一点的导数值？由于计算机的舍入误差的存在，如果按导数的定义来求，精度将比较差。 我们先来看一下导数的定义：<br />
	<span id="more-1419"></span></div>
<p style="text-align: center;">
	<img loading="lazy" decoding="async" alt="Definition" height="74" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_1.png" width="354" /></p>
<p>
	即：</p>
<p style="text-align: center;">
	<strong><span style="color: rgb(255, 0, 0); "><span style="font-family: arial, helvetica, sans-serif; "><span style="font-size: 16px; "><img loading="lazy" decoding="async" alt="formula A" height="62" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_9.png" width="240" />&hellip;&hellip;&hellip;&hellip;（A）</span></span></span></strong></p>
<p>
	使用该式来求导时，由于在计算机内以二进制表示的数值不是一个精确值，而是一个有舍入误差的值，所以这样求出来的导数值，最多能精确到计算机精度的平方根&mdash;&mdash;具体的推导过程这里就不写了。例如，你的计算机精度为10<sup>-12</sup>，则使用这种方法求导的精度只能达到10<sup>-6</sup>&mdash;&mdash;即使你使用了一个10<sup>-12</sup>数量级的△x。可能你会觉得△x每减小一点，求出的导数就更精确一点，可惜，舍入误差会让你的期望落空。在很多场合下，这样大的计算误差是无法接受的。</p>
<p>
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: left; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p>
	我们现在考虑这样一种导数计算方法：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="Definition" height="63" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_3.png" style="cursor: default; " width="380" /></p>
<p>
	即：</p>
<p style="text-align: center; ">
	<strong><span style="color:#f00;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:16px;"><img loading="lazy" decoding="async" alt="formula B" height="59" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_10.png" width="270" />&hellip;&hellip;&hellip;&hellip;（B）</span></span></span></strong></p>
<p>
	这个式子是怎么来的？由泰勒展式，可得：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="Taylor" height="57" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_4.png" style="cursor: default; " width="500" /></p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="Taylor" height="57" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_5.png" style="cursor: default; " width="500" /></p>
<p>
	两式相减，得：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="minus" height="60" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_6.png" style="cursor: default; " width="470" /></p>
<p>
	即：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="divide" height="58" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_7.png" width="400" /></p>
<p>
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: left; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p>
	可见，用（B）式来求导时，截断误差为：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="truncation error" height="56" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_8.png" width="140" /></p>
<p>
	&nbsp;</p>
<div>
	用同样的方法，我们也可以计算出（A）式的截断误差，可以发现（A）式的截断误差比（B）式大。</div>
<div>
	&nbsp;</div>
<div>
	截断误差与舍入误差之和，即为总误差，而舍入误差对（A）、（B）两式都是不变的，因此，我进进而可以计算出（A）、（B）两式的总误差，并对比，然后可以得到一个结论：<span style="color:#ff0000;">（B）式的精度比（A）式的精度至少要高一个数量级</span>&mdash;&mdash;在这个结论的推导过程中，由于h是一个变量，因此需要用到线性最小二乘的方法来确定&ldquo;最优&rdquo;的h（即：使总误差最小的h），这里我就省略掉这一段推导过程了。<br />
	既然有了这个更胜一筹的求导式子，我们仅仅通过不断减小该式中的h的值来求导就行了吗？还是不行，因为我们仍然不知道一个合适的h是多大。</div>
<p>
	&nbsp;</p>
<div>
	这个时候，我们需要的是Ridders算法&mdash;&mdash;一种通过&ldquo;<a href="http://www.codelast.com/?page_id=963" target="_blank" rel="noopener noreferrer">外推</a>&rdquo;（extrapolation）来得到&ldquo;最合适&rdquo;的h所对应的导数值的算法。 而Ridders算法的核心，是Neville算法。这再一次验证了一个真理：数学算法互相之间的环环相扣，不胜其多。</div>
<div>
	&nbsp;</div>
<div>
	Neville算法是一种常用的优秀的内插/外推算法（其实都一样，因为内插方法确定的同时，其实也就可以扩展到外推（超过已知点的范围）。这就好比你在平面上对三个点(x<sub>1</sub>, y<sub>1</sub>)、(x<sub>2</sub>, y<sub>2</sub>)、(x<sub>3</sub>, y<sub>3</sub>)（其中x1&lt;x2&lt;x3）使用样条曲线来确定[x1, x3]区间内的插值点时，你同时也就可以在样条曲线延长到的地方，得到区间[x1, x3]之外的点）。</div>
<div>
	&nbsp;</div>
<div>
	说到Neville算法，既然它是一种内插/外推算法，我们就不得不说到拉格朗日插值法&mdash;&mdash;一种多项式插值方法。可能看本文的人觉得被绕晕了，从求导算法一步一步绕到了这里，为了说清楚算法的前因后果，我写得也不容易。</div>
<div>
	&nbsp;</div>
<div>
	下面，就来看看拉格朗日插值公式吧：</div>
<p style="text-align: center;">
	<img loading="lazy" decoding="async" alt="Lagrange interpolation" height="305" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_2.png" style="cursor: default;" width="398" /></p>
<p>
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: left; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p>
	这个公式是干嘛的？它给出了经过(x<sub>0</sub>, y<sub>0</sub>)，(x<sub>1</sub>, y<sub>1</sub>)，&hellip;&hellip;，(x<sub>k-1</sub>, y<sub>k-1</sub>) 这k个点的多项式插值公式。使用它，你可以计算出通过k个点的内插点或外推点的函数值（从函数形式上，我们可以很容易地验证出：f(x<sub>0</sub>)=y<sub>0</sub>，f(x<sub>1</sub>)=y<sub>1</sub>，&hellip;&hellip;，f(x<sub>k-1</sub>)=y<sub>k-1</sub>，因此，拉格朗日插值函数必定是过这k个点的）。</p>
<p>
	知道了拉格朗日插值函数，那么它和Neville算法有何关系？使用拉格朗日插值公式来计算内插点很直观，但是，你无法知道这个计算结果的误差，并且用它不便于编程实现。而Neville算法使用了一种巧妙的、画出来像三角形的表来计算出拉格朗日插值函数的值，并且给出了误差的估计，而且还便于编程实现，所以，这也就是它存在的意义。</p>
<div>
	&nbsp;</div>
<div>
	关于Neville算法的具体原理，我这里就不写上来了，请看<a href="http://www.physics.utah.edu/~detar/phys6720/handouts/interpolation/interpolation/node4.html" target="_blank" rel="noopener noreferrer">这个链接</a>。看完了这个链接，我再补充一句：在Neville算法的（向表的顶端的）推进过程中，最后求得结果之后，我们认为&ldquo;估计的误差&rdquo;就是最后一步与其前面那一步前进的距离之差。</div>
<div>
	&nbsp;</div>
<div>
	好了，现在我们回到Ridders算法，前面说了，它的核心是Neville算法。那么，问题是：如何外推？Neville表是如何构造的？</div>
<p>
	对应到Neville算法中，我们的插值函数就是上面的（B）式，自变量为h。由于h是未知的，甚至于初值都是猜测的，在寻找一个合适的h的过程中，我们需要构造出若干个已知的插值点（Neville表的第一列），然后再向Neville表的顶端推进，所以，与平常的插值在概念上有点&ldquo;不太像&rdquo;：在平常的插值过程中，我们会在若干已知的插值数据点所构成的区间范围内计算一个新点的纵坐标值，而这种情况更像是自变量h向&ldquo;外&rdquo;（超出已知范围的）推断猜测，所以我们称之为外推，而不是内插。</p>
<p>
	然后，我们的插值点如何构造呢？由于我们期待的逼近过程是h&rarr;0，因此，必然要创造出一系列越来越小的h，用它们来求出一系列的导数值（此即为Neville表的第1列，也就是相当于&ldquo;已知&rdquo;的点），然后再用外推的方法，求出Neville表的第2、3、&hellip;&hellip;、最后一列。在这个过程中，<span style="color:#00f;">待求的插值点的横坐标当然是h=0</span>，如果你非要我说得明白一些的话，那就是：相当于Neville算法中的x为0。</p>
<p>
	至于&ldquo;一系列越来越小的h&rdquo;，我们可以通过指定一个初始的h值，并不断将其除以一个系数c（&gt;1）的方式来得到。例如，x<sub>0</sub>=h，x<sub>1</sub>=h/c，x<sub>2</sub>=h/c<sup>2</sup>，&hellip;&hellip;，x<sub>n</sub>=h/c<sup style="font-size: 14px; ">n</sup>。横坐标为x=0的点没有包含在这些值所构成的区间的范围之内，这也就更说明了我们将这个逼近过程称为&ldquo;外推&rdquo;（而不是&ldquo;内插&rdquo;）的合理性。</p>
<p>
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: left; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p>
	为了更清楚地表示Neville表的结构，请看我画的这张图（以4阶的Neville表为例）：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="Neville" height="333" src="http://www.codelast.com/wp-content/uploads/2011/03/derivative_calc_11_pub.png" width="440" /></p>
<p>
	在向Neville表顶端推进的过程中，如果把上图中的每个P称为一个数据点的话，则：各数据点的计算可以按图中的箭头方向，以从上到下、从左到右的顺序逐项计算出来，这样的话，可以尽可能地减少计算函数值的次数，提高程序的效率。因为在逼近过程中，如果遇到了误差增大到一定程度的情况，求导过程就结束了，这样，下面的数据流就没有必要进行了（在这里，请允许我把<span style="color:#008000;">x<sub>1</sub>&rarr;y<sub>1</sub>&rarr;P<sub>01</sub></span>这样的一个数据计算过程称作一个<span style="color:#0000ff;">数据流</span><span style="font-size: 14px; font-family: arial, helvetica, sans-serif; ">）。</span></p>
<p>
	在Neville算法中，子结点的计算只依赖于两个父结点，因此，图中所示的数据计算流程是可以实现的，并且这种概念比原始意义上的Neville算法更好&mdash;&mdash;原始意义上的Neville算法以&ldquo;第1列&rarr;第2列&rarr;第3列&rarr;第4列&rdquo;的顺序计算各项数据，因此无可避免地使第一轮计算过程中就对所有插值点的函数值进行计算，显然，这样做的效率不佳。所以说Ridders算法设计巧妙啊，这就是其优秀原因之一了。</p>
<div>
	根据你所构造的Neville表的大小，计算函数值（这里所说的函数指的是上面的（B）式）所需的次数会有不同。为了求得比较准确的导数值，Neville表不应该构造得太小，否则，程序将有可能会在误差一直减小的阶段就结束了。但也没必要将Neville表构造得太大，因为误差增大到一定程度的时候，我们自然应该将程序退出，取之前得到的最小误差值所对应的那个内插值作为求得的导数值。</div>
<p>
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: left; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p>
	上面就是Ridders求导算法的原理，我个人觉得，如果你原来已经略知一二的话，那么我这篇文章能为你增强一部分理解；但如果你一点也没听说过的话，只看此文并不能使你理解细节问题，你还是要去查很多很多的资料才行。</p>
<p>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9bridders%e6%b1%82%e5%af%bc%e7%ae%97%e6%b3%95/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
