Upload
vmedeau
View
227
Download
0
Embed Size (px)
Citation preview
7/27/2019 Numerical analysis - Chapter 0.pdf
1/23
7/27/2019 Numerical analysis - Chapter 0.pdf
2/23
2 I CPTER0 F
MHOD 2
MH 3
The i a bter wa 0 Eo i beg duplated-peaon cabe sav by elnan he eated mltpiaion y p 1/ A bet sgy .tos compue 1/24 song ptil podcs as we g Tha lad o e ow med
d the powes of he npu nmer1/2 r, ad sr them r u
Nowwe n add p e es
hee r now 3 muplcato o 1/ along wih 4o mulpcao. Counng up,we have duced to 7 mliiao wt e sme 4 adios e do om 4.o 1 prao a sigct roement? ltr is oly oe evuin to be dne henpobaby no We Metod 1 or eod sed te ae wl be aab be
y c f o nge o he ope keyb Howeve uppe e plynomi
needs to e evaluaed a di e inpuS x vel mes p ecd Ten te drenema be r t getng te ao whe i needed.I s e et we c d or a deee 4 polnoial I may b rd o age tl
we eii ee moe at but we an he bsL elemen meho is theowig oe
(Neted Mulilan) Rewe he plynomal ta i c euae m the idou:
i
/P(x) -1 + x5- 3
) -1 S . 3x + 2 1 + x( x3 x3 = -1 ,t 5 X : ( 3X* (3 X ) (
e Ue yomia iswrte bakw and powe ox re aced ou te t ote lo Once ou c see o wte ths wa no comptao i equ t d hewige ccin e uhanged w eve fo e iside u:
mpy
* ,
1muy
Z*
add 3 -
ad -
7/27/2019 Numerical analysis - Chapter 0.pdf
3/23
. 1mulply * -,
2
0 Evu Polynomia I 3
add+ 5 2
9mulply 2 * 2.
add -
4 (03
T methd, lld lpcon H' h auas e lymal 4 mupln d 4 add A geeral degre d plynml c be evaud n ltpa ad addts Nsd multlato s ce la t yedvs f plyml ae
eexmle f lymal eala hae f e ene p f pu mehds sce mpug Ft pue ae ey fs at dg vr mpletng S
7/27/2019 Numerical analysis - Chapter 0.pdf
4/23
4 I CHAPTER 0 Fundametals
EXAMPE
nest(4,-l S -3 )1/20 0 0 OJ)
=
L25
a wefound l by ha. Th fe st . m, ret oft MA cd show n book, mus b acc om h M pa (o e ue o) wnxctng th cond.
Tf ns od s o b used w a pi 0 a 2) h bbvaedfo
s [-
ma b ud w eu du o e ag sateme . eumb of nu gumns s s tha 4, b p ae auomay se o zo
Beaus o 's sem of eo o s od cua a a of: vaus a oce foowig od is iav:
nt ( 2 2 0 2}
an =
5 - 6 3
Faly, dg3 irtg poyom
P(x) = 1 + x (:- 2) + x 3 ( -)))m Cp 3 bas pos r1 = . = 2 r3 = . vuad I by
> s. -][0 2 3]
=
d a n mhod o aung t poyomP( = 4c5 + x8- 3:1 + x4
So rwig o pono my hlp uc copuao eo equedfo uaon T d o5 om a m1 d wr s a poa hequn :
Pt = x5 7x- x6 + 29= x5 ( + 7 + * 3 + x3 * .
Fo eac npux, w d o ccuae x x x, x , ad x = x5 fss mupcaos combed mupcao ofx5, d mucaon ad addos om dg 3 poynom e ua gvet o opao oun o m nd add p euon
7/27/2019 Numerical analysis - Chapter 0.pdf
5/23
0 Eci
Bna Numbers 5
Rewr h foowg polynoia d or. Eva wi d wihout d om a
X =a) P(x) 6x : 5x2 +
() P(x)=-:+4.3sx- 5x 1
(c) P(x) =x4+x3- x2 I
Rew h olow ol o ad x = /:
a P = 63 7
() P() = 85- x4 - x3 + x2 - 3x1
(c P(:) = 4x6-4-2 +4
3. Elua Px = x 4x 1 a x = 1/ b osdg Px a a oloma d ed mulo.
4. Evluat oloa w bas P = l l/ x )J / - -/)) at a) x = ad b) =-.
5 a o b o Px) =4 ( 1) { (. )) ( x= / d b x =-I/2
6 Epn how evluate h o>a fr a ux f ao ao How a ao ad addo qid?
a) Px)= ao asx x0 aux (b) Px = a,x ax ax7 an a7
o a addo d mutos re rr o aa a d" o wia . sing a d mul lgohm?
0 Computer Pol1 Ue h fon ua P = I x ax = U h
MD o cod o a Fd 1 ro of oo b cmp w
h qia x Qx = (1-
1 U t m o vl Px = T + x x98 x a= d a
qi io d u o stmt o o nestd mcao.
I BIARY UMERSo eaon h ld d o ou i h , do uad D u rd bse 0 oa 2 dr or a i i ke
iio io T j u oa, th pocss is reved. ci we dic w ocven ween ia d i
7/27/2019 Numerical analysis - Chapter 0.pdf
6/23
6 I CHAPTER 0 Funamenas
By nuers eped
bbb-b ,
whe each in dg rb. s or 1 he e qvlnt to the numbe i
..b:2 + bt1 bo h
For eaple, he deal e 4 s eprsed a ) n ae ad 3/ ep-sntd (.h
021 Decmal to binf
e demal ume53w peente (5) 0 empize tt s te inteete se .T nvewy et t bek te ne nt nee n tnlprs d cvet ech p paely r te nue .70=0 (7)JO, el nvet eac p nd b h esl.
Ige p Cne eal nteges b dg suesvel decdng e rne he ds or I, a dd sg he dep e ccurtey. rd) n mg ( e ) (3)0 e ld ave
6 R l
6 I R
-Rl
6 = R
= IRL =ORI
Terefore, he ae 1 er e en i s as dened asw LO.h. Chekn he e e have 1 4 + 2 0 = 1 4 1=.
Fo p Cve ( 10 to b eversng the peen steps. Mlb csve nd or e nte pt vn o e dec pnt therh
7 x =
X 2=.
2
. X = l
. X = + 0
X .8
Noice he pe p fe fu teps d ep indte excl te mea The
7JO = (1 ..=112
7/27/2019 Numerical analysis - Chapter 0.pdf
7/23
0 Binay Numbers I 7
wh vrb na is u t dente nntely r bi. Pong pgr nu th
(53.7) = (100010
Binaryo de" cim=a"___T cn a bna n dn1, irs gin es p neg d ap
tg pt Sply up pw 2 a e dd bf T biy nm010lh imp 1 4 + 0 + + 0 (o
I
Fcol If he rc pa (a g as xpa) pedh m wy F p
1 1 1 (11)(01=-= 2 8 6 6 10
cp i w faa p n a ni ba xpaniCnng an innly bia ann dem racn c be dn ev wy ehp p wy i e h hi ppy upab
xp uppe x = 001) be veted to da My b .whi h 4 placs t l bn hn ub he n :
Sbcin d
= 10111011X 000101
4 - x = (11) = ( n x dx= (.10h = / b
A ape u e c p e eiy p
= 10101 Mpyng by
sts t y = = 10 I01 e ac p y c tz = 1 L, a be:
\ 10101
z 00001
Tr, = 5 n= 57 = 2 = l9/28 b 10 It g ee chck i eut by cnerng 1928 t na d cpag h gi .
Bna b a h bin blcks f hn pn bu h uu b g d unedy hun rt It is se o b 6 m js pee be e eay. Hxdcl e pentd
by he 16 0 2 bcdef Eh he ub c e epeetdb b Tu )t=(01 8)!=(100 n (f=1 h=5w I e
7/27/2019 Numerical analysis - Chapter 0.pdf
8/23
8 l HPTR 0 F
0.2 Exerciss
nxt sin, MA1AB's fa x fo epesenng ache u ll derbed
1. Fnd he b tto f th b 10 t (a) 6, b 7 c}79 d 22.
v e olwg Ius t b Us o noton o ontnbn ub (a) 5 b /3 5 d 8 554 f 0.
3 id !he st 5 b he b pton fr.
4. Conve th olo n umb o ase : 1 b 1. (c) .1d . lO f T g h lL
03 FLOATlNG POINT RRSNTATON OF RA NUMBRS
eio e pe model o compue arthet of oatig poit numb.ee ea mels bu o implif maters e ill chooe oe paiculr od ddib t dt.The m we hooe o-aled 5 Floa Poin Sadd.e It o lecl d Eonic eer IE tk tv terst inesabisig sdad for e indus Tei oaig pon atmetc fo1a beomete coo dd o nge-peson ad double-prcon amec togou compu idu.
Roundng eor vtbl n t-on copuer memoy ato
used to represen re e ecio numbes Aou e would o tt U eoade duing a log lulation ae only a oreet t r t tu tobe hul iing n c Sip algriths, su Gun elin rds f ln dnt qut,g cc acci iz n fac a a thee o ths bk l ade o og when aclcuao is a of bng uele due o gcato of the smal ero ade bydgtl compue and to ow ow vd o imze sk
01 Floating pot ormas
he Edd ci o a t o biy eeaio of rel numb A ag
i u coit o hee p t i +or a ch conin eig sict bis d a xn e pa od ogeh n ngcopue d.
here n hree commol ued leve o pcon o oatg pon umbers: ngleprecion double econ d eXeded peion, ao non as longdoube peiTe nube o bt locaed och oang pon um he tee foas is 2 ad 8 recivel h b ae divided og p ollow: prison sgn xetI atsa
sngl I 8 23doble 1 5lng dol 1 6
7/27/2019 Numerical analysis - Chapter 0.pdf
9/23
DETO
0 Floar ng P Rprnio o umb I 9
ltree ps o pcion wrk essetUy e same way Te om oa g pn mb s
l . X 6)
whe each f heN 's isor nd is an Mbi bn nber ere e enenomalizaon means tat hw n (.6, te leadin (etms bit mus
When a bin number is srd a nomalied oang pon numbr, i "lejusd meing te let 1 sht us e let f e adi oin e sis comea by a hge i the eoen Fo eamle te de umber, c s11 n binar would be r a
beause a si o 3 bits
mlplcaon b 2s
necessar to move e leo oe ohe oect oo concrteess wewll spc e dbe psion foma o m o he
ss Se d ln-double sion ae adled i e sam a, wi e exceio diere exponen ad maisa lth M N. 1n doube pisin ud b mC compier and b B M = 1 and = .
e double reci mbe I
+{0I 2twhe we have ox e 2 bi of e masa Te ne oag poi numbe grtthn s
+I.ll X
e numr c deed mh. s the i8nce beween I ad te smaleBoat poi nmbe greaer a l F the Eoul cisin oaig poin sa,
-52cb =
Te dema umbe4 = 11 is letuie as
+ tJIIOl 101101101101101 IOJ010110juo . . x 23,
whee we hae boxd e 5 bits o e mansa A new question aises: Hw d we e te biay umber rprening 4 n a ie numb o bi?
We mus uncae e br i some w nd n so di we essaiy mke asml eo e mehd cl c s o sply ow away the bs ha l o eea ose beynd e 52d b o e h of he deiml i. is poool simple, bu i s biae i hat it aways moes te esul owd e
he aleate meod is od n be 1 numbe cutm rounde upjf the nex diit s 5 o he und dow hewise ln bn is spd o
7/27/2019 Numerical analysis - Chapter 0.pdf
10/23
10 I CHAPR 0 Fundametls
DEFINTIO 0.2
ounding p e bit s Sccy the mpoa bit n he doube pison fo she 5 bit to he rght f pon e rt oe ng otde of he o he t
oug tu ime b he tndard, is to add to bi 52 od u) fbi t 53 and to do ohg rod dow) to bi 5 f bt 53 0, wi one epon: fhe it fog b 5 1 . ety way between up ad down we round upor round down acdg to hich choe me the na bit 5 ea to 0 (Here weang he msa e e sin ds nt play a oe
Wy there the sg xpna c? Ecept fr hs cehe ue mans undngo the oaze oang pont nmber loest o e ognal numr-henc amehe Roudg t Nart Rle The er a unng w e ualy ey t bep or dow refor th excepona c he cae where ther ao qall disttoag oint nmbers t od to, should decided in a way hat dosn't pfer up odown sstemacl Ts t t o avoid he possty of a nwt slow in lng
calclaions du spl a bised rong he hoc to ke he nl bit 5 eqal to ne ae f a t s sohat arj but at at t does ot splay a perene up or dowExercse 03. Poblem 6 shs some ght on why he biary choce of 0 d s fe
EEE oudig t Nast u
For doble psion, if e rd bt to the gh o e bna it 0 h oud dn(rncate afr the 5d it he 53d bit s , hen ud up add the 5 bit) usll kown its to th ight f e aOs. i wich cse s adde t f and ony ifbt 5 .
For he numr 94 sus pvosl the 53rd bi to e ht of he bn o sa I ad fowed by oer ozo bi e Rodg to Rule says o rod upor add o bt 5 eefre h oag p mber at represets 4 s
+10 111 lOlLI101I X 23. (0.7)
Denote the doube presion oaig pont nmber assoiated o, using the Roigto Nerest Rule b x
n cmpter ah h rel nube s pced wi h sg o bits tAccrng to deon. f(9 is the numbr in the b psntain 07 Waed at e oag pon repsetato by disardng e t al J lQ T52 X3 =L x - 4 8 om he ght end of he me nd he adig x 2 = 9 i ronding step Tef,
f(4 = . + 49 - 0 X
= 4 + ( l - 0)
= 94 + 0 X 9 0
I or wds a ompter sing double prcson repreenaon and h Roning t
es Rle makes an er of0
when sting 9 We a 0 -9
he
7/27/2019 Numerical analysis - Chapter 0.pdf
11/23
DNTON 0.3
AMPL
F Pint Represenaon of e Numbe 1
he m s ha oang n ub peeng 9.4 i no ualt 94 aug v oe To qan a oen, we ue e da deon
of eLe Xc a oud o o e exa q :. e
b c - x1.d
e a an e
Relave oundg o
- = ,
n e IEEEine et oe, e eae g o o() o o anoehf ae eion:
lf (: ) - X I 1_.- - -LI
- mltw 09
e e o he nx = 9 e wd ou he dg eo (0.8) u afy09:
t9 -1 02 29 8 5 I- 9 47 X 2 < 2Emh
Fd e doube ion ao ad oung ro o 04Se 0)10 = 01102jg e e e e
-
-204 = IOO O 2= + Lri: t=-= ,- o: =-:--= o 1o :1 1:-=o-o: u: - I100110 .. X
eoe odng o e odng e, fH0) +tl100110011001100110011001100110010011 0011001010I -2
Hee1
adde o 2 i ud it51
o nge ode o g nhe addonAnyzng aeJy e daded 5 .0110 x e
non nd added 2 - by odg u eeoe04 = 0 - 04 r6 + r
0 + 2-/20 + l) 0 + = 0 + 0.1 r2
Noe ha e ae e undg o04 0/04 E= = / mcobng(09)
7/27/2019 Numerical analysis - Chapter 0.pdf
12/23
1 I CHAPTER 0 Fu
EXAMPE
0.3.2achinerepes_entaon___Sofw h debd aoatn pt prenaon in the abs H a w mo
de about ow s eptaio is implemd on a comper Aa , s scon i dsss th doubl piso fomat; e othr foa v similr
Eah doubl pcon oag pt numr is ssin n 8 bt word. or bts tostor i ee pt Eh suc ord s t fon
(010)
h s i sod, oowed b I bi prsentn ent he 52 bollown t dcml po rpsi th ms e ig bt 0 o a sitvnumbr d or a nav br Te prstin te expot come m thpost br er rslti om addi - 023 to th pont t l for
poents btwen -0 d 03 Ts cov vles o .
e 1 om I to 6, lag0 d 47 or spa pus whh ll re to lteT umbr I0 i ced th pnn b o the double prson foatl s usd
t cort boh psv d egatv ponents to psiv bin umbr o storag n pnt b For sl ad o-doub peson. th pot bas as ad 68 rsptiey
M's fot x nssts simply o epg t1 64 its o aembr 00 6 scesve hedecim r bs 6. numbs hs. th st 3 hxml rpsnt he sn d pnt combid w lt on the maa
or amp. th numbr o
+ 1 [0000000000I X 2th doble psn ma mb o
00I I l l !0once he ual 02 s addd to th xpont T t x dis ospon to
00 3//,
s the m rretao o h tng poL nmbr I ill 3f!0000000000 Yo c hck ths b tyi io ad rie umber I
d he hx mine num rpsenao of h l numb 9.4
rom 0 at te si s = 0 ponet ad th bts of tass aer lhdecimal nt ae
0u1tl1111o - cccccccccd
Addg 023 to the pnt gives 0 o (00) Te sg andepoet ombiaLio Ls 000h 0t mag e he oma
2cccccc
7/27/2019 Numerical analysis - Chapter 0.pdf
13/23
. 3 Fot P a N I 1
Now e r o e sia xnen aes0 d Te Ja is ud trepesent o i e ssa bit sng a z and N w stad for Not a Nme
oeise e e ... e1 = , is tepte as the onoalid oa pointo
(0.1)
at i e e-most bi is no longer ssme to e . ese non-d nmes caed subno oat ont nues e etnd the geo ve sma nmbe b afew more de o magide; Teeoe x = -04 is e smalest nonzerepesenble ner dbe precision. I mace wo is
ooo11.Be sure to undestad te dieence beween mlest rpesenble nuer
nd fch = y nue beow Em a maie repesable, even ouadd hem o 1 ma ha o e On the oer ad nm beow 2-07 anot epented a
e subno nbs lde e mo impoant me a e sbnol
resenaon iclus to det oaing pin nme, +0 nd , h e eted e e e n Te machine reprention o + as sign bis 0 exponetbits . u = 0 d manssa zeros n so a 6 bita . e exora for0 is o e nuer- l eaty e se excetfo hsi bit e hex fat or{ is800
0.3 Addtiop of flQ_Ctng Rom,ubers
Machne adiio ons o liing the decimaJ poin o e two nmbe o be addedadd hem, d en sto he r again a o poin numer e adio itsecan be done in gher rcon (w more t bis) since he addiion kes plae i arer dedicated ju to t ppe olow e addion e esult must be oudedback o 5 bi ond te binr pnt fr stoge as a mache nm
or empe addg would a folows:
= I X + o 2 j00
7/27/2019 Numerical analysis - Chapter 0.pdf
14/23
14 I CHPER 0 ume
h aved a l. x 2 = , accrdg h udg le Thfe, i eqnl dbl pecs ec. N tha 2-53 e ge g p b
h pty; ayhg lg added 1
wld u a um gaer h
dcmpu amcTh ac a Em = -5 d mea a be ma Elc e-
gb e IEE d As o a e peale mdel cmpuLa hr ze j e mg a e addd r cd mr u
ma ee ha cmp ec caue e uca adg at mm u l Fr examp. adbl pc cmpr IE rdg ee ake 9. bac , a h ac eul l mhg ha ! Whap g: F d a 4 p
l W9
bad ( h9
c e rped h err) ru 0 + 2 x 2 Now kg e cmpe bc 0 eul bg a ud Exp b mah mbr f(0) = 0 + c lav
X 2 T =I =3 X SJ
d e T a ml umbe he rd E b 1 er ScMB' ba da e EE dbl pec ber e lJua dg a MTLB
f ng
X =
9.4000000000000
y
=
0000000000
z=y-0
330660785e1
> 3*2"(-5)
ans =
a16
7/27/2019 Numerical analysis - Chapter 0.pdf
15/23
EXAMPL 04
0. erie
. Fl Pont Represnation of Rl Numb I 5
Fn he double pcson oatig po sum (1 + 3 x 2-53 1
coe atmetc e swe s 3 x 25 Hoever oatg pot
athmec may f Note that 3 x 25 = 2 + -5 e t addiio isl 2 + 4.0 25= 1.I 2+ olooooooo 1!1 x 2= OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOJjJ x 2
i i agan e ecetionl cae for e rudg ule Sie b 2 l1e sum 1, emu roud up. ih mas addi I to bit 2 Aer cing, e et
+ X 2'ich s e repreto of + -5 Teeore ater utain e ult iU 2 wh s equa to 2 = 4 x 2-53 Once again noe e rce betwncopute hec and ret artec. Chek h ult by usig M
ulaio MAT o any ompilepoing oati o ulion unerthe snad follow e pecise ules dese i eio louh Botg
pont cculaton cangi
vep l
ause i der om coec athmet it
away pditble Te Roung o eaes Re is the typia eaul oung lhougif deie t pssible o chage to oher oundig ul by u omple ags empso of suls de roudg protoco is omeime ueful a a oaa to asess he tabilt of a ccuato
It may be supg t smll d es on, of elaie sie Emcb. are cpableof derilig maingul cauaios One eis for i is intoduced in e etsectio M gee"y te ud o er mgicat ad coditiong is a eungteme n Capt 2 and beod
Covc e oloing ae 10 umb o bn d xps ea a a oang poit nbx b sg the Roudg o et Rue: a) l/4 (b) /3 c) (d) 09
Con he ollog bas 0 umbs to br m exps ea a oang pont num b usn e Roudg o aet Rul: a) { 96 (c) 1. d /7
Do he olwing sum by d EEEoubepion ompur itmeti. ui heRounng o Net Rue ( you ase usg B
a (I+ 2-51 +2-SJ)- 1
(b (1 S rS + -3) I
7/27/2019 Numerical analysis - Chapter 0.pdf
16/23
1 I CAPTR 0 Fudats
4 Do the olowng su b hnd doble pcon mput ahic, ng eoundng o Net R:
(a) (I + (2-stz-s2+r})
-
I(b) o + (z51 + 2- +2) - 1
5 Wt c o gien nu in MAB' fo he Show you work chkyu anwe w L 8 b) c /8 ) /3) ) H 2/ (f . g) .(h) (02
6. T I /3 + 2/3 exy qual ole pisn oatng pint hmec un te Rounding to ea ul? You wlJ nd to u 1/) d (2) fom Exrci ohs hlp xpln wh i xpesed s t s ould the u be t ae i oppngt b we u nted o EE rondin
a pln wh ou can dene cin ilo on a coputer using doublpon ae E un to Nees ule bclag (7/ - 4/3 - () Do(4/ - I/3) I lso g Eb? xn onen t oating pon numbes ndcr out h n tt
8 cide wheher I + > in duble prion oang wt Rondg trsL ) : = z b) X = 2-3 + z-6
9 De th a law bold frcop ddton
0 Fnd h dob prion pson nd nd h xct dfnc lx x or
th en J nUbs C te et undin eror no mr hn /2 =27 )x = '7 (c) = 0/
11. How many ot g ou guante n luatn in 10 by aultor nd by ow abunI + ) Exlan our onng h wy o ll humbr mopy on a doue priion omper?
0.4 LOSS OF SGNCANCE
vnge o nong h dta o coput tc t w rfor n bt poton o unn pol ptls oputer luin On majorpoblt s n mn fo i th loss o gnnt gt at rul m subatig nyal nmbs plt f obvou taent o p, in btacton pobe
13561566
.
w S wt wo pt nur t w ew n-it curc. d nd wa rl t s onl on-dt ltoug t l u aif
7/27/2019 Numerical analysis - Chapter 0.pdf
17/23
XAMPL 0.5
4 oss oSignfcace I !e e ohe eapes o f oss o sice a e me uble d mayases sca b aoided by rccttio
Calce.- 3 on -decmal-dii computers eaple s sl fal smple d presened ol for ilaive ppoes
stead of us a copter i a 5bi maissa, s i double prson 1Esandado e ssume a we ae ing a r-dcaJ-di compue Uing a h-ditcompte ms at sog ea tmate cJcuaon aong e a pies storio a oag pont nber w a thr-g massa Te pobm (Le 90 and3.) re ge t o hree- acracy Se e a o o use a rdigit comprbing opimc e mi ope o ge swer s go o ree di Of ousewe ca' ept more tn l base e oly on ree dgs dg te
lo) eg a and lcuator. we see ta o anwe sapromately .666 1.666 x Ho may cot dgs do e et wt teth-dt omputer?
None s t ts ou Since 301666 wen e stoe eeaerul o r signica dig e ge 3 Subag 0 e ge a n e o0.0. o sgica d our awer a cect
pisny he s a wa o sae opon, een on a he-dgt compuerWat s aun e loss of sgane s e a at e a eplcly subg neryeqal numbes ad 3 e ca aod s problem b ng aJgeb o e eereson:
J9.01 3 (- 3J+ 3 32
001 01 3 3_ + 3 6 016 67 X Q ere we ave roded e la g o f e isa up o 7 sce e net s .oce ha we g al hree igs corrc i wy m leat te ee dg a e coetswer onds o e leson s i s impoa o d ws to avod ban nealy
equa numbes n alculaon
ssblee eh ha woked in he precding eample was essenly a c Mulpln
by te conjue epresson" is one c La c ep rstte the aclaon Oenif idnis cn b s wi onoe epesos. For exple, ccuJaoo 1 osx we x is cose o zro s st to loss of iane t comp tecalcaon of e epssons
c 1 osC' J = sn ad 2=1
l os
fo a ae of pt mbers . We e at by mlplng he erao d deoorofE1 by I + cosx and sig the ide s + os2 = nte pco
7/27/2019 Numerical analysis - Chapter 0.pdf
18/23
18 I CHR 0 Fundmes
XAMPL .6
te two expsons e equ. Usng e double pcso ofMB compurions, we ge
e followng te:
1 2. 092232050476 0693205760 050252088858 05025086885700000 05000 5000848 05005002083400000 OSL249929 050052000000 0499999986293 0500025000000000 000000438685 0500000025000000 000 0504502 050000300000 I000000 090030832 050000000000000000000 0000 0000000000000 05000000000
000000 00000 0000000000000 05000000000000000l 0000 0000000000000 05000000000000000000 00000000000 0500000000000 00 0 0500
Th ig colm 2 is co p o e digis shown e t opuLion e o hesubaco o nly eql ube s vig jo poblems elow . = o5 nd s nocoec sgnc dgi[ o u t0- nd beow
Te epesson E ldy s seel ncoec dg fo = w- d ges wose x deses e equlen expession 2 dos no sc nely equ nmb d sno sch pobems
Te qdc fou s oen subc o oss of sgcce Agn is esy to oids og a you know s ee n ow o esce e epsson
Fnd o oos o he q equo 2 91= 3
Tr one in dole eso o eple, usng B Neie onewl gve e g nswe nless yo e w o loss o sgnicce nd know ow oconec Te oe s d o oos, le's s wi ou-g cuc So tloo ie ey oe The oos o uc euon o o ax b c 0 gien by e qud o
(02)b
Jb2- 4c=
ao o pole, is nles to
9 }924 3=
2sing e mns sg gvs e oo
= 84 X J01
co o o sgicn dg o e pls sg oo
9 + 9 3)r=0 - 2
7/27/2019 Numerical analysis - Chapter 0.pdf
19/23
0.4 Eercses
Lo o Signfe I 9
MB ala louh coec answe i loe 10 , e answe o oetgnin disen hou te numb deng he proble wee sped exaly(seny wih nnily ny coect digi d despite the a at M
copu w appoxmate 6 inicnt di ( inepretaon of e fat h eace epsion of1is 25 22 -16) How do we epln e to fureo get aurte igis or ?
Te nswe lo of ie s clr t 912 and /924 + 4(3) re nearyequal relately n oe pee s o oag poit um, ermaisas not oy at o siay bu lso are aaly dencl en ey esracted a dected by he quadai fomula o coure e reu i zeo
Ca i acultion e ad? We m x e os o nicn poem Tecoect way to oe 2 b ecn the adri ormula:
- + 2
(b + Jb2 r
-:.1;2;_==- :+-r==4;=c)
Situtng a b, o ou eape yels accodn to MAAB 162 wch s coc o our gcat gs o accurc as eqed
Ts eaple shows s at te quadrac ormla J ) us e sed w ce ase where an/or e sJJ omped wi ore pecisely i al en d- ae nr q in agude, and oe of e root s jec o loss oinicance.l is poie i itation then e two roo houd b aJulae as
.4ac =
ad xz (0.3)
b +- 4Note hat neihe forla e fr bac nearl eqa be O th er and
if i eaive ad 1l hen he two oot re be clclted a - 4ac
Xi 2c
and . +
. Ieniy f whch ues he i on nea ul nms n lteae ha avo e oem
a)I x )
ax
- ( x3
X
(c) - -
+x
x2. Fi e o f e eonx +3 s4= 0 wi heiit cac.
7/27/2019 Numerical analysis - Chapter 0.pdf
20/23
20 I CHAPTER 0 Fs
Explin hw to mst acuaelycmpute ewo of equan ; + x - J = Q,whe b i a nmrgt I
4 Pv ful 0.14
Computer Prom Clulae epion fl n dbl pc hec (ig fr
exmpl) fox = Th, sig n larjve f lte expe de' ffro sbang naly eql nbs epa he lain nd k aleofesl. Rep enb fec gi in gn psin fo each
() -cx 1- (1 x3X2 Fnd he sl ofp for whch eren alculted in dole en im
x = 1 o or[ digs. H: Fit d e l pssn - )
(a) - (b + cos si - 2
3 3
Cnsid ght ngle who g ofng 33455660 nd Hw mhng is hypene h log lg? Ge youwe ls
I5 REVEW OF CACUUS
THOR
XAMPLE
Some mobs frm lulu b ecry lr. tdh VTheem n e Me Vlue Theem mpnt f sohr1g equo Cpe .yl' eoe i imo f ne1ning ineolin in Ce 3 n eoof mou mpoane fo o lvng ieenl equin in Ce 7 8
T g rph o m ncion no g Fo exm he funcon o n -alu n egave fr aher pa hrgh zer somehre. Tis fi
br geg equin le o k
i'ne ne chp
.
h eem lze
non
ltecdiae Vlue o L nnu fnon he itv [ b] en elize ee val eeen b. Moe isel ify i ne btwa d b en e xis nmbe i b s fc =
S h j = x3 on e l [I, mt on h vu 0 d Beu I) = nd /3 = 6, ll ue we nd 6, incdng 0 nd
m b kn on y f. Fo example seLingc = J, no fc = f() = 0, d
dly, /(2=
7/27/2019 Numerical analysis - Chapter 0.pdf
21/23
THEOREM 0
XAPL 08
0.8
05 eviw o Calus
(Continuous t) Lt f a onous unction in a neighohod o xo. d assuml-Xn = x he
lm fxn= f( im xn)= fxon \-oIn ote wos mt may b ught de contuo. ncons
Mn Vlue Theorm Lt f b a nnuouly irntiable nction o th nta[a,b] n th xist a numbc twen a and b uch tha f'(= fb) fajb a 8
Aply h Men Vue Thrm to f x) 2 - 3 on e nel I. ].he cote of e thm s bus /1) = -2 and / =6 er must t
a um c the itera [1, sating /c= 6- -}}- I) =4 t s tond such a . Snce Jx = 2 t ort = 2
The next statment s a sl cooly of th Ma Valu Theore
oll's Thoem Let f be a conuousy denable unction on e nt [a ban sum ha f(a = f(b n ere sts a numr c btwn a a b such hat
'c) = 0. a uncion f nown weU a nt h a lot o nomaon cn b acd
about neary Fo eampe i P(x > , en f grater values or nby nsto h ig, nd esser ues for po o l. Taos Torem us h deivs a tx to ge a fll accouning of the ncon us in a sma nghborho of x
alors eom th Rmnder t and b l numrs nd let f be + tesconnuously djntable on he rl ten x and e her xsts a numbectn x and suh at
x '' x - 3 mf = fx + x )f ( 2!
f ) + 31 ( +
/ ( J fk> + x J
7/27/2019 Numerical analysis - Chapter 0.pdf
22/23
I CHAPTER l
XAPL
THEORM 9
5 Eerises
ind he degee 4aylor lymal Px) for sinx centred a e oint = 0.Emae the maximm possible eror when using P t esiae sin or lx I : 0001
e olynmial is sly alculated to PJ = x-
/6. Note a e deg term is absenL sine cocien is zero e emaider te m is
n absle ale ot be lgr lx !52 Fo x the remader isat most - and wl be nisble we, or exple x x3 s sed in dblreson to appomate sn I Ceck his b mpng bo in A
FnJ he tegal vrs f te Mean Vale eorem o0s:
Mean Vlue heem f Itel) e be a nnus fnon on e eal , and le g be an teble ucon that des no change sgn n [a b] hen thee exis anubr between a andb suc tht
ib g: dx ibg
th nteede Vue 'heorem to e !at fo soe 0 < c < la f 4x I ) j =5s -4 c x 8 x + I
d tyn he en Value e or on e neval 0 lJ (a) f) =X(b f( =c fx = x
3. Fnd sasyng t eVale ee or Inegls wth fx, g n e ntel j(a) f = fx =x t f x) =e'
d te lor polnoal fdege 2 aut he r e ollowing funcosa =eAz {b fx =os = Lx + .1
5 d te Tlor lynoal fdee aout he pn x = follwing unons(o fx 2 ) =os ) fx =l d) f snx
6 a Fnd the alr lnmal o deee 4 forfx =- aou he on =() s e rult o to apprmae /9 ad /
) Ue he Talor rmnder to nd eor formul r he Tayor lyn Gve eo
un or each o he t approtions made n pa (). Wh the twaximaos pa b d ou ect to e se to t coct lue?
(d) Use a alulaor to cmp e actual er n eh wt your eo ound frmpan (c).
7 a ou Eercise -d) rx = l;c
7/27/2019 Numerical analysis - Chapter 0.pdf
23/23
Sare tr I 23
8 (a) Fid t deg 5 alor plyoml ced = 0 or ) = os Fin aup bo o e ppotingf() cosx ior . - 4 4] by P(x).
9 A coo appxio for.J +s I , wn x sUse e d 1 ayorpoloaof j(x)J mld o dn a oula o o I + !x .Eluae E o h case f appang . s a clcuao ocompa e c tO ou e oun E.
w 9 F,h Readinghe IE adrd fo oat p compution ound [3 Te sou [1 6 dscssoa pn thmetic n rat nd e recen [ mpizes e IE75stndde es b Wnon d [4J b Kuth had geat ue o he developmen of oh
adwre d soaeThee seve so paes hat speci gealpurpose sciec com
pn, e bul of doe n oai po hmetc Nlib (hpwtlibo isa coeco o fe sor ned by T& l Labrtoe et oenese n O Re Natonl btor e collo consiss o hguliysavlbl n Fo, Jav bu i coms wi te suppo e omes e cod mea o b sul inje fo h use to opre o
e ca lors Go NAG p/.aouk) e a lroig oe 40 ueclle surous o lig gr apped math plee progm e avlae i Fon d C n lable from ava ps NG
clus lbes o shred memo d dsbued memo compunhe ISL umcl b s a poduc o Vsul umcs nc(ttp:/wwwncom), nd coves simil to hos crd b e NAG librFoa , and Jaa pogm a avaiale lo Qroide PV-WV a powelpogig aguag w da als vulao apabite
Te omput vrometsaemaca Maple dM1ave grown o ecops may oe sm computaton meods s preiousl dcbd d have ul edi a apcl neaces Mahmaca p:/wwoescom) nd Maplewwwmaplsocom) e o promence ue o no smbolc copug enineB as w to see scece d engg applcio ough "oolboxe wch levrae e basc hqui soe o ders drcon.
l ths >' w ee ute basic lois wh M plemnoseMB de n is mnt to be isuctioa o ui ote sped d rlaile sacce o cl d radbl Rds who e nw o MT soul beiw the utol n px ; t wil s doin e ow implemeons