Textbook. Welcome to. Lecture 1 MATLAB 1. Numerical Methods for Civil Engineers. Applied Numerical Methods With MATLAB for Engineers and Scientists

Size: px
Start display at page:

Download "Textbook. Welcome to. Lecture 1 MATLAB 1. Numerical Methods for Civil Engineers. Applied Numerical Methods With MATLAB for Engineers and Scientists"

Transcription

1 Welcome to Numercl Methods for Cvl Engneers Lecture MATLAB.. S U R A N A R E E UNIVERSITY OF TECHNOLOGY INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING Tetbook Appled Numercl Methods Wth MATLAB for Engneers nd Scentsts STEVEN C. CHAPRA McGrw-Hll Interntonl Edton

2 References Numercl Methods For Engneers wth Personl Computer Applctons, (Thrd Edton) b Chpr, S.C. nd R.P. Cnle, McGrw-Hll, 998 Numercl Methods wth MATLAB : Implementtons nd Applctons, Gerld W. Recktenwld, Prentce-Hll, An Introducton to Numercl Methods : A MATLAB Approch, Abdelwhb Khrb nd Ronld B. Guenther, Chpmn & Hll/CRC, Numercl Methods usng MATLAB, John H. Mthews nd Kurts D. Fnk, Prentce-Hll, 4 The Mtlb 7 Hndbook, Mthwork Inc. KEEP THESE BOOKS! The re ecellent creer references (t lest for whle) Topcs Covered Introducton to Mtlb Appromtons nd Errors Roots of Equtons Lner Sstems Interpolton Numercl Integrton Ordnr Dfferentl Equtons Optmzton Curve Fttng

3 Conduct of Course Assgnments % Mdterm Em 4 % Fnl Em 4 % Fnl Score Grde - 9 A B B C C D D 59 - F Grdng Polc

4 ก - ก - ก - ก I F MATLAB M ATLAB ก ก ก ก ก ก MATLAB ก ก ก The Lnguge of Techncl Computng The ltest verson Mtlb 7. R6b

5 MATLAB MATr LABortor - Mth nd computton - Algorthm development - Modelng, Smulton, nd Prototpng - Dt nlss, eplorton, nd vsulzton - Scentfc nd Engneerng Grphcs - Mn toolboes for solvng problems: Control Sstem Toolbo Sgnl Processng Toolbo Sstem Identfcton Toolbo Neurl Network Toolbo Sttstcs Toolbo Optmzton Toolbo Prtl Dff. Equton Toolbo Smbolc Mth Toolbo MATLAB Eductonl Stes

6 MATLAB The MATLAB Sstem Bsc Arthmetc Bult-n Functons Bult-n Vrbles Mtrces & Mgc Squres The MATLAB Sstem The MATLAB sstem conssts of fve mn prts: Development Envronment: set of tools nd fcltes tht help ou use MATLAB functons nd fles. Mn of these tools re grphcl user nterfces. It ncludes the MATLAB desktop nd Commnd Wndow, commnd hstor, n edtor nd dedugger, nd browsers for vewng help, the workspce, fles, nd the serch pth. The MALAB Mthemtcl Functon Lbrr: vst collecton of computtonl lgorthms. The MATLAB Lnguge: Ths s hgh-level mtr/rr lnguge wth control flow sttements, functons, dt structures, nput/output, nd objected-orented progrmmng fetures. Grphcs: MATLAB hs etensve fcltes -D nd -D dt vsulzton, nmton, nd presentton grphcs. The MATLAB Applcton Progrm Interfce (API): llows ou to wrte C nd Fortrn progrms tht nterct wth MATLAB.

7 Gettng Strted MATLAB Desktop Gettng Strted Commnd Wndow Commnd prompt >> DEMO

8 Gettng Strted Edtor/Debugger Bsc Arthmetc Clcultor functons work s ou'd epect: >>(+4)* ns 5 + nd - re ddton, / s dvson, * s multplcton, ^ s n eponent. >> 5*5*5 >> 5^(-.5) >> *(+4.7-4/6)/.5 Lst-lne edtng Up Arrow

9 >> ns 4 The vlue n ns cn be reclled: >> ns/ ns Assgn vlue to vrble: Upper & Lower Cse >> ; >> A; >> * >> *A Severl commnds n the sme lne: >>;6+,+7 >> 5 >> b 6 >> c b/ For too long commnd: >> Num_Apples ; >> Num_Ornge 5; >> Num_Pers ; >> Num_FrutNum_Apples+Num_Ornge... + Num_Pers Bult-n Functons >> sn(p/4) ns.77 >> p ns.46 sn(), cos(), tn(), sqrt(), log(), log(), sn(), cos(), tn() The output of ech commnd cn be suppress b usng semcolon ; >> 5; >> sqrt(59); >> z log() + ^.5 z.54

10 The comms llow more thn one commnd on lne: >> 5; b sn(), c snh() b c MATLAB Vrbles s creted whenever t ppers on the left-hnd of >> t 5; >> t t + t 7 An vrble pperng on the rght-hnd sde of must lred be defned. >> *z??? Undefned functon or vrble z >> who >> whos >> cler Use long vrble nmes s better to remember nd understndble for others >> rdus 5.; >> re p*rdus^; Formt >> p >> formt long >> p >> formt short >> formt bnk >> formt short e >> formt long e >> formt compct >> formt loose >> formt

11 Bult-n Vrbles Use b MATLAB, Should not be ssgned to other vlues Vrble Menng ns vlue of n epresson when not ssgned to vrble eps flotng-pont precson, j unt mgnr numbers, j p π relm lrgest postve flotng-pont number relmn smllest postve flotng-pont number Inf, number lrger thn relm, result of / NN not number (/) >> ; >> 5/ >> / On-lne Help: >> help log >> lookfor cosne Mtrces nd Mgc Squres In MATLAB, mtr s rectngulr rr of numbers. sclrs -b- mtrces vectors one row or column mtrces t s usull best to thnk of everthng s mtr. The mtrces opertons n MATLAB re desgned to be s nturl s possble. MATLAB llows ou to work wth entre mtrces quckl nd esl. Renssnce engrvng Melencol I b the Germn rtst nd mteur mthemtcn Albrecht Dürer.

12 ก ก ก MATLAB : ก ก ก ก ก ก ก ก ก M-fle ก ก ก : ก ก, ; ก [] Commnd Wndow >> A [6 ; 5 8; ; ] MATLAB ก : A ก ก ก ก ก MATLAB workspce ก A ก workspce who whos : >> whos Nme Sze Btes Clss Attrbutes A 44 8 double

13 Workspce Browser The MATLAB workspce conssts of the set of vrbles (nmed rrs) bult up durng MATLAB sesson nd stored n memor. You dd vrbles to the workspce b usng functons, runnng M-fles, nd lodng sved workspces. To vew the workspce nd nformton bout ech vrble, use the Workspce browser, or use the functons who nd whos. sum, trnspose, nd dg >> sum(a) ns >> A ns A >> dg(a) >> sum(dg(a)) >> sum(a )

14 Subscrpts ก j ก A กก A(,j) A(4,) 4 >> A(4,) ns 5 A ก 4 A: >> A(,4)+ A(,4)+ A(,4)+ A(4,4) ns 4 The Colon Opertor : ก MATLAB >> : ก ก ns ก ก ก >> :-7:5 ns

15 Submtr : ก ก A(:k,j) ก k j ก A >> A(,:) >> A(:,) >> A(:4,:) ก 4 >> sum(a(:4,4) ก end >> sum(a(:,end) Jutposton >> B [9 8 5 ; ; 4] >> [A B] >> sze(ns) >> [A ; B] Row nd Column Vectors Row vector >> A [ 5 7 ] Column vector >> A [ ; ; 5; 7; ] Trnsposton >> At A

16 Arrs Opertons >> A [ ] >> A() >> length(a) >> cler(a) >> B [ ] >> A + B >> A - B >> A * B >> A.* B >> A / B >> A./ B >> A.^ >> odd :: >> even :: >> nturl :6 >> ngle :p/:p; >> sn(ngle) Generte mtrces usng bult-n n functons >> A zeros(4) >> A zeros(,4) >> A ones(4) >> A ee(4) >> A mgc(4) Elementr Mtr Opertons >> S A + B >> D A - B >> A*B >> C [ ; ; 4 5]; >> A*C >> A^ >> L log(a) >> [m, n] sze(a) >> det(a) >> nv(a) >> v [ ]; >> A dg(v) >> B dg([ ]) >> w dg(b)

17 Lnspce lnspce functon cretes row vectors wth equll spced elements. >> u lnspce(.,.5,5) >> v lnspce(,9,4) >> lnspce(,p/6,6*p); >> s sn(); >> c cos(); >> t tn(); >> [ s c t ] Emple. Trnsportton route nlss The followng tble gves dt for the dstnce trvel long fve truck routes nd the correspondng tme requred to trveled ech route. Use the dt to compute the verge speed requred to drve ech route. Fnd the route tht hs the hghest verge speed. 4 5 Dstnce (mles) Tme (hrs) Soluton: >>d [56, 44, 49, 5, 7] >>t [., 8., 9.,., 7.5] >>speed d./t speed >>[hghest_speed, route] m(speed) hghest_speed route

18 Numercl Methods for Cvl Engneers Lecture - MATLAB Sve & Lod from Eternl Fles GRAPHICS - Cretng plot - Plottng Tools - Plot Grph from Dt Mongkol JIRAVACHARADET S U R A N A R E E UNIVERSITY OF TECHNOLOGY INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING Sve Dt to Eternl Fle >> cler >> lnspce(,*p); cos(); z sn(); >> sve z ก ก z.mt Lod Dt from Eternl Fle z.mt bnr fle Current Drector >> whos >> lod z >> whos

19 Sve Dt to Pln Tet Fle >> cler >> :5; 5*; >> XY [ ]; >> sve vls.tt XY -sc Lod Dt from Pln Tet Fle >> cler >> XY lod( vls.tt ) >> XY(:,) >> XY(:,) Input/Output Commnds User Commnd Input MATLAB Descrpton Output - Screen - Fle dsp (A) dsp ( tet ) fprntf nput( tet ) nput( tet, s ) Dspls the contents, but not the nme, of the Arr A. Dspls the tet strng enclosed wthn sngle quotes. Control the screen s output dspl formt. Dspls the tet n quotes, wts for user nput from the kebord, nd stores the vlue n. Dspls the tet n quotes, wts for user nput from the kebord, nd stores the nput s strng n.

20 INPUT AND OUTPUT Promptng for User Input >> nput( Enter vlue for ); B defult, the nput functon returns numercl vlue. To obtn strng nput, second prmeter, s, must be provded. >> ournme nput( Enter our nme, s ); functon s nputabuse % nputabuse Use nput messges to compute sum of vrbles nput( Enter the frst vrble to be dded ); nput( Enter the second vrble to be dded ); z nput( Enter the thrd vrble to be dded ); s ++z; Tet Output The dsp Functon >> dsp( M fvorte color s red ) >> Speed 6; >> dsp( The vehcle s predcted speed s: ) >> dsp(speed) Snce dsp requres onl one rgument, the messge nd vrble must be combned nto sngle strng. >> ournme nput( enter our nme, s ); >> dsp([ Your nme s,ournme])

21 G R A P H I C S Cretng Plot ก ก MATLAB plot ก plot() ก ก ก plot(,) MATLAB ก ก ก ก ก ก ก sne() π >> :p/:*p; >> sn(); >> plot(,) Grph Components MATLAB ก Fgure

22 ก ก >> lbel(' to \p') >> lbel('sne of ') >> ttle('plot of the Sne Functon','FontSze',) ก ก ก : >> s([ *p -..]) >> grd on Plottng Tools ก Fgure ก ก ก ก ก ก : >> plottools

23 ก ก ก Vew ก Show Plot Tools Fgure ก ก ก Hde Plot Tools ก ก ก ก ก Propert Edtor ก ก ก

24 ก ก ก ก ก ก ก ก ก >> cler >> :p/:*p; >> sn(); >> sn(-.5); >> sn(-.5); >> plot(,,,,,) legend ก : >> legend('sn()','sn(-.5)','sn(-.5)')

25 Controllng the Aes >> s([mn() m() mn() m()] >> hold on >> plot([mn() m()],[,]) >> hold off >> grd Plot Grph from Dt ก ก ก ก >> [ 4 5] >> [ ] >> plot(,) ก ก: >> cler >> lod(.dt ) >> >> (:,) >> (:,) >> plot(,) mrker

26 Import from EXCEL ls EXCEL >> cler >> lsred(.ls ) >> (:,) >> (:,) >> plot(,)

27 Numercl Methods for Cvl Engneers Lecture - MATLAB Progrmmng wth MATLAB Workng wth M-FlesM Scrpt M-FlesM Functon M-FlesM Flow Control Mongkol JIRAVACHARADET S U R A N A R E E UNIVERSITY OF TECHNOLOGY INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING Workng wth M-FlesM Overvew MATLAB ก ก ก tet ก.m ก M-fle flenme.m flenme ก ก ก ก MATLAB Tpes of M-FlesM scrpts functons ก nput output

28 Open Bult-n n Edtor M-fle tet edtor Notepd Wordpd ก bult-n edtor ก MATLAB กก ก ก ก bult-n edtor ก Fle > New > Blnk M-fle ก New M-Fle Scrpt M-FleM M-fle % ก M-fle prod_bc.m

29 A Scrpt to Plot Functons trgplot.m t lnspce(,*p); sn(t); cos(t);.*; plot(t,, -,t,,.,t,, ); >> trgplot Replce the plot sttement wth plot(t,, -,t,, :,t,, ); s([ *p -.5.5]) legend( sn(t), cos(t), sn(t)*cos(t) ); >> close ll; trgplot Use T E X notton to dspl θ legend( sn(\thet), cos(\thet), sn(\thet)*cos(\thet) ); lbel( \thet (rdus), FontNme, Tmes, FontSze,4) >> close ll; trgplot >> lnspce(,*p); >> sn(); >> cos(); >>.*; >> plot(,,'-',,,':',,,'--'); >> s([ *p -.5.5]) >> legend('sn(\thet)','cos(\thet)','sn(\thet)*cos(\thet)') >> lbel('\thet (rdus)','fontnme','tmes','fontsze',4) >> ttle('plot of smple trgonometrc functons',... 'FontNme','Tmes','FontSze',)

30 Functon M-Fles ก ก Bult-n functon ก MATLAB ก ก Commnd Wndow >> nput prmeters functon output prmeters Functon Defnton Lne ก M-fle ก MATLAB ก functon functon [outputprmeterlst] functonnme (nputprmterlst) functonnme ก M-fle functonnme.m

31 Cretng Functon M-FleM M-fle tet edtor : pt.m functon h pt(, b) h sqrt(.^ + b.^); output rgument functon nme Input rgument ก M-fle ก ก M-fle >> 7.5 >> b.4 >> c pt(,b) c 8.9 Cretng P-Code P Fles You cn convert verge.m nto pseudocode clled P-code fle. >> pcode verge Tet fle: cn be vewed b n edtor Pseudocode: cn t be vewed b n edtor - Fster for lrge progrm - Use to hde lgorthm

32 FLOW CONTROL MATLAB hs severl flow control constructs: f swtch & cse for whle contnue brek f Condtonl Control The f sttement evlutes logcl epresson nd eecutes group of sttements when the epresson s true. The optonl elsef nd else kewords provde for the eecuton of lternte groups of sttements. An end keword, whch mtches the f, termntes the lst group of sttements. f condton epresson elsef condton epresson else epresson end Condton: Equl A B Not equl A ~ B Greter A > B Smller A < B Greter or equl A > B Smller or equl A < B AND & OR

33 Emple : f < dsp( s negtve ); end Emple : f <, dsp( s negtve ); end Emple : f > c ^ - ; elsef / >. c log(/); else c + ; end swtch & cse The swtch sttement eecutes groups of sttements bsed on the vlue of vrble or epresson. The kewords cse nd otherwse delnete the groups. Onl the frst mtchng cse s eecuted. There must lws be n end to mtch the swtch. swtch cse vlue epresson block of sttements cse vlue block of sttements... otherwse block of sttements end swtch sgn() cse - dsp( s negtve ); cse dsp( s ectl zero ); cse dsp( s postve ); otherwse dsp( sgn test fl ); end

34 for The for loop repets group of sttements fed, predetermned number of tmes. A mtchng end delnetes the sttements. >> P zeros(5, 5); >> for k :5 for l :5 end end P(k, l) pt(k, l); >> P whle The whle loop repets group of sttements n ndefnte number of tmes under control of logcl condton. A mtchng end delnetes the sttements. whle condton epressons end >> ; >> whle + > /; end >> Brek Loops Return Loops brek return LOOP return brek

35 Here s complete progrm, llustrtng whle, f, else, nd end, tht uses ntervl bsecton to fnd zero of polnoml. ; f -Inf; b ; fb Inf; whle b- > eps*b (+b)/; f ^-*-5; f sgn(f) sgn(f) ; f f; else b ; fb f; end end f fb b The result s root of the polnoml - - 5, nmel

36 Numercl Methods for Cvl Engneers Lecture 4 : Appromtons & Errors Sgnfcnt Fgures Error Defntons Round-off Errors Truncton Errors Tlor Seres Mongkol JIRAVACHARADET S U R A N A R E E UNIVERSITY OF TECHNOLOGY INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING Appromton & Error For mn engneerng problems, we cnnot obtn nltcl solutons. Numercl methods eld ppromte results tht re close to the ect nltcl soluton. How confdent we re n our ppromte result? The queston s how much error s present n our clculton nd s t tolerble?

37 Sources of Error Modelng Error ( ) Round-off Error ( กก ) Truncton Error ( กก ) Dt Error ( ก ) Humn Error( ก ) Composte surfces nd terrn modellng Med ppromton methods

38 Sgnfcnt Fgures Cr speed? 49 km/h 48.8 km/h 48.9 km/h km/h dgts dgts dgts 4 dgts ZERO s NO sgnfcnt: 845,.845,.845,.845 re 4 dgts Sgnfcnt Fgures Number of sgnfcnt fgures ndctes precson. Sgnfcnt dgts of number re those tht cn be used wth confdence, e.g., the number of certn dgts plus one estmted dgt. 5,8 How mn sgnfcnt fgures? Zeros re sometmes used to locte the decml pont not sgnfcnt fgures

39 Use of Sgnfcnt Fgures n Numercl Methods ) Numercl method eld ppromton results. So we hve to specf how confdent n our ppromted results. ) Specfc qunttes such s π, e, or 7 cnnot be epressed ectl b lmted number of dgts. π But computers cn contn onl... >> formt short ; p.46 (5 dgts) >> formt long ; p (5 dgts) Tr lso ep(), sqrt(7) * Omsson of the remnng sgnfcnt fgures s clled round-off error. Accurc nd Precson Incresng ccurc Incresng precson B I A S UNCERTAINTY A C C U R A C Y Computes vlue close to true vlue P R E C I S I O N Computed vlue close to ech other

40 Accurc. How close s computed or mesured vlue to the true vlue Precson (or reproducblt). How close s computed or mesured vlue to prevousl computed or mesured vlues. Inccurc (or bs). A sstemtc devton from the ctul vlue. Imprecson (or uncertnt). Mgntude of sctter. Error Defntons True vlue Appromton + Error True Error, E t True vlue Appromton True frctonl reltve error True percent reltve error, ε t True Error True vlue True Error True vlue % ก ก

41 Appromton Error ก ก ( ก ) ก Percent Appromte error, ε Appromte Error Appromton ก ก ก % ε current ppromton - prevous ppromton current ppromton % ก Prespecfed tolernce, ε s ε s (.5 -n )% ε < ε s ก n EXAMPLE 4. Error Estmtes for Itertve Methods Appromte e.5 b usng the seres n e !! n! true vlue: >> formt long ; ep(.5) >> ns st estmte: e nd estmte: e + e true error: ε t % 9.%.6487 ppromte error: ε.5 %.%.5

42 Terms Results ε t (%) ε (%) After s terms re ncluded, the ppromte error flls below ε.5%, nd the computton s termnted. >> Term :6 >> et [ ] >> e [ ] >> plot(term,et,'o-, Term(:6),e,'+-') ROUND-OFF OFF ERRORS Computers retn onl fed number of sgnfcnt fgures All computtons n MATLAB re done n double precson FORMAT LONG E : Flotng pont formt wth 5 dgts. True vlue π ROUND-OFF MATLAB p e+ Creton of erroneous dgt >> formt long e % dspl ll of the sgnfcnt dgts >>.6 +. >> ns +. >> ns +.

43 Computer Representton of Numbers Numbers on the computers re represented wth bnr (bse ) sstem We use the decml (bse ) sstem 7 Bts & Btes BIT Bnr dgt ( or ) BYTE Group of 8 bts 7 MAX BYTE NUMBER

44 Integer Representton Computer uses btes 6 bts & st bt for sgn Sgn Number Upper lmt ,767 Zero - Zero Redundnt Integer rnge: [ -768 to 767 ] Flotng-pont Numbers Stored n bnr equvlent of scentfc notton Sgned eponent Sgn Mntss How computer stored flotng-pont number Sgned eponent Mntss Sgn MATLAB uses the IEEE flotng-pont stndrd

45 Sngle & Double Precson Sngle Precson -bt Sgn bt Sgned eponent 8 bt Mntss bt Rnge: to to.8-8 Double Precson 64-bt Sgn bt Sgned eponent bt Mntss 5 bt Rnge: to to. -8 MATLAB Dscrete Appromton denorml overflow usble rnge overflow under flow under flow usble rnge relm - relmn relmn relm >> formt long e >> *relm >> relmn/ >> relmn/e6 denorml (fewer sgnfcnt dgts)

46 Effect of Order of Opertons Dgts: ( ) ( ).999 ppromte * to t sgnfcnt dgts when * < 5 t Emple: 4 6. < 5 sgnfcnt dgts TRUNCATION ERRORS Truncton error results from usng n ppromton n plce of n ect mthemtcl procedure. Emple: Dervtve of veloct dv v v( t+ ) v( t ) dt t t t + Veloct dv dt v t Contnuous Dscrete t t + Tme

47 Bungee Jumper Problem rte of chnge of veloct wth respect to tme, dv dt g cd m v where v vertcl veloct (m/s), t tme (s), g grvt ccelerton ( 9.8 m/s ) c d drg coeffcent (kg/m) m jumper s mss (kg) Anltcl soluton b solvng dfferentl equton, v gm gc d tnh t c d m e + e ( t) tnh( ) e e Emple: Compute veloct of free fll bungee jumper wth mss of 7 kg. Use drg coeffcent of.5 kg/m. 9.8(7) 9.8(.5) v ( t) tnh t 5.4tnh(.87t).5 7 >> t::; >> v5.4*tnh(.87*t); >> [t v ] ns Veloct, m/s Anltcl Soluton for the bungee jumper problem Termnl veloct >> plot(t,v) Tme, s

48 Numercl Soluton to the dfferentl equton Rte of chnge of veloct cn be ppromted b v(t + ) dv dt v t v ( t t + ) v( t ) + t Substtute nto dv/dt g (c d /m)v to gve v v(t ) True slope dv/dt v t Appro. slope v( t t + ) v( t ) + t v( t ) v( t ) + d g v( t ) t + t m Rerrnge equton to eld cd v( t + ) v( t ) + g v( t ) ( t t m + c ) Euler s s method: dv v( t + ) v( t ) + t New vlue old vlue step sze dt t t t + t Emple : Numercl Soluton to the Bungee Jumper Problem Perform the sme computton s prevous emple but use the Euler s method. Emplo step sze t strt t s, t + s, v() m/s: cd v( t + ) v( t ) + g v( t ) ( t t m + ) v() () 9.6 m/s Net step t s, t + 4 s, v() 9.6 m/s: v(4) MATLAB:.5 7 (9.6) 6.49 m/s >> [Enter] >> ns+(9.8-(.5/7)*ns^)* [Enter] [Up Arrow] [Enter] mn tme... t(s) v(m/s)

49 >> hold on >> v [ ] >> plot(t,v,'+-') Veloct, m/s Anltcl Soluton for the bungee jumper problem Termnl veloct Appro. soluton Anltcl soluton Tme, s T A Y L O R S E R I E S Tlor seres s representton of functon s n nfnte sum of terms clculted from the vlues of ts dervtves t sngle pont. It s nmed fter the Englsh mthemtcn Brook Tlor. If the seres s centered t zero, the seres s lso clled Mclurn seres, nmed fter the Scottsh mthemtcn Coln Mclurn. It s common prctce to use fnte number of terms of the seres to ppromte functon.

50 T A Y L O R Defnton S E R I E S The Tlor seres of functon f() f() f() f() tht s ndefntel dfferentble n neghbourhood of, s the power seres f() f() + f ()( ) + f () (! ) + f () (! ) + where n! the fctorl of n f (n) () the n-th dervtve of f t pont Tlor Seres (nth-order ppromton) Let s chnge to nd to + nd defne the step sze s h ( + - ), the seres becomes: f ( f ( )! + ) f ( ) + f ( ) h + h + h + + The complete Tlor seres s gven b f ( )! f ( )! f ( )! f ( n) ( n! ( n) n f ( f f + ) ( ) + ( ) h + h + h + + h + f ( ) n! Note tht, n equl sgn replces the ppromte sgn. A remnder term, R n s ncluded to ccount for ll terms from n+ to. ) h n R n Remnder: R n ( n+ ) f ( ξ ) h ( n + )! n+ ξ + Where ξ s not known but les somewhere between nd +

51 T A Y L O R S E R I E S Predct functon vlue of one pont n term of functon vlue nd ts dervtves t other ponts f() Known f( ) Zero-order ppro. Frst order Second order f( + ) f( ) f( + ) f( ) + f ( )h True f( + ) f( ) + f ( )h + f ( )h /! f( + ): wnt to know + h Emple: Appromton of functon cos() b Tlor Seres Epnson Use Tlor seres epnsons wth n to 6 to ppromte f() cos t + π / on the bss of the vlue of f() nd ts dervtves t π /4. Soluton: Step sze: h π / - π /4 π / True vlue: cos(π /).5 Zero-order ppromton: f(π /) cos(π /4) whch represents percent reltve error of ε t % 4.4%.5 Frst-order ppromton: f () -sn() f(π /) cos(π /4) sn(π /4)(π /) whch hs ε t 4.4%

52 Second-order ppromton: f () -cos() π π π π cos( π / 4) π f cos sn whch hs ε t.449% Order n Appromte ε t (%) To get more ccurte ppromton, we cn use hgher order (dd more terms) nd/or reduce the step sze h. Mclurn Seres specl cse Tlor Seres ก Tlor Seres : f() f() + f ()( ) + f () ( )! + f () ( )! + Tlor Seres wth : f() f() + f'() + f ()! + f ()! + Usng ths formul Tlor seres of functons cn often be rther esl computed.

53 Tlor Seres of Functon: ep() Compute severl dervtves of the gven functon. f() e, f () e, f () e,, Evlute these dervtves t. (n) f () e f() e, f (), f (),, f () Substtute nto the seres, (n) f() f() + f'() + f ()! + f ()! + n f ( ) e !! n! MATLAB Emple: Tlor Seres of ep() >> cler >> -:.:; >> ep(); >> plot(,) >> ones(sze()); >> plot(,,,) >> + ; >> plot(,,,) >> +.^/; >> plot(,,,) >> +.^/6; >> plot(,,,) 4, 5, 6... Untl then?

54 MATLAB Emple: Tlor Seres of ep() Smbolc Toolbo >> cler >> sms ; >> tlor(ep(),5,,) % declre smbolc % epnd e bout to order 5. Plot grph wth ezplot : ^4/4 + ^/6 + ^/ + + Compre t wth the ect vlue. >> ppro subs(,,); >> ect ep(); >> et (-ppro/ect)* et >> ezplot() >> hold on >> ezplot(ep()) >> hold off Whch lne s n ppro. red or blue? 5.65 Tlor Appromton Error How ccurte s the Tlor seres ppromton? The n terms of the ppromton re the frst n terms of the ect epnson: e !! ppromte truncton error So the functon f() cn be wrtten s the Tlor seres ppromton plus n error (truncton) term: f ( ξ ) h ( n + )! ( n+ ) f() P n () + R Remnder: R n n n+

55 Tlor Seres Epnsons for Some Common Functons 5 n n sn( ) + ( )! 5! (n )! 4 n n cos( ) + + ( )! 4! ( n)! e n !! n! for ll for ll for ll 4 n n ln( + ) + ( ) -!! 4! n! 5 n n rctn( ) + ( ) -! 5! (n )! p p( p ) p( p )( p ) ( )!! + + p for < Bg-O O Notton ( n+ ) f ( ξ ) n+ n+ Rn h O( h ) ( n + )! f() P n () + O(h n+ ) Bg-O s used to descrbe the error term n n ppromton. For emple: e O( ) s! e + epresses the fct tht the error, the dfference s smller n bsolute vlue thn some constnt tme when s close enough to. +!

56 Emple : Estmte the error of the ppromton From MATLAB emple, let s estmte the error n the ntervl [-, ] e + +! +! + 4 4! e + +! +! + 4 4! + O( 5 ) [-,] The error done when ppromtng ep() b Tlor seres of degree 5 s bounded b the bsolute vlue of the frst term left out. 5 εt.8% for - 5! 5! Emple: Tlor seres ppromton of functon sn() Plot the frst n to 6 terms of the Tlor seres of sn( ) sn() n n n >> -*p:p/:*p; >> sn();plot(,) >> s([-*p *p -.5.5]) >> hold on >> ; plot(,) >> -.^/6; plot(,) >> -.^/6+.^5/; plot(,) >> legend('sn()','n ','n ','n ')

57 Numercl Methods for Cvl Engneers Lecture 5 : Roots of Equtons Grphcl Methods Brcketng Mehods Open Methods f MATLAB Methods Mongkol JIRAVACHARADET S U R A N A R E E UNIVERSITY OF TECHNOLOGY INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING Wht Are Roots? Qudrtc formul: f() + b + c f() b ± b 4c Roots Vlues of tht mke f()

58 Root Fndng Methods Two mjor clsses of methods: Brcketng methods: strt wth guesses tht brcket, or contn, the root nd then sstemtcll reduce the wdth of the brcket Grphcl method Flse-poston method Bsecton method f() )? Open Methods: requre onl sngle strtng vlue of wthout brcketng the root. Fed-pont terton Newton-Rphson method Secnt method GRAPHICAL METHODS Plot the functon nd observe where t crosses the s. f() *?

59 Grphcl method : NOT precse ZOOM ZOOM Double root? Brcketng Method Corse level serch for roots over lrge ntervl ) Subdvdng lrge ntervl nto smller subntervl ) Emne sgn t the end of ech subntervl f ()

60 Possble ws n n ntervl Prt () nd (c) : f( l ) nd f( u ) sme sgn No roots or Even number of roots Prt (b) nd (d) : f( l ) nd f( u ) dfferent sgns One roots or Odd number of roots Eceptons: () Multple roots (b) Dscontnuous functon Emple: Grphcl Methods Plot the functon nd observe where t crosses s f ( ) ( e ) 4 4 f() f() Observe: 5 f (5) -.4

61 Interpolton (Flse-poston method) Assume s lner functon for short ntervl Interpolton: (6 ) (.69) f (4.977) -.69 f (5) -. 4, f (4).58 nd Interpolton: (5 4) (.4) f (4.79) -. Bsecton Method Repetedl hlve ntervl whle brcketng root f () + m ) Choose ntervl [, b ] whch hs sgn-chnge ) Compute mdpont of ntervl m ( + b ) / + b - - ) Select subntervl whch hs sgn-chnge nd repet )

62 Emple: Use bsecton method fnd the root of equton f ( ) ( e ) 4 Estmte root t mdpont: r εt % 5.79% f() True vlue of the root: Intl ntervl [, 6 ] Select ntervl wth sgn-chnge: + - f (4).58 [ 4, 6 ] Net estmton: r (4+6)/ 5 ε 5 4 % 6.667% 4 Termnton Crter nd Error Estmtes Stop computton when ε < ε s, E. ε s.5% Iterton b r ε (%) ε t (%) < ε s.5%

63 Open Methods Smple Fed-Pont Iterton Newton-Rphson Method Secnt Methods MATLAB functon: fzero Polnomls Wht ou should know bout Open Methods How to construct the mgc formule g()? How cn we ensure convergence? Wht mkes method converges quckl or dverge? How fst does method converge?

64 Fed-Pont Iterton Also known s one-pont terton or successve substtuton To fnd the root for f(), we reformulte f() so tht there s n on one sde of the equton. f ( ) g( ) If we cn solve g(), we solve f(). s known s the fed pont of g(). We solve g() b computng g( ) wth + gven untl + converges to. Fed-Pont Iterton Procedure ) Rewrte orgnl equton f() nto nother form g(). Emple: + sn sn + ) Select ntl vlue + ) Predct new + s functon of old + g ( ) 4) Use terton + g( ) to fnd vlue tht reches convergence. Itertve untl stsf % + ε +

65 Emple: Fndng root of f() - e - ns.567 ε (%) >> >> ep(-ns) Appromted Root e - True vlue Number of Iterton Two-Curve Grphcl Method f() ep(-) f ( ) e Root f ( ) f ( ) e >> :. : ; >> plot(,ep(-)-) >> :. : ; >> plot(,,,ep(-))

66 Emple: Bem Deflecton Unform bem subject to lnerl ncresng, dstrbuted lod. w Deflecton,, gven b: w EIL ( L L ) L Gven: w.75 kn/cm E 5, kn/cm ; I, cm 4 ; nd L 45 cm; Fnd the pont of mmum deflecton M. deflecton occurs t where d d ( L 4 ) w L EIL Usng fed pont terton, we cn rerrnge ths equton: L + 5 g( ) 6L Strt t cm nd L 45 cm >> L 45 >> >> (L^4+5*ns^4)/(6*L^*ns) Enter M. deflecton occurs t cm w EIL ( 5 + L L 4 ) >> ; >> w.75; >> EI 5e4*e4; >> w/(*ei*l)*(-^5+ *L^*^-L^4*) cm -.4 cm Ans.

67 There re nfnte ws to construct g() from f(). For emple, f ( ) (ns: or -) Cse : Cse b: Cse c: + + g( ) + ( ) g( ) g( ) So whch one s better? Cse : + + Cse b: + /( ) Cse c: ( ) / + >> 4 >> sqrt(*ns+) Enter Converge! >> 4 >> /(ns-) Enter Converge, but slower >> 4 >> (ns^-)/ Enter Dverge!

68 Convergence.8 g() Dvergence.8.6 g()

69 Newton s s Method Kng of the root-fndng methods Newton-Rphson method Bsed on Tlor seres epnson f f + + +! ( ) f ( ) + f ( )( ) + ( ξ ) ( ) + Newton-Rphson Method Truncte the Tlor seres to get f( + ) f() + f ()(+ ) At the root, f( + ), so f() + f ()(+ ) + f() f ( )

70 Newton-Rphson Method Use the slope of f() to predct the locton of the root. f() f( ) Root slope f ( ) + f() + f( ) f ( ) + + s the pont where the tngent t ntersects -s. Emple: Fndng root of f() - e - ns.567 f () + e + f() f ( ) e + e >> >> ns-(ns-ep(-ns))/(+ep(-ns)) Enter Converge! Fed-Pont Iterton: >> >> ep(-ns) Enter

71 Newton s method - tngent lne f ( ) root * + Appromton Sequence of Newton s Method f() f( ) f( )

72 Flure of Newton s Method Cse : Inflecton pont n vcnt of root f() Flure of Newton s Method Cse : Oscllte round locl mmum or mnmum f()

73 Flure of Newton s Method Cse : Jump w for severl roots f() Flure of Newton s Method Cse 4: Dsster from zero slope f()

74 Overcomng the Flure of Newton s Method No generl convergence crter for Newton-Rphson method. Convergence depends on functon nture nd ccurc of ntl guess. A guess tht's close to true root s lws better choce Good knowledge of the functons or grphcl nlss cn help ou mke good guesses Good softwre should recognze slow convergence or dvergence. At the end of computton, the fnl root estmte should lws be substtuted nto the orgnl functon to verf the soluton. Other Fcts Newton-Rhpson method converges qudrtcll (when t converges). Ecept when the root s multple roots When the ntl guess s close to the root, Newton- Rhpson method usull converges. To mprove the chnce of convergence, we could use brcketng method to locte the ntl vlue for the Newton- Rphson method.

75 Secnt Method for functon whose dervtves re dffcult to evlute Dervtve ppromted b bckwrd fnte dfference ( ) f f( ) f( - ) ( ) ( ) f f + + f ( ) f ( ) ( ) f ( ) f ( ) f ( ) - Emple: Use secnt method to estmte root of e - - Intl estmte - nd. True root Frst terton: - f ( - ). f ( ) -.6.6( ).67 8.% (.6) ε t

76 Second terton: f ( ) f ( ) (.67) %.6 (.78) ε t Thrd terton:.67 f ( ) f ( ).58.58( ) (.58) ε.48% t Secnt Method Advntge of the secnt method - It cn converge even fster nd t doesn t need to brcket the root Dsdvntge of the secnt method - It s not gurnteed to converge! It m dverge (fl to eld n nswer)

77 Convergence not Gurnteed.5 ln ln() secnt no sgn check, m not brcket the root - Convergence crteron -4 Bsecton tertons Flse poston -- 5 tertons Secnt -- tertons Newton s -- 6 tertons Flse poston Bsecton Secnt Newton s

78 MATLAB Functon: fzero Brcketng methods relble but slow Open methods fst but possbl unrelble MATLAB fzero fst nd relble fzero: fnd rel root of n equton (not sutble for double root!) fzero(functon, ) fzero(functon, [ ]) Emple: Fndng root of f() - e - ns.567 Wrte n nonmous functon f: >> Then fnd the zero ner : >> z fzero(f,) z.567 Open Methods: - Fed-Pont Iterton - Newton s Method - Secnt Method

79 Emple: Fndng root of functon ns f ( ) ( e ) 4 Wrte n nonmous functon f: Brcket Method: - Bsecton Method >> Then fnd the zero between -6: >> z fzero(f,[ 6]) z f() Intl ntervl [, 6 ] Roots of Polnomls n fn ( ) n where n s order of polnoml constnt coeffcents Bsecton, Flse-poston, Newton-Rphson, Secnt methods cnnot be esl used to determne ll roots of hgher-order polnomls. Roots of polnomls: () n th-order equton hs n rel or comple roots () If n s odd, t lest one root s rel. () Comple roots est wth conjugte prs (λ + µ nd λ µ)

80 Roots of Polnomls.5 f() dstnct rel roots repeted rel roots comple roots MATLAB Functon: roots Evluton the root s n egenvlue problem Zeros of n th -order polnoml n n n n p () c + c + + c + c + c Coeffcent vector c [cn cn c c c] >> roots(c) - roots >> c pol(r) - nverse functon

81 Emple: Fndng root of functon p() + >> roots([ - ]) p() + 5 >> roots([ - 5]) p() >> roots([ ]) ns ns 5 5 ns

82 Numercl Methods for Cvl Engneers Lecture 6 Lner Algebrc Equtons Bsc Concepts Gussn Elmnton Bckwrd Substtuton LU Decomposton Mongkol JIRAVACHARADET S U R A N A R E E UNIVERSITY OF TECHNOLOGY INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING Lner Algebrc Equtons In mn problems of engneerng nterest, ou wll need to be ble to solve set of lner lgebrc equtons. The methods cn be brodl clssfed s: Drect methods Itertve methods Guss-Elmnton Guss-Jordn Jcob Guss-Sedel LU Decomposton

83 Lner Algebrc Equtons Lner Algebrc Equtons n n b n n b n + n +... nn n b n n equtons n unknowns A sstem of n lner equtons n n unknowns, where ll the s nd b s re constnts. We need to fnd ll the s such tht ll the bove equtons re stsfed. Emple: c c c c c c c c c Mtr Form: c c c A b Smbolc Notton Augment Form:

84 Sstem of lner lgebrc equtons A b m m n n mn m b b b m m number of rows n number of columns where j nd b re constnts,,,,m, j,,,n Soluton : A b A - A A - b A - b MATLAB : - Use mtr nverson, >> nv(a)*b - Use bckslsh opertor, >> A\b Requrements for Soluton, A m n m rows nd n columns m n Solvng A b for n unknowns from n equtons m > n Overdetermned sstems (e.g., lest-squres problems) m < n Underdetermned sstems (e.g., optmzton)

85 Emple Unque soluton Consder the sstem >> -::; >> (8-*)/; >> (5*-)/6; >> plot(,,,) Geometrcll ths corresponds to two lnes crossng n one pont. Emple No soluton Consder the sstem >> -::; >> (8-*)/; >> (-4*)/6; >> plot(,,,) Geometrcll ths corresponds to two prllel lnes never crossng.

86 Emple Ill-condtoned Consder the sstem >> -::; >> (8-*)/; >> (5-4*)/7; >> plot(,,,) Geometrcll ths corresponds to two lmost prllel lnes brel crossng. Senstve to round-off error. Mtr Rnk rnk(a) number of lnerl ndependent columns n A >> A [ -4 ;6 ;9-7 ]; >> rnk(a) ns For mtr A wth m rows nd n columns, nd A b hs soluton - f rnk(a) < n, nfnte number of solutons - f rnk(a) n, unque soluton For sstem of n equtons n n unknowns wrtten n the form A b, the soluton ests nd s unque for n b f nd onl f rnk(a) n.

87 Consstenc Test Element of vector re coeffcents n the lner equton n b n b A b n b m m mn m Augmented mtr: b b Aɶ b n b m [A b] Consstent when A nd A ɶ hve the sme rnk Emple: An Inconsstent Sstem from Dt Fttng Eperment dt: Prctcl Model: α+β Dt Model: α + β α + β α + β.5 Mtr Form: α β.5 Consstenc test : >> A[ ; ; ]; b[; ;.5]; >> rnk(a) >> rnk([a b])

88 nd Eperment: α β ( ) + () Consstenc test: >> A [ ; ; ]; b [; ; ]; >> rnk(a) >> rnk([a b]) [ α β] T [ ] T Ect soluton Nonsngulr Cse If the coeffcent mtr A s nonsngulr, then t s nvertble nd we cn solve A b s follows: A b A - b Ths soluton s therefore unque. Also, f b, t follows tht the unque soluton to A s A -. Thus f A s nonsngulr, then the onl soluton to A s the trvl soluton.

89 Nve Guss Elmnton The most bsc sstemtc scheme for solvng sstem of lner equtons. The procedure conssted of two steps: ) Forwrd elmnton of the lner equton mtr usng row operton to obtn n upper trngulr mtr. ) Bckwrd substtuton to solve for the unknowns elmnton row operton bckwrd substtuton Mtr Upper trngulr Soluton Forwrd elmnton b b b b b b Bckwrd substtuton b / ( b )/ ( b )/

90 Substtutons Substtutons Bckwrd substtuton: Bckwrd substtuton: Forwrd substtuton: Forwrd substtuton: Upper trngulr mtr nn n n b,,,, ), ( + n n b n j j j Lower trngulr mtr b n b j j j,,,, ), ( Pvot row Pvot element EXAMPLE : Nve Guss Elmnton R R R Forwrd elmnton (Row operton): R + R, R+R: R - R: 9 5

91 Bckwrd substtuton: ) 5 9 ( ) ( + >> A [- -;6-6 7; -4 4] >> b [-;-7;-6] >> A\b MATLAB: EXAMPLE : Guss-Jordn Elmnton Pvot row Pvot element R R R Forwrd elmnton (Row operton): R + R, R+R: R - R: 9 5

92 Dvde dgonl to one: R/- R/- R/- Use dgonl to elmnte to dentt mtr: R +.67R R +.5R R +.R No bckwrd substtuton! X X X - Gussn Elmnton wth Pvotng To prevent flure from zero dgonl elements Augmented mtr: Aɶ [ A b] Frst row operton: R R/, R + R/, R4 + R/ R R R R4 net elmnton fl

93 P I V O T I N G Echnge row to vod zero pvot element RR-R Solvng Sstems wth the Bckslsh Opertor A b A - b MATLAB A \ b A \... mens multpl on the left b the nverse of A >> A [ 4 - -; 4 -; ;- 6 -] >> b [-4;5;7;7] >> A\b... 4.

94 LU Decomposton A L U When Guss elmnton s used to solve lner sstem, the row opertons re ppled smultneousl to the RHS vector. [ A b ] If the sstem s solved gn for dfferent RHS vector, the row opertons must be repeted. [ A b ] The LU decomposton elmntes the need to repet the row opertors ech tme new RHS vector s used. *RHS Rght Hnd Sde b LU Decomposton To solve A b, we strt b decompose A nto L nd U such tht A LU where L l l l l l l U u u u u u u Emple: lower trngulr mtr 5 4 upper trngulr mtr

95 6 LU LU Decomposton Decomposton Mn de s to record the steps used n Gussn elmnton. Consder the mtr: 5 A Gussn elmnton: R R () For recordng Recordng Method: A Gussn elmnton (con t): ) ( () 6 () R R R + R L Lower trngulr mtr: Msterous concdence!!! A LU 5 6 >> L [ ; ; - ] >> U [ - ; - 6; ] >> A L*U A L U

96 Guss elmnton s LU decomposton Guss elmnton cn be used to decompose A nto L nd U s llustrted for three-equton sstem, b b b Forwrd elmnton U Store row zeros poston: ( f ( f ) ) ( f ) where f, f, nd f [A] [L][U] L f f f U EXAMPLE : LU Decomposton wth Guss Elmnton From prevous emple, Frst step: R+R Second step: R+R f f 6 f After the second step of forwrd elmnton Thrd step: R-R,, After forwrd elmnton, A 6 U Lower trngulr mtr, L f f f Check LU A or not?

97 Solvng Lner Sstem b LU Decomposton The lner sstem A b cn be solved n steps: () Fnd the LU decomposton of mtr A : A LU A b L U b (defne U ) () Solve the sstem L b : Forwrd Substtuton L L L L L L b b b Solvng Lner Sstem b LU Decomposton () Solve the sstem U : Bckwrd Substtuton U U U U U U LU Decomposton replces the solvng sngle A b sstem b solvng two sstems of L b nd U However, the ltter sstems re es to solve snce the coeffcent mtrces re trngulr.

98 Emple: Emple: Usng Usng LU LU to solve equtons to solve equtons A b LU b L b U b b b f f f Step : L b : Forwrd Substtuton 6 7 b f b f f b 9 ) )( ( 7 9) ( ) )( ( 6 Step : A LU : Decomposton done n prevous emple Step : U : Bckwrd Substtuton 9 5 )(5) ( 9 ) )( (

99 MATLAB Functon: MATLAB Functon: lu lu >> [L, U] lu(a) >> A [- -;6-6 7; -4 4]; >> b [-; -7; -6]; >> [L,U] lu(a) LU Decomposton: LU Decomposton: >> L\b >> U\ Solve equtons: Solve equtons: For Guss elmnton wth pvotng: PA LU P dentt mtr wth sme rows swtched s A n pvotng. For emple PA : (swtch R R) 5 5 PA Pb b LU b L b U LU LU Decomposton wth pvotng Decomposton wth pvotng

100 A LU 5 6 >> A [ - ; -5 ; -]; >> [L,U] lu(a) >> [L,U,P] lu(a) Emple: Emple: LU LU decomposton wth pvotng decomposton wth pvotng From prevous emple: P A L U 5 5 R R, R R, R R Net, we wnt to fnd the soluton of the sstem: A b 5 PA Pb b LU b L b U >> b_dsh P*b >> L\b_dsh >> U\ >> A\b Compre wth,

101 Numercl Methods for Cvl Engneers Lecture 7 Curve Fttng Lner Ft Goodness of Ft Qudrtc Ft Polnoml Ft MATLAB polft & polvl B Asst.Prof.Dr.Mongkol JIRAVACHARADET S U R A N A R E E UNIVERSITY OF TECHNOLOGY INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING LINEAR REGRESSION ก [, ] ก ก α + β - ก - ก

102 Error Between Model nd Observton Dt: [ ] Model: ŷ α + β Error: e α β Crter for Best Ft : Σe BEST lne wth error mnmzed? ก e ก e ˆ ŷ α + β ก ก ก ก ก

103 ERROR Defnton ก ก ก ± e ˆ ก ก S ( ) e ก ก ก lest squre Lest-Squre Ft of Strght Lne ก (, ) : ŷ α + β : e ŷ β α ก : S e + e + e... S r Σe Σ r + ( β α ) ก ก S r α S r β

104 ก ก S Σ ( α β)( ) α S Σ ( α β)( ) β ก ก α Σ α Σ + βσ + βn Σ Σ Σ Σ Σ n α β Σ Σ n ก ก ก α β α n ( ) n α S S β α where nd re the men of nd Defne: S Σ Σ Σ n Appromted for n s S Σ Σ n ( ) ŷ α + β S Σ Σ n ( )

105 Emple: Ft strght lne to nd vlues Σ n 7 4 (9.5) (8)(4) / 7 α.89 (4) (8) / 7 β (4).74 Lest-squre ft: ŷ MATLAB: >> :7; >> [ ]; >> ht.89*+.74; >> plot(,,'o',,ht)

106 Goodness of Ft Sum of the squre of the errors: n n r ( β α ) S e ( ) S S S / S Sum of the squre round the men: ( ) t n S S Stndrd errors of the estmton: s / Sr n Stndrd devton: s St n s Lner regresson s > s / s / Coeffcent of determnton r S S S t r t S S S r ก ก กก For perfect ft S r nd r r

107 Emple: Error nlss of the lner ft ( ) ( - β - α ) Σ s s /.486 α.89 β S t S r Snce s / < s, lner regresson hs mert r Lner model eplns 86.8% of orgnl uncertnt. OR Emple: Error nlss of the lner ft S 4 8 / 7 8 S 5 4 / 7.7 S / 7.5 S r (8.7.5 ) / 8 Σ Snce s / < s, lner regresson hs mert..5 r s s / Lner model eplns 86.9% of orgnl uncertnt.

108 Non-lner Curve Ft ก ก Lner regresson ก ก error ก ก Qudrtc Ft (, ) ก : ŷ + + : e ŷ ก : Sr e + e + e +... S r Σ e Σ( ) ก ก S r Σ( S r Σ ( S r Σ ( ) ) )

109 n + ( Σ ) + ( Σ ) Σ ( Σ ) + ( Σ ) + ( Σ ) Σ ( Σ ) + ( Σ ) + ( Σ ) Σ ก ก 4 Σ Σ Σ 4 Σ Σ Σ Σ Σ n Σ Σ Σ ก ก ก Gussn elmnton, Emple: Ft second-order polnoml to the dt. ( ) ( ) Σ From the gven dt: m n

110 Smultneous lner equtons Solvng these equton gves.47857,.599, nd.867. Lest-squres qudrtc equton: Coeffcent of determnton: r Polnoml Ft Polnoml Ft (, ) ก m: m m ŷ ก ก ก m+: Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ m m m m m m m 4 m m n

111 MATLAB polft Functon For second-order polnoml, we cn defne c,, c c m m m A Y C nd show tht ( ' ) ' or >> C polft(,,n) - C A A A Y C A Y Ft norm >> [C,S] polft(,,n) Ft QR ndependent vrble dependent vrble n degree of polnoml C coeff. of polnoml n descendng power S dt structure for polvl functon Solvng b MATLAB polft Functon >> [ 4 5]; >> [ ]; >> c polft(,,) >> [c,s] polft(,,) >> st sum((-men()).^) >> sr sum((-polvl(c,)).^) >> r sqrt((st-sr)/st)

112 MATLAB polvl Functon Evlute polnoml t the ponts defned b the nput vector >> polvl(c,) where Input vector Vlue of polnoml evluted t c vector of coeffcent n descendng order c()* n + c()* (n-) c(n)* + c(n+) Emple: >> c [ ] Polnoml Interpolton >> polvl(c,) >> plot(,, o,,)

113 Emple: Whch order s the best polnoml ft? st order (lner) Ft : >> [ 4 5 6]; >> [ ]; >> c polft(,,); >> st sum((-men()).^); >> sr sum((-polvl(c,)).^); >> r sqrt((st-sr)/st) r.658

114 >> polvl(c,); >> plot(,, o,,) Order r st.658 nd.6695 rd.995 >> c polft(,,) >> c polft(,,).5 Dt st nd rd c [ ]

115 Eponentl Ft ก ก eponentl functon Populton 6E+5 5E+5 4E+5 E+5 E+5 E+5 E+ 5 5 Yers ก ก ก 5 ก ก ก ก ก ก ก ก Eponentl Ft Populton Yers ก log ก ก ก ก ก ก lest-squre

116 Eponentl Ft (, ) ก ก ŷ e ก กก ก b ln ŷ ln + b ln ก b lest squre ẑ α + β ẑ ln ŷ, α b, β ln e β Emple: Eponentl Ft

117 Lest Squre ft of nd z : z ln z z Σ n z 7 4. Σz ΣΣz n / 7 α. 6 Σ ( Σ) 9 / 7 n β z α 4. (-.6)() 4.88 ẑ α + β ŷ e b ŷ.6 e.6 α b, e β e >> :.:6; >>.6*ep(-.6*); >> plot(,,'o',,)

118 Lest Squre ft of nd z : (b MATLAB) >> cler >> :6; >> [ ]; >> z log(); >> c polft(,z,); >> b c(); >> ep(c()); >> ht *ep(b*); >> st sum((-men()).^); >> sr sum((-ht).^); >> r sqrt((st-sr)/st) r.9968 >> :.:6; >> *ep(b*); >> plot(,,'o',,)

119 Numercl Methods for Cvl Engneers Lecture 8 Interpolton Lner Interpolton Qudrtc Interpolton Polnoml Interpolton Pecewse Polnoml Interpolton S U R A N A R E E UNIVERSITY OF TECHNOLOGY Mongkol JIRAVACHARADET INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING Vsul Interpolton km/h Vehcle speed s ppromtel 49 km/h

120 Interpolton between dt ponts Consder set of dt collected durng n eperment. We use nterpolton technque to estmte t where there s no dt. known dt Wht s the correspondng vlue of for ths? BASIC IDEAS From the known dt (, ), nterpolte + n + n nterpolte ˆ ˆ ˆ F( ˆ) for ˆ Determnng coeffcent,,..., n of bss functon F() F() Φ () + Φ () n Φ n () Polnomls re often used s the bss functons. F() n n- ŷ F() ˆ

121 Interpolton v.s. v Curve Fttng known dt curve ft nterpolton Curve fttng: ft functon & dt not ectl gree Interpolton: functon psses ectl through known dt Interpolton & Etrpolton Interpolton ppromte wthn the rnge of ndependent vrble of the gven dt set. Etrpolton ppromte outsde the rnge of ndependent vrble of the gven dt set.

122 Lner Interpolton The most common w to estmte dt pont between ponts. The functon s estmted b strght lne drwn between them. Interpolted Pont Lner, Qudrtc, nd Cubc Interpoltons ponts Lner st order f() + ponts Qudrtc nd order f() ponts Cubc rd order f() Generl formul for n (n( )th-order polnoml: f() n n-

123 Lner Interpolton Lner Interpolton Connect two dt ponts wth strght lne ˆ F ˆ ˆ) ( Usng smlr trngles: ˆ ˆ ) ˆ ( ˆ ˆ) ( F + Qudrtc Qudrtc Interpolton Interpolton Second-order polnoml nterpolton usng dt ponts (, ) (, ) (, ) Convenent form: ) )( ( ) ( ) ( b b b f + + ) ( f + + where b b b + + b b b + + b ) ( Substtute b f ) ( Substtute b f b ) ( Substtute f

124 EXAMPLE : Lner & Qudrtc Interpolton Estmte ln() b usng lner & qudrtc nterpolton Lner nterpolton from to 6 ln() ln().69 ln(4).86 ln(6) f () + () Lner nterpolton from to 4 ε t 48.%.86 f () + ().46 4 ε t.% Qudrtc nterpolton from to 4 nd 6 b, b b Substtute b, b nd b nto equton f () +.46( - ) -.587( - )( - 4) whch cn be evluted t for f () +.46( - ) -.587( - )( - 4) f ().5658 ε t 8.4% f () MATLAB : >> :.:7; >> log(); >> -.587*.^ *-.6696; >> plot(,,,)

125 Polnoml Interpolton In generl, n+ dt ponts cn be ftted b n nth-order polnoml of the form f n () b + b ( ) + + b ( )( ) ( The followng equtons re used to evlute the coeffcents: b f( ) b f() f( f [] f() f() f() b bn f [n,,, ] ) n f [, ] f( ) f [,, ] n ) Fnte Dvded Dfference The brcketed functon evlutons re fnte dvded dfferences nd re defned s f [ f [ f [ n,, ],,, ], f() ] f [ f(, ) ] f [, f [n,,,] f [n, ] n st fnte dvded dfference nd fnte dvded dfference n th fnte dvded dfference,, ] These equtons re recursve,.e. hgher order dfferences re computed b tkng dfferences of lower-order dfferences.

126 Dvded Dfference Tble The computtons re orgnzed n the dvdeddfference tble: f( ) f( ) f( ) f( ) f( ) Frst Second Thrd f [, ] f [,, ] f [,,, ] f [, ] f [,, ] f [, ] Newton s dvded dfference nterpoltng polnoml: f n () f( ) + ( + + ( )f [ )(, ] + ( ) ( n )f [ )( n,, )f [, ],, ] EXAMPLE : rd Order Polnoml Interpolton Use the polnoml nterpolton to estmte ln() ln() ln().69 ln(4).86 ln(5).694 ln(6) f( ) Frst Second Thrd f () +.46( ).797( )( 4) +.( )( 4)( 5) For, f ().7 ε t.7%

127 Polnoml Interpolton Polnoml Interpolton Although the fnte dvded dfference s well suted for determnng ntermedte vlues between ponts, the do not provde polnoml n conventonl form: n f ) ( Snce n+ dt ponts re requred to determne n+ coeffcents, smultneous lner sstems of equtons cn be used to clculte s. n n n n n n n n n n f f f ) ( ) ( ) ( Where s re the knowns nd s re the unknowns. Vndermonde Vndermonde Mtr Equton Mtr Equton ) f( ) f( ) f( n n n n n n n n Rewrtten the equtons n the mtr form:

128 Polnoml Interpolton Fndng P n- () of degree n- tht psses through n known dt prs P n- () c n- + c n c n- + c n Vndermonde Sstems n prs of (, ) n equtons n unknowns Lner : pt. Qudrtc : pt. Cubc : 4 pt. Polnoml pss through ech of dt ponts Emple: Construct qudrtc nterpoltng functon c + c + c tht pss through (, ) support ponts (-, -), (-, ), nd (, -) Substtute known ponts nto equton: - c (-) + c (-) + c c (-) + c (-) + c - c () + c () + c Rewrtten n mtr form: 4 c c c

129 Vndermonde Mtr c c c >> [- - ] ; >> A [.^ ones(sze())]; or use the bult-n vnder functon >> A vnder([- - ]); >> [- -] ; >> c A\ c MATLAB : polft nd polvl Functons Fnd c + c + c tht pss through (, ) support ponts (-, -), (-, ), nd (, -). >> [- - ]; >> [- -]; >> c polft(,,) c We cn then use the polvl functon to perform n nterpolton s n E. To nterpolte t >> polvl(c,) ns.5

130 Also, we cn use the polvl functon to plot the result s n >> ht -:.:; >> ht polvl(c,ht); >> plot(ht,ht,,,'o') Polnomls Wggle nd-order rd-order 4th-order 5th-order

131 MATLAB s Commnd Lnes to Demonstrte Polnomls Wggle >> [ ]; >> [ ]; >> :.:; >> polvl(polft((4:6), (4:6), ), ); >> polvl(polft((4:7), (4:7), ), ); >> 4 polvl(polft((:7), (:7), 4), ); >> 5 polvl(polft((:8), (:8), 5), ); >> s([ -5 5]) >> plot(,, o ) >> hold on >> plot(, ) >> plot(, ) >> plot(, 4) >> plot(, 5) Pecewse Polnoml Interpolton Usng set of lower degree nterpolnts on subntervl of the whole domn brekpont or knot Pecewse-lner nterpolton Pecewse-qudrtc nterpolton Pecewse-cubc nterpolton f () nd f () contnuous t brekpont cubc splne

132 MATLAB s Bult-n Interpolton Functons Funncton nterp nterp nterp nterpft nterpn splne Descrpton -D nterpolton wth pecewse polnomls. -D nterpolton wth nerest neghbor, blner, or bcubc nterpolnts. -D nterpolton wth nerest neghbor, blner, or bcubc nterpolnts. -D nterpolton of unforml spced dt usng Fourer Seres (FFT). n-d etenson of methods used b nterp. -D nterpolton wth cubc-splnes usng not--knot or fed-slope end condtons. nterp Bult-n Functon -D nterpolton wth one of the followng 4 methods:. Nerest-neghbor uses pecewse-constnt functon. Interpolnt dscontnue t mdpont between knots. Lner nterpolton uses pecewse-lner polnomls.. Cubc nterpolton uses pecewse-cubc polnomls. Interpolnt nd f () re contnuous. 4. Splne nterpolton uses cubc splnes. Ths opton performs the sme nterpolton s bult-n functon splne.

133 How to use nterp? >> ht nterp(, ht) >> ht nterp(,, ht) >> ht nterp(,, ht, method) where tbulted vlues to be nterpolted. ndependent vlues. If not gven :length(). ht vlues t whch nterpolnt be evluted. method nerest, lner, cubc or splne Emple: Interpolton wth pecewse-polnomls >> [ ]; >> [ ]; >> ht :.:; % evl nterpolnt t ht >> n nterp(,, ht, nerest ); >> plot(,, o, ht, n); puse; >> l nterp(,, ht, lner ); >> plot(,, o, ht, l); puse; >> c nterp(,, ht, cubc ); >> plot(,, o, ht, c); puse; >> s nterp(,, ht, splne ); or >> s splne(,, ht); >> plot(,, o, ht, s);

134 EXAMPLE : Lner nterpolton b nterp functon Estmte the vlue of when s equl to >> :5; >> [5 9 6 ]; >> nterp(,,.5) ns Plot Grph: >> ht :.:5; >> ht nterp(,,ht); >> plot(,,'bo-',ht,ht,'r') 4 5

135 Numercl Methods for Cvl Engneers Lecture 9 Numercl Integrton - Bsc Ides - Smbolc vs. Numercl Integrton - Trpezod Rule - Smpson s s Rule - MATLAB qud nd qud8 Functons S U R A N A R E E UNIVERSITY OF TECHNOLOGY Mongkol JIRAVACHARADET INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING BASIC IDEAS I b f f () ( ) d Are under curve f ( Node ) Trpezodl regon b Appromted b pecewse-lner: Are Sum of trpezodl regons

136 Smbolc Mth Toolbo Smbolc Mth Toolboes ncorporte smbolc computton nto the numerc envronment of MATLAB. Smbolc Integrton wth MATLAB >> I nt(f) %Indefnte ntegrl >> I nt(f, v) %Desgntng ntegrton vrble >> I nt(f,, b) %Defnte ntegrl on close ntervl >> I nt(f, v,, b) where f smbolc epresson Vrbles must be defne s smbolc b sm or sms >> sm( ), sm( ), z sm( z ) or >> sms z Emple : I b ( c ) d >> sms b c >> I nt(^-c,,,b) I /4*b^4-c*b-/4*^4+c*

137 Wht s Integrton? The ntegrl s equvlent to the re under the curve. f() I b f ( ) d I Emples of how ntegrton s used to evlute res b Net force due to wnd blowng gnst the buldng Cross-sectonl re of rver Newton-Cotes Formuls Replce complcted functon wth polnoml tht s es to ntegrte b I f ( ) d f ( ) d b where + n n fn( ) + + L + n + n n f() f() b b Appromte re b strght lne Appromte re b prbol

138 Trpezodl Rule f() st degree polnoml Lner lne f () f(b) f ( b) f ( ) f( ) f ( ) + ( ) b f() b I f( ) d b ( b ) f ( ) + f ( b) Are of trpezod wdth verge heght wdth b h f ( ) + f ( b) verge heght Composte Trpezodl Rule Improve ccurc b dvdng ntervl nto subntervls f() f f f f 4 f f ( ) d f ( ) d + f ( ) d + f ( ) d + 5 f 4 ( ) d

139 f() n b h b n There re n segment wth equl wdth: h b n d f d f d f I n n ) ( ) ( ) ( L ) ( ) ( ) ( ) ( ) ( ) ( n n f f h f f h f f h I L n f n f h f f h f f h I L + + n n f f f h I Substtute h b n MEAN f() f f f f 4 f 5 f 6 wdth verge heght n f f f b I n n ) ( + +

140 Emple 9- Use Trpezodl rule to numercll ntegrte f ( ) from to b.8. Note tht the ect vlue of the ntegrl cn be determned nltcll to be.645. or usng MATLAB s Smbolc Mth Toolbo : >> sm( ) >> Int(.+5*-*^+675*^-9*^4+4*^5,,,.8) I 76/ Sngle Trpezod: f(). nd f(.8). f() I ( b ) f ( ) + f ( b) (.8 ) Error ε t % 89.5% Integrl estmte.8 Trpezods: n (h.4) : f(). f(.4).456 f(.8). I ( b ) n f + f + fn n I. + (.456) +. (.8) ε t % 4.9%

141 MATLAB s trpz functon Trpezodl numercl ntegrton >> z trpz() % Integrl of wth unt spcng >> z trpz(, ) % Integrl of wth respect to Emple: 9 o o sn d >> ngle :5:9; >> (p*ngle/8); >> sn(); >> z trpz(,) >> z.994 Emple 9- Use MATLAB s trpz functon to numercll ntegrte f ( ) from to b.8. Note tht the ect vlue of the ntegrl cn be determned nltcll to be.645. For n : >> lnspce(,.8,); >> f.+5*-*.^+675*.^-9*.^4+4*.^5; >> I trpz(,f) I.688 n I ε t

142 Smpson s s Rules Usng hgher-order polnomls to connect the ponts f() f() Smpson s / rule Qudrtc connectng ponts Smpson s /8 rule Cubc connectng 4 ponts Smpson s s / Rules f() Qudrtc connectng ponts f( ) f () f( f( ) ) I f( d ) f ( d ) ( )( ) f ( ) f( ) ( )( ) ( )( ) + ( )( ) ( )( ) + ( )( ) f( ) f( ) h I f + f + f h [ ( ) 4 ( ) ( ), ]

143 Emple 9- Use Smpson s / rule to numercll ntegrte f ( ) from to b.8. Note tht the ect vlue of the ntegrl cn be determned nltcll to be.645. Soluton: n (h.4) : f(). f(.4).456 f(.8). I.4 (. + 4(.456) +.).675 ε t % 6.6% Composte Smpson s s / Rules 4 I f ( ) d + f ( ) d + L + f ( ) d n n b where h, n h h h I 4 n 4 n + [ f + 4f + f ] + [ f + 4f + f ] + L+ [ f + f f ] n n evennumber b I n n ( b ) f ( ) + 4 f ( ) + f ( n,,5 j,4,6 ) + f ( j n )

144 Emple 9-4 Use composte Smpson s / rule wth n 4 to numercll ntegrte f ( ) from to b.8. Note tht the ect vlue of the ntegrl cn be determned nltcll to be.645. Soluton: n 4 (h.) : f(). f(.).88 f(.4).456 f(.6).464 f(.8). I n n ( b ) f ( ) + 4 f ( ) + f ( n,,5 j,4,6 ) + f ( j n ) I.8 (. (4) + 4( ) + (.456) +.).64 ε t %.4% Smpson s s /8 Rules Cubc connectng 4 ponts f() b I f( d ) f ( d ) b h I f + f + f + f 8 h / [ ( ) ( ) ( ) ( )] ( ) b or ( b ) I + 8 [ f ( ) + f ( ) + f ( ) f ( )]

145 Truncton Errors Intervl Method E t wdth E t Trpezod Smpson s / ( ) h f ξ ( ) 5 (4) 9 h f ξ h b h b ( b ) ( b) 88 5 f ( ξ) f (4) ( ξ) Smpson s /8 ( ) 5 (4) 8 h f ξ h b ( b) f (4) ( ξ) Smpson s /8 rule s used when number of segments s odd. Appl Smpson s /nd /8Rules To hndle multple pplcton wth odd number of ntervls f() / rule /8 rule

146 Emple 9-5 Use Smpson s / + /8 rule wth n 5 to numercll ntegrte f ( ) from to b.8. Note tht the ect vlue of the ntegrl cn be determned nltcll to be.645. Soluton: n 5 (h.6) : f(). f(.6).97 f(.).74 f(.48).86 f(.64).8 f(.8). f() For the frst two segments use Smpson s / :.6 I (. + 4(.97) +.74).8 For the lst three segments use Smpson s /8 :.48 I (.74 + ( ) +.) 8.65 Totl ntegrl : I ε t / rule /8 rule %.74% MATLAB s qud nd qud8 Functons qud :low order method, qud8: hgh order method >> q qud( f',,b) Appromtes the ntegrl of f() from to b wthn reltve error of e- usng n dptve recursve Smpson's rule. f' s strng contnng the nme of the functon. >> qud( sn,, p/) Functon f must return vector of output vlues f gven vector of nput vlues.

147 .8 Emple: pol5.m 4 5 d functon p pol5() p.+5*-*.^+675*.^-9*.^4+4*.^5; >> qud( pol5,,.8) ns.645 Emple: Computng the Length of Curve t () sn( t), t () cos( t), zt () t [ π] where t, >> t :.:*p; >> plot(sn(*t), cos(t), t)

148 Length of the curve: Norm of dervtve π 4cos( ) + sn( ) + t t dt hcurve.m functon f hcurve(t) f sqrt(4*cos(*t).^ + sn(t).^ + ); >> len qud( hcurve,,*p) len 7. Emple: Double Integrton m mn m mn f(, ) dd For emple: f (, )sn()+cos() ntegrnd.m functon out ntegrnd(,) out *sn() + *cos(); >> mn p; m *p; >> mn ; m p; >> result dblqud( ntegrnd,mn,m,mn,m); result

149 Numercl Methods for Cvl Engneers Lecture Ordnr Dfferentl Equtons - Bsc Ides - Euler s Method - Hgher Order One-step Methods - Predctor-Corrector Approch - Runge-Kutt Methods - Adptve Stepsze Algorthms S U R A N A R E E UNIVERSITY OF TECHNOLOGY Mongkol JIRAVACHARADET INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING Defntons nd Termnolog Dfferentl equton (DE) : An equton contns the dervtes of one or more dependent vrbles wth respect to one or more ndependent vrbles. Emple: d d. Ordnr DE (ODE): An eq. contns onl ordnr dervtes of one or more dependent vrbles wth respect to sngle ndependent vrble. d d d Emple: + 5 e, + + d dt dt

150 Ordnr Dfferentl Equtons Rte of chnge of one vrble wth respect to nother. d dt f ( t, ) where t ndependent vrble dependent vrble Intl Condton (t ) k Emple: Mss-sprng sstem c m d d m + cv + k m c k dt + dt + Leohrd Euler Leonhrd Euler mde huge number of contrbutons to mthemtcs, lmost hlf fter he ws totll blnd. It ws Euler who orgnted the followng nottons: f ( ) (functon notton) e (bse of nturl log) π (p) ( ) (summton) Leonhrd Euler 77-78

151 EULER S S METHOD From Tlor seres: ( t t) ( t) ( t) + ( t t) ( t) + ( t) +! Retnng onl frst dervtve: ( t) + h f ( t, ) where h (t - t ), (t ), nd f(t, ) (t ) h t t Predct True New vlue Old vlue + slope step sze t error + h f ( t, ) + h f ( t, ) + h f ( t, ) Emple: Mnul Clculton wth Euler s Method d t, () dt Ect soluton: t + 5 e f (t, ) t 4 Set step sze: h. t ( ) t f (t -, - ) Euler - + h f (t -, - ) Ect Error. NA ntl cond.... -() -..+.(-.) (.6) (-.) (.4) (-.4)

152 Implementng Euler s Method odeeuler.m functon [t,] odeeuler(dffeq,tn,h,) % Input: dffeq (strng) nme of m-fle tht % evlute rght hnd sde of ODE % tn stoppng vlue of ndependent vrble % h stepsze % ntl condton t t t (:h:tn) ; n length(t); *ones(n,); for :n () (-)+h*fevl(dffeq,t(-),(-)); end d Emple: t, (), h. dt rhs.m functon ddt rhs(t,) ddt t-*; >> [t,] odeeuler( rhs,.6,.,.) t

153 Ect Soluton : >> (/4)*(*t-ones(sze(t))+5*ep(-*t)) >> t:.:.6; >> (/4)*(*t-ones(sze(t))+5*ep(-*t)); >> plot(t,,t,) Improvements of Euler s Method Heun s Method: estmte slope from dervtves t the begnnng nd t the end of the ntervl. Euler: - + hk slope: k f(t, ) slope: k f(t -, - ) t - h t t

154 Averge slope k + k f ( t, ) + f ( t, ) k+ k + h Use slope: (k + k )/ t - h t t Heun s Method d f ( t, ) k f ( t, ) dt k f ( t + h, + hk ) k + h + k Euler Heun True - h t - t

155 Predctor-Corrector Approch Heun s Method: k f ( t, ) k f ( t + h, + hk ) k + h + k Euler s Method: + h f ( t, ) Predctor: + h f ( t, ) Corrector: f t f t + h (, ) + (, ) Itertng the Corrector of Heun s Method To mprove the estmton f t f t + h (, ) + (, )

156 Emple: Use Heun s method to ntegrte From to 4, step sze e.8 4.5, () 4 e e + e. Anltcl soluton: ( ) Predctor, + h f ( t, ) + (4e.5()) Corrector, + h f t f t (, ) + (, ).8() (4e.5()) + (4e.5(5)) ().5().5() e e + e True vlue: ( ) Reltve error, E t % 8.8% nd Corrector, + rd Corrector, +.8() (4e.5()) + (4e.5(6.7)) 6.758, E.% t.8() (4e.5()) + (4e.5(6.758)) 6.8, E.% Error m ncreses for lrge step szes. t

157 Iterton usng up-rrow n MATLAB >> +*(4*ep()-.5*) % Predctor of 5 >> +(/)*((4*ep()-.5*)+(4*ep(.8*)-.5*)) 6.7 % st Corrector of Press nd Enter % nd Corrector of % rd Corrector of % 4th Corrector of % 5th Corrector of 6.69 % untl no chnge MATLAB s Implementton func.m functon dd func(,) dd 4*ep(.8*)-.5*; odeheun.m functon [,] odeheun(dffeq,n,h,,ter) % Input: ter number of corrector tertons (:h:n) ; n length(); *ones(n,); for :n () (-)+h*fevl(dffeq,(-),(-)); for j:ter end end () (-)+h*(fevl(dffeq,(-),(-))... + fevl(dffeq,(),()))/;

158 For to 4, step sze, (), Iterton 5 >> [,] odeheun( func,4,,,5) _true Et Compre wth Euler s Method: >> [,] odeeuler( func,4,,) Et

159 Comprson of True Soluton wth Euler s nd Heun s Method >> true (:.:4) ; >> true (4/.)*(ep(.8*true)-ep(-.5*true))... + *ep(-.5*true); >> [euler,euler] odeeuler( func,4,,); >> [heun,heun] odeheun( func,4,,,5); >> plot(true,true,euler,euler, o,heun,heun, + ) 8 6 True Euler Heun RUNGE-KUTTA (RK) METHODS Generl Formul usng Weghted Averge of slopes m γ k + l l l For Heun s method γ γ.5 The weghts must stsf m l γ Second-Order RK (Rlston s) Method: + h k + k k f (, ) k f + h, + kh 4 4 l

160 Thrd-Order Runge-Kutt Methods where h + k + k + k 6 k f (, ) ( 4 ) k f + h, + kh (, ) k f + h k h+ k h Fouth-Order Runge-Kutt Methods The most populr RK methods Clsscl 4th-order RK: where k f (, ) k f + h, + kh k f + h, + kh k f + h + k h (, ) 4 h + k + k + k + k 6 ( ) 4

161 Emple: Use 4th-order RK method to ntegrte e From to 4, step sze Step :,.8 4.5, () k k k k 4 e 4.5() e + e + e +.8(.5) 4.5( ) 4.7.8(.5) 4.5( 4.7 ).9.8() 4.5(.9 ) ( ) 4.8().5().5() e e + e True vlue: ( ) Reltve error, E t %.8% 6.946

162 MATLAB s Implementton oderk4.m functon [,] oderk4(dffeq,n,h,) (:h:n) ; n length(); *ones(n,); for :n k fevl(dffeq,(-),(-)); k fevl(dffeq,(-)+h/,(-)+k*h/); k fevl(dffeq,(-)+h/,(-)+k*h/); k4 fevl(dffeq,(-)+h,(-)+k*h); () (-)+h/6*(k+*k+*k+k4); end For to 4, step sze, () >> [,] oderk4( func,4,,) _true Et(%)

163 Adptve Stepsze Algorthms MATLAB s ode nd ode45 Routnes ode use second- nd thrd-order RK smultneousl ode45 use fourth- nd ffth-order RK smultneousl Emple: For to 4, ().8 4e.5, () func.m >> ; n 4; ; >> [45,45] ode45( func,[,n],); >> true (:.:4) ; >> true (4/.)*(ep(.8*true)... - ep(-.5*true))+ *ep(-.5*true); >> plot(true,true,45,45)

164 Numercl Methods for Cvl Engneers Lecture Optmzton Bsc Ides One-dmenson - Golden-Secton Serch - Qudrtc Interpolton - Newton s Method Multdmenson - Drect Methods - Grdent Methods S U R A N A R E E UNIVERSITY OF TECHNOLOGY Mongkol JIRAVACHARADET INSTITUTE OF ENGINEERING SCHOOL OF CIVIL ENGINEERING BASIC IDEAS f () f ( ) Mmum f ( ) f ( ) < Root Root Root Mnmum f ( ) f ( ) > Mmum : Fnd * such tht f(*) f() for ll Mnmum : Fnd * such tht f(*) f() for ll

165 Emples of Optmzton Mnmze weght of structure subject to constrnt on ts strength, or mmze ts strength subject to constrnt of ts weght Desgn vehcle for mnmum energ consumpton subject to constrnt on cpct nd speed Desgn mchne for mmum effcenc wth less energ consumpton Optml plnnng nd schedulng of constructon project Budget or fnncl plnnng of n orgnzton Globl & Locl Optmzton f () Globl mmum Locl mmum Globl mnmum Locl mnmum * s globl mnmum f f(*) f() for ll * s locl mnmum f f(*) f() for ll ner *

166 Golden Secton Serch Smlr to Bsecton root fndng method Defne ntervl tht contns one nswer Need ponts to detect mmum or mnmum MAX L * U MIN Pck 4th ponts then choose the frst or lst three ponts. Intermedte Pont Contnue the process to nrrow down the ntervl Choce of Intermedte Ponts f () MAX - Defne ntervl - Pck pts. from 4 pts. Frst terton: L * U L L + L L L L Intervl L s nrrow down to L

167 Choce of Intermedte Ponts f () MAX - Move U to new poston - Use sme old pts. so pck the new 4th pt. Frst terton: L L * L U L L + L L Second terton: L L L L L L L L + L L From two condton, Set R L / L, Solvng for postve root, + + R R or R R 4( ) 5 R +.68 R.68 Golden rto snce t llows optm to be found effcentl

168 The Prthenon n Athens.68 Ths golden rto were consdered esthetcll plesng b the Greeks. Intl Step of the Golden-secton Serch f () Elmnte f ( ) f ( ) Mmum L + d U d L d d U ) Guess ntl brcket L nd U ) Choose two nteror ponts nd t the dstnce d 5 where d (U ) L.68(U L ) ) If f ( ) > f ( ), elmnte [ L, ] nd set L for net step

169 Net Step to Complete the Algorthm f () Mmum L U Old Old 4) Onl new need to be determned, 5 new d (U L ) L + d Emple: Golden-Secton Serch to fnd mmum f ( ) sn, L nd U 4 Soluton: () Crete two nteror ponts 5 d (4 ) () Evlute functon t nteror ponts,.47 f ( ) f (.47) sn(.47).6 f ( ) f (.58).765 d d L U

170 () Becuse f( ) > f( ), elmnte upper prt, New U.47 New.58 (4) Compute new 5 d (.47 ) OLD NEW L U L U (5) Evlute functon t New f ( ) Old f ( ).765 New f ( ) f (.944).5 Becuse f( ) > f( ), elmnte lower prt,... Tbulted results: L f( ) f( ) U d

171 Qudrtc Interpolton nd polnoml provdes good ppromton ner optmum f () True mmum Qudrtc ppromton of mmum f ( )( ) + f ( )( ) + f ( )( ) f ( )( ) + f ( )( ) + f ( )( ) Emple: Qudrtc Interpolton to fnd mmum f ( ) sn,, nd 4 Soluton: () Evlute functon vlues, f ( ) f ( ) f ( ).6 ( 4 ) +.589(4 ) + (.6)( ).555 ()( 4) + (.589)(4 ) + (.6)()

172 () Becuse f(.555).769, emplo golden-secton serch, elmnte lower guess, f ( ) f ( ) f ( ).6.589( ).769(4 ) (.6)(.555 ) + + (.589)(.555 4) + (.769)(4 ) + (.6)(.555).49 After 5 tertons,.476 gves mmum vlue of.7757 Newton s Method f ( ) + Defne new functon, g( ) f ( ) f ( ) f ( ) At optml pont *, f ( *) g( *) g( ) f ( ) g( ) g ( ) f ( ) + +

173 Emple: Use Newton s method to fnd mmum of f ( ) sn, Intl guess:.5 Soluton: () Evlute st nd nd dervtves of the functon, f ( ) cos 5 f ( ) sn 5 () Substtute nto Newton s formul, + cos / 5 sn / 5 () Substtutng ntl guess, cos.5.5 / , f (.9958) sn.5/ 5 (4) Second terton, cos / , f (.469).7785 sn.995/ 5 f() After 4 tertons, result converges rpdl to the true vlue.

174 Multdmenson Optmzton Emple: -D Topogrphc Mp of -D Mountn Lne of constnt f D serches: Ascendng mountn (mmum) or Descendng nto vlle (mnmzton) DIRECT METHODS Rndom Serch Unvrte nd Pttern Serches GRADIENT METHODS Grdents nd Hessns Steepest Ascent Method

175 Rndom Serch Repetedl evlutes functon t rndoml selected ponts Emple: f (, ) Domn boundres: - to nd to Wrte n M-fle objfun.m functon f objfun(,) f --*^-**-^; >> rnd % Unforml dstrbuted rndom numbers % on the ntervl (.,.). ns. Rndom serch lgorthm: rndsrch.m functon [m,m,mf] rndsrch(objfun,mn, m,mn,m) ter ; mf -nf; for :ter mn + (m - mn)*rnd; mn + (m - mn)*rnd; fn fevl(objfun,,); f fn > mf mf fn; m ; m ; end end

176 >>[m,m,mf]rndsrch('objfun',-,,,) m -.69 m.76 mf.5 ter m m mf TRUE Unvrte nd Pttern Serches - More effcent nd stll no requre dervtve evluton - Chnge one vrble t tme whle others constnt 4 Pttern drectons From () move long s wth constnt to m t ()

177 Powell s Method Use pttern drectons to fnd optmum effcentl - Pt. nd re obtned b -D serch from dfferent strtng pts. - Lne formed b nd wll be drected towrd mmum Conjugte drecton GRADIENT METHODS Use dervtve to locte optm Grdent : f h f Slope long s h h f f f + j Steepest drecton The vector s clled del f drectonl dervtve of f (, )

178 Hessn To determne whether mmum, mnmum or sddle H f f f f If H > nd > locl mnmum f If H > nd < locl mmum If H < sddle pont Steepest Ascent

Chapter Newton-Raphson Method of Solving a Nonlinear Equation

Chapter Newton-Raphson Method of Solving a Nonlinear Equation Chpter.4 Newton-Rphson Method of Solvng Nonlner Equton After redng ths chpter, you should be ble to:. derve the Newton-Rphson method formul,. develop the lgorthm of the Newton-Rphson method,. use the Newton-Rphson

More information

Chapter Newton-Raphson Method of Solving a Nonlinear Equation

Chapter Newton-Raphson Method of Solving a Nonlinear Equation Chpter 0.04 Newton-Rphson Method o Solvng Nonlner Equton Ater redng ths chpter, you should be ble to:. derve the Newton-Rphson method ormul,. develop the lgorthm o the Newton-Rphson method,. use the Newton-Rphson

More information

6 Roots of Equations: Open Methods

6 Roots of Equations: Open Methods HK Km Slghtly modfed 3//9, /8/6 Frstly wrtten t Mrch 5 6 Roots of Equtons: Open Methods Smple Fed-Pont Iterton Newton-Rphson Secnt Methods MATLAB Functon: fzero Polynomls Cse Study: Ppe Frcton Brcketng

More information

DCDM BUSINESS SCHOOL NUMERICAL METHODS (COS 233-8) Solutions to Assignment 3. x f(x)

DCDM BUSINESS SCHOOL NUMERICAL METHODS (COS 233-8) Solutions to Assignment 3. x f(x) DCDM BUSINESS SCHOOL NUMEICAL METHODS (COS -8) Solutons to Assgnment Queston Consder the followng dt: 5 f() 8 7 5 () Set up dfference tble through fourth dfferences. (b) Wht s the mnmum degree tht n nterpoltng

More information

GAUSS ELIMINATION. Consider the following system of algebraic linear equations

GAUSS ELIMINATION. Consider the following system of algebraic linear equations Numercl Anlyss for Engneers Germn Jordnn Unversty GAUSS ELIMINATION Consder the followng system of lgebrc lner equtons To solve the bove system usng clsscl methods, equton () s subtrcted from equton ()

More information

Course Review Introduction to Computer Methods

Course Review Introduction to Computer Methods Course Revew Wht you hopefully hve lerned:. How to nvgte nsde MIT computer system: Athen, UNIX, emcs etc. (GCR). Generl des bout progrmmng (GCR): formultng the problem, codng n Englsh trnslton nto computer

More information

Lecture 4: Piecewise Cubic Interpolation

Lecture 4: Piecewise Cubic Interpolation Lecture notes on Vrtonl nd Approxmte Methods n Appled Mthemtcs - A Perce UBC Lecture 4: Pecewse Cubc Interpolton Compled 6 August 7 In ths lecture we consder pecewse cubc nterpolton n whch cubc polynoml

More information

4. Eccentric axial loading, cross-section core

4. Eccentric axial loading, cross-section core . Eccentrc xl lodng, cross-secton core Introducton We re strtng to consder more generl cse when the xl force nd bxl bendng ct smultneousl n the cross-secton of the br. B vrtue of Snt-Vennt s prncple we

More information

INTERPOLATION(1) ELM1222 Numerical Analysis. ELM1222 Numerical Analysis Dr Muharrem Mercimek

INTERPOLATION(1) ELM1222 Numerical Analysis. ELM1222 Numerical Analysis Dr Muharrem Mercimek ELM Numercl Anlss Dr Muhrrem Mercmek INTEPOLATION ELM Numercl Anlss Some of the contents re dopted from Lurene V. Fusett, Appled Numercl Anlss usng MATLAB. Prentce Hll Inc., 999 ELM Numercl Anlss Dr Muhrrem

More information

Fall 2012 Analysis of Experimental Measurements B. Eisenstein/rev. S. Errede. with respect to λ. 1. χ λ χ λ ( ) λ, and thus:

Fall 2012 Analysis of Experimental Measurements B. Eisenstein/rev. S. Errede. with respect to λ. 1. χ λ χ λ ( ) λ, and thus: More on χ nd errors : uppose tht we re fttng for sngle -prmeter, mnmzng: If we epnd The vlue χ ( ( ( ; ( wth respect to. χ n Tlor seres n the vcnt of ts mnmum vlue χ ( mn χ χ χ χ + + + mn mnmzes χ, nd

More information

ORDINARY DIFFERENTIAL EQUATIONS

ORDINARY DIFFERENTIAL EQUATIONS 6 ORDINARY DIFFERENTIAL EQUATIONS Introducton Runge-Kutt Metods Mult-step Metods Sstem o Equtons Boundr Vlue Problems Crcterstc Vlue Problems Cpter 6 Ordnr Derentl Equtons / 6. Introducton In mn engneerng

More information

CISE 301: Numerical Methods Lecture 5, Topic 4 Least Squares, Curve Fitting

CISE 301: Numerical Methods Lecture 5, Topic 4 Least Squares, Curve Fitting CISE 3: umercl Methods Lecture 5 Topc 4 Lest Squres Curve Fttng Dr. Amr Khouh Term Red Chpter 7 of the tetoo c Khouh CISE3_Topc4_Lest Squre Motvton Gven set of epermentl dt 3 5. 5.9 6.3 The reltonshp etween

More information

Rank One Update And the Google Matrix by Al Bernstein Signal Science, LLC

Rank One Update And the Google Matrix by Al Bernstein Signal Science, LLC Introducton Rnk One Updte And the Google Mtrx y Al Bernsten Sgnl Scence, LLC www.sgnlscence.net here re two dfferent wys to perform mtrx multplctons. he frst uses dot product formulton nd the second uses

More information

Review of linear algebra. Nuno Vasconcelos UCSD

Review of linear algebra. Nuno Vasconcelos UCSD Revew of lner lgebr Nuno Vsconcelos UCSD Vector spces Defnton: vector spce s set H where ddton nd sclr multplcton re defned nd stsf: ) +( + ) (+ )+ 5) λ H 2) + + H 6) 3) H, + 7) λ(λ ) (λλ ) 4) H, - + 8)

More information

Introduction to Numerical Integration Part II

Introduction to Numerical Integration Part II Introducton to umercl Integrton Prt II CS 75/Mth 75 Brn T. Smth, UM, CS Dept. Sprng, 998 4/9/998 qud_ Intro to Gussn Qudrture s eore, the generl tretment chnges the ntegrton prolem to ndng the ntegrl w

More information

Applied Statistics Qualifier Examination

Applied Statistics Qualifier Examination Appled Sttstcs Qulfer Exmnton Qul_june_8 Fll 8 Instructons: () The exmnton contns 4 Questons. You re to nswer 3 out of 4 of them. () You my use ny books nd clss notes tht you mght fnd helpful n solvng

More information

Definition of Tracking

Definition of Tracking Trckng Defnton of Trckng Trckng: Generte some conclusons bout the moton of the scene, objects, or the cmer, gven sequence of mges. Knowng ths moton, predct where thngs re gong to project n the net mge,

More information

Principle Component Analysis

Principle Component Analysis Prncple Component Anlyss Jng Go SUNY Bufflo Why Dmensonlty Reducton? We hve too mny dmensons o reson bout or obtn nsghts from o vsulze oo much nose n the dt Need to reduce them to smller set of fctors

More information

INTRODUCTION TO COMPLEX NUMBERS

INTRODUCTION TO COMPLEX NUMBERS INTRODUCTION TO COMPLEX NUMBERS The numers -4, -3, -, -1, 0, 1,, 3, 4 represent the negtve nd postve rel numers termed ntegers. As one frst lerns n mddle school they cn e thought of s unt dstnce spced

More information

Variable time amplitude amplification and quantum algorithms for linear algebra. Andris Ambainis University of Latvia

Variable time amplitude amplification and quantum algorithms for linear algebra. Andris Ambainis University of Latvia Vrble tme mpltude mplfcton nd quntum lgorthms for lner lgebr Andrs Ambns Unversty of Ltv Tlk outlne. ew verson of mpltude mplfcton;. Quntum lgorthm for testng f A s sngulr; 3. Quntum lgorthm for solvng

More information

Model Fitting and Robust Regression Methods

Model Fitting and Robust Regression Methods Dertment o Comuter Engneerng Unverst o Clorn t Snt Cruz Model Fttng nd Robust Regresson Methods CMPE 64: Imge Anlss nd Comuter Vson H o Fttng lnes nd ellses to mge dt Dertment o Comuter Engneerng Unverst

More information

Quiz: Experimental Physics Lab-I

Quiz: Experimental Physics Lab-I Mxmum Mrks: 18 Totl tme llowed: 35 mn Quz: Expermentl Physcs Lb-I Nme: Roll no: Attempt ll questons. 1. In n experment, bll of mss 100 g s dropped from heght of 65 cm nto the snd contner, the mpct s clled

More information

Physics for Scientists and Engineers I

Physics for Scientists and Engineers I Phscs for Scentsts nd Engneers I PHY 48, Secton 4 Dr. Betr Roldán Cuen Unverst of Centrl Flord, Phscs Deprtment, Orlndo, FL Chpter - Introducton I. Generl II. Interntonl Sstem of Unts III. Converson of

More information

Remember: Project Proposals are due April 11.

Remember: Project Proposals are due April 11. Bonformtcs ecture Notes Announcements Remember: Project Proposls re due Aprl. Clss 22 Aprl 4, 2002 A. Hdden Mrov Models. Defntons Emple - Consder the emple we tled bout n clss lst tme wth the cons. However,

More information

CENTROID (AĞIRLIK MERKEZİ )

CENTROID (AĞIRLIK MERKEZİ ) CENTOD (ĞLK MEKEZİ ) centrod s geometrcl concept rsng from prllel forces. Tus, onl prllel forces possess centrod. Centrod s tougt of s te pont were te wole wegt of pscl od or sstem of prtcles s lumped.

More information

The Schur-Cohn Algorithm

The Schur-Cohn Algorithm Modelng, Estmton nd Otml Flterng n Sgnl Processng Mohmed Njm Coyrght 8, ISTE Ltd. Aendx F The Schur-Cohn Algorthm In ths endx, our m s to resent the Schur-Cohn lgorthm [] whch s often used s crteron for

More information

ESCI 342 Atmospheric Dynamics I Lesson 1 Vectors and Vector Calculus

ESCI 342 Atmospheric Dynamics I Lesson 1 Vectors and Vector Calculus ESI 34 tmospherc Dnmcs I Lesson 1 Vectors nd Vector lculus Reference: Schum s Outlne Seres: Mthemtcl Hndbook of Formuls nd Tbles Suggested Redng: Mrtn Secton 1 OORDINTE SYSTEMS n orthonorml coordnte sstem

More information

Lecture 36. Finite Element Methods

Lecture 36. Finite Element Methods CE 60: Numercl Methods Lecture 36 Fnte Element Methods Course Coordntor: Dr. Suresh A. Krth, Assocte Professor, Deprtment of Cvl Engneerng, IIT Guwht. In the lst clss, we dscussed on the ppromte methods

More information

UNIVERSITY OF IOANNINA DEPARTMENT OF ECONOMICS. M.Sc. in Economics MICROECONOMIC THEORY I. Problem Set II

UNIVERSITY OF IOANNINA DEPARTMENT OF ECONOMICS. M.Sc. in Economics MICROECONOMIC THEORY I. Problem Set II Mcroeconomc Theory I UNIVERSITY OF IOANNINA DEPARTMENT OF ECONOMICS MSc n Economcs MICROECONOMIC THEORY I Techng: A Lptns (Note: The number of ndctes exercse s dffculty level) ()True or flse? If V( y )

More information

LOCAL FRACTIONAL LAPLACE SERIES EXPANSION METHOD FOR DIFFUSION EQUATION ARISING IN FRACTAL HEAT TRANSFER

LOCAL FRACTIONAL LAPLACE SERIES EXPANSION METHOD FOR DIFFUSION EQUATION ARISING IN FRACTAL HEAT TRANSFER Yn, S.-P.: Locl Frctonl Lplce Seres Expnson Method for Dffuson THERMAL SCIENCE, Yer 25, Vol. 9, Suppl., pp. S3-S35 S3 LOCAL FRACTIONAL LAPLACE SERIES EXPANSION METHOD FOR DIFFUSION EQUATION ARISING IN

More information

Linear and Nonlinear Optimization

Linear and Nonlinear Optimization Lner nd Nonlner Optmzton Ynyu Ye Deprtment of Mngement Scence nd Engneerng Stnford Unversty Stnford, CA 9430, U.S.A. http://www.stnford.edu/~yyye http://www.stnford.edu/clss/msnde/ Ynyu Ye, Stnford, MS&E

More information

International Journal of Pure and Applied Sciences and Technology

International Journal of Pure and Applied Sciences and Technology Int. J. Pure Appl. Sc. Technol., () (), pp. 44-49 Interntonl Journl of Pure nd Appled Scences nd Technolog ISSN 9-67 Avlle onlne t www.jopst.n Reserch Pper Numercl Soluton for Non-Lner Fredholm Integrl

More information

Chapter Runge-Kutta 2nd Order Method for Ordinary Differential Equations

Chapter Runge-Kutta 2nd Order Method for Ordinary Differential Equations Cter. Runge-Kutt nd Order Metod or Ordnr Derentl Eutons Ater redng ts cter ou sould be ble to:. understnd te Runge-Kutt nd order metod or ordnr derentl eutons nd ow to use t to solve roblems. Wt s te Runge-Kutt

More information

Dennis Bricker, 2001 Dept of Industrial Engineering The University of Iowa. MDP: Taxi page 1

Dennis Bricker, 2001 Dept of Industrial Engineering The University of Iowa. MDP: Taxi page 1 Denns Brcker, 2001 Dept of Industrl Engneerng The Unversty of Iow MDP: Tx pge 1 A tx serves three djcent towns: A, B, nd C. Ech tme the tx dschrges pssenger, the drver must choose from three possble ctons:

More information

Machine Learning Support Vector Machines SVM

Machine Learning Support Vector Machines SVM Mchne Lernng Support Vector Mchnes SVM Lesson 6 Dt Clssfcton problem rnng set:, D,,, : nput dt smple {,, K}: clss or lbel of nput rget: Construct functon f : X Y f, D Predcton of clss for n unknon nput

More information

ME 501A Seminar in Engineering Analysis Page 1

ME 501A Seminar in Engineering Analysis Page 1 More oundr-vlue Prolems nd genvlue Prolems n Os ovemer 9, 7 More oundr-vlue Prolems nd genvlue Prolems n Os Lrr retto Menl ngneerng 5 Semnr n ngneerng nlss ovemer 9, 7 Outlne Revew oundr-vlue prolems Soot

More information

Jens Siebel (University of Applied Sciences Kaiserslautern) An Interactive Introduction to Complex Numbers

Jens Siebel (University of Applied Sciences Kaiserslautern) An Interactive Introduction to Complex Numbers Jens Sebel (Unversty of Appled Scences Kserslutern) An Interctve Introducton to Complex Numbers 1. Introducton We know tht some polynoml equtons do not hve ny solutons on R/. Exmple 1.1: Solve x + 1= for

More information

Formulated Algorithm for Computing Dominant Eigenvalue. and the Corresponding Eigenvector

Formulated Algorithm for Computing Dominant Eigenvalue. and the Corresponding Eigenvector Int. J. Contemp. Mth. Scences Vol. 8 23 no. 9 899-9 HIKARI Ltd www.m-hkr.com http://dx.do.org/.2988/jcms.23.3674 Formulted Algorthm for Computng Domnnt Egenlue nd the Correspondng Egenector Igob Dod Knu

More information

COMPLEX NUMBER & QUADRATIC EQUATION

COMPLEX NUMBER & QUADRATIC EQUATION MCQ COMPLEX NUMBER & QUADRATIC EQUATION Syllus : Comple numers s ordered prs of rels, Representton of comple numers n the form + nd ther representton n plne, Argnd dgrm, lger of comple numers, modulus

More information

The Number of Rows which Equal Certain Row

The Number of Rows which Equal Certain Row Interntonl Journl of Algebr, Vol 5, 011, no 30, 1481-1488 he Number of Rows whch Equl Certn Row Ahmd Hbl Deprtment of mthemtcs Fcult of Scences Dmscus unverst Dmscus, Sr hblhmd1@gmlcom Abstrct Let be X

More information

Calculus - Activity 1 Rate of change of a function at a point.

Calculus - Activity 1 Rate of change of a function at a point. Nme: Clss: p 77 Mths Helper Plus Resource Set. Copright 00 Bruce A. Vughn, Techers Choice Softwre Clculus - Activit Rte of chnge of function t point. ) Strt Mths Helper Plus, then lod the file: Clculus

More information

Shuai Dong. Using Math and Science to improve your game

Shuai Dong. Using Math and Science to improve your game Computtonl phscs Shu Dong Usng Mth nd Sene to mprove our gme Appromton of funtons Lner nterpolton Lgrnge nterpolton Newton nterpolton Lner sstem method Lest-squres ppromton Mllkn eperment Wht s nterpolton?

More information

CS434a/541a: Pattern Recognition Prof. Olga Veksler. Lecture 9

CS434a/541a: Pattern Recognition Prof. Olga Veksler. Lecture 9 CS434/541: Pttern Recognton Prof. Olg Veksler Lecture 9 Announcements Fnl project proposl due Nov. 1 1-2 prgrph descrpton Lte Penlt: s 1 pont off for ech d lte Assgnment 3 due November 10 Dt for fnl project

More information

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad INSTITUTE OF AERONAUTICAL ENGINEERING Dundgl, Hyderbd - 5 3 FRESHMAN ENGINEERING TUTORIAL QUESTION BANK Nme : MATHEMATICS II Code : A6 Clss : II B. Te II Semester Brn : FRESHMAN ENGINEERING Yer : 5 Fulty

More information

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

SUMMER KNOWHOW STUDY AND LEARNING CENTRE SUMMER KNOWHOW STUDY AND LEARNING CENTRE Indices & Logrithms 2 Contents Indices.2 Frctionl Indices.4 Logrithms 6 Exponentil equtions. Simplifying Surds 13 Opertions on Surds..16 Scientific Nottion..18

More information

Abhilasha Classes Class- XII Date: SOLUTION (Chap - 9,10,12) MM 50 Mob no

Abhilasha Classes Class- XII Date: SOLUTION (Chap - 9,10,12) MM 50 Mob no hlsh Clsses Clss- XII Dte: 0- - SOLUTION Chp - 9,0, MM 50 Mo no-996 If nd re poston vets of nd B respetvel, fnd the poston vet of pont C n B produed suh tht C B vet r C B = where = hs length nd dreton

More information

8. INVERSE Z-TRANSFORM

8. INVERSE Z-TRANSFORM 8. INVERSE Z-TRANSFORM The proce by whch Z-trnform of tme ere, nmely X(), returned to the tme domn clled the nvere Z-trnform. The nvere Z-trnform defned by: Computer tudy Z X M-fle trn.m ued to fnd nvere

More information

Pyramid Algorithms for Barycentric Rational Interpolation

Pyramid Algorithms for Barycentric Rational Interpolation Pyrmd Algorthms for Brycentrc Rtonl Interpolton K Hormnn Scott Schefer Astrct We present new perspectve on the Floter Hormnn nterpolnt. Ths nterpolnt s rtonl of degree (n, d), reproduces polynomls of degree

More information

Announcements. Image Formation: Outline. The course. Image Formation and Cameras (cont.)

Announcements. Image Formation: Outline. The course. Image Formation and Cameras (cont.) nnouncements Imge Formton nd Cmers (cont.) ssgnment : Cmer & Lenses, gd Trnsformtons, nd Homogrph wll be posted lter tod. CSE 5 Lecture 5 CS5, Fll CS5, Fll CS5, Fll The course rt : The phscs of mgng rt

More information

Physics 121 Sample Common Exam 2 Rev2 NOTE: ANSWERS ARE ON PAGE 7. Instructions:

Physics 121 Sample Common Exam 2 Rev2 NOTE: ANSWERS ARE ON PAGE 7. Instructions: Physcs 121 Smple Common Exm 2 Rev2 NOTE: ANSWERS ARE ON PAGE 7 Nme (Prnt): 4 Dgt ID: Secton: Instructons: Answer ll 27 multple choce questons. You my need to do some clculton. Answer ech queston on the

More information

Study of Trapezoidal Fuzzy Linear System of Equations S. M. Bargir 1, *, M. S. Bapat 2, J. D. Yadav 3 1

Study of Trapezoidal Fuzzy Linear System of Equations S. M. Bargir 1, *, M. S. Bapat 2, J. D. Yadav 3 1 mercn Interntonl Journl of Reserch n cence Technology Engneerng & Mthemtcs vlble onlne t http://wwwsrnet IN (Prnt: 38-349 IN (Onlne: 38-3580 IN (CD-ROM: 38-369 IJRTEM s refereed ndexed peer-revewed multdscplnry

More information

Polynomial Regression Models

Polynomial Regression Models LINEAR REGRESSION ANALYSIS MODULE XII Lecture - 6 Polynomal Regresson Models Dr. Shalabh Department of Mathematcs and Statstcs Indan Insttute of Technology Kanpur Test of sgnfcance To test the sgnfcance

More information

1 Part II: Numerical Integration

1 Part II: Numerical Integration Mth 4 Lb 1 Prt II: Numericl Integrtion This section includes severl techniques for getting pproimte numericl vlues for definite integrls without using ntiderivtives. Mthemticll, ect nswers re preferble

More information

Statistics 423 Midterm Examination Winter 2009

Statistics 423 Midterm Examination Winter 2009 Sttstcs 43 Mdterm Exmnton Wnter 009 Nme: e-ml: 1. Plese prnt your nme nd e-ml ddress n the bove spces.. Do not turn ths pge untl nstructed to do so. 3. Ths s closed book exmnton. You my hve your hnd clcultor

More information

Partially Observable Systems. 1 Partially Observable Markov Decision Process (POMDP) Formalism

Partially Observable Systems. 1 Partially Observable Markov Decision Process (POMDP) Formalism CS294-40 Lernng for Rootcs nd Control Lecture 10-9/30/2008 Lecturer: Peter Aeel Prtlly Oservle Systems Scre: Dvd Nchum Lecture outlne POMDP formlsm Pont-sed vlue terton Glol methods: polytree, enumerton,

More information

VECTORS VECTORS VECTORS VECTORS. 2. Vector Representation. 1. Definition. 3. Types of Vectors. 5. Vector Operations I. 4. Equal and Opposite Vectors

VECTORS VECTORS VECTORS VECTORS. 2. Vector Representation. 1. Definition. 3. Types of Vectors. 5. Vector Operations I. 4. Equal and Opposite Vectors 1. Defnton A vetor s n entt tht m represent phsl quntt tht hs mgntude nd dreton s opposed to slr tht ls dreton.. Vetor Representton A vetor n e represented grphll n rrow. The length of the rrow s the mgntude

More information

Fall 2012 Analysis of Experimental Measurements B. Eisenstein/rev. S. Errede

Fall 2012 Analysis of Experimental Measurements B. Eisenstein/rev. S. Errede Fll Anlss of Epermentl Mesurements B. Esensten/rev. S. Errede Monte Crlo Methods/Technques: These re mong the most powerful tools for dt nlss nd smulton of eperments. The growth of ther mportnce s closel

More information

Least squares. Václav Hlaváč. Czech Technical University in Prague

Least squares. Václav Hlaváč. Czech Technical University in Prague Lest squres Václv Hlváč Czech echncl Unversty n Prgue hlvc@fel.cvut.cz http://cmp.felk.cvut.cz/~hlvc Courtesy: Fred Pghn nd J.P. Lews, SIGGRAPH 2007 Course; Outlne 2 Lner regresson Geometry of lest-squres

More information

Chapter 3 Solving Nonlinear Equations

Chapter 3 Solving Nonlinear Equations Chpter 3 Solving Nonliner Equtions 3.1 Introduction The nonliner function of unknown vrible x is in the form of where n could be non-integer. Root is the numericl vlue of x tht stisfies f ( x) 0. Grphiclly,

More information

Logarithms. Logarithm is another word for an index or power. POWER. 2 is the power to which the base 10 must be raised to give 100.

Logarithms. Logarithm is another word for an index or power. POWER. 2 is the power to which the base 10 must be raised to give 100. Logrithms. Logrithm is nother word for n inde or power. THIS IS A POWER STATEMENT BASE POWER FOR EXAMPLE : We lred know tht; = NUMBER 10² = 100 This is the POWER Sttement OR 2 is the power to which the

More information

Electrochemical Thermodynamics. Interfaces and Energy Conversion

Electrochemical Thermodynamics. Interfaces and Energy Conversion CHE465/865, 2006-3, Lecture 6, 18 th Sep., 2006 Electrochemcl Thermodynmcs Interfces nd Energy Converson Where does the energy contrbuton F zϕ dn come from? Frst lw of thermodynmcs (conservton of energy):

More information

INTRODUCTORY NUMERICAL ANALYSIS

INTRODUCTORY NUMERICAL ANALYSIS ITRODUCTORY UMERICL LYSIS Lecture otes y Mrce ndrecut Unversl Pulshers/UPUBLISHCOM Prlnd FL US Introductory umercl nlyss: Lecture otes Copyrght Mrce ndrecut ll rghts reserved ISB: 877 Unversl Pulshers/uPUBLISHcom

More information

TO: Next Year s AP Calculus Students

TO: Next Year s AP Calculus Students TO: Net Yer s AP Clculus Students As you probbly know, the students who tke AP Clculus AB nd pss the Advnced Plcement Test will plce out of one semester of college Clculus; those who tke AP Clculus BC

More information

SVMs for regression Non-parametric/instance based classification method

SVMs for regression Non-parametric/instance based classification method S 75 Mchne ernng ecture Mos Huskrecht mos@cs.ptt.edu 539 Sennott Squre SVMs for regresson Non-prmetrc/nstnce sed cssfcton method S 75 Mchne ernng Soft-mrgn SVM Aos some fet on crossng the seprtng hperpne

More information

Katholieke Universiteit Leuven Department of Computer Science

Katholieke Universiteit Leuven Department of Computer Science Updte Rules for Weghted Non-negtve FH*G Fctorzton Peter Peers Phlp Dutré Report CW 440, Aprl 006 Ktholeke Unverstet Leuven Deprtment of Computer Scence Celestjnenln 00A B-3001 Heverlee (Belgum) Updte Rules

More information

Two Coefficients of the Dyson Product

Two Coefficients of the Dyson Product Two Coeffcents of the Dyson Product rxv:07.460v mth.co 7 Nov 007 Lun Lv, Guoce Xn, nd Yue Zhou 3,,3 Center for Combntorcs, LPMC TJKLC Nnk Unversty, Tnjn 30007, P.R. Chn lvlun@cfc.nnk.edu.cn gn@nnk.edu.cn

More information

NUMERICAL DIFFERENTIATION

NUMERICAL DIFFERENTIATION NUMERICAL DIFFERENTIATION 1 Introducton Dfferentaton s a method to compute the rate at whch a dependent output y changes wth respect to the change n the ndependent nput x. Ths rate of change s called the

More information

Lecture 22: Logic Synthesis (1)

Lecture 22: Logic Synthesis (1) Lecture 22: Logc Synthess (1) Sldes courtesy o Demng Chen Some sldes Courtesy o Pro. J. Cong o UCLA Outlne Redng Synthess nd optmzton o dgtl crcuts, G. De Mchel, 1994, Secton 2.5-2.5.1 Overvew Boolen lgebr

More information

The Trapezoidal Rule

The Trapezoidal Rule _.qd // : PM Pge 9 SECTION. Numericl Integrtion 9 f Section. The re of the region cn e pproimted using four trpezoids. Figure. = f( ) f( ) n The re of the first trpezoid is f f n. Figure. = Numericl Integrtion

More information

FUNDAMENTALS ON ALGEBRA MATRICES AND DETERMINANTS

FUNDAMENTALS ON ALGEBRA MATRICES AND DETERMINANTS Dol Bgyoko (0 FUNDAMENTALS ON ALGEBRA MATRICES AND DETERMINANTS Introducton Expressons of the form P(x o + x + x + + n x n re clled polynomls The coeffcents o,, n re ndependent of x nd the exponents 0,,,

More information

Review of Taylor Series. Read Section 1.2

Review of Taylor Series. Read Section 1.2 Revew of Taylor Seres Read Secton 1.2 1 Power Seres A power seres about c s an nfnte seres of the form k = 0 k a ( x c) = a + a ( x c) + a ( x c) + a ( x c) k 2 3 0 1 2 3 + In many cases, c = 0, and the

More information

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0)

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0) 1 Tylor polynomils In Section 3.5, we discussed how to pproximte function f(x) round point in terms of its first derivtive f (x) evluted t, tht is using the liner pproximtion f() + f ()(x ). We clled this

More information

Errors for Linear Systems

Errors for Linear Systems Errors for Lnear Systems When we solve a lnear system Ax b we often do not know A and b exactly, but have only approxmatons  and ˆb avalable. Then the best thng we can do s to solve ˆx ˆb exactly whch

More information

Polynomial Approximations for the Natural Logarithm and Arctangent Functions. Math 230

Polynomial Approximations for the Natural Logarithm and Arctangent Functions. Math 230 Polynomil Approimtions for the Nturl Logrithm nd Arctngent Functions Mth 23 You recll from first semester clculus how one cn use the derivtive to find n eqution for the tngent line to function t given

More information

Math 497C Sep 17, Curves and Surfaces Fall 2004, PSU

Math 497C Sep 17, Curves and Surfaces Fall 2004, PSU Mth 497C Sep 17, 004 1 Curves nd Surfces Fll 004, PSU Lecture Notes 3 1.8 The generl defnton of curvture; Fox-Mlnor s Theorem Let α: [, b] R n be curve nd P = {t 0,...,t n } be prtton of [, b], then the

More information

Chapter 12. Ordinary Differential Equation Boundary Value (BV) Problems

Chapter 12. Ordinary Differential Equation Boundary Value (BV) Problems Chapter. Ordnar Dfferental Equaton Boundar Value (BV) Problems In ths chapter we wll learn how to solve ODE boundar value problem. BV ODE s usuall gven wth x beng the ndependent space varable. p( x) q(

More information

Fitting a Polynomial to Heat Capacity as a Function of Temperature for Ag. Mathematical Background Document

Fitting a Polynomial to Heat Capacity as a Function of Temperature for Ag. Mathematical Background Document Fttng Polynol to Het Cpcty s Functon of Teperture for Ag. thetcl Bckground Docuent by Theres Jul Zelnsk Deprtent of Chestry, edcl Technology, nd Physcs onouth Unversty West ong Brnch, J 7764-898 tzelns@onouth.edu

More information

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives Block #6: Properties of Integrls, Indefinite Integrls Gols: Definition of the Definite Integrl Integrl Clcultions using Antiderivtives Properties of Integrls The Indefinite Integrl 1 Riemnn Sums - 1 Riemnn

More information

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite Unit #8 : The Integrl Gols: Determine how to clculte the re described by function. Define the definite integrl. Eplore the reltionship between the definite integrl nd re. Eplore wys to estimte the definite

More information

Correlation and Regression. Correlation 9.1. Correlation. Chapter 9

Correlation and Regression. Correlation 9.1. Correlation. Chapter 9 Chapter 9 Correlaton and Regresson 9. Correlaton Correlaton A correlaton s a relatonshp between two varables. The data can be represented b the ordered pars (, ) where s the ndependent (or eplanator) varable,

More information

x=0 x=0 Positive Negative Positions Positions x=0 Positive Negative Positions Positions

x=0 x=0 Positive Negative Positions Positions x=0 Positive Negative Positions Positions Knemtc Quntte Lner Moton Phyc 101 Eyre Tme Intnt t Fundmentl Tme Interl Defned Poton x Fundmentl Dplcement Defned Aerge Velocty g Defned Aerge Accelerton g Defned Knemtc Quntte Scler: Mgntude Tme Intnt,

More information

Lecture 5 Single factor design and analysis

Lecture 5 Single factor design and analysis Lectue 5 Sngle fcto desgn nd nlss Completel ndomzed desgn (CRD Completel ndomzed desgn In the desgn of expements, completel ndomzed desgns e fo studng the effects of one pm fcto wthout the need to tke

More information

AP Calculus Multiple Choice: BC Edition Solutions

AP Calculus Multiple Choice: BC Edition Solutions AP Clculus Multiple Choice: BC Edition Solutions J. Slon Mrch 8, 04 ) 0 dx ( x) is A) B) C) D) E) Divergent This function inside the integrl hs verticl symptotes t x =, nd the integrl bounds contin this

More information

Mechanical resonance theory and applications

Mechanical resonance theory and applications Mechncl resonnce theor nd lctons Introducton In nture, resonnce occurs n vrous stutons In hscs, resonnce s the tendenc of sstem to oscllte wth greter mltude t some frequences thn t others htt://enwkedorg/wk/resonnce

More information

Investigation phase in case of Bragg coupling

Investigation phase in case of Bragg coupling Journl of Th-Qr Unversty No.3 Vol.4 December/008 Investgton phse n cse of Brgg couplng Hder K. Mouhmd Deprtment of Physcs, College of Scence, Th-Qr, Unv. Mouhmd H. Abdullh Deprtment of Physcs, College

More information

Loudoun Valley High School Calculus Summertime Fun Packet

Loudoun Valley High School Calculus Summertime Fun Packet Loudoun Vlley High School Clculus Summertime Fun Pcket We HIGHLY recommend tht you go through this pcket nd mke sure tht you know how to do everything in it. Prctice the problems tht you do NOT remember!

More information

Decomposition of Boolean Function Sets for Boolean Neural Networks

Decomposition of Boolean Function Sets for Boolean Neural Networks Decomposton of Boolen Functon Sets for Boolen Neurl Netorks Romn Kohut,, Bernd Stenbch Freberg Unverst of Mnng nd Technolog Insttute of Computer Scence Freberg (Schs), Germn Outlne Introducton Boolen Neuron

More information

Computation of Fifth Degree of Spline Function Model by Using C++ Programming

Computation of Fifth Degree of Spline Function Model by Using C++ Programming www.ijci.org 89 Computton o Ft Degree o plne Functon Model b Usng C Progrmmng Frdun K. Hml, Aln A. Abdull nd Knd M. Qdr Mtemtcs Dept, Unverst o ulmn, ulmn, IRAQ Mtemtcs Dept, Unverst o ulmn, ulmn, IRAQ

More information

Multiple view geometry

Multiple view geometry EECS 442 Computer vson Multple vew geometry Perspectve Structure from Moton - Perspectve structure from moton prolem - mgutes - lgerc methods - Fctorzton methods - Bundle djustment - Self-clrton Redng:

More information

LAPLACE TRANSFORM SOLUTION OF THE PROBLEM OF TIME-FRACTIONAL HEAT CONDUCTION IN A TWO-LAYERED SLAB

LAPLACE TRANSFORM SOLUTION OF THE PROBLEM OF TIME-FRACTIONAL HEAT CONDUCTION IN A TWO-LAYERED SLAB Journl of Appled Mthemtcs nd Computtonl Mechncs 5, 4(4), 5-3 www.mcm.pcz.pl p-issn 99-9965 DOI:.75/jmcm.5.4. e-issn 353-588 LAPLACE TRANSFORM SOLUTION OF THE PROBLEM OF TIME-FRACTIONAL HEAT CONDUCTION

More information

Section 8.3 Polar Form of Complex Numbers

Section 8.3 Polar Form of Complex Numbers 80 Chapter 8 Secton 8 Polar Form of Complex Numbers From prevous classes, you may have encountered magnary numbers the square roots of negatve numbers and, more generally, complex numbers whch are the

More information

Math 113 Exam 2 Practice

Math 113 Exam 2 Practice Mth Em Prctice Februry, 8 Em will cover sections 6.5, 7.-7.5 nd 7.8. This sheet hs three sections. The first section will remind you bout techniques nd formuls tht you should know. The second gives number

More information

Work and Energy (Work Done by a Varying Force)

Work and Energy (Work Done by a Varying Force) Lecture 1 Chpter 7 Physcs I 3.5.14 ork nd Energy (ork Done y Vryng Force) Course weste: http://fculty.uml.edu/andry_dnylov/techng/physcsi Lecture Cpture: http://echo36.uml.edu/dnylov13/physcs1fll.html

More information

The 7 th Balkan Conference on Operational Research BACOR 05 Constanta, May 2005, Romania STEADY-STATE SOLUTIONS OF MARKOV CHAINS

The 7 th Balkan Conference on Operational Research BACOR 05 Constanta, May 2005, Romania STEADY-STATE SOLUTIONS OF MARKOV CHAINS The 7 th Blkn Conference on Opertonl Reserch BACOR 5 Constnt My 25 Romn STEADY-STATE SOLUTIONS OF MARKOV CHAINS DIMITAR RADEV Deprtment of Communcton Technque & Technologes Unversty of Rousse Bulgr VLADIMIR

More information

Lecture 2: Numerical Methods for Differentiations and Integrations

Lecture 2: Numerical Methods for Differentiations and Integrations Numercal Smulaton of Space Plasmas (I [AP-4036] Lecture 2 by Lng-Hsao Lyu March, 2018 Lecture 2: Numercal Methods for Dfferentatons and Integratons As we have dscussed n Lecture 1 that numercal smulaton

More information

5.7 Improper Integrals

5.7 Improper Integrals 458 pplictions of definite integrls 5.7 Improper Integrls In Section 5.4, we computed the work required to lift pylod of mss m from the surfce of moon of mss nd rdius R to height H bove the surfce of the

More information

Demand. Demand and Comparative Statics. Graphically. Marshallian Demand. ECON 370: Microeconomic Theory Summer 2004 Rice University Stanley Gilbert

Demand. Demand and Comparative Statics. Graphically. Marshallian Demand. ECON 370: Microeconomic Theory Summer 2004 Rice University Stanley Gilbert Demnd Demnd nd Comrtve Sttcs ECON 370: Mcroeconomc Theory Summer 004 Rce Unversty Stnley Glbert Usng the tools we hve develoed u to ths ont, we cn now determne demnd for n ndvdul consumer We seek demnd

More information

? plate in A G in

? plate in A G in Proble (0 ponts): The plstc block shon s bonded to rgd support nd to vertcl plte to hch 0 kp lod P s ppled. Knong tht for the plstc used G = 50 ks, deterne the deflecton of the plte. Gven: G 50 ks, P 0

More information

Advanced Machine Learning. An Ising model on 2-D image

Advanced Machine Learning. An Ising model on 2-D image Advnced Mchne Lernng Vrtonl Inference Erc ng Lecture 12, August 12, 2009 Redng: Erc ng Erc ng @ CMU, 2006-2009 1 An Isng model on 2-D mge odes encode hdden nformton ptchdentty. They receve locl nformton

More information

a = Acceleration Linear Motion Acceleration Changing Velocity All these Velocities? Acceleration and Freefall Physics 114

a = Acceleration Linear Motion Acceleration Changing Velocity All these Velocities? Acceleration and Freefall Physics 114 Lner Accelerton nd Freell Phyc 4 Eyre Denton o ccelerton Both de o equton re equl Mgntude Unt Drecton (t ector!) Accelerton Mgntude Mgntude Unt Unt Drecton Drecton 4/3/07 Module 3-Phy4-Eyre 4/3/07 Module

More information