![北航數(shù)值分析第三次作業(yè)_圖文_第1頁(yè)](http://file3.renrendoc.com/fileroot_temp3/2022-1/30/e5eb9ee2-c57c-4375-b302-e7a6dd3c3a95/e5eb9ee2-c57c-4375-b302-e7a6dd3c3a951.gif)
![北航數(shù)值分析第三次作業(yè)_圖文_第2頁(yè)](http://file3.renrendoc.com/fileroot_temp3/2022-1/30/e5eb9ee2-c57c-4375-b302-e7a6dd3c3a95/e5eb9ee2-c57c-4375-b302-e7a6dd3c3a952.gif)
![北航數(shù)值分析第三次作業(yè)_圖文_第3頁(yè)](http://file3.renrendoc.com/fileroot_temp3/2022-1/30/e5eb9ee2-c57c-4375-b302-e7a6dd3c3a95/e5eb9ee2-c57c-4375-b302-e7a6dd3c3a953.gif)
![北航數(shù)值分析第三次作業(yè)_圖文_第4頁(yè)](http://file3.renrendoc.com/fileroot_temp3/2022-1/30/e5eb9ee2-c57c-4375-b302-e7a6dd3c3a95/e5eb9ee2-c57c-4375-b302-e7a6dd3c3a954.gif)
![北航數(shù)值分析第三次作業(yè)_圖文_第5頁(yè)](http://file3.renrendoc.com/fileroot_temp3/2022-1/30/e5eb9ee2-c57c-4375-b302-e7a6dd3c3a95/e5eb9ee2-c57c-4375-b302-e7a6dd3c3a955.gif)
版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、數(shù)值分析第三次作業(yè)1. 算法的設(shè)計(jì)方案對(duì)Fredholm 積分方程,用迭代法進(jìn)行求解:u (x ' =A (u (x ,其中A (u (x =g (x -K (x , y u (y dy-11對(duì)于公式中的積分部分用數(shù)值積分方法。復(fù)化梯形積分法,取2601個(gè)節(jié)點(diǎn),取迭代次數(shù)上限為50次。實(shí)際計(jì)算迭代次數(shù)為18次,最后算得誤差為r= 0.97E-10。復(fù)化Simpson 積分法,取迭代次數(shù)上限為50次,取2*41+1,即83個(gè)節(jié)點(diǎn)時(shí)能滿(mǎn)足精度要求。實(shí)際計(jì)算迭代次數(shù)為17次,最后的誤差為 r= 0.97E-10。Guass 積分法選擇的Gauss Legendre 法,取迭代次數(shù)上限為50次
2、,直接選擇8個(gè)節(jié)點(diǎn),滿(mǎn)足精度要求。實(shí)際計(jì)算迭代次數(shù)為24次,最后算得誤差為r= 0.87E-10。2. 全部源程序 module integral implicit none contains!/復(fù)化梯形 subroutine trapezoid(m implicit none integer : i,j,k,mreal*8 : x(m+1,u(m+1 real*8 : sum,sum1,g,r,h real*8 : e=1.0e-10h=2./m do i=1,m+1x(i=-1.+(i-1*h end dou=0.02 do k=1,50 do i=1,m+1 sum1=0.g=dexp(
3、x(i*4.+(dexp(x(i+4.-dexp(-4.-x(i/(x(i+4. do j=2,m sum1=sum1+dexp(x(i*x(j*u(j end do sum=h/2.*(dexp(x(i*-1.*u(1+dexp(x(i*1.*u(m+1+2*sum1 u(i=g-sum end dor=h/2.*(dexp(x(1*4-u(1*2+(dexp(x(m+1*4-u(m+1*2 do i=2,mr=r+h*(dexp(x(i*4-u(i*2 end doif(dabs(r<=e exit end dowrite(*,* kopen(1,file="trapezo
4、id.txt" do i=1,m+1write(1,'(3(f18.12' x(i,u(i,dexp(x(i*4. end dowrite(1,'(4x,a2,e9.2' "r=",r close(1returnend subroutine trapezoid!/復(fù)化simpson subroutine simpson(m implicit none integer : i,j,k,mreal*8 : x(2*m+1,u(2*m+1 real*8 : sum,sum1,sum2,g,r,h real*8 : e=1.0e-10h=2
5、./(2.*m do i=1,2*m+1 x(i=-1.+(i-1*h end dou=0.02 do k=1,50do i=1,2*m+1 sum1=0. sum2=0.g=dexp(x(i*4.+(dexp(x(i+4.-dexp(-4.-x(i/(x(i+4. do j=1,msum1=sum1+dexp(x(i*x(2*j*u(2*j end do do j=1,m-1sum2=sum2+dexp(x(i*x(2*j+1*u(2*j+1sum=h/3.*(dexp(x(i*-1.*u(1+dexp(x(i*1.*u(2*m+1+4*sum1+2*sum2 u(i=g-sum end d
6、or=h/3.*(dexp(x(1*4-u(1*2+(dexp(x(2*m+1*4-u(2*m+1*2 do i=1,mr=r+4.*h/3.*(dexp(x(2*i*4-u(2*i*2 end do do i=1,m-1r=r+2.*h/3.*(dexp(x(2*i+1*4-u(2*i+1*2 end doif(dabs(r<=e exit end dowrite(*,* kopen(2,file="simpson.txt" do i=1,2*m+1write(2,'(3(f18.12' x(i,u(i,dexp(x(i*4. end dowrite
7、(2,'(4x,a2,e9.2' "r=",r close(2returnend subroutine simpson!/Gauss_Legendre法 subroutine Gauss implicit noneinteger,parameter : m=8 integer : i,j,kreal*8 : x(m,u(m,a(m real*8 : sum,g,r real*8 : e=1.0e-10data x /-0.9602898565,-0.7966664774,-0.5255324099,-0.1834346425,& 0.18343464
8、25,0.5255324099,0.7966664774,0.9602898565/data a /0.1012285363,0.2223810345,0.3137066459,0.3626837834,& 0.3626837834,0.3137066459,0.2223810345,0.1012285363/u=0.02 do k=1,50 do i=1,mg=dexp(x(i*4.+(dexp(x(i+4.-dexp(-4.-x(i/(x(i+4. do j=1,msum=sum+dexp(x(i*x(j*u(j*a(j end do u(i=g-sum end do r=0.do
9、 i=1,mr=r+a(i*(dexp(x(i*4-u(i*2 end doif(dabs(r<=e exit end dowrite(*,* kopen(3,file="Gauss.txt" do i=1,mwrite(3,'(3(f18.12' x(i,u(i,dexp(x(i*4. end dowrite(3,'(4x,a2,e9.2' "r=",r close(3returnend subroutine Gaussend module!/主程序 program main use integral implicit noneinteger : code1=2600 integer : code2=41call trapezoid(code1 call simpson(code2 call Gaussend program3. 各種積分方法的節(jié)點(diǎn)和數(shù)值解(由于數(shù)據(jù)太多,在打印時(shí)用了較計(jì)算時(shí)少的有效數(shù)字)復(fù)化梯形法 復(fù)化Simpson 法 4. 各方法所得曲線(xiàn) (由于所取節(jié)點(diǎn)太多,且精度高,所以圖中很難看出各曲線(xiàn)的區(qū)別。 ) 5. 不
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度消防系統(tǒng)節(jié)能改造分包合同
- 單位節(jié)水改造合同范例
- 與物業(yè)簽合同范本
- 2025年度地下綜合管廊施工合同履約擔(dān)保書(shū)
- 2025年度展會(huì)現(xiàn)場(chǎng)互動(dòng)展位展板制作合同
- 環(huán)保設(shè)備貸款居間合同
- 出售大路門(mén)面合同范本
- 2025年度智能新能源汽車(chē)買(mǎi)賣(mài)合同
- 2025年中國(guó)智能信用卡行業(yè)發(fā)展監(jiān)測(cè)及投資戰(zhàn)略規(guī)劃研究報(bào)告
- 2025年度員工競(jìng)業(yè)禁止協(xié)議期限與違約責(zé)任明確合同
- 2024年資助政策主題班會(huì)課件
- 中國(guó)慢性阻塞性肺疾病基層診療與管理指南(2024年)
- 部編四年級(jí)道德與法治下冊(cè)全冊(cè)教案(含反思)
- 高中英語(yǔ)選擇性必修三 Unit 2 Healthy Lifestyle Section B Learning about Language(教案)
- 綠色卡通風(fēng)食堂食品安全培訓(xùn)PPT
- 人教版小學(xué)數(shù)學(xué)二年級(jí)上冊(cè)口算天天練
- 建筑施工安全檢查標(biāo)準(zhǔn)-JGJ59-2011完整版
- 黃恕伯:必修教材教學(xué)建議
- 排球比賽記錄表
- ASM鑄造缺陷的國(guó)際分類(lèi)7大類(lèi)(學(xué)習(xí)版0228)
- 關(guān)于汽車(chē)行業(yè)必須了解的縮寫(xiě)含義
評(píng)論
0/150
提交評(píng)論