<?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>R2S &#187; 高斯</title> <atom:link href="http://www.road2stat.com/cn/tag/%e9%ab%98%e6%96%af/feed" rel="self" type="application/rss+xml" /><link>http://www.road2stat.com/cn</link> <description>江湖一散人</description> <lastBuildDate>Thu, 26 Jan 2012 08:18:36 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>复化Gauss-Legendre求积</title><link>http://www.road2stat.com/cn/mathematics/composite_gauss_legendre_quadrature.html</link> <comments>http://www.road2stat.com/cn/mathematics/composite_gauss_legendre_quadrature.html#comments</comments> <pubDate>Thu, 27 May 2010 17:33:21 +0000</pubDate> <dc:creator>Xiao Nan</dc:creator> <category><![CDATA[数字之美]]></category> <category><![CDATA[勒让德]]></category> <category><![CDATA[复化]]></category> <category><![CDATA[数值积分]]></category> <category><![CDATA[高斯]]></category><guid isPermaLink="false">http://www.road2stat.com/cn/?p=484</guid> <description><![CDATA[高斯型求积公式是数值积分中一个比较成熟的想法. 速度快, 精度高, 公式优雅. 一般Gauss-Legendre求积公式 对于一般的Gauss型求积公式 取权函数, 积分区间设定为, 则得到一般的Gauss-Legendre求积公式 取Legendre多项式的零点作为Gauss点, 通过计算得到Gauss点个数和时的求积公式 以及 变量替换方法 上述分析中, 积分区间固定为, 实际应用时做变量替换 将被积区间化为 复化Gauss-Legendre求积公式 将被积区间m等分, 记, 作变换 在每个小区间上应用Gauss-Legendre公式, 累加即得复化Gauss-Legendre求积公式 不妨设 则有: Gauss点个数时, Gauss点个数时, 总结复化Gauss-Legendre求积过程如下: 1. 分割区间, 记录区间端点值； 2. 通过查表或求解非线性方程组, 在所有小区间上, 将Gauss系数和Gauss点的值代入变量替换后的公式； 3. 将所有区间的结果累加, 即得到整个区间上的积分近似值. 针对Gauss点个数和的复化Gauss-Legendre求积公式编写的一个简单的MATLAB函数 compgauss() &#8230; <a href="http://www.road2stat.com/cn/mathematics/composite_gauss_legendre_quadrature.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>高斯型求积公式是数值积分中一个比较成熟的想法. 速度快, 精度高, 公式优雅.</p><h4>一般Gauss-Legendre求积公式</h4><p>对于一般的Gauss型求积公式<br /> <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_cbb6402feed2986e6cd7e67c600e177c.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\int_a^b f(x) \rho (x) dx \approx \sum_{k=0}^{n} A_k f(x_k)" /></span><br /> 取权函数<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_0e81df54457f80f77a4d22ced4cc48e9.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\rho (x)=1" /></span>, 积分区间设定为<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_d7455a676b32c077860f75f351322de3.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\left[-1, 1 \right]" /></span>, 则得到一般的Gauss-Legendre求积公式<br /> <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_f7d42cf638b519655f81de468a9d4a26.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\int_{-1}^{1} f(x) dx \approx \sum_{k=0}^{n} A_k f(x_k)." /></span><br /> 取Legendre多项式的零点作为Gauss点, 通过计算得到Gauss点个数<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_c303081f7a16f603112b0375bdc84883.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="n=2" /></span>和<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_f4b339682e05755eb7408448ef87e1ca.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="n=3" /></span>时的求积公式<br /> <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_4996429cb5eb2c1a6ef161dd84f64adb.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\int_{-1}^{1} f(x) dx \approx f(-\frac{1}{\sqrt{3}})+f(\frac{1}{\sqrt{3}})" /></span><br /> 以及<br /> <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_91623eda84c561645dea6c193a8289a9.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\int_{-1}^{1} f(x) dx \approx \frac{5}{9} f(-\frac{\sqrt{15}}{5})+\frac{8}{9}f(0)+\frac{5}{9}f(\frac{\sqrt{15}}{5})." /></span></p><h4>变量替换方法</h4><p>上述分析中, 积分区间固定为<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_52e0f4e8efc463057bb180a1d986b979.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\left[-1, 1\right]" /></span>, 实际应用时做变量替换<br /> <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_ae47cec1b3904a1a24eb1c15d5dc4da5.gif' style='vertical-align: middle; border: none; ' class='tex' alt="x=\frac{a+b}{2}+\frac{b-a}{2}t." /></span><br /> 将被积区间<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_aa8a2f2a8b3a6d086d150cad4e3d1975.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\left[a, b \right]" /></span>化为<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_d7997c900aea82b9da9f930172b1eb20.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\left[-1, 1 \right]." /></span></p><h4>复化Gauss-Legendre求积公式</h4><p>将被积区间m等分, 记<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_0b4d54cec22e337628dae6982090cbba.gif' style='vertical-align: middle; border: none; ' class='tex' alt="h=\frac{b-a}{m}" /></span>, <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_dd577f01acd27de265409e155b73a9ef.gif' style='vertical-align: middle; border: none; ' class='tex' alt="x_k=a+kh, k=0, 1, 2 \ldots, m." /></span> 作变换<br /> <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_df7f57aebd2ed7e7c418b4940036c0c9.gif' style='vertical-align: middle; border: none; ' class='tex' alt="x=\frac{x_k+x_{k-1}}{2}+\frac{h}{2} t" /></span></p><p>在每个小区间上应用Gauss-Legendre公式, 累加即得复化Gauss-Legendre求积公式<br /> <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_ca51f3107e0e41ba607e878f064bbaf4.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\int_a^b f(x) dx=\frac{h}{2}\sum\sum A_k f(x_k)." /></span></p><p>不妨设<br /> <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_487728105b5a3b177fc27f840cf6d46e.gif' style='vertical-align: middle; border: none; ' class='tex' alt="G(t)=f(\frac{x_k+x_{k+1}}{2}+\frac{h}{2} t)" /></span></p><p>则有:</p><p>Gauss点个数<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_c303081f7a16f603112b0375bdc84883.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="n=2" /></span>时,<br /> <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_a001240ae6b324d5035ce39634ec6b27.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\int_a^b f(x) dx \approx\frac{h}{2}\sum G(-\frac{1}{\sqrt{3}})+G(\frac{1}{\sqrt{3}})," /></span></p><p>Gauss点个数<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_f4b339682e05755eb7408448ef87e1ca.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="n=3" /></span>时,<br /> <span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_0ff62bc68e2a31dacbc7f6b711b0aaad.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\int_a^b f(x) dx \approx \frac{h}{2}\sum \frac{5}{9}G(-\frac{\sqrt{15}}{5})+\frac{8}{9}G(0)+\frac{5}{9}G(\frac{\sqrt{15}}{5})." /></span></p><p>总结复化Gauss-Legendre求积过程如下:</p><p>1. 分割区间, 记录区间端点值；<br /> 2. 通过查表或求解非线性方程组, 在所有小区间上, 将Gauss系数和Gauss点的值代入变量替换后的公式；<br /> 3. 将所有区间的结果累加, 即得到整个区间上的积分近似值.</p><p>针对Gauss点个数<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_c303081f7a16f603112b0375bdc84883.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="n=2" /></span>和<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_f4b339682e05755eb7408448ef87e1ca.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="n=3" /></span>的复化Gauss-Legendre求积公式编写的一个简单的MATLAB函数 compgauss() 如下:</p><div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p484code2'); return false;">View Code</a> SCILAB</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4842"><td class="code" id="p484code2"><pre class="scilab" style="font-family:monospace;"><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000000; font-weight: bold;">function</span></a> <span style="color: #009900;">&#91;</span> <span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> compgauss<span style="color: #009900;">&#40;</span>a<span style="color: #339933;">,</span> b<span style="color: #339933;">,</span> n<span style="color: #009900;">&#41;</span>
<span style="color: #339933;">%</span> Composite Gauss Integration
<span style="color: #339933;">%</span> Equation <a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">Type</span></a><span style="color: #339933;">:</span> n<span style="color: #339933;">=</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> n<span style="color: #339933;">=</span><span style="color: #cc66cc;">3</span>
<span style="color: #339933;">%</span> Coded by Nan.Xiao <span style="color: #cc66cc;">2010</span><span style="color: #339933;">-</span>05<span style="color: #339933;">-</span><span style="color: #cc66cc;">25</span>
<span style="color: #339933;">%</span> Step.1 Divide Interval
<span style="color: #339933;">%</span> Step.2 Calculate
<span style="color: #339933;">%</span> Step.3 Sum Results
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">format</span></a> long
f <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span> <a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">exp</span></a><span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span>.<span style="color: #339933;">*</span><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">sin</span></a><span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
h<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span>b<span style="color: #339933;">-</span>a<span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span>n<span style="color: #339933;">;</span>
xk<span style="color: #339933;">=</span><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">zeros</span></a><span style="color: #009900;">&#40;</span>n<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
xk<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">=</span>a<span style="color: #339933;">;</span>
xk<span style="color: #009900;">&#40;</span>n<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">=</span>b<span style="color: #339933;">;</span>
fk1<span style="color: #339933;">=</span><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">zeros</span></a><span style="color: #009900;">&#40;</span>n<span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
fk2<span style="color: #339933;">=</span><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">zeros</span></a><span style="color: #009900;">&#40;</span>n<span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #b1b100;">for</span></a> i<span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">:</span>n<span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span>
    xk<span style="color: #009900;">&#40;</span>i<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">=</span>a<span style="color: #339933;">+</span>h<span style="color: #339933;">*</span>i<span style="color: #339933;">;</span>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #b1b100;">end</span></a>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #b1b100;">for</span></a> j<span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">:</span>n
    fk1<span style="color: #009900;">&#40;</span>j<span style="color: #009900;">&#41;</span><span style="color: #339933;">=</span>f<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>xk<span style="color: #009900;">&#40;</span>j<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>xk<span style="color: #009900;">&#40;</span>j<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>h<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">/</span><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">sqrt</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>...
        f<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>xk<span style="color: #009900;">&#40;</span>j<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>xk<span style="color: #009900;">&#40;</span>j<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>h<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">/</span><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">sqrt</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #b1b100;">end</span></a>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #b1b100;">for</span></a> r<span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">:</span>n
    fk2<span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>f<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>xk<span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>xk<span style="color: #009900;">&#40;</span>r<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>h<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">sqrt</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">15</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>...
        <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>f<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>xk<span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>xk<span style="color: #009900;">&#40;</span>r<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>h<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>...
        <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>f<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>xk<span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>xk<span style="color: #009900;">&#40;</span>r<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>h<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #009900;">&#40;</span><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">sqrt</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">15</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #b1b100;">end</span></a>
mysum1<span style="color: #339933;">=</span>h<span style="color: #339933;">*</span><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">sum</span></a><span style="color: #009900;">&#40;</span>fk1<span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
mysum2<span style="color: #339933;">=</span>h<span style="color: #339933;">*</span><a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">sum</span></a><span style="color: #009900;">&#40;</span>fk2<span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">disp</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Result of 2 Nodes:'</span><span style="color: #009900;">&#41;</span>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">disp</span></a><span style="color: #009900;">&#40;</span>mysum1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">disp</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Result of 3 Nodes:'</span><span style="color: #009900;">&#41;</span>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #000066;">disp</span></a><span style="color: #009900;">&#40;</span>mysum2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm"><span style="color: #b1b100;">end</span></a></pre></td></tr></table></div><h4>总结</h4><p>1. Gauss求积公式较一般的机械求积公式的进步之处, 在于其针对插值型求积公式进行了改进. Gauss公式将插值节点设为未知, 成功地将代数精度由<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_7b8b965ad4bca0e41ab51de7b31363a1.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="n" /></span>次提高到<span class='MathJax_Preview'><img src='http://www.road2stat.com/cn/wp-content/plugins/latex/cache/tex_d2b2d9fec288403faf6e85ebf2c58972.gif' style='vertical-align: middle; border: none; ' class='tex' alt="2n+1" /></span>次. 计算过程简单, 速度快, 达到要求精度所需步骤较少.</p><p>2. (复化) Gauss 求积的一个问题在于, 增加Gauss点个数, 继续求解Gauss系数和Gauss点值时, 需要解一系列非线性方程组. 其解析解较难求得. 而取数值解作为公式中的参数, 不如解析解理想.</p> ]]></content:encoded> <wfw:commentRss>http://www.road2stat.com/cn/mathematics/composite_gauss_legendre_quadrature.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
