版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
§1.1ErrorsandSignificantDigits1.1.1Truncationerrorandroundofferror
Truncationerror:madebynumericalalgorithms,arisefromtakingfinitenumberofstepsincomputation
Chapter1
Errors2022/11/241§1.1ErrorsandSignificantDcomputation
sinx,where
Accordingtotheexpansionofsin
x(1.1)
Butwehavetouseitsfiniteitemstoapproximatesinx,forexample,computesin0.5,setn=3,Eg.1.1xisaradian,notdegree.2022/11/242computationsinx,whereAc
AccordingtotheTaylor’sremainder,(1.2)Thisresultisveryaccurate.2022/11/243AccordingtotheTaylor’sEg.1.2TakingonlyafewtermsofaMaclaurinseriestoapproximateIfonly3termsareused,2022/11/244Eg.1.2TakingonlyafewtermsEg.1.3(Secantline)UsingafinitetoapproximatePQsecantlinetangentlineFigure1.ApproximatederivativeusingfiniteΔx2022/11/245Eg.1.3(Secantline)UsingafEg.1.4(Differentiation)FindforusingandTheactualvalueisTruncationerroristhen,Canyoufindthetruncationerrorwith2022/11/246Eg.1.4(Differentiation)FindEg.1.4(Integration)Usetworectanglesofequalwidthtoapproximatetheareaunderthecurveforovertheinterval2022/11/247Eg.1.4(Integration)UsetwoIntegrationexample(cont.)Choosingawidthof3,wehaveActualvalueisgivenbyTruncationerroristhenCanyoufindthetruncationerrorwith4rectangles?2022/11/248Integrationexample(cont.)ChoRoundofferror:usingfiniteprecisionfloating-pointnumbersoncomputerstorepresentrealnumbers
2022/11/249Roundofferror:usingfinite1.1.2Absoluteerrorandrelativeerror
Definition1.1let
x*betheaccuratevalue(unknown),andxbeanapproximationtox*,then
E=x-x*iscalledtheabsoluteerrorofx*.Ingeneral,wecan’tgettheabsoluteerrorbecausewedonotknowthetruevalueofx,butwecanestimatetheerrorwithabsoluteerrorbounddefinedasfollows:
Definition1.2Apositivenumber?iscalledtheabsoluteerrorboundofx*if|x*-x|≤ε.2022/11/24101.1.2Absoluteerrorandrelat
Remark.Ingeneral,x*isunknown,sowereplacex*byx,Canyougivethereason?
Definition1.3Ifxisanapproximationtox*,then
iscalledtherelativeerrorofx*.2022/11/2411Remark.Ingeneral,x*isEg.1.5Supposex=9999,x*=10000,y=9,y*=10.Pleaseshowtheabsoluteerrorandrelativeerrorofthem.Solution.Ex=9999-10000=-1,Ey=9-10=-1.er(x)=(9999-10000)/10000=-0.0001.
er(y)=(9-10)/10=-.3SignificantDigitsDefintion1.4Supposeistheapproximationtox*.Ifthenthenumberxissaidtoapproximatex*tolsignificantdigits.Machinerepresentationofnumbers2022/11/2412Eg.1.5Supposex=9999,x*=10Eg.1.6Supposex*=20.03173,andx1=20.03,x2=20.031,x3=20.032areitsapproximationsrespectively.Determinethenumbersofsignificantdigitsofthem.Solution.Rewritex1,x2andx3asx1=0.2003×102,x2=0.20031×102,x3=0.20032×102.Since
AccordingtoDefinition1.4,x1,x2andx3have4,4and5significantdigitsrespectively.2022/11/2413Eg.1.6Supposex*=20.03173,aSometimes,wecutalongnumberintoashortnumberthroughrounding.Eg.1.7Accordingtotheroundingrule,writethefollowingnumberswith5significantdigits.
①287.9325②0.03785551③8.000033④2.718281828459045⑤2.765450Solution.
①287.9325≈287.93(roundingdown)②0.03785551≈0.037856(roundingup)③8.000033≈8.0000(roundingdown)④2.718281828459045≈2.7183(roundingup)⑤2.765450≈2.7655(roundingup)2022/11/2414Sometimes,wecutalongnumTheorem1.1Suppose
withnsignificantdigits,thentherelativeerrorboundofx*Theorem1.2Iftherelativeerrorboundofisthenxhasatleastnsignificantdigits.2022/11/2415Theorem1.1Suppose§1.2PropagationofErrorsWhenweuseinaccuratenumberstocalculate,howdotheseinaccuraciespropagatethroughthecalculations?2022/11/2416§1.2PropagationofErrorsWheEg.1.8Findtheboundsforthepropagationinaddingtwonumbers.ForexampleifoneiscalculatingX+Ywhere
X=1.5±0.05
Y=3.4±0.04SolutionMaximumpossiblevalueofX=1.55andY=3.44MaximumpossiblevalueofX+Y=1.55+3.44=4.99MinimumpossiblevalueofX=1.45andY=3.36.MinimumpossiblevalueofX+Y=1.45+3.36=4.81Hence 4.81≤X+Y≤4.99.2022/11/2417Eg.1.8FindtheboundsforthePropagationofErrorsInFormulasIfisafunctionofseveralvariablesthenthemaximumpossiblevalueoftheerrorinis2022/11/2418PropagationofErrorsInFormuEg.1.9Thestraininanaxialmemberofasquarecross-sectionisgivenbyGivenFindthemaximumpossibleerrorinthemeasuredstrain.2022/11/2419Eg.1.9ThestraininanaxialSolution
2022/11/2420Solution 2022/11/2220ThusHence2022/11/2421ThusHence2022/11/2221Eg.10Subtractionofnumbersthatarenearlyequalcancreateunwantedinaccuracies.Usingtheformulaforerrorpropagation,showthatthisistrue.SolutionLetThenSotherelativechangeis2022/11/2422Eg.10SubtractionofnumbersthEg.11Forexampleif=0.6667=66.67%2022/11/2423Eg.11Forexampleif=0.6667201.3.1Avoidthesubtractionofnearlyequalnumbers
Thesubtractionofnearlyequalnumberswilllosssignificantdigitslargely,sothisoperationleadstoalargerrelativeerror.Eg.1.12Computetheapproximationtox*-y*using4-digits.
①x=18.496;y=17.208②x=18.496;y=18.493Solution.①Theapproximationswith4-digitsto
x*andy*usingtheRoundingRuleareasfollows:
x=18.50;y=17.21
x-y=
18.50-17.21=1.29Infact
x*-y*=18.496-17.208=1.288§3HowtoAvoidtheLossofAccuracy2022/11/24241.3.1AvoidthesubtractionofAbsoluteerror
Relativeerror
②Theapproximationswith4-digitsto
x*andy*usingtheRoundingRuleareasfollows:
x=18.50;y=18.49
x-y=
18.50-18.49=0.01infact
x*-y*=18.496-18.493=0.003
Absoluteerror
Relativeerror2022/11/2425②Theapproximationswith4-dFindabettersolution:①moresignificantdigits;②usingabettercomputationform,forexample1.3.2Avoidbignumbers“swallowing”importantsmallnumbersEg.1.1.13Tocalculate1-cos0.1usingtwoways.(4significantdigit)1-cos0.1=1-0.9950=0.00502sin2(0.05)=2*0.04498*0.04498=0.004496.Truevalue:0.004496.2022/11/2426Findabettersolution:①moresEputingrootsofaquadraticequationUsing4digitsroundingarithmetic,applytheformulaTotheequationSolution.Inthisequation,b2isamuchlargerthan4ac,whichinducesWehave2022/11/2427EputingrootsofaButtheaccuratesolutionisWecanfindaverygreaterrorforx1.Abetterwayis2022/11/2428ButtheaccuratesolutionisWIfsetε=10-5,wehavetocomputeuntiln>105Let
x=1/3,resultcansatisfytheprecisionbyonlycomputing5times.Eg.AvoidabigNumberDividingbyasmallnumber1.3.4Reducingcomputations2022/11/2429Ifsetε=10-5,wehavetocompu§1.1ErrorsandSignificantDigits1.1.1Truncationerrorandroundofferror
Truncationerror:madebynumericalalgorithms,arisefromtakingfinitenumberofstepsincomputation
Chapter1
Errors2022/11/2430§1.1ErrorsandSignificantDcomputation
sinx,where
Accordingtotheexpansionofsin
x(1.1)
Butwehavetouseitsfiniteitemstoapproximatesinx,forexample,computesin0.5,setn=3,Eg.1.1xisaradian,notdegree.2022/11/2431computationsinx,whereAc
AccordingtotheTaylor’sremainder,(1.2)Thisresultisveryaccurate.2022/11/2432AccordingtotheTaylor’sEg.1.2TakingonlyafewtermsofaMaclaurinseriestoapproximateIfonly3termsareused,2022/11/2433Eg.1.2TakingonlyafewtermsEg.1.3(Secantline)UsingafinitetoapproximatePQsecantlinetangentlineFigure1.ApproximatederivativeusingfiniteΔx2022/11/2434Eg.1.3(Secantline)UsingafEg.1.4(Differentiation)FindforusingandTheactualvalueisTruncationerroristhen,Canyoufindthetruncationerrorwith2022/11/2435Eg.1.4(Differentiation)FindEg.1.4(Integration)Usetworectanglesofequalwidthtoapproximatetheareaunderthecurveforovertheinterval2022/11/2436Eg.1.4(Integration)UsetwoIntegrationexample(cont.)Choosingawidthof3,wehaveActualvalueisgivenbyTruncationerroristhenCanyoufindthetruncationerrorwith4rectangles?2022/11/2437Integrationexample(cont.)ChoRoundofferror:usingfiniteprecisionfloating-pointnumbersoncomputerstorepresentrealnumbers
2022/11/2438Roundofferror:usingfinite1.1.2Absoluteerrorandrelativeerror
Definition1.1let
x*betheaccuratevalue(unknown),andxbeanapproximationtox*,then
E=x-x*iscalledtheabsoluteerrorofx*.Ingeneral,wecan’tgettheabsoluteerrorbecausewedonotknowthetruevalueofx,butwecanestimatetheerrorwithabsoluteerrorbounddefinedasfollows:
Definition1.2Apositivenumber?iscalledtheabsoluteerrorboundofx*if|x*-x|≤ε.2022/11/24391.1.2Absoluteerrorandrelat
Remark.Ingeneral,x*isunknown,sowereplacex*byx,Canyougivethereason?
Definition1.3Ifxisanapproximationtox*,then
iscalledtherelativeerrorofx*.2022/11/2440Remark.Ingeneral,x*isEg.1.5Supposex=9999,x*=10000,y=9,y*=10.Pleaseshowtheabsoluteerrorandrelativeerrorofthem.Solution.Ex=9999-10000=-1,Ey=9-10=-1.er(x)=(9999-10000)/10000=-0.0001.
er(y)=(9-10)/10=-.3SignificantDigitsDefintion1.4Supposeistheapproximationtox*.Ifthenthenumberxissaidtoapproximatex*tolsignificantdigits.Machinerepresentationofnumbers2022/11/2441Eg.1.5Supposex=9999,x*=10Eg.1.6Supposex*=20.03173,andx1=20.03,x2=20.031,x3=20.032areitsapproximationsrespectively.Determinethenumbersofsignificantdigitsofthem.Solution.Rewritex1,x2andx3asx1=0.2003×102,x2=0.20031×102,x3=0.20032×102.Since
AccordingtoDefinition1.4,x1,x2andx3have4,4and5significantdigitsrespectively.2022/11/2442Eg.1.6Supposex*=20.03173,aSometimes,wecutalongnumberintoashortnumberthroughrounding.Eg.1.7Accordingtotheroundingrule,writethefollowingnumberswith5significantdigits.
①287.9325②0.03785551③8.000033④2.718281828459045⑤2.765450Solution.
①287.9325≈287.93(roundingdown)②0.03785551≈0.037856(roundingup)③8.000033≈8.0000(roundingdown)④2.718281828459045≈2.7183(roundingup)⑤2.765450≈2.7655(roundingup)2022/11/2443Sometimes,wecutalongnumTheorem1.1Suppose
withnsignificantdigits,thentherelativeerrorboundofx*Theorem1.2Iftherelativeerrorboundofisthenxhasatleastnsignificantdigits.2022/11/2444Theorem1.1Suppose§1.2PropagationofErrorsWhenweuseinaccuratenumberstocalculate,howdotheseinaccuraciespropagatethroughthecalculations?2022/11/2445§1.2PropagationofErrorsWheEg.1.8Findtheboundsforthepropagationinaddingtwonumbers.ForexampleifoneiscalculatingX+Ywhere
X=1.5±0.05
Y=3.4±0.04SolutionMaximumpossiblevalueofX=1.55andY=3.44MaximumpossiblevalueofX+Y=1.55+3.44=4.99MinimumpossiblevalueofX=1.45andY=3.36.MinimumpossiblevalueofX+Y=1.45+3.36=4.81Hence 4.81≤X+Y≤4.99.2022/11/2446Eg.1.8FindtheboundsforthePropagationofErrorsInFormulasIfisafunctionofseveralvariablesthenthemaximumpossiblevalueoftheerrorinis2022/11/2447PropagationofErrorsInFormuEg.1.9Thestraininanaxialmemberofasquarecross-sectionisgivenbyGivenFindthemaximumpossibleerrorinthemeasuredstrain.2022/11/2448Eg.1.9ThestraininanaxialSolution
2022/11/2449Solution 2022/11/2220ThusHence2022/11/2450ThusHence2022/11/2221Eg.10Subtractionofnumbersthatarenearlyequalcancreateunwantedinaccuracies.Usingtheformulaforerrorpropagation,showthatthisistrue.SolutionLetThenSotherelativechangeis2022/11/2451Eg.10SubtractionofnumbersthEg.11Forexampleif=0.6667=66.67%2022/11/2452Eg.11Forexampleif=0.6667201.3.1Avoidthesubtractionofnearlyequalnumbers
Thesubtractionofnearlyequalnumberswilllosssignificantdigitslargely,sothisoperationleadstoalargerrelativeerror.Eg.1.12Computetheapproximationtox*-y*using4-digits.
①x=18.496;y=17.208②x=18.496;y=18.493Solution.①Theapproximationswith4-digitsto
x*andy*usingtheRoundingRuleareasfollows:
x=18.50;y=17.21
x-y=
18.50-17
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年智慧體育項目合作計劃書
- 人教版初中生詞匯書
- 部編版五年級課外閱讀訓(xùn)練教學(xué)成果
- 人教版必修一的語文學(xué)習(xí)目錄解析
- 初中語文人教版試題解析
- 北師大小山行記
- 北師大教學(xué)設(shè)計實踐邁向教育巔峰
- 蘇教版高中必修一數(shù)學(xué)全攻略解析
- 蘇教版分?jǐn)?shù)除法教學(xué)心得分享與交流說課稿
- 六年級蘇教版數(shù)學(xué)秋季學(xué)期試卷
- 更換凈化水設(shè)備的請示
- 焦?fàn)t爐頂灌漿施工方案
- 神經(jīng)病學(xué)常見病詳細(xì)目錄
- 赤峰市國企招聘考試真題及答案
- 史密斯輸液泵的使用方法
- 機(jī)械制圖習(xí)題集(第7版)
- 農(nóng)業(yè)推廣的內(nèi)容同課異構(gòu)
- 2023年上海市英語高考一輪復(fù)習(xí)精講精練專題23:句子翻譯(下)含詳解
- 扣繳個人所得稅報告表-(Excel版)
- 2023年成人高考《英語》(高升專)真題庫及答案(單選題型)
- 25個吊籃事故案例
評論
0/150
提交評論