DIFFERENTIAL EQUATIONS
WITH MATLAB ® Second Edition
BRIAN R. RONALD L. .JOHN
E.
HUNT LIPSMAN
OSBORN
.JONATHAN M. R...
167 downloads
3532 Views
22MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
DIFFERENTIAL EQUATIONS
WITH MATLAB ® Second Edition
BRIAN R. RONALD L. .JOHN
E.
HUNT LIPSMAN
OSBORN
.JONATHAN M. ROSENBERG
Differential Equations with MATLAB® (Second Edition)
Brian R. Hunt Ronald L. Lipsman John E. Osborn Jonathan M. Rosenberg
Differential Equations with MATLAB® (Second Edition)
Updated for MATLAS
*' 7 and Simulink -
6
Brian R. Hunt Ronald L. Lipsman John E. Osborn Jonathan M. Rosenberg All 01the UnWefsity 01 Maryland. College Park
Kevin R. Coombes Garrett J. Stuck
WIllY
JOl iN WIU;¥ & SONS, INC.
MATI.A8. Simulink, ond Handle Graph ics are rcgi~ l crcd Imdcrnarks of the MatbWorb, Inc.
C : ,4! t 0
zoo.s Jolla Wiley &i; SoIu. Inc. All nghlJ ,......td ,
tn".. mmtd
,. . . . IIoob .. lOr ............ s
-
Contents ,
I'rduce
,
,,
Introd ucllon
"
" "
Guid ing PllI lo'ophy S!" "
JA I
3,~
I'"..c!iom
,.
V.,..'10r.l
35 1
•, ,, , 9 9
Online Help MAT LA li Wi ndows linding a S." ion
1)(>loR Mathernali", " ith ,\1,\1"1.,\ K AnthOltl,. 32 R«O'~riRg from Problems 32.1 bTOn in Input
U
,, ,, ,
Surr"'l !i"g Dulpul B" ,](',o Fu nctIons
3$.2
User-defined FunclJon' Manl"n, Variable.
"" "
"" "" "" ""
20 , 'n
C{l"'~n!.
"" "" "26
"',th
Qlap/llII, _splat. Modify.". Gnsph> Gnphin..... i!b plot.
PIontn, Muhiple Cu.ws Patmncbic
26 28
Plnl~
COlliOW' PI"'~ 9 c.lclll\ll 310 Sonw 'npt.1JId Remind""
"30
"" "
.. tldn.M-lhludM·boo .... 41 The MATLAB 0. ~Ip 4 1.1
41.2 41.3
Thr W",kopal'< Thr eu....nI Di~ctory and MATLAIII'alh Thr Command Hi\Iory
32
33
"" "
4.2 M file. ."
Snip! M·f".~ Pwo.:llon "' -fil ••
."
~111
4.11
31
4.3 I.oopt 4.A I'IunMin& Your Rnul" _ 4.4 I 4.4 2 4.41 "".4 4.4 .5
4.5
~ .. nunll
Onoph'''' Prlny Prinlmg ''Publishinl"".n M-m. M·boob Prlpannillom<wo,~ Solu,ions o"h"..loll Your M-lil..
"A' 'Set":I'nK1ln- ..llhMATLIIR
.....11.·.·.7 of DUrtnlltlal f.qu. Uo...
find,.., Symbolic Solutions
IWllrDU and llniq .... nc" Stabtltl)" of 1>,fre~"lIal Equation,
Dllr.rrn, "'-1"" . . r S)mbolic Solullonl
f
A QuaUtztUn Appn>lt
"
"
"
•.,
,
U,l nK Si mulink Con"ru'l,"g and Run",ng" S,muhn~ Model 92 Oorpollo lilt WOJk$pace and How S,,"uhn~ W(>f~.
"
" l'IIhlcrn Sf! C: Nomcrlral Solullon.
"
."
" " 92
96
"
98 98
" '" ,'".. '"'" '''''" "" ". '''''" '" '" '" '" "2
'" '" '" '" '" '"
'"
'"'" '" '"
Conr~ms
• TiT .... AIIIIJdq Sftolld Onkr Ullfar I':quMllo",
13'.1
1 • I..sOldHEqU&Uon.wllhMATLA B ID.2 . , £ Awl Ordrr EquatiD", wIth Simulin\;;
'" '" '"
10.3 0" r WlIDII Method.
10.3. 1 The II\Itrlaclnx of aim 10)2 Proof of \he Sturm Com(Wiwn Theorem 10.4 A OeomctrK M~thod 10.4. I The ("0".1 .... ' C.... fficien' C..... 10.4 } The Vanahle C.... ffici~n' Case 10,4 J Airy ', Equalion 10.44 B~ .... l', Equation , 10.4 5 Olhtl l:qu.,;o",
Problem !Itt D: Sftond Onkr Equ.ll oru
11 Serl•.soIDII_ 1f .1 Smn Solu!i"". II.l Slflaular Po,n" 11 .3 f>utK-IioD M·tile. for Scm, Solullons 11 4 Sene. Solullon. U,inX _ l e
12 I .,I,v TnIIIfonnl
'" '" 'SO '" '" '" 'S< '"
'" '" '" '"m
'W
'" ''90 "
III Dilf.",ntla] Equllion, and Lopllce TllUlsforml II I DiOW"IUlUOIU fun"ion, Il} DiIf.R'nl,a] Equltion, wj,h Di,conlmuous rort'ing
. 185
I'IubkaI Stt 11Sui. Solollo'" 'lid lapla~e '1'ralls(nmlJ
,OJ
13
HIP- Ordtr Rqll.llloll! Mnd S).I..... or 1" ".. O rd~r Etjun lloM 13.1 HIJhtI Ordt, l inear Equ"ion. IU, Syllems of hl>l Q;dn Equation> 1121 lint ... hl'1 Order Sy'''ms 1311 MAll-AB '0 Find b,enpai.. 13,) " - I'ortrai" 13.31 PloIII", & Single Trajectory Ill} Plonin, S.",",! Tnjrc\offlS 13 3) NII""'",al So\u';on. or fIrs, Q;do r Syllem,
u,,'"
.. Q .,e"" 11Itw)' to.r S),I,mJ of mlf'""llal t:qu.llol\ll
..'"'"'
'" '" 20' 20' '" '" m
'" "" 2S9
'"
Chapter 1 Introduction We ""Kin by "'<eribing the philowphy behInd OUr Ipproach 10 the study of ordinary dtfftr enll.] equatIons. ThIs phlio'lOphy h.. It.. fOOl. in the ....1 "'c undtnW>d MId ~rply dIfferfnll~1 equation.; It h... inftll(oced our (cach,ng and gu,lkd m. de"ol"""",m of 111 .. book. Thi. chlpier al'>O contaJns ''''0 UStr's i"'dos. Oflt fOl"OOrn,\ and """ fo< inillUrton.
1.1
Guiding Philosophy
In Kicntific inqulIY. whon ...., are 101...... u.d In undrrIlMd'"g. dts
1.2, Sr!le of MATlA' 1:1, s"ffieien! for Ihe 1hn:. of 1he d,rr.ren".! equations chaplerlom .. a ;f)'ou plan.o do liItm in 1""(1 "lSion~. and thinlin, obou. lilt i"u.e. in'"h"d. n..n go 10 1hc
. If)QU 1 qu,dJy ludllludcnl\ 10 I 1....1 of proficiency, Charter 9 leach.s enough aboul Simuhok 10 ITI3ke il JIO .. ible for ,tuoknl' to u>c il fOf many pmblefTl'l in Problem Set.< C·p
bu,.
1.3.2 ODE Chapters l1rc", .,ght eh'pler. (~-7 and 10--14) ,upplemenl the ITI3lcrial in I t:ad'liooal te~1. We usc MATLAB 10 sludy dirrcrtnli.1 equalion, "'ing symoolic. nun ... ric,l. ""phi.al. Wld qu.hlah~ meillods. We .m~\I"" u.. followinglopic" d,~ction fIelds. ".hilll)'. numer· ical merhods. comparr"'" mrrhod •. and phase porU1Uts. "These IOp'C~ an "1 emph .. lled to lhe ~ame deg~e in lradilional "XIS. We incorpornlc mi, new cmph,"is iOl0 our d>1$ di§cuSliOR'. lIc>llIin& wmc clUllime to each chapter. Spttifi~ &UldelrllCl m dIfficult 10 prtscrihc. and !he requ,rc.j lime >·aries ",im each chapler. bul On a>'enge we Ipt"nd up 10 an hour pcr chapl.. in cl.I' di§cuI,ion. "The S!nXlure of !hi. bool ~quire. Iblot numerical mtrhods Ix diseu'sed caly io Ihc COUr\e. immed,ately after Ihc dl>cussioo of firl.1 Ofder ~u.honl. "The d'scu~ .. un of numer· ical .nclho'minos of MAlLAB (Rele_, II .nd 12) did not IUppo" ~hdn(osh. \)u( (he mOIl Cum:nl I'mion. (Rclca"" Il ""d 14) do, {On • Mucin(olh. MATLAB 7 ",qui",. M"" OS X 1032 (Panm..),) If you runnin, • MlICinlosh plalform, you should find tlul OIU ,n,tnJ(I'()fI\ for Windows plalf"",,, "ill $U(fICe for your nted, 1.,1. MATLAD 6 (Rdeal > or IlDU »), If the Command Window t< "a.ch"c". il' IIllc bar will be d ... ~. alld th~ l'ro"'pl will he follo..-ed by a cursu. (I hlinking ,'crllell h~). lb.11$ Ibrpllcc .... he .... )'00 will ~nt.r your MATLAB commandl (>ee Chapter 3) Iflhe Comm>nd WIDdow I. not ""II' •. ju,1 dlc~ In it any"hetc. I'igu", 2.1 conlaln, an eurnple o( a .... \\'Iy laWII:htd MAil.AB lJe'ltp
"r
,
24 lYI'In/,' on 11K: Comrn;lnd ll'indo ..
•
_......
.
Fig"", 2.1: A MATLAR [)•• llO9
Rc ..... rk 1.1 MATU\R 6 has a OClklOp. but.n oklcl ,o""nn. of MA11..AB. for v.amplo ~,.l. I~'" wa"1() Int(c,rlUro Do,klop. Only tho C"omllW>d Window appeared "bra you laul",hed t~ awllealion (On UNIX Iyllom\. the lcnm.w from "'mob you in. '"(Ikod MArLAR 5 ilercomo qu,le profic1enl w,th MATI.AII YOII can ac«\< the onhne hell' In one of ... 'cr~1 "·oys. 'I"\"p,ng balp .tthe command prompl will "",oal a long li,l of 101" . ' fot "Inch help" .,ailablt, lust 10 IlIu",",ue. try typo jllg bdp vana,,_l Now)'"" !.Co . long h l l of "g. ,..,,,,lpII""""" MATI-All cOrrlrn)nd!, h(311)', tf~ balp aolv a LO I.arn _bool Lhe: _olva romm,nd In c"cf)' in§lancc abo,·c, .""'" informallOn lh.n your SlO 1ft IooktnII for Ippt..... In tbt Ii; !, tbearch for documcnlllion in d,fferenl wayl, 'The 6,,1 ,~ the Llh Wt drI,sate 10 11M: "m.l ~lph>he1ic reaction mo.k The thi,d lab pro. HieS tho Starrh ,nccha""m Vou type: In "hal yOIl .~ek. o"i>t. a fUl'I(:lioo 0, .0 .... othe. e,
Con,,",.
"",pood,
R~mark 1,3
If lou type: helpwi n 10 launch the 'kIp Hrov...". tilt dilpl.y ]WI' .... ,11 coota,,, lilt SlIme I'O>t"' that yOY 0« I I lhc rel"lt oftYPlnll h.lp ~Ithe command prom pl. bullhe enl".\ "'ill be links, To ,umrrwiu. lhe IIdp Drow"" 'II robuo,t of C Illrough \be l>ttktop . l)ock monu d",,"nwanl cu,wd arrow in !he .oolbM. You can separate !}tlUOP 001 (0 yoor compo ... du krop by clicking on \be com.' of window', roolbnr. 4 ~nd 8, For now, we wan. to WIll . ncounlor, ",moly grnphics I ' These will Ii windows. nlballibo ull them graphic. wiooow., In Chapl.. 8, teach you ID_ .. Uld.1IIIII1",,1 ... MATlAB p phic! Wl ndovos d f«,,,,..,ly_Sec: Figu", 31 in ElF' for IIUllpIc. ...mplo of a BJ*opll~J window
.h.
.
'J.I In MATLAB b Of .arli., ,..,,,ion., you cannot dock figu'" WIndows. /II", can ia t'ftIioa 7 ,f)1'u 4ft t>ptnrring On a M""inu..h plalfOl'fl1.
2.7 Ending a Session 1b" brllllesl w.~ to c"nduJ. a MATI,AB "~Iion is (0 Iypc: q\lit al the prompt. You can IlIo click 0/1 1M 'proia] ,)'ml>ollh.1 doses yOUT windows (lIIu. lly un x in (he uPI'I" ugll l
iliad comer).
!I'.
Snll Molber way.o u il i, to th. ~:xll M ATI.,\ II opliOfl from.he: f ile - II Ihe Dc.ktop f/,j",y you oxil MAT I.AD. yoo .hould be SOI'O 10 UVe rOOT "'OIk, p i lii)' pphi" or mher lile s you need, ""d in 1 . I.. n up afr.. yourself. Some . ' I , . rordoin, so ..... ddn: .Kd In Chapto, 4
or
a."...
Chapter 3 DOing Mathematics with MATLAB Thl, huog up in a (.loul.bon, or K en!' 10 be 3.2.)
1aklnil loo lon, 10 perform .. fIIIN'IIoII. yoo ~an u,uJlly abo., il by Iyping C TML+C. Wh ile I>Ol foolp roof, holding ..... 1IIt by I.belled tnt. Of CONTROL , and pR'ss,nl C i. the method o f choice wlltn
IL\1L\I .. DOI R..pood'n~,
3.3 Symbolic Computation
"
U\lnll MATlAB'5 Symbolic TooIbo •• lOll CI1l cany 0111 ~ymbohc calculation•• lKh as fklOn", poIynomll]. or ..,].ing a1~llfaic tquaMllI, 1),," b . lJ:l aymbolic to make 'UI. Ihll!he: Symbolic Tooilloi 11 in.wlled Odonl~ TIti. fe.""" "ollen u... ful In d"URluisItiJIl.ymbolit 001('111 from Rumcneal OUlpul MA:rt.AB oflen mmor .implifH:.""", 10 !he: "'fft"ioo.)ou I)'pe bu, Il00:. IlOl male any b,g change, u"len )'011 ,ell ;110. You "111 "lot MAl1.AB's d.ll;pl ify eomllllJld to try to 1'"''' an • • fft";on as "mply as pulle them by commas .
Precision Arithmetic I for II I .akul~lIo.", U,ing''''' ~.o do U kl arithmetic with symbolic ulltusions. Conskkr II
lloatin£ point formal (.. ~,.nl;lic JlOIauon") and meaM 1.2246 It thol oin(".) " ",ally cqllfll ~ aUlomalicall y prrfO)l"Tll(d clemonl by-d." .. n!. Fox u _ • 11'.)'011 do DOt !)pi I prriod fOf addilion and jub\.:oo;I,on.• nd you canl)'pt' - xP ~~ 10 . . till uponcl'ltl.li of la fouf.re of da" ··'Y'" oil,""" i t_. tbey af. symbolic ob,l«" 111< ,-ariabl. , u and v are symbolic bcc.u", ". lk< 2 anay, The ".nah~ y" of cln. "cluJ arnoy", j.~,. a .lnn••• pre .. i"". The I.. IIW(I dau d ..ou .... rtpro lenled by £ 1 and 9 1. wruell .... of ew~ "mlnle 00.1«1." and by f and 9 . ",hleh an: of "fu""lIon handl. arnoy" 1l>e " Bylo," column ,bow. bow m",,11 computer momory " I IiOC. I"by more d'III'.
sollllion~. MATLAB Irpot1$ "S ",sui" by a,,,ng the 1110'0 . ThU$ the fin\$Olulion cons,rn of lhe fin l fIn\ .... ue of~. You can ow"'1 the", value! by typing" t 1)
,
prea:dina U'" ohhe .oh'. romm.nd, we M~'Knod Ihe oUlpul to the .oh'. on a sY$tom of 0GuMiO/lI withOltI .'$igning the oulput lutoma\irally d'$p!ay lhe ••!ue; of the wlution .
.o1"l'a + y- :a • 2 ',
."" -,
"'*" 01 sandI/ ~.1l ...
'I' - l O" . 7')
of tho iOIutton, typo .01." and .01.1' To "", the P '+ !._L_ • . . (1 ), ... .• . yt 11, n~_ ."_'. _!)'pC .... • u.equfoIionI c~ bf ""hod .ymbolically. ~nd ,n lheseU", ' aolv. tnM 10 find MhiMld _~r. fof o>ample: IbI
!
-
.... _ftl'oon'x, • • " ]'08513321516064165531208767387 IMWIimel tilt", i. mote Ihan on. ,0Minn, and you m.y 1\01 gel ,,·hol you • • poeted
o;,;;"""""""",;"",I" """." .• '. 70 3 07' ~11~9096221 3 93161 4 80 44 265 ' 1
IN. Orupillc. 1l>e an" .... II ~ comple, numbe •. 'I1Ioua,h ir " . ,·.1111 wlu{lon of !he equation. the.e are al", ...1 number ",luIIOl'l' 1l>e gaph_ of ~xp( - .I) and ,ill{.I)lR .shown in MZu" 3.1; .:ach
ml• •,""IIOr Ou •• ,peri.DC. II tha, doong !.O "II MIITLAB cummands in the command .. induw I'«" "I,,, """'" robuSlllo15, .specillly ,f you wanl 10 sa,'. you. command, in an M hie (s« Chlptel 4) In order '0 ... produ«'~ san", ,",ph lite, 00. To dOle the fig..,~, type c 10•• or clo.. .U, or ,imply click on li>c M io the Oppel nghl COmo. ofw ",,"dow, Se. S..,tion 8.5 for more ways to manipula'. gmph\.
3.B.3
G rup hlng wit h p l ot
The I)lot command work< 00 HCIO", of n"n"'nc~l d>la. The: .ynw. i, I)lot (X, Yl whe •• X WIll Y are ,''"''t(ll'$ of the.arne length I'ornampl. n
X
~
(123.1 y . . . ,
6' 5.1 1)1ot[X, Yl
.. .. , ..
, 0:,
"
"
",
.
.
"
"
. " "
,
..
,
Figure 3,3: P1Ollln~ I.",. S0 .11·e1en"'nl nctor x .
•
. I'i l""" H
I
,
•
Plot of. ParabOI.
flulll'lI Muldpk Cun-es Ibe old
.
1'101 ""d d..."" a DtW bolo!. on Thi~ command
""pili., .nd iliaw any new ,,,,phies 011 101' oftbt old.
(0 lOll (0 10]1
'.-pI-x) ud dDt .. )' ,n hau", 3.1 .",h.. in \hi . pKify how mllII)' le,'cl .. I. to 1'101 by oddrnl I n o!,lIonal ,nleger :ugu,,.,.,nl to a_tCOla. or .. h~1 JI, h.r41nt.~r.1 • in"llogllox - 2jo.xpl · x · ll, K, 0, 1) Warning, Explicit int"9ra1 could not be found. ~ In B}'In. int at 58 hardinteqral int(logll'x-2I'exp)-x-2)),x 0.,1) In lhal UIC you can ulC MATLA B lOeomputt I nUI1"I11.
4.1
The MATLAn Desktop
I.:ffec1i,-. ",e of MATL/\II "'qui.... understand,ng lh.
component. of the MATI-AB [k;llop. While you can cmtomll.c )'0"' [),,,llop 10 ~Ul{ yflU' OW" " . .',I-. "'. will '''"11l< in Ihl< chap"', 1hailOO ""amed lho deflull c""figu .... lion. ,,-;th lilt WOliup"". ll rov,,,,, and Cu.rr"l [)ueclOfy Brov.'\O, In tilt uppt. Idl. lhe Command 111\1(1) '" u.. 10\r pl'oj«: •. you can
:
;;~;;;'" 'd' ;" ";."'S
ill cuncnl workong dn'-':Io!)'.
11l1S is the
=~~~~::':~!':":.';:'r,:dfrom unng Ih. yourr omOland ~"ion a rclines,"ed nl..c s4 you ify . U~(urile com_pec mand.
.
,
\IIII&lPI'U •• Idd. dt=lory 10 lhe fIIIlh Ii" by u\ in, . """paU" CI UIa&bhrll •• iii.. in • dll'«IOI)' if you .nhc r om. il the cum:nl ",Ql kinll Whe n ) ou add a dll«tory 10 the p;llh . tile liles il COll1ai ns . l1Ic potl'h;on. or e,'en In a pte"iou! MATLAB
",,,;on l'or lhe", PUIJlOSC". you can rale a.:h"nl.se or Iho' oornrnand hIliOf)' fUll"" of MAT· l.AII. U'" lho up and do.... n arrow loy. in lho Command Window 10 ",roll through the command< (hal )'0" ha,'e u1>"" n.. fin, Ii... of the M·file 'pte,fin ,he !\lime of the fUDI',ioo and deocnbe. both ," IOPU' arsumenl' lor pata1tIoOltl1).oo. ". outpu' .'al... , In 1/'" •• ample, the funclion IS calkd .1".pow.r 1bc fil< "",me (",thotn lhe .to .... n'ion) and the funcllon I\.1me .hould rn&lCh Wben yoo erl'~l. "'i.... w funtllon M·(,I. ,n an u""ded ednor ....·indow and !-tIN! S~' •• the Ild'lOrl\"koogger t - , 10 .... 11 the hi. 81 n .. p"",,~ . '" llH: funclion in OUr e.ample lal •• 0 ... ,npu' argumenl ... h,eh i. cIU.d c in.ide ,be M·fil •. It al", ",'um, one OU'PUI ,·.Iu., When Ihe fun.lion fin"he, ..«ulInK. Ih. ,..Iu. ofy w,1I be ~.,gn.d '0 an. (by comm.nd will aU1oma1icaily reui.,'. Ih" lI,fu,,"," on. Por ... rnpk: H h.lp .tn.pO. ... 10",-b), SIN~POW~R computes sin,xl/x for x ..,hor. b 1. ...• c. "The: ",nuinmg lincs of ,he M-fik define the fu"l lhe numbcn and II"lphs ",un, H JOIII' R'adtn "'" "mply 1I0ing to run you , M filu {all ,he: ""'y through ,n • sm... pull-lIItn lOU ,hould male Iobe",1 uS(' of 11K: pau . . command. Each ti me M AT-
at"
"
l.AU ",.. lIts a ~au •• rornm.1J\d. n "1IpS nec~lIn, .1It M· file un.il !he "Iott prt'!Iot! • Ley. I'au..e. should be plac.d aflc!. ca.·h Cl.lmmon., aflc! •• ""h ""ph. and commar>d • •ha. prodUCt Importanl OUlpul. Tbo:sc ~Ulot. allow lilt ...",et'l.I ",ad and undc-"WId your I.,ulh. Nu'~: An al.ema",·. tu u.ing pau ... whIch is benet if)'Ou a", guing to "publllh" llle M·m .... tl,l "'para ••• h. M-m. intu cells", explaIned In S.c.il,ln 4.2. 3. and k. yI,IUI I•• dc. Mep .h.ougll.he me nne ccll 01 a lime.
"")0'
4.4. 1
1· I't.'S~ nt ing
ar'et
G rll llhies
", 1II.lIeato«! In Chaplet J. grarh",s appc;u In ... parate .... ,ndow You can p.-in.!he CUrKnt figure hy .. Iecting!he I'Mnt •.• Ilc!m from !he Flle menu In !he pap/llC! WI!>dow_ Altcl... i,..ly. tilt pdnt cOfllfl1o&lld (",lhou. any argumen'l] caUIot,!he figure in !he currenl grllil/IIC\ w",dow to be pnnled 00 you. defouh p.-i •• er Slnc. you probably don'l "' '''''1,1 pnn.,hc glaphiC5 eycry lIme you 1\," a script. you should no. Include a b= pdnt cl,lmm"nd \0 an M·fiIe. In" •• d, YI.IU Ihou ld Ulot a f""" uf pdllt oomnuruJ lh>' !(nd~ !he: I,IUlpU"1.I a file. It ...IM> helpful tl,l gi,·. tt.wnabl. Jill., ,1,1 YI,IUI flilutt. and to in ...... pau.a cl,lmmands inll,l yuu. ,,"np' '" thlt viewets ha,..,. eh....,.,.o $U the 68Utt bcfl,l", the tt" I,If lite ",ril" execule, h" • • ample: xx • 0,G,2:2·pi, pletlxx, dlllxxl) _ PUt • titla en tha figura. titl.(' rigura A, lilla CUrva')
,h.
pa....
_ Ster. th. ~ra~h in th. fila figuraA ••p •• prillt -4.p. figuraA 11.. foml I,Ir.he priDt command used in this ",,;p' doe, nn,,..nd anything '0 the printer In' lead. 11 cau
.1 ... C:U1"YO••
1.,
D!ocC •• eblc-.) ' ,'ooU :::0 Ga. bold off. axl. « (O. 2 "pi , ... ~t • tltl. OD tho fi~r • .
~l,
1 ))
CU~. ') '(be ICtIIII i.lhown in Flgu", 4 I .
titl.C' ......., 81 ...
-~-
,
., '
",
1
"
\
:I.,
,
" ",
,
I
\ 1
\ \
y
lL ,
\, '.
I , I
\
I
\
\
•
\ I
J
•
I
_Iii •
•
Figure 4.1: Slne eu ..... CJ
ld', an.aI~ 't lIIis .ol.,ioo. We $WI by defining the ...."..h",. (a. fraeholu] muluplcl of .. fRlIIIO 10 2R) Tht figure CO/1\I1'WId optn. allC .. vaphic. window. and the bol" o il _!!lind Ie" MATLAB know thai we """"' 10 draw !.C\'cral ~u"~, on the WIle set of ues. Tbr Imu "',,, ... n f o r and eM COOSbMe .. for-loop.•, dncnbed abcro~. The IInpo"an! put of Ibr loop j. tb< p lot rorornmd . .... hICh pIocs (he du,1\'d "ne cur\"cJ. We ,nSnICd ,. . "0 oft: f~ SO thai Vie only oee lho loop command. once In ,he CQfIlffilInd Wmdow Fllwly..." lurn « hoing back 011 .. fit. uiton,lhe loop. lilt: b o ld o ff to relu", die anphto; .....irKlow. and t i t h \be fil ll'''_
4A.2 Prru)' Printing If. I•• ~ymbolic c~r", s'ign, ,he" Iyplll!! puttyCn) ""play • • In prmy pnm fnrml !. wllkb uw. multipl. lin.~ on your ~ru n to ;m;tote wriu"n Illathematlc,. The ,~sull is ofIm III!ft ruily ,nd than It.. lIef,ull one· lI ... OOlput fonnal An importanl future IIr DCtItl:J' .- thillt ".""" long e',,",$O iool III fll ,,·,t hm lbe narginl (80 (!.a'kt,," WIde) IIf • 'I M'''Il ·wud willllovo If yoor . ymbolic OUlpul lS Ioog e_gII '" u~nd pasI the nlP"
edg. of your "',!\dow. 11 probably ... ill be lrunealtd "hen you pom Y"'" ""Ip
or
Ihnl il
"-4.4
"1'1"'"" in a ""w WIndow. !\i· books
AOOIher sophl>11C81td wa y oJ pre5Cnunl M ATI.A~ OIIlpul . wlthoul """ins 10 prodoce an M .III. ('''1. MlCrosofl "hnJ documenl. " .. OOpolal ln. 1t~1. MATf.AO COfIIlllamh. ami gr.>phICli . (Th" option;s noIl>,"I. bIt 00 UNIX nlllChlllu . 001On l lOCh ronlpull. MATLAD commands ami pap/'llC. InIO' 11Tj.' documenl WIth 1ht help of Ihe 11ll;X cOinmand \iocll1dqu~ic. In r... l. lhal " how " e prodU«d the grap/'litl In Ihi ' boo~ l) A . ;ml'l. fi"l 'rprWCh is 10 p.. pa .. . !\oro docun.. nl \I Ilh nplan. lory C011U1lCnil. ami 10 p'~k: In ooe ', MATLAD cornmands (0"" can do Ih,. In oooU,.. f"nl) or ,nciOOc 0...,', M.m., (u''''8 .'II ~". froll\ \\'IJId's l"s.r1 n.. nu ). ,",nally. l '-'" can ", Ite in lile g ... phi.. us"'8 l'ir!u lT" ~'rum ~·lIr ... from the 1",.r1 "", nil '" \\\mJ You ~hould h,,·c fi!l;1 ",'.01 11K- graphic! In pog. t i H . Or e pa fonna' A "lOre roh"U,lapproach. which I<mi, 10 be !tIICu mhe"""", ;n lhe 1000g run. ;, 10 cnahlc M ·bools 011 you. mach,,,,,. An M·booL, IS. 1I'0 nt doc un .. n! \11th emhtdded Dd ""II nor oblil...,.!he currenl 0IlC before you Iuo'e IImc lO!« ,I
n.,,'
"
1)0
nor ,ncl""" bare print commands rn )'00. M filt •. 1"'1Cad. pnnllQ a file.
S, The l!dtlor/l)cbuga:c' ha ...
".raI lI",ful fUIII""
f()( debulll,"g M·fiko:
(I) Splliling lhe M·fiI. inlQ cell. mal'" n ]lQn.• Ul.h .' platt. "IlI -fik by lyp,ng lIlint~t and lire file name ,n rho ('oounand W,ndow.
lit"'''
"b",upoin"" ,nlO rho file ""nl1hc Ik""l menu ()( rho ... d 001 ee) You.an icon [] on rho loolbar 11... ",11 .lOp . . >
PI'O",I"
" d1J. remember !hal you elll , top . runnIng M·fil. by typ,ng CTML+C, l111S IS u~ · I'u1 if . CIlcuIaIioo II taking too long. tf MATLAB IS 'p"wmg out ulKlc:,ired output, It: ".pau_ comrrw'Id. you ~ahLC th.l you waHl
to SlOP .. er lhe 'pec,fic WIUlion 10 ... a'«1",,,,,, In (hi' Ibrory and appli •• lloo of d,ff... nlJ.1 "'Iuall"",. An uodt",W>d"" of them bdp" In ,n,c'l'l'tung and uling /'tsull, prodllCcd by MATlAB.
S.l
Finding Symbolic Solutions
Consider d,. d,rr",enli.1equ.tion
d,
"
/(1,\1),
(51)
Po r.oluhon 10 th" "qu,uoo is • dlfr... ntiable fu~lIOfllI(') of the ill
~rct
••h
i
5, SoM;""s of Ditfc",nliJ./ t:qua(;""f
'h .1 toIutioD \hi! RimS 1/ ond t .lgelnicaUy ... ,i.ho;MJr e~pn:I~mg 1/ as a func_
boU. • ,IIIIUIIoa 1/1&1 RIlle. 1/ UH1 , through. fOfTllul. ,nvol •• ng ,nrcgrab
,
fwtc·
~
....an the ,r..ndard fuocrions of c.kulu.:
polynomi~ls, c~po.
:'~I'!t.~"Za.n= triaonomclnc funClions and lhei. ~~~""I. and .~, comb',nanons
lJy SIH'~1U1 fimcuom we liliiii wriouI_.elemenlUy funclion ! Ihal m:orh<mahc,an. g,~en. I\ll"" 10. oflCn , 1liiy uiI!I' .. soIurionl of parljcul",ly in'por1anl d,ff.",nllal ~Iua"o", AI. jWali\;aI mal\t'r, I ",'ulion from 4'01.,. " mosr u~ful .. hen" UpresSd ,I. e~_ plidllJ ID 1IZIDI of buill-in MATLAB funcuon, of t: lhe ", ,oclude Ihe .'emenlary funcr,ons allllD1.prci11 functK>n1 In the following ~umple, ~ ,lIustrale how lO Ose alia 0IIIpUI iD !hi, U,,", S« Sec lion SA for eumplcs ,nvolvlng othe. lyl"" of ",lull""s JIll D)' pc 1riltl llbol_
" . . . ti
1..,..,1IIrcua:h ala~br&ic O(l(l1Itionl and com~iI,onj
loa,,,
"',olv.
£'r I.. COIUidt. rh< lillt'" dlfferenlial cqualion
7
'"
You . . ftDd rhr
{' +]1-
"""ta1 wlution 10 thi,"equal ion in MATLAIJ by Iyping:
• • tbolft " lII'. t"2 • y ',
't')
e. 22"t-2"xpltl'Cl n.lIDlullon of rh< diffcf1:nhal .quolion il the .'p",uion folLowinlll"" equal "lIn NOI,ce dIM MAn.AB prWua:' !be "",.... in lenns of "" asb,'r&IY conSlanr C1 . ( I'or higher order eI(\IItlODJ, theR ... ,11 M I. nwry .l b'l",,), wn,tanlS .. \he order of lhe eqn. """.) You CIII obWn .poTI)' point In /I ond INt the J.OlulIOIl CUI\'.' .1II11Q1 CI'O!S_ Thus an ,mual val ... probJcm IIVPI ha.""Clly 0'" solution , bul, 5\1>te the", a,e an ,nfim,e lIumber of flOS"bk laitial rondi'ion., a d,ftn.nl,alcqu, 1ioo hlU an ,nfinl1e "umbOT of SOlul,OIt5. ThIs prin_ dpk I, Imph,,1 in lh. I'O l ulll oolained above w"h d.olv. , when we "" 1101 51'ttify an IIIId.. coad,tion, 'h" ",1"lion depends on an a,hilf11f)' con"." I; wilen .... e !!",c,fy a" inill.1 condIllon, 1M wlu"o" i. cumplelely de,.ml\ ... d. II II Impoltllnl 10 ... m.mho, !blllhe . " llCIlCd 10 lit", lho: wiullon '"m, .... ,"ph .01 j...., 1'0", ... S.2): » eaplot(eol, I -I lJ)
•
•
• hgu«omr. unboundrd a~ I approacho, I from !he Idl Thr righl ~h ofl"" ,"ph dep,tU ~ oflho: f"no:l,on 1/(1 1).""1 il i, nOI p;tn of lho IOlul,on of lho: 'nlll~1 "II~ prot>km
5,3
Stability of Differential E(IUalions
In addlllon to '''II.nee and uniq""nc ... ,he ..n~,~." (Y of III< IOlmion of an ,nllill .·at"" pfObkm 10 lhe milill ronM;on i, a funda"",nl.l '"'''' ,n lilt liltOf)' and applie.lIon of d,ff.",.,,"1 rqullions Whrn I d,ffmntlat rqUIUon i, U""" to modoll phY'iuI1lllrm. tho cuel ,mllaC cond",on II """rally u.l.roovlem cff«li, .. ly. m. wlu[,oo for """h'" I J.hould he flirly in"",,mc to m. mlllal ,.,.1"" -i.,.• '1J\lI1! chan~1 on !he ,mual ,.. h.. lhould ~ad [0 ,null chan"" 10 til( .olulion for posit;ve llme- ror tile follow;ng A, We '''''"lIoncd 81 !he beginn' n, of !hi. !ieCIlOO. f'" a physicol \yl~m lhr ,n;II.1 ,-alue 1/11 '),poeally i. ~ koov.'n " ..cUy. When ,\,~ found by muw,."..,nl, lht i. iilIIlppro''''I.>le .'al"" Ji... llIcn. If ~(I) il the solution com:'pOndong 10 yo, and 1M ",lmion" "~ry KnI""'. 10 !he matal nl .... Ji(t) w,lI h8l·. huk .dlllon 10 lhe I(lual 01"'.1/(1) orlM 'y,l.m AI' inc ........ , An ,nmal ,.. I... problem "hose: $OlulIoo IS f..... y ,o ... n"I1'" 10 ,nutl 'WIt! in tho: ,nili al ,,,,Iue as I inc .. lUts is ,allffl Jl! tlte ,o!uhoo l by ROling IhOl Jf l Oll 0, SO lite cquatlOll i. un.table
jA J),ffrrrnr 1)tpcs (If Sym!>Olic So/ur,(IJlj We un abo ulldenl.nd the ,ub'/oly of the: d,ff... nllal ~U~I'O'" in Ihc:.. 1"-0 eumples by u.m,mn, II>< ",Iut"", (ormul~_ DUI 0/ I~ can he: cakulatood and ,IS .. gn and "'" foond ..... n ,(. wlUI'OO fonnu!a cannot he: (oond !'or ulmpk ..... ran ,onmcd,"lt:iy!ell I~lthe: d,ffer.:nloalequllioo dlll dl + I'll" QffitlimeJ iolv. docs IlOI fInd all the .\.OIUlIOOS of lI!
equIIIon. aftd .. !wn II ,II.' a single aM".', .hat may IlOI be: lhe solutIOn you ,.,anl II is lifer 1m ,..MnJt" ,'''ph lho soIutioo )'011 want ROO tllen usc ! nco 10 .\.01,.., numerically rot I/llIInl'" Inlll.l , ..." """don lho gNpl.•• ' •• roC'Cy) .ollfllDcl a. y) - c. 3) ~
3.1117
R_rk 5.4
The 0, nnd wh ile ils solo lio" soh'.' dlldlIfIiualilll equation bollt for! > 0 and 1 I .. noos I/(t) by (6.1) gcomoruically. Specifically... c can obtain (hIS ,"fonttation from the d,rt«l from \be wm:uon field. DI' rection held, can be dni..'" by h;and for >Or1l
Not. LIt)t .... hll" .... ,,'~ at It .... C Iu" .• Iabo
~
:,.'
U
J)lreCtiOD
Field (or a Non-Linear Equation
.2 1-- t6.llcaD \It' whd c' piicilly bt
6.3
In
Autonomous Equations
Equat,on' of In.: form HII) .
,..sr.
",hich rio 1>01 ,"" 01\-. t ,n Illt nihl·hand arc • • Iled aUl_"" tqlWion .. If. [>hY' .nl Iy"cm fo11ow. rule, of .'OluIIOO thaI do nOl chanie "'Ith "'1'1
+
,
.. ,
"
. , .,oJ" " , ,, ,," , "
' '
. ,
.. . , ,. ,"
tlncLlon lick!. n..... ly. cha" Ii) t~r~ a.~ 11'1'0 coo"aOl ..,LuhOll. 1/ • II, aod II 11'.: ..... IIIIt1I1i u/>oYt" II, I. nd to 00; and (IIi) aLL OIhc. M.)\ulioo. tcnd 10 II, as I - 00. W. fkrt ve IhcK prt>JXll i.. of the ~oL"'i"n. ~(I) dlf«,Ly from lhe graph of f(lI) a1
""""
I 'I'hI ron.I ...1 funcl;""' 1/(1} II, and 1/(1) I/j arc ",Iuhuns. caLLed the ~q"jJjbr",m 1III1IIj0fU' Tllty...,!he: uOlque ",Iullon. thaI UI;\fy 11", ,o;t;al cond, hons II{O) II, udll(O)
1I' . ...·I""o 1/(1) .. "h 11(0) < II,. Tlltn. b«au~ of lbe uoiqueness of sol .. II""
"mtI I hr Ih.u 1/(1)'
1/. for I)) I and II'{I)
f{W) > ()
",11'o. ,lila, . hm,1 al
lnft ft'ly hm 1/(1) ,-, ('oold " MPI'I'" ,hot ~, 1/, ~ The '''".... "
1/'(1)
b < 1/,. 1\0. httlU":
f(l/e/)) ... f(b) > 0
(6.6)
,f b < 1/,. Ihen (6.7)
Bu! nt"a""o' (b,6 ) and (6,7) lay Ihat I/{ I) "WroachU a hu"wnlal ltSyrnplolc 01 1M ...... I" .... mil Il' ,top< i. "ptnll:",rnl1y" blHarr than a p"'1l"'e number, The ~ ..111111i """loa.,1idl(>tl guarnn'«1 Ih.t
lim /I{I) ,-,
/I,.
). If 1/(1) 1\ • ..,Iution ""Ih 1/(0) > Ill. liltn 1/(1) > y, for aliI, Also
/MI)) > O.
1/'(1)
lIoJICO 1/(1) is one. ",;un inerusml In fat!. 1/(1) _ "'" TIu, can bt """'" by u... d in pat'! fbI. Somoti""', .•, .. r lhall iN from the an argu"",nt ,im,lar to eumple Iltlow. I/(t) act ..lIy rra.cbtl.",. ,n hmtetime,
th.,
w. "-r mml 4 Now con"tlt. 1/, < 10\, < 1/" Then if 1/(1) i, I .oluliOIl ,,',th 1/(0) hll'el/' < I/(t) < 1/, for aliI AI",. 11'(1) /(1/(1) < 0 lienee 1/(1) is. docrr",,", fUJlChOO A. In pan 2. n" no( d,fficulllO ,how that lim, .,1/(1) 1/,. N",o that In \h" analym tilt propen;',
or 1/(1) .... tktomunod wltly from the ",0 of
/(1/). We c.U ~'" 'alu .. of LN, , MATLAB~ ... ,,,h" Ihi! .quatlon and pl()! 11>0 $Oluuoo cu,"c" Hrre;\ a $tqurnc. of
COIII/IIIIIdI lllat dot' w. " . UVlln, hoi'" 0", ,.,. .yu t 0 ,.,. '01 . dIlP1Ur (4I o lv,('Dr· r " l - r', pp I~
'riO) • c',
't'»,
a.al . _1. 0 . 1 5,2
'Ulot(IIIbI(l ol. c, c v d), p p JIlu.l 't·, rl aM l ' v '
(0.3 ) 1. ,Old
p p titl' ' aolutiool of ~ /"'t • r-2 - r' Filii" 6,1 tilt aclual $01u\,on cu,,'ol for lhe d,ff.... ntl.1 equauon-as Wa"'n by
• •
•
• "
"•
hgure 6.7: SoluIIOII CUm'! for l:qu.>t_ 16.8)
MATLAB N.... Ih., tllt $Olu""" eun'.! rom'!poodon8 to ~(O)
,-
;> I
go to inC. ",I)' on fonn.
!uh1 7 .... (.1 U .. formul. (6,9) 10 verify tho f'I'OI'O,,,cs of 1I(1) obta;,,,,d .I:>ove by lhe quahlah>'c mrlbod. Drt.nm". whJmale w luuOI1 I/o (t) OI1lhe inlf.vaI [O. 2), lyp"
;r '
"' ,'dSU, 10 2), 1) Itf It liD liDooymou. funclion. o. " al,UC_tuAc, 10 2], 1 )
If func , 1lI jOin M ,tile.
n.c", IS sllll lOOlbe. p01llb,lIiy. namely 10 1""
lhe ddiolllOl' of
lbI_ymou. fulldcd I f)'ou~", 'nr~",,1cd onl)' ,n ilIo 11111< or 1Io{l) II rho.1III of tho In" .."lIl. ,n this ca", I 2. )'ou can rype )'& (.nd ), "hle "'lull IS Ihown In Fllu,e 7.2.
" to 21, 110.2'])1
,
,
."
II:
•
,,'
.. -
"
"
Figu." 7.2: A Family of Num
IOI)2~,
V,
I 001~
V.
10119
1/.
I02l~
U.
103iO
Error . 11/(0_3)
-~,
00070.
If lho: ,n,1Il1 , ...1... problem is su fficicnlly sl1>l.1Ollo", then (Of the Eule. Method one Can Ulow .h,t.M error in "epp,ng from I" 10 any I, ,n the inknillu < I the ,",ll.' C'OI'\dJ~on. and the mten1l1. hul n01 on h. MOftO'lc'. ,t can be ~hown that the error il actually prop:lftiuoal to 10_ llecao>e of this, the Eul •• Method i, calkd a[orJI rm/"rn"/wd. Note that on Ihe example, clliling the step lite 10 half hld the effecl of CUIt,ng the error appro'i .... tely in half, a, "'rc:cl.d for a firsl order method. It is 8110 u\(!fullll knuw th.l""a/ ,T",T. SupJlOiC u(l) " the ",lu,ion of the d,rr... nuoJ '(lual'On r.alisfying u(I, ) V,. Tlltn lho: local error in It"W,nl! from I, to I, .. is ""fi... d
,,'"
,, . ,
1l{I,.d
V,,,:
i r ., lho: e"or made in ~ ".p assuming lhe w lul,OII , .. I.. at IJ
"1/,.
Usinl! Taylf\
formula II i. ea. ,ly . hown thaI. fOf the Eulc. Melhod,
2I \I ", I, ,.' ' for lome I J € (I" I, .1l. Thus the local mOf " pruportlOllalto h'. B«au~ local c,:,"", pl1)vidu a " mplc C{Jmparison Ilf mtthods and ,I used ,n the """gn of numtr>od we d, IoCUI'. TlIe errOr d,~u,.w ," lite pn:yi;,os l'"rnll",plt is called g/,,/>III , nUT, ,n order 11> d''''"Bu"h it from loc~1 C'rcd ""Y II> inrcrpolal< " dt5",ihed in S«lion 11.6.1 ,) To gtaIlIl ~( I ). Iyp< p lot (t. y l.
7.2.2
Thc Impro\'cd Euler !\Iclhod
We as" m ,(nM"nh lhe I""semline: "ppro,mlilion. rrpl..,mg the ~Iopc V(I.) by 1M a,'c ra," of die I\\'O >IOPOi V(t,) and y'(t ,+ I)' n", yidd,
y(t .. d "
", ,)+ h
V_(~'li,V(',.d f(t" ,(1.» + f (I,. ,,1/(1,. ill
y(I,)+h -
-2
(7.3)
, , _ _ 1bI.,.......imlhon 11(1,) - y, and Iht I'r.. iou~ liu k, apl'",,,m.:IUOIIII(I,. ,) .
• +11/(1 ,.) IO ~I
J(I " I/, ) + J(I ,+l.lI, + hJ(I" y,ll - - - - 2 - ~~ - - -
" y,+h - II,
+ h i + 1(1, >;:11, + IIi)
y" , . wbae v,'
IU ,. 1/,). Oi,'. n tho initi . 1...lut rJu. Ihi. analym
lead! to .he ",c ursi ,·. formula
, '0, 1, .. ,11
l.
II.. I
'''''1', 7.1 Wf ~ n ",""dr, I'robkm (7.1) and find lUI app",..,m. t;on to y(0 .3) with /I
0.1 We obWn
,
~1+1, i,+J(t"fJ\l+ hll'o)
"
fJ\l+~'2
('U+ +1,_) ~>
I/J
'''"
lit
1.Q..l ~o&l
~,
hlu/II
l.OI9~2~
0.000033. Note thut the erro< on the IonpfO" e1>')1)))
+ 2(O,I~
OIS U21173!j,1
t D,J llJ(,'J'J)
+ 0,21;735,J)
\.044038"" U(0,3), !//(03) ~II ,0,000007 ,Weo« ilia, threrror in lh< RUDge,KullaMelhod wnll /, 1I,3 IS much Ie" !han Iho enm in !bo Eukl MetOOd. or e'en in thr Imp"""n.llinlC poin'N "i(h,he pnlhl.m, in lhi, book 1'0' .om" i"III,1 value problem' (.cf. lfC-d 10 OS "riff prohlrm,l. 1he ",1,Olh thll haH be.n "''''K'''''' 'l'I". and ,,'auld be preJ.Cnl 'f ono ,,,,,Id ",l;I,n "" Infin,t( number of d'giIS. In .dJnion. the:", 15 " ",oJ 'r>/! aror, "hlth am« """au,," Ih. '(lmpUlr, ulel • (.. e<J. Fmne numbe, or d' gits. I...,mn/l II. (r) fo~t 101111'
1.
u
"""U'''''y.
ya(lN>d ]
1M'. ,'omnWld, rn>doe. (he OUIPUI 2 , 236067tl77,199~1. " h,eh al'l'ffl~tma't$ the: tUl,,1 ~4lut ,lr) I" 12 di~'l' Ab.Tol 'I"'"itl", ab'olul. erro,. and R.1 Tol . pec,fic$ rei "IIVe ("or, Wllh the !oC1I rng< 1.-0 for AblT01 and 1.-r fur JI.1 To1 . .. he", a and r ne pOMI"'e ifl l.¥(", od.'5 (oes
99 10 IPI'rox,m.:nc 1/(1) w,th uror less \han Ulax( 10 '.I~(llllO '). W,IbouI thr~ option, M"TI-All U ~~ the .Tollnd 1_ -3 fO/i Rd Tol, The nd...d l«:hnique, lila, art Him! "",(ul for ,md)lnll diffcrtn,ial ((juahOn,
8.1
Dahl Classes
"''Cry ,-.nlbl. you define in MATLAB. as .....11 u .,'(1)' '"PU' and OUtpOJllO a command. " an "rmy of dala belonging 10 • pMticulu rlaJl. In lIois boo1 "'( Ul.t primanly fourl)l'" of dar.' flontm, poi'" numbers .• ymbolic . ' prr."on,. r. (A llIing ,. ""Iually a row , ·",, 1Or of characters,) An m·by." =~y of n,IIlIl>elow You can sec \be dos. and amy'''''' of .,'ery ,-arlahl. you ha'" dtfincd by Iypmg ..hoa ("". SOCI;OO J6). 'The s." of ""mble dcfml,,,m< 500.. n hy ..hoa i. calk
» »
."" left hand .1d8 of equation K. I.2
right hand aide of equation
Symbul1c und FloatinJ,: Point Numbers
We mon"oncd aoo.'c 1113. )'011 Can ",,,",,crt btl"'~n symbolIC numbtr! and IIooIJnl point numbers with double and.~ Jl;umbulO th.,)OU ')'pC' m. by derau] •. nOllUn. pClllll Hov.'."cr. If you mix .ymbohc and nOlI!!", l'O'nl numbt", ," an antlunthc ex~'''on. lho Hoollng p,"1 nurnbc:r!i a", aulOlIlJI,ully con'·clted 10 Iymbollc. This ~~pl3Jnl ... hy )'00 can Iypc aY"U x and Ihen x -2 .... ,Iimul ha_ing 10 coo"er1110 a symbolic "umlle,. Ir.", j. anOlheruample: » a .. 2
•
,
u
b .. a/'Y>a(l)
o
'"
MATtA II wu ik,iH"",J so Ihal wme noaung [lOInl "umbel'$ .'" ftltoml to lht,r
aY>alc) ~
aqrt IS)
I'
bell
S"''''' n 'S d,lhculi 10 predlCi "hen MATI..AO ",II pre!ltf\" e,XI' ues., 'I ., ",ulIl0: n3n1e of 11>0: '1"",lure fllll""ed by the name of lhe I,dd, wnh a pcnod in 1>o:',,"cco. Thus. 801.x " a ,'ecl", wnla,mng the;r ,'aluc$ of Ihe two ,,,IUIIM' of lh~ 1)" '0'" of etju'lions li,'cn III .olve, and 101 ... ( 1) is the first
')I'''' ..
",11
""milt, in Ih" ,'""I", 1\1".., ,.nerally. a \\,ue,,,", can cOIllam lllulllplc dala cla'W'I.
l'Of cnmrlc. one field ~;I!I 1>0:. 'lnn~ aod "'I>lIIt, can br an .m>y orllo>li"1 POint numb",,!;, or. fUIIClIOfI handle. A tield can nen l>o: '1K'II1>er mudu"" An unmplc of II mo ... (»uplc. \Iruet""' like 1111, IS gi,eo b) od •• 5 ... I>ro II~ OUlpUl IS I>sIgned to a sioglr ''3I1abl.; \Ce Seclion 8.6.1 ~Iow. Ahhou~h In th" I!oo». .... "ill u\C ~trllCtPn:~ only "hro!he) occur u MATLAB output, lOU ,-.n ddiOt, II>t min, o. 'ymoohc dass of data ('oo,,,k. tbe [un"",ngrumrle » t • ,,,All . 1'1 fIJ)
"",,,un
,'"' TIt" ... ull mOl)' ht puullng If IOU are .1pe- In Bytn. inl; at 58 In "hilt .. in!;. at 9
'" int(hlt). t)
MATtA B ~anOO\ culuate the mtegol bc:cau!.e .. ,thm a Itnn,. II. IS regarded as an uni.nO'll·n
fU",,11on II you make (he 'npul to iDt IpnOObe.l.hen MAT1.AB ~ubslilule~ the 1""'-'011' defimlion of II. hefo~ rerfOfuun, tile mleg"'''OO' » _ya8 t/ int(h{t), t)
'" 1/4't·4 8.3
More about M-liles
II 1M fil., Thel"C'~ twO kind, of M-lllc, h ks C()nlUlIlIllW ~lATI.AI:I ~a(c",.nt' are ca ot rod~ 0011"'1. and ~cripl ",-filn. wh'''h M ·filn "h1Ch :>CC'l 1m.. In ... fUna".l>le~ "nh lhe SlIfIlC na ..... in )'oor "orklpxe.)
8.4
Matrices
..... R nd ro/U,M .-celon; ",hiel>"~ d,~usw.J A "'illm IS a rcelangular aml) 0 r ""m""B. f1W a . . In ScCliOO 3. 4. af1' nnmpl~s of malnn:s Co.mdrr lho 3 x 1 matn>
A
",til
,
3
,
7
to II
:)
"
It can he ~ntc.-.:d In MATLAB !he ronlllund ~~ ,. • 11.1,3, " 5,5.7,81 ,,10,11,13 )
'" ,
,
,
,
, 3
•
9 10 11 12 NOI~ (hall"" ",MO' ,I,m.mt in any row nil' ~paralcd by ~Onllll~$. and tl>c row. arc .>
.
. i •• CAI
•• ,
=
",e,
If hH) m~lnc ... A and 8 tho W1lI: the" sum ,s o/Ita"",d by 1)1''"' A • 8 You can ~1j.(l3dd a ",alar (a single number) to a ",atri.; A"" Ooddl C \0 ..""h .. Jerrent I.,I.. .. ";"",A _ B rcpre..,nl\lh.,hffcrenccofAandB,nndA - c~ubtnlCl'lhcnunlberc fmm ,-fll. myeu 1er . m 10 ,,,,hal,,e the output ' ·CClOll.
>""
8 ...1.)
"..,.1
Sui t ing Linl,':l r Systems
SUPI"'''' A " 8 nonlingular 'l x '1 maIn. and b " a column "eclO' of length n. Then t)'P'"1I x • A\b nume,ically romputn Ih. "nuluo .01""0" In A"x • b '1')'fIC halp .. ldivida for mo..... inf"",,""on.
8j Gr;ph'ci
r"
If e,ihcr I\. Or b ,I ~ymbohl rathc:. than n . •• • . nmo'le. u",n x • I\. \ b rom ."• to I\. x • b symbohcally. Tonkulll. Ilymbolic I PUle! U", wlU11Ol1 type x • _)'11 II\.) \ b .., ut,on "'Mn both inputsare numofi""', To g. , symbohcally eakul ... d .,gen»>,rs.l~pe
8.S
0
(U, RJ • • ilJ(eYJI(AJ I
Gn.plties
In &CUon 3.8 "C dl5<us~d the plomng commands e"plot. plot, .nd " .... tou ... '" " 'cll 3 \ lhe ""SIC rommands f'" ""JuJ;ung and labt-hng ll1e .u.1 of I srapll. no...: com· m~lId ,. olong wnh qui v ...... h,ch "c introduced III Chart .. 6 to plOl dU'NlIon fieldl. ""' IIIe maIn g!llpillci comnW>ds lOU ,.,111 n«d for thil t'IllIf$t. In this ~tion """"ribc ad"'lion~1 cotllmand. for m.nlpul"108 smph"l. In many C3KS. we ,,"Knlle how 10 do lhlJ boIh fro", ,he MATLA8 prom.,. and WIth the mOllSh appean In a new" Indo\!. labe~d "Figur-.: I" Suil6eq""n l smphic; comn\lln "nahIM. u ..,,& the F,gure I'alene hrs • •decl the: Lype of annOln·
oox.
lion yoo ""anI. then click the: spot on the gl1lph you " 'nnl II to aJll>Car. For 3 texl type .he , • • 1 ""xt. "h,le for M alfOW, click agam 10 mr b'ghlllhlcd, mal..~ .un: 11K .dll (arrow) lCOO ,n lhe hgun: Toolbu i. bighllghted, and if not tMn eli,'1.. on this iron firM. 'OKn click on the r'Q"ll.b In the Propcny Ed,tlJlIO t hanlle Ihc fo nt Often a font thai i-l largct than lhe defu"llnnpro"cspnntcd ootP"I. You CD n al", chnnge Ih. fOOl of a t.~t annolation you h''''j) added by right·cllcking On It ,,"d " ' lng the [KIIl·up onen u, or hy ~ I ccti"g It ami using tile I'rope, ty l!d,tor. To .re .n of lhe o"D,lohle way. to modify. curyC or other 01*£, in Ihe graph, the UC', ur the cnt",. hIU'. Window, ~lccl'lx: ooJCct you want 10 modify and click In-lp«lor in Ihc Prope n y Ed,tor, (I f tl>< Propeny Ed,tor is not open al",ady, lighl·clid on the objecl Dnd IcI.ct I'roli'frll es .... ) 10 !.rlcclt"" figure w,ndow 1I.,.,1f. did; 'n the: border OIItside the AnO\h(r ""ay to <e. and dl.nl Of yOll Can specify a "~Clor of I .alues. III whIch case MATlAR outputs the oumeneol ~lu1ion.1 Ihc I v.llle$ you chose. Anolher app0 ""th lhe cort\mand~ bvll' g (whkh We w;]I usc In nu~r 101(1 wi,. boond:uy ,alIIy typil\& the foil"",,", command" u
u
9 _ tHt , y ) y . All It. y) _ od.4 5 (g ,
( 0 1 1. -2,1) /
W.. rnin!l: F.o11ure .. t t 4.999847e-00l Unable to meet integr .. tion tolerances without reducing the step size below the smallest value allowed (8.881784e-016) at time t. > In ode45 at 355 » pIot l t, y ) u
&>Ih(I O 1 -5 20 ) )
8,6, ,..,,, run's "r MA1'L A O's Nmllfnr~1 ODE Sokers
'"
(NOIlce .ha. e' en lhough .I>c: ligh. ~Ide of .1>c: d'ff~n:n',al cquahoo " • func!lon of V only, " c "D ,'r IH"dc II D func.ion of ""0 "ariablel. as aden r10' mull'l'bcaHOII. you should ,,,,llIdt: tilt ptriod be· fon: ll1c:..e lhn.., operlloos. In 1110>1 caws you !Ivy mdudt !be ptriod .,-cn .. lito it I. ru')I necr~'ary, lIov...,wr. )'00 !oIlould 001 includr!~ ptriod in inJlll! to JymboI ie ~011""and5,
2, USUIS 11K: wrong cia., of iOJlll! to. oommand, MOl! of !he commands lIy ,,'cllto Simu itnk.
9.1
Constructing und RUllning a Simulink Model
We will ,liu1... (r lour model .... m. lI>ppc:nslo br. Orr« your "mulalloo door, ru n succes,fully, 11 may appear rhalll(llhing 11>, II>ppcnc:d, Th"" nOl ",aUy.he ca",. l'Ilrone tlll n~, 1111 hkely Ihal one or ~ new ,.nables. C"'3IM hy Ibr ~imu!nllon. Will ~how up In you. Wo.~space, I'oruample. ""brn you run Ihe model or " ig,'re 9.4 W,lh 0 < I < 2, )'OU "'In foee U "3.iable call ed tout 'n lhe Work$pacc. an array of ~i'e Il19 x I. Thi' i. a ,'etlor of tl'" values of I wl""e the (al'1'ro~ U\\nle) ""Iulion y h.1 hren compu1ed. III Ihl~ n urnple. you """"Id nlw gel . " am' ng nlCs\.IIlIo "Sol".r Step si,.c II hreonunl I~IJ lhan ~I"'dfied nllnl","m ' lep si(.,"lhal !l\oOtce: of num.rical soh •• and u ~ one of MATLAO's (>!hr , SO.... B Instead.) U"ng the Tu Work\p;toCe bioel , .... e Can 00\\ romp.>rC the model> In h gure 94 and Figu", 9.6 . Runnmg Ihe model In I' igu", 96 aglllll g"'es an error me:"""ge on lhe Simu lation l),al OO\IIC' .... ,noJoo,o•• th .. 11 m" sa)'ml: ''Tl'Qtlb]. solvmg algebr.uc loop conlaining '"eeond e x /M4th Function' . t lime: 1.8. Stopptng simulalion n,.,,,, m.y be a sinllulanly In Ih. solulIon," W. alw ge l a .... ;un lng me:ssage In lhe Conunand W' ndow. sa)'mg: " Wllflllng: 'The model • ..,('condcx' does nOI have cCnllnuouS Slates, he nce USlnll the soln. 'V",r i "bleStepDi screte' mltead of t"" soh •• ' o de4 5 • spn:ified In the Configurat ion l'ar.IITJmul c " d,ff~n:"1 soh 'cr for oddS Thi rdly. Iher~ il 1M problem tl\llt the \.lI uue root funct ion is not dlffell' nhable: al 0 and not defined 10 lhe left of 0 And finally. the", i5 Ille ISSue ..... e alll';wJy dl>cuued. name:ly that nume:ncal diffe ", nt;nuon i\ more un.table Ihan numerical integrnllon. In spite of nit these problcm~. the simulation "ill ''worh''_t.... pi~ture Ofle 1«1 In lhe Scope IS shown in h 8urc 9. 10. and ... 1}' ",uc.'b "' semble~ I~gure 9. 8.
od.,
od.'
1~8~Jl:
9, 10 Scope Oulput for Ille Second Model
If " f outpul t"" Tt'~ult of t"" >«ood modd 10 the Worhpace as .... e did with Ihe filll rnodel. .... can now eomp.;!re the ffSUIt!.. T"" final "'lulu are IDown In Figure 9. ] I TIle computed poi nt5 from Ihe rlfst mode l are shown ... nh dIamonds; those from the second model are 500"" Wllh Circ les, NOie thai tho: 1..... 0 solutions are a lll105t idenlical ou l to I
9.2. Om/,ull ~ \\'orbpacc "lid /lOll' Sunu/ml llI:.>fh
'"
I .t>. 001 II",,, L . I~y nart 10 di,.., ... The ~u,el IoOluIJon, "u>< tqUlllon. as rompllial with (I.olv 'h ,•• model. • . I ~ shown ",Ih . wild I",.,• and b.blCall, tOl~'-'.~""" w, u", muh. of tile
fi""
"
,
"I
• " "
• • " •
I
.. "
,
" " ".,
..
!
, ,, '
.,/ "
"
,
fill'''' 9. II Cllffi/'Wlhg T"ll Modtls
~;I( . .... I!il) 9.2 Build a Sim ull nk IllOdtI 10 11udy ll1e IlOII hncar /l ulonomou~) initial , ,.I\If
problem IJ(O)
O.
('I. I)
and 10 oulplll the "ppro~im31C rotUl ion 10 1M Worhpac~ Compare your ,..,ullS with tlle UKI roluliQll as cumrulcd by (leol ve Conflnn lhal ll approad"'J i as l i:ol5 1~.
Chapter 10 Solving and Analyzing Second Order Linear Equations Nt" l"n'~ \.CCond law of dynarmes-force Ii ''1 ...1'0 DUll 'Hnes ItteIcr1lKln_II, p/I).itim thaI. In ordrr to undenlalld how 1M ", .... ld 1f11Jfb, llley mu
110M. The mo.1 basic second order differen t,al rqu8110ni ar. liMO< .~u.tiO!lS ""ilh ( Mlanl e'''ff,dNlIJ: a';' + by' + ry g(I).
Th...e «I"ahons mod.! a ,,-ide ''lIntly of ph)'.;".' ~11U'bOOI. ,,,,,loolng OSCIllations of ~pon8§. ~Imp'" dectll graph e!loogh soIul;o;>nS 10 gtlln id • • of lhe:n gmeral brII3vlOr, .... mu~t conM!UCI a tWramrler family of lOlulioru. Sin« thl' mittll does not del.nn' .... thl' mlllal ,lope, " C cannot dnt .. a d''''''''!ion fidd fOf a.l«Ond or
A,
(106)
,,'he 'e Ihe ti r~1 in" ,"1 cOlld"ion is the firM bOll ndary condnion. lI1d in tho II«ODd imiW COIllil hon, the slop
I
S('cond l>oundM)' condlllon In (II},') OJ 5allSfi~, TO"anlllll, end, the following fUllellOn
M ·flkisusdul. fUDc~loD r • trial(l) % find. ylll giv«D that y CO) .0, y'IO) • • "be2 • _It,y) [yUt/ _t " 2·Y(2) - y ( l J)1 Ite yel • o.sd5(rhl2 , (011. (0 _]1, r • y.(en4, I), We Il0l. lila. fOi certam sImple naml'ks (10.6) can be 5Oh~ symbohcally ,."h dlcl v. If tile resuilm, 5OIuhon ,5 deOOled by 1/(1. 5), Ihon , can be
found hy wlv, ng 11(1,.)
I ""II hero or IOlv.
A .. llhe con'lanl ,""elm (1 0 I ). The rode Ihal folio",! shows how '0 lllot np4c 10 find and plO! ,iI< ("umcneal) !.01. IIon, whIch is ~how'n In rl/lure 10.3. NOlO w .1ht boundary conllniool II. m~ned In 1ht fonn of a fUnf;.iQn beond of ya and yb. 1ht '-aluc, of y I~; vI ., 1ht "'0 boundary pomls. TIle !.Oh.r ~"IIS ""Ill the mlllal glleU and lools roo- a nearby wl.tion of lhe dlfferenlial C~ yy - daval(bva ol, ttl, » plot(tt,Yr(l,,))
" "
."
...." ." "''"
....
"" .
,,,
..
10.2
Sccnnd Order
10 11'. !hough!1It 11' krm is Illl,ung in (107)), lhal !ell. us how to hnk up the blocks lie .. \I e U!oN' Polynomial hndian block 10 cOfl'pule I + , l from / in, .ingle , Iep; Ihrn we muillply Ih" b)' V In tilt Product bl(IC l and Ihc"n l11uluply by I m I"" Gam block 101-tnAII
.
(IU)
.,
1'llIure IO_S, s",opc Output wIth lhe SQlulion 10 (10.7)
1
-(1: t ») (?' u
'(' ') (' ')
(10.9)
(1+1)00+\0
Thi l5uuem conllrocling lht mood !bown in Hg .. '" 10.6. This nlOlk\ use; "eCUIllht n:Jalloo bel ..'«n IhI: a ros of 1.... 0 linu d y ,"d~ptndtnl w luhOm of I StCOOd onl inlc,,·al} bil ll1JlllllClll rrnphes Ihn! 00 (0 , "" j. 1M ,.eros of 110 10) I,'2llnot t>r farthrr l pM1 l1w1
.i.
n'"
CII.apr~r JO "',."••, 'OM' A••"""., J"'~
.. s
In ",,!ticu1a., 501ullOnf of (10.10) musl OKinnie D' .r • 'Xl. though the osdllalioo~ may b(comc Ius fre'l"""1 a.;r incrra ... ~. I" ......:d. by tumms 11K aoo-'c comp:1f"on ","",lnd. one conc:lu~. lh:ot tho lA:fI.K of solulloo~ of (10 ]0) in nlU~1 be at lea,( ~ V J,. apan
1"-, --..)
F'l ure 10.8.00..) '''0 rcP"'scnWI"~ .... UIlOO. of (10.101 comp.Md "nil ".01... A. yOll can the graph coofinm Ihr prrru,llOl1' of tbr I"'~~'ou, parlIlrap/l
=.
~
\
Thr Siunn ('o'"P''''''''' 111N11cm can al", be u...-d 10 ~l"d)' the: 1.1:10. of 501ul 10111 10 "nY'1 ~ua!ion 31101 10 Il. s~r, cq"'lIIon. In th. 1.lIer ~a"". a ., ubsl\!UI"}II IS made 10 ellmi. n~l~ lhe V' lentl
10,3, 1 Th ... Illll'rhu:1nl: or Zl'ros \'011 "'")' ha,'. '1OIIcscd on .be Wronsl o.an I.e. ~,(r) and Vllr) IIhow, that \I' (z) doo:s
11'(6)
1I;(b)Ul{b).
S;IICC' 'I, 0 nnd u'{bl < O. (1'1011(:t "C plot z from -,,/2 10 '" 12; \lu' I; the range of ,'alues lale" 00 by 1M arctan funcuon You !Ny ,,0IIIiM" ... I!.)I h3ppr"s If : g(lr\ off 1M OOIlom of 1M gnph ...," tf '5 thaI ''vI "'P< around·' 10 1M lop of the g"'pI> RC()l lUll" •• ea\ 'ly il "helher the amphtUtJoo' of(10.15) 10 IK"ha-'c hke I phy';ul oKi!!.I", ""h dampm8_ lhe amphtude of ",dll.llons should (\ccrease as X increa§cS. Sm". Ih. dampmg coeffic l.nt Koel ,I> l.rn as X inc, •• ", •• we c.nnOl be IUfC (wilho" , • mnre reflntd anal)'~'ll whew. the amplitude of wluhOOI of (10. 1~) mUll dc:cK,"", 10 uro_
bee,,,,,,
."1"""
os, ,r'p''''''7/'''''' 'I" ,/ .,""" ' '' '''''''''n' ",. ' I' c" ('111'11"" III, ' . ') """11' ,,, . I '1""""'''''_ ." I".''' ' ;:, ': ,,,,,,",,,,,,,:,1'111111",, ' U " , , , , , , , , , , .' I IIIIIJI!! I ·llffUII," ",,:.' '//III1t"" 'I!II I f I I " / I !I " " i / I I / I I I " 111/1' , I ' " ' ' 1/ I 1111/1 i I I I I! /I" I i I I I " 'I
i'l
Iff' ",,,,,"",.' 1/:'
IIUI'"I/1I1/111 /""!II/II'"II 111"'11111/1/ ""'1111111111
.'I",11I11f1l1l11
'''"11'';
""1
"""'11"'11" 11111
"'"11
\"""""11111
1 '''''"/1111/1 \ ''''''f/lfllill
""'111111111/ \ '''''"1111/1/1
• /1111/11111111/
\:./111/1""" ,/
1IIIIIIfllllili \"""'tII11",1
., ..
...
I'" " " , l f I / I / ' P\ ,1I1f111111111,1
"t U I" l i l l I /J lJ' , i l l / l.lilHl1l1UJ
h ,lure 10.11: DiR'Cuon F,eld of "
00fI1 .
+ ~ 5in ' cos: +sin' •
In (ace Ie doe" as you can chcd by plOilln, the DCJ)t1 fUnc'lon~ ~..e1:1 (0. _) and bII ••• lytO , > can be u§cd 10 ~ludy solutions of diffcrent,,1 tqalIlOllS, e'~n .... hon ...., cannot fir>d an e..tl fonnula soIutlun. Of CQU~. fonnul. ~U1KlflS are n,,,,,,,dy ,,,],,,,bl •. and IliIIY tcclu"QUC5 fOf findIng them. For >nilance, (pon.cnllal 'UMUlution, ... hie" lead, to loOIutlOnS of an wIJar)' con,WI! cOltffiOCll1 homogCl\fflU1 equatIOn.
• 11lC method of ~dOlCI''''' 0/ tmJn. "hoch produces ~ secOlld lj ...",]y in&:pon&:nt solulnJn of a homogeneous "'luallon .. hen one wlullon " alrtady known.
• The nlC lhod of ""dnermi",d rl"fjici,ms, "hieh $01"" 'pe1\1, D",dmg bY.l 1 )'w:ld. lite ~uallOO
, c ,"
0,
.... ,,(s) b,''-'"'' 'l{z) r/r', Both plz) and q(rJ ~ smgula. at r 0 Such ;>0111' " "n~III.v1!1'" "hoeK 11K' I'ogul.my of P ,\ D(> ....(If'" Ih.n I r and the IlOg"]3"'Y of q" no '''''''' ,h... i/r',.~ .... I~ rrR"/'" ""RIII.. , 11(l1li" MO«" prK.",ly, ".., .... y ,h.l . fUrlChon I(r) ha, a p!.Cd on Ih,s nampk as • l"otOl)p!'. W. suppoSdcpendeOi wlotlOfl y(r).
Enrdse II . t Compule two ~ lenni m ueh of lhe namplcs pru.cnrrd in IIIIHhlpk'" II IS Importanr 10 OOIe IIIlt fOf «jUaironl w,1II ••,ulu IlRlulu pOUlts. ill< frobtmo\ 5 O. Illen 1110: illll"'Ol"" i",eg",1 defining the Laplace Trnnsform « m•• rge5 for w > II. and lherefore £(I}($) is defined.' I.'~l for 6 > II. (We §lIY thai a fonelion ., pirendS' cOfI /01", o u1 if il only has • dlS.erele .. I of jomp diSOUS and an l hle) plu! a tr.loslahon (by · 1(0»). K'OlIIrk 12.1 If you ~now .cU')(.) and /(0). you can I>dd lhem and di.ide by ~ 10 00. """ C(f)(.). TIll s procedo re is . n. logOilS 10 solVIng a nl$l ortler iOl l' al value JllOO1eOl by Integrallon YOII n.. y ha"e noticed in ehaplc. 9 lhatl .... icon for an Inl.g(1lIOl block m Slmuhn~ ,onlam~ lilt " P""SIlOU 1/ •. IJecIUJ;e many enll'''''c" and ~ lcnh~IS UJ;e the LaplKf Tf1IIIsform,o . naly.., dl ffc.rnllal «iuallons. Slmuhnk usc.. "dwi51on by $ " . , the IIlntIfIOIlIC for Inl'V"llon
11, I /Jlfferentlal CquaUOIli and 1."I'1~ T/'aII~{"""1
'"
Applymg lhe rOJm~la In (12,1) rept3\Wl) yJ(lds.1Io follooo Iftl ~lI'c.n. dell : ; : : .l~braic· fi nd F(.) Ihlll ma}.es fOlm of lhe differenl,al Cllu,II00. rhls ."rob~~~~ l.a lac~\"'nlforml fOl a while 10 dc,·clop 1'(.) ha,·c a oIcSlfcd fonn. 0 .... mU>! "OI ~ ) . _ ' II.. trrh' 'Ior of lbe solution y(l), "_. I I IIon'( .... deml l .... S an 1",dCrMRndmll 01 ,~,..' Ill' on
'"
Hut tp. .. "g dc.... 1oped IhH \(0", many (n,nlttl'S and Kient;l!\ lind II helpful!" thInk III lel1l\! of \hi.' ..... pla« Tnmform of a d,fTe~nu.1 t<Ju~uoo WI moxIrlJ • \y~lem "'Ihrr than lh",k. dlltttly 0\'1(",11 !he d,ffe ... ntoal t<juahon. Wh,,," the: fqU3UOOI .... coo"der In tillS tlldl hphc. and napla". lifo part or 1M Symbolic Malh Toollxu, "h"h I, "e ha,.o mo,·etOIOI,..,otht,r, In . ~f lhe ttI""lion and thc ,00u.. y(MI The ollly lhings you ""ed 10 change DIe the dr Inlllon 0 $u\»li1U!c
for the intllal coo
formula 10 lhe I.fl of cj.
In olher ,,,,,01\, .1 .:trh nl". of c ....." Itched 00 the d,ff.,..,,,,. 1I90
Tht fur..:llon .l(1 c) is wmohmesdcnolfii,sd tl · In MATLA U's Symbolic Math Toolbox, the ,("1 the interval 1- I . I I· We cOtmder nOW the l..tpl Ke Transforms I)f u,( I) antl6,(I), Smcc tile l..aplacc Tl1Ils' fot'" of a function (i(l"'nds onl y On liS ,'aluc:s for I ~ 0, Yo " con~ldcr only the case whcn c 2: 0 IOlhrfWise lhe;e functions are ju . , I and O. fC'Il«".-dy. for I 2: 0). 1bcn fOf~ > O .
•
Stnclly . pu)"o •• 'KinK the Laplace Transfonn of 6,{1l rcqU,,'CS llw: theory of general-
.00...,.
'~M functio n! . .. k~h .. e a11udod 10 lIere ,. a rou&h rxpl~tIlIuon Firs!. "'C think of 6,(1) a~' limn of """" fiJ~ fUI\CliOllI. lbc easlcsl way 10 do lh,~ IS 10 ul.e step fUrlClionl. W. nn wnlc a funtuon o(101al ,ne' vall . COOIC( nlnillCd on the m\.....'ll! [e t, C+ c], as
,2t
(II,
,(/ )
"'h(1})
,
2!: (..{I
c+ t )
,(.
c . e)).
Thu . in . CC"rt •• n ~n~. ~,
(I)
Hili
~ (u(1 . C+€)· U(I
• 4"' 2c
,
, ))
u'(1
'i
u~(t).
The wit ( 12 1) fOf lhe Lopillte Tranlform Ilf n d~ ri ""H.e ClfI be JU; lified in lbe case m al the de",'am e il a ,e l,rrlll"ed funclion, "" fOf C ;> O.
,-"
-
Enld~
1204 ""n fy thll hphc. com-tll y compules tho: I..apllte T lUIsfonns of tho: fu nctlOfll b ...dai4.(t - 2 1111od 4ir.c(t - 31
12.3
Differential Equations with Iliscontiullous Forcing
Conlid~ r IlII inhnl1log~nwus, iC'CQIId order linear .qul lio n Wllh CQnII. nl """, m ciont! :
a~" (I } + by'( I } + rll(t)
g(l).
The ~unclinn g(l } I. cal led lhe fn""ng funclio n Ilf lho dirr.",nl,al equ31ioo, becau", in many phy"cal mode l. g(l) comspoods 10 the ;nAuence of an ul~ In;l1 fon:e, If g(t } ;1 pie«wise ('OI\l,nuoulOJ m,'ol\"J the: della funclion.lhc:n we can solye the eq uallon by lhe mtlhod of !..aplite Trnn. forms
J2..1.
DJff~n.·,,/jal
I-.ijualJOm ,,,Ib D,}COOr,noous/'orrmg
Exam,"~ 12.2 Comi ... , lhe inlr,,1
."
'-aluc I'fobkm
~"(I) + 3y(l)+ ~(I )
g(I).
~(O)
I.
yeO)
••
whe,e
O. g(l)
•• O.
.
,(r~ lteqn .. 1.pl .... (.qn, t , .),
»n.oq.qn . . . ub.(lt.qn. (·l.plac:.(y(t),t •• )', ••• 'y(O)'. 'D(y)(O)')' ('I, 1. 1»),
» ~~
ytran. . . .Dlve( D.M ....'. 'I), y .. 11.pl.c:.fytr..... , " t)
(Smce rhe fonnu)a for lhe rqu.arioo ",'as (00 100, to typo on one: line. " .• u!o 192 ,\ bour> I. s ,""" the footS of Ihe ,h"''''''t.ri~lic potynonnal 31C (omple . "'th negati" c , e.1 pm!. the ""luII(Ift decays to 0 in an mcillllO.y man ...,
.,
.. ..
I
•
. .
I
..
.
,
" . ,,, ' ' ' ' , . •
hgu,~ 124, 5011l11(1ft of an E(I""1ion "'Ih an Impul$C
Chapter 13 Higher Order Equations and Systems of First Order Equations ro. ...
Firl.t and sI '8al. !.OIUUOll,.
Hqual,oo, or hlgber oro.r. and systems of fiB! ",dr. «I"'lJOOl. aho arise nJlunlly Foe nample, third order cqualJOns rome up in 8u,d d}nlmlcs: fourth ordtr n"drnnH Inal wh,' rofl ' r" and f'. Bl ln Ihe ,'>(Cond order cue, lnere il a di mcuh y e" e n f(lr Ihc\~ "'I,rallon< ir " " large. ! iore il i, dimcu lt 10 compule lhe roofS or Ih" c har.ICle ril lic pol) oomlal \\'c can. tro.o. ,,'·cr. Y'oC MATLAll tu find good "ppC:e
J .U'. Sy5l~ms of Fi-.I Orrkr /Jq~~IIoo!
13.2 Systems or First Order R(llllltiolls ('on~ ider the senernl 5)'~t~m of fin! Ofdn "'!uallOfIl •
.I,
F, {I. z J, Zl,
,z~)
zl
f 1(t, z " Zl,
",Z~) (I).J)
z~
F.. {I,ZI,XI"
.. z~).
Such ! Yile"1S an~ In the ~llIIly of ~pnng_maB IY~~11I1 " 1111 nWI and OIhe I Y ~np lIId nw. .., In man)' r 3J111'cal,ons. SyM. ms nf fiDI ordtr rquahon, al!.!> ame ,n the Iud I"gho:r order rqu~ I' l}fIs . A singlc h' gher orI • >I _ lOy, Dy • ->I, >1(0) • a, y eO] • b', ~~ lx, y) • ".olv.U'tP, ' t'), ~~
xf • elt, . , b) .v.Il v.c:torln hc))1 ~~ y f • 111ft, a, b] .v.Ilv.c:to rhaIY))1 The funclions >If and yf can be e •.,,' uted fOI • particular choire of ,nitlal COItdltiolll
x{O)
0,11(0)
b, atap#rucul..-,."Iueofl. Ne~t " 'e rlOl a p/Ia>e po
xlabel 'x'
n
ylabel 'y'
'"
.
.,
...
"
yf (t •
>II
"
151)
We cooo;e a rectangular ,rid of 25 'nIllal cOIKllUonS. wllh a mog"'g from 2 to 2 and Ii rung''', from 2 '02 (m Imcg.:r Increments). We leI t ranlJIr nd the qua lil'I"~ tileOf)' of I WlfIornous doff.,,"li.1 eQual,ons from smile e<juali01ls to systems of lW1) equallOf\\ Thus we ron"dr • • ,Yiltm 01 tf>c, fOfTl\
{~ We Issume thil lbe (uIII'llOns
(14. 1)
F and G h, ,-c ronUnUOll. lWI,al dtn>o,,,'u
~"I'y'IIh< ..
In
lhe pl:lllC, and lhal \hc cntical pomll--lhe common uro. of F and G-= isoblo:d We ~II()W from the fundamental ni SI.nee and "nill"t lle!> thtr i. covrrnl by the (Imlly of traJ~t~; the pial of Ihue Cline'" Ihe,wu' fKK1ro,r o((l4 I). . A< we ~ I\OW. "'. can find eArhcn (onnul. Wlul,on! r(t). v(t) only (Of mnpir 1)lttmJ Thus are fon:ed to lurn 10 qu.htlu, •• nd 8UJll(ricil "",t/Iodl. It i, our pUl]lCM hr .. 10 dlng behaviors of wluuon curves is b.1sc:d on tbe Poincad- Bcndluon Tbrottm fTheoo:m 97.3 on Boyce &r: DiPrima), "Iuc h IS \01l1d for aulooomous s ys,clTt! of ,,,'u equatIon. Systems of th""e or mo"" equaliooHan hi ... m"",h mon: complicated limitina beha"ior, 1'0< .,ampic. solution curves can remaon bounded and yet fail to approach any equilihrium OJ prriodic ,'a' e., / -. 00. Th" phenomenon. called "chIlO'" by ma,bema,, _ ciani, WI ' anlJCip.1.led by POillCart (and pel'haps .,·en carher hy the physicist Maxwell), bul mo" .. ienbl ll did "ot "pp"'CiDle how widespread ~haos i. unlll the arrival of compulers. Therc are IWO q"~litnt,,'e methods for nnalY/,ing ~yMcmJ of equation.: on. based on lhc idoa of. \'r('l"r firid: and ,he other Ixls..d OIl IitlfMI !"/ j/"bi/i/y mla/y,i•. The laller method i~ treal.d in de,ai! in most differential equuliOlI"C~IS : il provides information about lhc liability of crilical point! of a nonlinear sYI'em by 51udying associated linear Iystcm!l. In this ,nl " wo ha"e lhc diff.""nIJaI equallOOl
{ r (t)
F (;t(t), y (1))
I1(t) G(z(t ), y(t)), If "'0 eillploy l"«tQl' notation x{ t )
[ ) zIt )
~(t)
f Ix}
then lhc 1)'lttlll tl wnUon as
"
r ( x ).
[
P Ix ) G (x )
),
M~', lbe \'eC' ~lc poIlU> (bin DOl on "'" uul tend .....r from tbem. &lid !boot 0Wtt!li nrll !he POlOt (O 5.0.5) 'eod '!}\'Iud,~ l'unherroort, tho ,ettof field r;au,gl) muesu thl ' n~ry -oluUOll CUI"I~ 'lartJng m the filll qUidrant (but no! ""tho I,I,Q) InIIU 1O'O.ro (0. ~). II 5). 1I~1>tt (0.5. 0.5). "'hieh ODrTelpor> >Ur\IJI1 _ the fu\!1 .. O cnlKaI poont. ~nd t .. ~y from Ihtm ... hr~&I 100lulHltI cur>CI .Wbn, K;U Ihc laner ~Dd lCI\Ooud 11_ Funhu".... c.1hI: .eIll """p"'d IpunuwO) 0"" :oI~ OQ jNrtF1fl'1 '"'in 0"'11 I''''' pYI!WWO) orn; '41 'lulsn liIlJ 'lIOJl»UilllI! JO ....pI
s;mlu~
"'11 puu MON
("~Iu'od
UOI1J;>SJ.,UI "'!lIP pUll 'II J>(IJO II! '.....,
SnolHl, 8ulsn 'SIOld reJM:K ''1I'1Il 01 "'.1/ A1QeqoJd U..... 00.\ I!IIH) 'I: nJalll! ..... . ">111 SJUJI\ ,(U'IIW MOll WIUU,,:>p pliO ' qdu8 >wv< :>111110
,t
pII'I
~ 1IIO\l3IIIII-rl1IU
ltttWLS6 )0 uottnUOPlJ .... '" IIqI PIIH -'l ILl - ,I'J + ullJlJ
puI
~'I"lK.' ~to'IlIl(1
'U1Ul0,oo,) ooLlsuln'"
HV1.LVIV 41/,,,;>;m"'-ld If I"S" w./qo.!d
lJCIIXJ
(,) l' ./1+ ,,'doz.
"
1'0. !hi' n .•
"
m~l •. II", compo,. !he ""meri",,] ,,,I ... of !he
in'.,ra] 9.
U~
.oly.to .01'-0 the "'I.ohOn
r' 3.' +.+1
0
fA I)
Ii".
FInd lh. numerical values Qf,h. roo... P1011he ,"'ph of lilt 5th ""Ih lh. ("""h., 'he graph loud",. ,he r-n.;. only twice. To , .. rify thi., yoo\hould melude the .c-•• ;, in your ,"'ph ond 'IIi"1IOn fu",,,oo
~(I)
,n MATL\O. """ then
delennme ," bel»>ior u , "f'I"Wthe~ 0 from !he righl """ U f boromts ~. 1'1I,~ ean be done: by ploUlnl!he ",",UIIOll 001 .me,,·.I •• IKh .. O.~ ~ f ~ 5 and O,2~f~20.
(bl Chinle the ,n,"al cond"'"" 10 1/(2) 3 Delerm,ne!he beh"'ior of thl< wlu· 1100. Iga,n by ploillng On ,nfe,,·.I\ loch a.,1M»e men llo ... d ,n part (I). fe} bnd Ugeneml wlulion of fhe d,ffo","".1 equ01ion by wll ing
III'
+ 3y
1/(2)
51',
c,
Now find lhr 501u1l00, COfTu"""..hng 10 the ,"".. I C$ of C correspond ' 0 whKh ","ha,..,..,. ~ Now. bosN 00 ,h,~ problem. and lbc INtmal ,n Chapters 5 and 6. dlKIIU.haI . ff«t , mall challV' in m,hal lbla can ha,·. "" ,he , Iabal bth.av,or of $O\utwD
,un'"
5. C"", id.. tl\( d,ff.... n'ia!.qualion
(~f Problem 7. Sec, ion 2.2
d~
I
(il
y+ ••
e'
in 1:I0~cc liz. Di l'l'imll)
u
(I) Sol,'. II
"
(hi U!.e contou r !O Jtt who, the WM,f)R cu,,-., Look Iol •. For yoo. t and r ""'~ ••. yoo nup, use -11 0 . 05, ) and -1, 0 • 05 ,~ PI ... JO contours. (~,
1'101 tile Wl."on Iolui,fyinK \be tOlII~1 cond,~on U( L.5)
0.5.
rd) To fmd a numtri01"1"'" il ,I .a.i.r 10 work "'ilh an ,mpl"" (onn; W Ior~ are ,n>lI\l
'~;:'::=~
•
_
1M
ini~;al , uoo,lIoo ~{O $)
].
• fm ,.. ~,,""'" ~{I l (ron, pm C~l a' • panjcul~r nl""
plltalM ,.,Jue / iolO 1M tqoallin& diffe...,.,,,1 equau .... , or inItial ",.I", pcobltms from Boyet &. DiPrima. S~ Probl.m 9 for .ddmOllal inlln>Cl;on. (.lIV+U'~
",",1/(-1)
0
(SccI.2I.Prob 19),
(f;)
II' + (I/I)V 'II 11/(4
(0
Ib)
(e) 1/'
3.,....21. I > 0 11)/3, 1/(0)
1>+tY+lI~
(f) ly'+11/
"I
~"
(SccI2.], Prob. 4(1), I
> 0 I$«t 22. Prob 21). ISccI.2.6.Prob,IO).
ISecl 22, hob 31).
'y,y{l)
0
(Ch2,M,,,,.nanwulProbltm.,Prob.6)
11. Chapter 6 dc""ibcs how 10 plot the dll'tction fi.ld for a r.r>1 ookr d,fferrnlial oqualiOn For each .q~l(on below. plot the dln'Clion field On a ,.CWlil. lalli' tI,oo&l> (bul 001100 1al1e) to show durly ~II of in cqu,hbnum poml>. Find !he ¢ 0 .( 11) ... O.ani)c < O.
>. Ilelps 10 COnl,,"r ,h= ~panilc
"
''I 'oJ
(B.2)
with the imhal COOd,liQn 1/(0) ,r fal 110\11' many ""Iuuon, doc. MATIAB
K"-~'
Do!hey all >au,fy Lhc iltiual roadi!lOR? Why 0:10 you think \hat MATLAflli'C' mulbple _" .... ?
(b) Wlut h.1l'P"n~ if you ,ubstilu~ ~ 0 in !he ",Jillion to 11'12)1 What ~n' If yOllt.,lead take the limit of !he ""'ullon •• ~ 01 Do)OO ind«:d i.tlhe fOlTtcl ",IUlion of Ihe ~u.tion for !hi, calC" 4
(e) Plollllesolu!lOllItO(B.2)forc5, the 'mll~l ...l ... problem ,~bl.1
1,
16 Con"d., the crilicallhresllold model for popul>lion JIO"Ih
y(2
~)II
(0) bod 111< equlhbrium ",,11I1iOll$ of the ddT.",nti.) eqUlion. Now ""'W the diJ«lion fiold. and II ... ,110 decide whicb equilibrium !.01"lIon, "'" .t.lb!e l!Id ",hich ... unu..blc, In panicul"', ",bal" the lim,ti", bcb,,-ior of the wlution iflhe
,ml,'] population i5 btl .....,•• 0 and 21 "UlU lIwI 2' (b) U... 4.01 to filld the soIutionl WIth in,h:ol ,~uu I 5.03, and 2 I. and plO! each of tlltsc 5Oiution._ Find tile ,nncelmn point (Of !he filll of lhese wlUliortl.
v.
(e) PlOIIIIe three ",,1.11005 t"",tht. wIth the dlm:hOO fidd 00 tht wnc graph Do the wlutions foll~ tht dIrection fi,Id., yOll"pc A.
the m,n,mum amounl of »11 on Iii< unk. """ lilt
(,) e~rl"imn8 Wh.1 proocipic gu.r.lnl«~ 1hc: (l\I1h of (he foll?",inj!. .'tatemc:n.. If lW<J solution'S" S, eo,""pond 10 ,""Ill .lao> 5 , (0). 05,(0) ""h 5 , (0)
5,(0). Ihen fo.- any I ~ O. it mUIlb< 1h,1 051(1) In lh" I'rolMm. ,," u'" d.01
v.
WId .01
v.
to
< $,(1).
Il'oOIkl \.011" p ~ on the rtJUll1 of 11>< J'It";OO' .'"1» U\O: .01 .... 10 find tl>< ,.I\IOS of II>
Ction
8"-.'
o-lIdcql (I)
tn
I}U
JI.
] lu U' 1'~pl. in why U· 0 ,. lilt oo.1y tal root wll¢n"
",l\
(OJ
Supclimpo~ your g.raph of lht .olullon 10 (6.3) on lop of lilt d'rttltOn f,.M for the cqu.6on. and '·'Iu.lly .. nfy Iht IIonger>ey of lilt ""UUlIn cu,,·.1 10 lilt dirtthon field,
Problem Set C Numerical Solutions In this problem l.el you will u>e ode'S and p lot to ,aleulal. and plO! numerical wlm,on.
[0 ordInary differential etjual,on$. Th" II"" of thole CI>1II1II':1I1(\I II f~pla"l(d In CharteD 3. 1. and 8. 11le \OlutiOll to Probkm 3 "Wars in the
(/~
I
. 2-
" ,
S,,,,,,,I, Sv/,,,,,,,,,_
+~',
y{O)
Qbsr .... c lhal dlJldl :> f W ?: f In the .."an I ::>: 0.11 to ~ I S I mCrUsc,. IIUl hovo ra.l dou '1II\Crrl"'~
?:
(C, I)
1 I.
and m.rrfcn 41(,) ,ntT(1) mUl l "lCrr~ at least n fall as til • .I01"I;on y innial 'lIluc probkm
d,
"
"
¢o( t} 10 the
,
,
Soh. Ihi , problem ~ymbohcally and conclude that 0(1) -
00 .. t -
" for
. ome t" ::; l/r < 1/2 . (b) Nnt . si""" 2tiIJ < 1 for t OS lIt and II ?: 1. II foIiO-O" thai 4>(t) ;ncrra..s It 111011 as fast a, the .0/01 ...... 11 .,(1) 10 tho illlt;al 'al .... problrm
d,
"
1 + f~.
~(O)
I
Soh " lh,s problem .yrnbolicaUy .nd conclude th.lti :> to(r + I) I, ,; ,C . "and fiJld on :appro""""e '-Iloe of Ie) NQY. COOl!",lC a Rummel ] soIullOll O
,.
(d ) I',nally, plO! lhe n"lIIoneal solul,on 01" compJre (he w luHons 'J)
hc .ame gr"Iph wnll .... (1) and 41, (/) lIIIl
132 2, Con~lIkr lilt mlllal ,'al"" probkrn ,/
1/1
1/(0)
,
(e2)
2
S"l I art "ymptol\C 10 th,. Ii... , bpi.." from 1M d,ff'",OI,al C<juauoo "hy thaI 'I pl3u"l>1e, (II"" UJC the d,ffe",ot,al C<jua"on 10 COfIsidc,lhe s's" of v' on and e~ 10 lhe lone II I.)
(d) I'ooall),. su~nmpose 3 plot of the d,,«I,on f,e1o.l of lhe diff"","".1 cquauon 10 confirm }'our In.:olys", 4 We shall ,"udy ,01U1l0n51/ 1/'
1I>.(t) \0 Ih. mnial ,.hlt rrohlem (y
Ji)( 1
~').
1/(0)
~
fOl' nonncKat"'e ,,,,Iuel of t. (.) PIO! nUn\leliul >olUhOllS ¢110ft) for !'c"Clal "alues of b, "Iltho numef1("al soIuhOll on s.e>"nllarJe m~""b Cr_t· I.~ < / ~ 10 or 1_5 < / < 100). Mlkc.' .... sslboutlheI\.ilUITofth<soIuhOIlU/ .... ""• .~_ bon ,of tile d,rr.",ntu,1 cquaUOll. Try 10 Ju,ufy lOU' gu.ess on uo< ,
7. Con~,de. the ,mllal ,,,11K prot>km
o. 1,15. and 3 od 4 5 10 find al'l'ro~imalc ,·.lu., of lile: 10l Ul ioo .1 r (0) ~ • 10 5tIOns on the 5&/TIIe Ir.lr/l l..abd the 6,-. cu" ••.
(c) Now Use'M r~lel Method J>fOII.m "nil h 0.5 to approl1mat. the w.>IullOl1 on ,he ",'c,,'al (- 1,9]. 1'101 oo.h the app","'m~l. and eXK' solutlonl on mlel"\'ai. llow close j, thc awro~"nauon t (l ,10. noel 5OIouoo as t inm,ucll I" light uf Ih. dl'>Cu,\ioo o f ,'ab,hly in Chlpt< problem 1/'
/I
'
+ I.
V(O)
0,
.. h,eh nnnol be loOhcd by ,hob. DIsplay the graf'/' of V(t) in a Scope bloc~ (n) When yOll nil) lhe modd w'th lhe deraull parulnctc" (t going from U 10 10)• .. hal error "IC "D..!:e do you gel? WhM do you tillnl " respon,ible for Ihi '. m.themalically?
JlO>";'' '
(bl The soluli"" to Ih" IV]> onl~ U'Wi foo- 1 < to. for ......1t oumbfr t o. What dou the nlOr i«(IrIIj onIer homottllCOlll tquI>OII '" tw_ Although II MlIo('S In ~ number of apphcallOlll, IIIt'wlng qlWllUm m«hantCl, opIkl, and "'3.·.. S. II C~IIOI be 50hed natlly by the ,1aIldanl ') moobc m.1hod O. AlrY 's "'iU&lIon rcJormbkl1/' ruth 1111 solution II (I ~lIIh( 1\ 1 + c,). (11le hYI"',boilc \IOt fll""lIon I. caUcd .1l1li In MATI.AIl , I'IQI a nmn.ncal WI,III"" of AII') "J "'i".hon logtther Willi a ("""nuit ~OIU1lQII (wlth 1\1) 00 lhe Intw'lIl (I I. 18), In an.logy with p.u1 (b). )'011 h,,,·c 10 choo~ "nlur5 for (', .IId ", III the (o<sm"k Wlolion, (d) 1' luI lhe numcnc.1 §(llut;on of "lry's (llu.llon on 1M Inlt"111 (-20. 2l: What due. lhe gmph '"&G"51 .bool lhe fMlutncy Ind .mplilude of oscl ll ltlOns u r • 007 Could any of 1h.1 IO(Or",.IIOII "',,~ \:INn prcd;,tcd from the f..:.,m,
de an3Iy~IS? )"
'"
!. ConIKlc, Ikl.el'. I""
0"(/)
+ ~ .in{/I{t))
0,
(D. 2)
"lion: II 32.2 (II_',S the gJ'l>\'uallonal ...olt.alu". WillIam We will as§ume d .. ann luI 100,8111 32 2 fl and SO replace (1)2) by the "'"pier form
11' +8i"fJ
0
(I).3)
OS. (Alltmllmdy. one can """ale limo, !.pla.:tn, I by ..,Iii Lt. 10 rome" /0.2) 10 (/).1)) h>r mOtions "nh '~II dlI. Foo- cumple. COOII ... 11 ' .. 0 [fthe " u posl Wllh bolh clld. '111ie snnoc lieighl (1el UI calt Ihls heIght ~ .). ~ I"" I~alcd :II r . 0 ~nd r I. lhe helghl ~ of the "hIe" I furn:lion of r "III n
~u Wllh t)Ollndal)' ~ondlhons 1/(0)
c./I+ (V)',
0, ~(l)
or the (ab[e; for tbl$ probkm \\'e'li u~ c
0, Thc:ronll 3nt (dcptndsonlltcleqlh
,.
.
)
(a) Soh'. !he boundary ,.,.]uo probl<m ",Ih 4a01 v.
(bl 501_. ,hil problem nurntncaUy ",m ,he 10001!nM.... 'hod Plot ,he solulloo on [0. It. and ,t!>]
(0 7)
!he ]ongl'udmal dISplacclIlOf .he cross.o.cn1l\l IS\4rldard muu nunched 10 a 'pnnl on a (riclionle.l'S lable). Suppose !Ioe A:itoring force of the ~prong is OOlllil"" hy Hooke's ulw, but "'llead" o(th. form
P ·(.1:11 + .1'). If ( , 0. the ... umptioo amount,.o Hook.'II ..."" but '" thi! probltm,.c shall fOC\lI 00. i 0 (e'ther POI,t;'·. or IX"g;It"l'l, ff v.-. h.>Il' Ii, A:"~~ pI't",.t "",_th ,dampi"l codfieins (b}-(d) for ~h'" ,oluel of •. 12. In lit;. problem ..... w IN solu.1On dung." w VIS dOSC', to I, (b) Note thal lhe formula you found In (WI (11;1 In" ahd "hen .: - I_ hnd IlIHl rio' .he soMi"" cu,,'e for ... I on thc in.~"..1 0 -:: I -:: If>, 81S(,ILa,Of)' nalure of WlUUOO5 of (D 10) for ,c' 01 Ry cOOIfWlng (I)_WI "',lh V" 0 for 0 < z. '" hal do yOll I~am aboul ,'''' ow:;I1~IOl)' 1131ure of wlulIon, fOf,c > 01 lIow many l.eros «IUld a 5OIUlIOO ha,'C on Iho I""u,,·. ,r.,,;,? Do lho 111Iph\ ~I)\I ploued ;n part (0) agree w"h Ih ... , •• pl,,?
u."
,he"
17. In I]', S prohkm. we siudy $Olutions of Ihe parabolic ~yl'n""r equalion
") ,'
0,
(0.11)
."'C'
.. hi"h III tho 5100y of quanlum ft1tthaOlc~1 ",bl1ll,ons. SillCo lho equalion (I) In" ullChlll,
leI N",,· wh,•. lhc p.robolic cylinder e'lu'lIon nun",,;c~lIy for n I wilh lhe IWO >fl' of IO,"al COlldl1ioll, y(O) I. VIOl 0 "nd u(O) o. v(O) .. I. 1'101100 1"'0 $01011On. 00 Ihe Same I"'ph. ( It "'ill prob:Ihly hdp 10 change lhe ran,e on lhe 1'101.) Do liM: ",Iollons brh",·c ., you ul"'cI.d1
,
{dl RCl"'al p;ln. (I) and (e) foo- "
"
5. l\I,nl 0\11 any dirr., coce. from lhe case
'"
Ie) Repeat !Wi' (b) and Ie) for" " ;...,...,3,IOn, M,lIe f.om the di'«lIon fiel.!. 11u.1. fOf any II. exac.ly one $0101100 funrC bet ..·«n 'lICUMi\'~ ttros III)'
or
solutIon of 8".»Cr~ c:quallon
(e) Lei n be a J'IOS,ti,-e numbn For z E 10, v). the quantll) 1+ I/( ~z]) is ku Ib& Or tejua.l to tht ronlWlt 1 + lie ~n]) , Ely mak,nllJl apptOj>lialc COOIpIIUOII. tlctennlne n 10000'" bound I on lhe d,.llIICC' btt"'«" .1>C('eS'''~ "1'01 or U'J wlullOn of Ek5.Stn.r Did your Krnph;cal siudy lead locomp>rilblc ,,,,IUt5 for 1;uK! L~
of! ... ,.IIIJe·
19, In tl", p.oblem. we study wluuom of Bc.t,Cl's ({I"allon of order n.
U"+ >'+(1
;:)u
0,
(1) 12)
for ft > O. Solutions of Ihis tejuallon. "lltd /h'nrl/",,(II'" of onkr ~ the .tudy of, ,briluon,.nd ,"'..-eli WIth meulM I)'mmelty, SInce (D.12 111 w If:r I~ replaced by -,c. w~ focus our III.nllOO on r ~ 0,
are:::'2 ~
"s (I) 1-100 thr C{lff'tlpondlnl fir'" I)f(\rr tqu,lIon for
Snuoo 10.4 "fChapkr 10. rb) 1«" l. plot lhr dlrtttion field for the - equahOO f,om sOlO x 20 (Remtmho. 10 uSC -./2"; : :S w/ 2.) Ila~ 00 tho plot, p«'dlCl "ha' the Ilf,~1 f"OChOO~ of oroer I lolA Ill. for 'mall r an,l d>rll ror large r. Is thrrf a ,-al ... of " """,nd "hich )00 np("
~ h"l "'1011;00 In (D.13) gowms
"nlen" If v Ito)
oInd Ikll l < ",n9.
( D .13)
Oalld Ili/(ioll 16'
ron-' .. ". " \ a ... Note lIla! the: eqWlUon~ (D III ,call, M' '_"" appro~'1lWIC "here / ....... 00, !he obJ«! rome I ~1 all.
(a)
.
~nl
.hand. lIIthe hmmn.
\ nan IllUned,a!. ~LOp IlfId!hen dot,n',100\..,
Wril~
a funchon M·fil. friction. m .tlllonK ",nh the hoe
fIlr'l u notkion ('I', Yl • td c tl o n \ U ... ' '" ,"'ga. yO, vOl the 1,me ml.,,~1 ti - . d. "'.•.--, . . . ..loti y O of, n 1n as paratrll"Crs d nu ,ruuol POI' 100 an vO of ,-c1OC,ly. ar.d 0II1p'ollS • ~blc of ,;aloes of 11 ... ,lb lilt conespondmg values of 1'l",llOn 300 ,-.Ioclly_ Tho:Il' III\' lal leasH tv.'O "1Iys 10 ,[(".:ture yoor M-tile. The mOil natural melhod II to lin. [IM5 tIu.! s.ay
op tion , _
od• •• t l' svant, ' , I tlticl, ( 'I', Y, 'I'E, n, III • • • " od. '5 Irhl . tt... [y O vOl. opti""l t, II0000nllhe o ptionE for the: !llO!mnl. lhe !.«ood hilt call. oddS on 1/1 anooymous funclooo "hE (,,-hose lkfinmon ",II ,",'01," lhe param, Draw 1'110 ,,,,ph, on onc. graph lhe disjll3c. menl y for O:S I :S 10: on lhe ~ond, draw • pha~ drag""') (or ~.II O\"'t, the woe time in",,,.1uplarn "l\al Ihr plClurrs Olean \Vh(ro: doc~ lhe !No" (1In"IC 10 rest'
170 Ie) An,y,crpll!l(b)bul,u[h lOJ
3.wn"'11h ~
2.
(d) N_dl3/lgclt.emll.. ldallllo~, 0, 'II 5 111ldIu,,, Lo> l.d 0. 75. Wlull kmd of mOUM tn' ... ~~ {l/"'1. You m>y ""ttl to kngthrlllhc 1I11Y lnlt ....":I1.) (tl hnd(lOlhtrorarcIl ln",.): fE-I) , ,(0) II 0, y[O)
,
,9)
,
r :.
'"
III ('akul~re aJ>d pph rhe ~n., .oIutioo-Thylor polynoluial--- 3. 6.11. I"), (I)
(h)
r111" 3z11 + ,III (.I' -- I J'y" + 8{x
Ie) 2r111"
,1.1'11 + Gy
O. 11111 12y
o.
O.
Id) ~.r'II" + 1I:r1l+17~ 0, ~(l) 2, 11(1) ",Io.ion ~ dciClIbt tw;,.., II btlla,'., as x _ O. ~. h>r lhe foll""i"1I dlfferenual eqU~llonS, compo,.
3_ III d\ls patt.llraJll! .he
m. md,e,.) equollon and find 115
root, TI :md r,_ 'Then compol•• he .ellm of do:g.ec 10 or leu In.he !'robemu, Kite' ""llIlion l~!pondlnll.(>'he lartcr '001. If' l -- '1" "'" an mleger. do the loIOme for Ihe othc. root (el Prohkll1 ' 1 ,~. /I of &"-\I0Il 5,6 (>f Hoyce &; ]),I'I1I11a),
2.1'11" + v' + ry 0, (h) ;!.rj~" + hV' + r'j~ (u)
0,
'"
(lly thinking about Whll hlppen. 10 the . you can ~e thaI J (.) J (0) r powe, ",no, .... lItn lllld lIt m ''''lchW. .~
n~
orn.,"oollldJ
J(, - "r for" odd.1
(r)
In(r) ,. al~. SQIUlion 10 BtU'/'J'""' _, n.n , n ''''' 0if ("un .
:1;'''+ !I (' , lIr+zn)~O The 'fa) lor 5~ ( I
I
z"
I)' 2'J ("-,,
"
.
(I) MAT1.AIl has a built·", funcllon for J.(r). ,,11M t>0: fuoclion h," a 10m" a5r npl'roadlC' 0 from the fight. Thus the ".'ngular p~lt" of I ;,(r) I>~(zl U follolH . F"" Uj( d.olve / ...',lbout ,rulo.a) ctlndmoll$1 to j,()1 \'~ the 1.c&eOO", equIllOll ro< n 0, ".~. Then ,n-fX'CI ~ach s.oIuliQn lJId choose ,,,J\lCS for the undetermIned WIlllanl~ 10 ~l poIYl>Oll1lal wI"'ioo, with
Pn(l)
I.
(e) Graph I'"(x) , . _. , 1'6{X) on the Inlerval
I
I , LJ.
(d) In the graph in SW'I (e). YOll c~n S« lh" l ." 1" 1/ 3. !l UI fOf Z > li thall the w lulion 10 the IVP g",aler than /I(.r)' + I; w thl' WIUI'~ ':-soh.. thlt IVI' You gol. wlyUOO of /I' /I' + I. /1(1), 1/ 3. U!oC 4.0 ...... facl tb.:Il the tang.nl fW1(tion """'" ' IUt (z - ,C) '/U\mg Ir", "'-h Ihc fOfm /l1 (I s 2 findw'"J!utt.,.,"' .... 1/1 bIo'A'IIp ' III Up "Mn ,IS argumenl ",....
Sft'
,
r
,""hs?
flll'cly 2 2. ) Ht~ tM wiuhOO of IF.. 3) mu'l b «omc infinite somewhere brl"~n z 1 and z t',. Is there any "'~y Qr ~,"g th, S from the so:ors iOIullon? Us",
o.
,'( 0)
0
200 (~) 1/" + 2V'
sinl + 6(1
+ 3y
J .. ),
0,
V(O)
,,'(0)
0.
14 UIC' tho u pla« Transfonn method 10 ~I .'c the follow;n, in itial Problem I' f()f :addmooal mstruction s. , a)
')I"
+ ·111
" 2~(j )~in (t
.in I
1M 11" +(j~' Hy Ie) 11"
+ -(II
(d )y"+y I~,
2,.-),
I«t) ,
1/(0)
0,
11'(0)
- 0(1 -311'),
1/(0)
I,
v(Ol
'"
2j --6(/ - K),
!I{O}
,,
0, O ":: I I, 5 ", 1 < 10 I , I ::>: 10.
h(l )
°
11'(0)
0,
probkm5_S~e
D.
11'(0)
0,
1/(0)
".tl~
0
U-e lhc: .... p)"". Transfonn mclllod 10 wh. lhe follOWing inlllal value prQbkms of hlllMr (Ink, In>load of cumbcrwmc: npKs\ion~ 11k. 'D (D {D (D (y) ) ) ) (t) , • MATI. AII allov.'\ you 10 t)l'" 'lSi f f (y (t ). tU ) ' , You will d,sco'"cr, after tU.m, 1M Lo pl.". TI'lIn\fonn. thaI MATI.Alllli\"n the: hIgher onkr initial CQIIdnions In 1m'" of ' Irllngc conslrUCU li ke N(D. 2) (y ) (0 ), whk h cannot hand le. Thul hI ",I 11"(0) I. for n ample. )"0\1 can u~ tho: followmg substilule:
.1Ib.
~~
IlIO W. ;: • =v- Iat rrap(cbar(lta;ul • . . . •• . . ·(D . 2)( y )(O)'. ' I 'll
H~ ...
a... u\ing MATLAB's command "her to ,onv~rt from a symooH, npru. ,ion to •• trinll, n rrep to ... pl ace part of a ~lIi ng, and then e y:m to ,onvert ixlek fn,m u ,(ring to a ~ymbolic e,p",s~ion The bac k qUOIes flilg H as a spec ial symbo l (whi," "om" fro m the Maple kernell. One. OJ
IH
) OU ha'
' II 1/"'(1)
e w h'cd the equa tion, plOl the wlution on un approprinte in terval 1/"(1)
11'(1)
(hI 1/' "(I)
+ 21'(1 ) + 11ft )
Y'''(I) 0
+ 31/"(1 ) 111ft )
( c)
(d )
1/"'(1) + ,111'(1 ) .
'"
21/(1) , 00II 1,
'"
I j,
1/(0 )
u t{t)~ i n(21 ),
• j,
1/(0 )
1/(0) I,
11'(0)
11(0)
11"(0)
1/'(0)
0,
11" (0)
11'(0 )
:>
D.
11"(0) = 1" (0)
11'(0) , 11" (0 )
(I
D.
11"'(0)
L
Wh ich of the\(: equ ations h"-.\ resonance.(yfIC beh.. ior? 16. Thi , prohlem i~ based On Proble m 35 In S« tion 6. 2 of !Ioye. & DI I'ri ma. Cons ider (!e"d', emIloa of pal"lmetel'li. Or lapl:stt Tl'lIIo,fOfTT)'. fa) Try 10 lOll'. fE.5) u'ing dl0 1 .... What hIppen"
(b) If you h.,'e lhe Profmional V""O" of MATlAB. )00 (III _ ..till _ I wrong'" plIt (a) by e~«u'ml/: lhe command » _ph( ' d l" l .... " ( ' DID(Y ) )ft) • Dly l ltl +' •••• 'ylt) • (t+l )- 3*. xpl - t)· collt) ' 11 WhJI do you gel? MATLAB', M.pl. I.omel hal u~ a ",Iunoa .... dIotIlbII. ,equire, solving a really me"y .Igobnlic equalion. helk.~ the lDS_ewe llll '" on unuSlible form. (e) No..... Olf!be 1....1'1"'. TraIIlform method fromCh~r 1210 ......... jIi. ) ~' 1/"", long does il take 10 g~1 a ""ull~ fd) Verify IMt the ~,pres\ion rrodU«d In pull
a"
/J~~
Dt
(h.7)
k7i.r 1 '
"MI"C k il a .on>lanl deprooing on tho: materi~llho: rod 1< IIlOIdc of. For Jimplitity. "e ".11 al~U1ll(" uni" h.,'e betn clloscn w thai k L Lei's aS$ume oor rod has length 1 ,aga",. 1R $ui1able unilS) aJM! Ih.>t tho: temperaWre al the tWO ends oflho: rod "kept h,ed. >ly at U O. Then ,,"'C ,/x)Ioutldary ",Iue pruhlcm for an ord",,,,>, diffen;nt,,1 CqllUtlOll for U, wlth;r us the .nd"prndrnt >"anable and s as an '~Ira paramete'·
UfO, I)
U(l.s) ,0,
(1l.9)
20J (a) C""Y out Ihi) proceu to .o1'1l(1l.7) and (RS) (.. ,til k I) "~n the ,nnill temperalu' .;5 u,,(z) sin(II,.). Yw .hould gel I n",• .,mple formula for the an.", ••; check (hal II I~d uhlfiu (E.1).
,th.
(b) Repeal pIn ia) wnh UU(l") ~in("".rl. " 2,3.4 (You can do thll .... loop.) You lhould~ •• ' ....,a! ~lI.m' What,. the .oluuon for .e.eraJ o? Cheoold find th'l MATE-A ll wl"ci thc ODH .. "b 110 dimeu!!)', bul cannot compIIlt thc In'rtV Laplace Tranlform 10 re-:,c~ ,ill(n ...1).
-
0u1d suffice 10 take 0 '5 r, I < 1.) How doe l thc w hlli on ",alch your inllIitinn thai Icmperaturc tiucluDlioll< in Ihe rod nil 0 ,ho\lld dissipate wllh limo"
20, Con_iokr the mass ·damper sy".111 wllh dead lone as dcplclcd in Figure E.1, The mollon of lhe Sy.\I.", IS described by the follll'>'o '"g eOlnblnation of equOlion! "'II" + 'lql
+ k{1I + b)
",y" + 'lql 1'(1), mil" + 'lql + k{y b)
1/
-b
F {I),
' A
< y$ b
(E_ll)
II> b,
,
~
V
V
,
< -b
•-
-• A
1'(1),
•
,
(I) Re .... nl. eI,U3tlOfl (E-II) as a "ngle e<juahon
using the h ..."i .id.. funelloo. (II) ConsHkr • free system. F O. and lei In IOkg, r 5ONsI", and k ]~Nlm, Suppo~ the lIIotion Slarts at ~(O) 0 wilh mllial "clocily ' '(I II (0) 20nllo. hnally Inc b 0,5111, I'md a Illl111crical mlulion w,lh odd5 nlld gllll'h it 011111" inteml.l 0 '5 I < 15, (e) ~ow by "arYlRglhc friction conSlanl r. lhe mllml "cioclty '\I and the dead lOlle \1OQ
,
IuS "tile that on suitable uoits.
,lOr ... ,th C'apaCI'-:cC
HI' I.
IE,12)
1.
c
••
Figure E.2: An LRC C,rcuit ""'h an Input 1'Il1.e
(a) lI ui1d ~ Simuhnk moo.! for tho r<ju.UOIl (Ii 12). thai 1.11., the para!D( ,ndth \) INott th.Jl1h,s com:sponds 10 III '"pm ""Il",e I(t) lhol ,\ tbe rnltgml of this sqlUll'e "'3,-,: ,) Let IlUn from 0 to 20 in tbr .11001110011 E.\pt'nmenl ",Ih "IIIIIIfI,'1he CII'\:"'( by "atying the p.1I1ImtlC. r Try r 0,1. I. 2. 3. ]0. You \bouId OOK'VC "cry diffcrent beh'''101 of the outpul ,-oItage ,'(I), depondl"1 011 tilt 'aille of r What II.1ppe811 Can )00 uOOtDland .. hy' (11m' Sohe (E-(2) willi
f.
~'Ql v. m tile hornogcncoo~ ea!oC /
O. JIm. do the wlUllnns I!n>h 1, f
F.... tho ooIulIOa "'Ill ,ruMI oOftCi'lIoa ~ (OJ
(D
(d) N'III -1 S I 'f I in (lr II' 1HI' 3). dn,,' thr wlll!!on IF) ) and 11'(3), and !he imm'll < ;0 lbe O!ba ~_ 6lloOd 0 the d,'>Cu"ion 1II Sco;a1 ,alII< 1 of !hi< ttlC"fK). to.~""
'0\11 .,pI&m"
.. tu.;h !hi< por>dulwn ~"InJ' b.rLL and fM,h ... ,lhuul ....""Iuq: !hi< lIJ"Iihl po.! tKIn. an.I..oo.< ... "'ell Il ...·'np o,~rbrad Uld COhI,,"'" h' ... ,01,~ In!hl .bl. pOint> IIohl:n: ""'y 110< popuilU[lII _W'o"""'" I/mr Sioce I .ePll'l."" ". ;01""00 approt>.1' nUmhc:c1 ~ .1OCh I.hal (I 5. wi" 0IIlhc:
7 Con",dor. the- ~""""""R
'1""'"
,
(" ,
10fI.1/
""rarun'
!I1OJ 1' Ihr popi~
2)
of tho
p!')
and ,
o ..... killl
tho
of tho pminon.
'") ~UId a]l .;nh (;r~
~l,n
m. ~... ~u.odBnlltl drh I f'hur J"Y'
u.ll ItII 1hr \)!ottm Idtnllf)' thr wr't'rno.. "I '~Q1n, ! oollor lnJldIll'ln)OII ' ......n t' .. tI>t InlOl1lllluun from l\&Ito III ond I~llo ,~. "'P'"........". ~f'k' of oruu!lJ condJliOl\' Thtn ",,,,,,1>,,,,, Ihr ,..:\(If "r16 ond p/w.< fIt tnne" i.\ 10 find (appro"m"e1y) a ~Iu"oo I'll,...·. that aw,,,,,,,,,,hes "ery close 10 rhe s.addk: poinl as lin1C increase,_ w~ will apply thIS Idra in • populallon dyrwnks model to gel a fairly pm:I"" picllrn: of whICh initIal COtt111' 10 depend on (he number of dlgll~ of accuracy per '"T1e .\'ep, Judgln' from your dala If a "umeneall'l1
uch uml changcs by. fiM>tl funcllon / of lhe difference belween the
~lale of the uml and tlie mlc of i15 prcdeds 10 • poI)'IICI"".1 /J,rl +:r 2 +z.) You cDll la~e Ille ini(,.1 ronditiOll for r to b¢ .,....:1 (5,11 , meani1lg a 5·d",,,,nsil)flal colum" ,'ector of randon! "umbers \>(twctn 0 IIHII. I;"'pcml",n t with dlfT~rrnl ... Iu~ of b and diSCUS. how the: mulL! rolllplR" wid! !he I",,,ar modd III (a).
IS TIm problem IS a foll()\O" up to Prob"'m 14 abo .... One pm.ible mrdi6c1lioD lei lhe modd '" tllat problem IS to ... ~unle ~t II wes • Ctnain iIIPOIIIIt 01 _ T
for the dlfl~rr~ btll'..~n lhe ~la~s of a Ulltt and It) prWtt«all\C of con$Crvauon of mailer. Let's aUlllTle thai (.n silltable IInlU) I + ~ I. bul thalli + : can be blW' than I. Si""" A B IS being both c",alM (al a ""e propXlIonallo lbe !'fOducl of the eoncenlnlllonS of A and 1J) and dCSII'U)'cd (al a nile proportional 10 Ihe concenlfllllOO of A lJ). Ihe diffc",nlial l!quQllon beCOtTlC'S' '11'
oZIl
,-:
nZIl' ,-(1
z),
(1'.9)
SllIdy th" ~)'.Ilcm in the dom:iJn 0:;::
I
'"
1.1/ ~ O.
(I) Show lhal (F.9) has. eu""'C of cmica! poin .. g'\"CO by the cquDuon
(b) l'Iot the 'CCI", field III tho case 0 I. ,10. (Ilus I. ltM: case ... hc~ lhe product A fJ IS r'dy un,Ulb1c and com'erts bad r:apidly 10 A and B.) W hal does ,''' field look hke In lhe phyMcally rele''lInl ~glon7 SUl"'nmpose se""1111 lrajeclones of lht syslem on YOIIr plot .•'alting along lhe hne segmenl joimng I 0.1/ 0 and I 0.11 3. (Nule Z 0 means no II IS presenl iMiaJly. I. 50 AfJ IS presem. and because of ltM: n:"«Slble reacllon. A is bul then ;: ennlually c. ealed.) (c) Plot the "CClor field In the case 0 10. ,I. (ThIS IS the case whe", lhe product tI fi,s rclam'ely .ed by MAll..A H,
2. MATLAIJ Commands: commands IhallfL11l,pulate dill or ~~p",.,ionl. or Ihll inili. ale a proc..S5. 3. BUIlt-In function. basIC IDlIthe~11CI1 fWlCtlons thaI can be e-o"'lU\td or pIontd. 4 Gnlph'(! ColttllW>d, command, U5'"1
In
creallng Of mod,f)'"g figu .. drcd and thtn I'D rllI»I cutl)""" more uillnplc\ To gel rtlOI\' mfonTl3l1on on • romrnand. IOU can uk' th< alp co.,,,,,,,", or lhe Help IlrowJ.r TlIII a10uary is nOl I romr .. ""n'''·~ h,. of MATL\8 . _ 7 . but>! mcludeslhc commands mOil usdul for " ud),", dilfc",nl'll ~u.tionJ,
MATLAU Opcmlors
•
M Ilf~cr for '1u""lIoo hand I.,," Allo U§filIO ClTalr ,,"(0)'l'I0II1 fWICIiont.
t • •
(x, Y) x. " 3.·y • y. " ] q\l1d.l("tln, 0, 1)
un m"lm d,,"slOll
\
,
:l • A\ B is the solution
of the eq\llDOll
,,-I: • a
1')"1'" b.lp .1 . . b fOl' ~ ,nfOlTll3IIOf1 A .
(l
01 3111 8 . III 511 A\B
Ordinary seal.r d,,';s;on. or "ihl matrix d;,';s;on 'J)'pt olp diu flIr mO", mfonn.:lllOO 2"
./
r:kn .. nl-b)'''''l~'''''n! d" .Slon of :unoy:!. Stt IN onliDe help for rd! v ida
•
Scal:u- Of m;,lri~ mull,phc"bon Stt lIM: oolme help (Of .t~.
•
Ek"",nt·bl-tlem.. nt mulnph.:aIKln of array' . .'in IN ooh"" help for t • •
Scalar Of matru fK"'ers. Sec the ooh"" hrlp for _ , .....
•
Ekmcnl· by...,kmonl pov.ers. Stt the onion .. help for po•• r
•
RIln,g~
op.ralor. u~d forlkfinmg .'«tonand mntritu. T)'pe halp colon
for 010'" 'nform.uon.
•
Compl. ~
conJugale transprn.c of" mnlm. Set ctn.napo •• Abo
u~cd
10 ""gin and coo strings.
,
•
Tran'po§c of 8
malri~.
See tn.napo ••
Supprn5CS OUtput of a MATI.AB command J: • 0,0.1,)01
Lmc ronlmU3uon op.ralQr. Cannot he
• ••
u~
InSide qUO/cd slnngs. Type:
halp punct for rn<m infonnalion 1 + 1 + 5 + 7 . ' . 1 1 ... +13+15+17 ['Thi. i . . . way to cr•• e. vary long atriug8 ' • . . •
'that _pan mor. than Dna lina. 'brack.ta' )
N()\ a true MATLAB command. U5Cd
In
Not. the aquar. '.
• • •
conjunction with arilhme tic opcr-
dum \0 foru dement-by-elemen! oJICr:I !u.>n' 011 arrays_ a . (12 l l ' b . ("Y KJ, a.·b
MATLAB Commands ao!4path Adds the specIfied dLl'tttOl)' !O foIATI.AB·, file $oran:h pa!b addpathl 'CI\1IIY lIlfilee') addpath C'\IIIY_ afUea A ''&n.hle holdmg the valuc of lhe moSI "'~n! "nass,gned output.
~.
twp .. "
Boundary \"J.lue problem wlver. Usually requlIClI U§(! of twpiait 10 sel tile ··'ntl,al guess·· argument The enml'le below w ives and plots tl'" solu> I. tion of!/'+1I Ow,thboundlUy vp luCSll(O) 0.11(,,/2) eolinit • bvpinit({O,O.l,l)·pil2. 11. 0)), a01 • bvp'cl e(x. y) (y(2), ~ y(l)1. ... ely., yb) (Y.I1), yb(1) ~ 1], aolinitll plotC.ol. ... aol.y(l. III
cd.
Males the lpec ifitd d'rtttOl)' the ,ulTtn! (" "QI kin8) d,rtttOl)'. cd. C, \-:yd.oc:.'lIlfUa.
OM.
.,,...
Con'"Cl1 •• symbolIC Uprt~11OII 101 W.n, '.ons or for dtr.nln& ;npuL 10 4.0 1 .... "Y
U. U~ful fill' dtfilllllllllhllt f~.
1,,11,,1 (char ldD {III ' ·'iDly)). ' x '. ' y ' J
C~~ valuu and definitIons for ''VIablC! and fullthO/ls. or
IlIOR:
If you \pmfy one
I'anabkJ. tbtn OfIly tho5e variable. an: dtam!,
Collect. coefficients of JKl" .... of tho ~~ifltd ~ymbolic ,'3Iilbl. In. '''''" 5ymbQlic expression
c o i l io t
1)'1U .. Y
co lllet (x "2 • 2· .. · 2 • lOx. x·y. x ) CODj
Gl"es the rom"",,~ COIl)",.I. of. complu ownbn. c:oD j (2 • ]01 )
ctranlpo" CooJugaie u./lIJlO'e of ......,m Usually in,vltd EqulvalenClD tun_po •• for re&llll.llfiuJ A •
.,th the
• optfIIOr.
(l 1 il l A'
Not a InM: M ATI.A8 cOl1l/l'Wld U$tl' _/If'ro.'''UUOfI of oni' n ln, (Moth Operations Llb".'Y) liqunloOn .ol,-cr IIle hero. C lock (Sourers LIbrary) Outputs the simu latIOn UIlJC. Cons\lInl (Sourer! LIbrary) Outputs a specified COI1Slanl DrmUll (Signal Rou ting LIbrary) Disassembles a ,'tetor 11&n31 m\o ,IS components.
From Worbp~" (S~s wbrnry) Takes inpu, from the MATLA R Wo.bpac" Gain {Math DixrahOOs l. ibrury) Mulhphcs by a conSI"'" or I cOilltant m;uri~. 11I....... lor (ContinUOUS Libr.uy) Cornpuld \he tkfin>lc Illleg",l, u,m/l: a specIfied m,tlal
condnion.
1'01'" Funrllon eM11l> Operations L,brnry) Cornpm•• c1ponenllals. loganllum. tiC. !>lID: (S ignal Ruullng Library) Assembles scallll .ignal> 101(> • '-Ntor signal, Pot) nomlal (M.th Optnl'ions Libr3Jy) E ....Juales a polynomial function.
ProdIKI (Mnlh 0pel'31ions libruy) Mulllph~1 ..... d,v,des signals, Can also '""cn
matn~
.;gn.I~,
Ramp (Sourcn L.,br1uy) OulPUI5 a funcl11m lhul j, ,"iliully conSlanl alld th~n inC",3S'< W. then 1I'OIIIill. ThOII1 funcbon f.
,
II(t, YI
il/2) Ot. 2 • exp(-t) A
(1/21 ' y."2
exply)
, lilt
yl
, xp ( ,
I'u r t (II) FOliowinS !he pn'sClipl,OO for a conlOlir plo!."''' !t!1be figure below_1bo filial.. I 10 COn1(IYr ma~"s alilhe cur,""s blac k loG lIIal lhey an: t"-lin 10 s« wbo:n prinIed. S-
of the CU,,-tS ha,'c IWO y ,-alues for tach I , ... Iue. Thcsc
eu"~s repreSCIIl1WO IiJIIa
solulion' Ihol IlIrd when Ihe;r slopc-I become infinllr; Ihi s 00es nol violate lbee1i I ulld ulllql"""'S~ IIK-orcm ~.use lhey 111«1 only'"' h.", tt (d)
Clear' Ilrinhles nnd ligu res clear all close 1111
Part (a): sYlllhoJic solution We are gOInK 10 ;""eMigale 1M IVP y' • (y 1)"( I - Y"3). yeO) • b. for various choices for tl>t mitlal ''lIluc b. We filli!..,. if We can find tlK: ."acl (symbolIC) solution t ) • (l
Y"))' ,
' t ')
I'H l't (II)~
lIumc rlc~1I
W~ "'~ IhUI d"'he
solution
able 10 find an .....:t WIUll00 We In"1 wh'e Ihc probItm "U""'n' c~Jly_ We Ikh"" the nghlhaod >Ilk of the dlrrertn~al ~"allon .. IJI uonylllOlU f~liOll, and then U~ a for 10000 lO soh', lhe initial .caIu.c: I'fOblem "'lh ode4~ for b . ,t, -112, 0, 112, I • ln, and 2. 1'0< 1m"lly ","e plot all mille "u_ncal soJU1Ion1 on..,... gnplt 1$ 1>01
f itt, y) (y t) < (1 y. ')1 fiQure, hold on for b - -1:(1,5:2 dlsp(I'SolvinQ for in i ti a l condition b (t, yJ ode ' SI!. (0 5J , b l: plot It, y )
' nwn2str(b)ll
0
"d hold off axis([O 5 -5 5)) title 'Solutions fo r b
-1,112 . 0, 112. 1, 312. 2'
" " "
h
, .
,
""
\'/lri n le
P
int. ,rill Ion \' h. all,
, i.e
ll'''lnc~' ~lu.,
,
•
",I
,
,
Wl th It .. d (1
266
,
, •
'"
-
,
,
w,
•
,,
"
i
b
,"",
,••
• ,
, ,b
" ,
• •
,. '" "' , •
Uf> boll
/
Part (II) : comments me'S8ge~ , For b . - 1. the wamlng and the soluMn approaches -inflnitY.$ t apprOKhes 0.216., fromlhe lefl.
IVr b . -I. -112. O. and 112 we get wamonS graph ~ulltcst thai the
Li ke'" is.:. " e ~ lhal the solutIons for b . - ]12. O. and 112 approaoch . infinity as I approaches 0.569 ___ . I 18._. and 2.1 1 . r-especti,ely. 1'101" lhlll we dl~pla y ed \he b values SQ thai we could tell "h leh value of b corresponds w which warn,ng message
Pan (b) The graph In pan (a) mdicat"" 1ha1 if b • 1. the ~o'Il' SI'Ol\(hng wlulion ;s y = I: if 0 < b < 1. the wlu tion fi,.1 ,ncreases, and then .u1 fa)
• l'an (bl' numencal solution • I'M (hI: fao;mi1e solu lion • l'arI (el; numental r.olu!ion
• Pan fel: fac\imlle solulion • t>nl1 (d )
Clear variables and ligures clear all close all
VI c plot a numerical soLul ..... of AIry', cqu~uon (lSI dailled I....e) and an cue! solulIon of (he flotllmilc ftjUIUon (solid Ii",,) near I • O. 1lIe 1"'0 solullOOS agree "",II (0.- I hel""CCn ·1 and 1, hullhcy d,,·c.ge "'pidly OlI\5idc Ih,s mnge, II~""
dcycq 'Ht, yl (y(2), t ' y(l) J i (tfor, yforl ode45 (airyeq. [0.2), plotltfol", yfor(:,l), '- - 'J
[0,1]1;
hold on (tbalt. ybak] ode 45{airyeq. plot(tblllk, ybak (,.l), '- - 'I
(0,
·21 .
(0, 1J);
lacA dllolve('D2y 0', 'y(O) 0', 'Oy{O) • I') ezplot(facA, [-2, 2) hold of! title 'Numerical solution and tac.1~11e near t
"
"
I'jlrt (b): numerical solution l!ere is a numencal iOlullOll 10 Alry'J equallou for I our -16 .. --,, ' 2. ThIlJ _ " . . de vallo ~~lIacllhc numrri~al .wlulion (bul 1\01 II! dtri\OI1i\~) II Ihe dtlirtd ."II1IeS dl ~ ol$(> CQml,ule Ihe: numerical 5OIullon 10 I ... 20 50 thai wc: can use II .,lin Illef ill put (d} 801b tt
ode'5 (airyeq, -18;0.05,-14;
[0,
yy = devallsolb, tt, I); plot Itt, yy, ' -'I hold on Iminlyy) IMx(yyl)
""" .6)6
.64
·lO),
(0, I J) ;
~70
Part (b): rll cslmlle solullon Arter "It"omg Ihc graph. "c s« thaI II doc, rr~mbk. ~I~ ,urv". 1I000e\"("r, U probably don nOl he dow: 10 Ihc solution or yO> • ·16°y ,,"lth thoe Qn~ miu;tl condItion a, , .. 0 b«;tUW ,hoe ,wo d,fferrnllal equations an: not ell&' each OIhoer near , ~ 0, The amph'ude of Ihc O\Cllla"on I ~. from 'M graph. aboul 0.6. bou "e elln make litIS more prtCl~ by lool.lng I!Ihc da,a We pnnled above the mlrumum and ma~lmum \'31""'$ or Ihc nun~ric.1 ..olulion YY ""''''Nn \ . -18 and .14. and judge thoe amphtude 10 be about 064 So I>U. r"""mll. SOlution \hou]d be Y = 0,64 0 5m(4°, + c21 for ..on~ c2. Smce lhe graph c' onel lCro In the Incrra~ing dirrction near t .. · 16,2."i. we choose 4°1- 16.25) + c2 ., O. or c2 .. 65. lbe gf1ll'h~ agr •• qUIl" "'e ll 'wer the entire tnterval.
,0
facB 'O.64°sin(4°t. 651'; ezpLotlfacB, (lB, 1411 hold o ff
axis I (-18 -14 1 11) title 'numerical solution and
facsi~11e
near
t
_
16'
'"
I'lin (c); numerical §Oluliou Now heAl il a nUlJlnical a.olUllQn 10 A,,,,'s eq
"
"olf
odf'4'ilairy_. - .. [I,lB),
14:0.05:18; yy " devalleolf, tt. 1); plot(tt, yy, • "J tt -
U.l'on
f
Oft ... ",
16 .. 4'2.
0",. , .
hold on ,,"xls([14 18 0 4 " 10'21])
I'lirl (c):
r:It:.~llIIil e
solu tio n
1...., wluliOIl IJ'IlC'Ml 10 be lJO" Ing npoKnullty... hleh il abo .. hal Ihr h)'pntoIx WIt does far from ttro. In fOCI, "nhI~ I" (uP(~) - e' p(. l ))l'2. or 11'1',,"imlltl) uplO'2 for blgc~. So, lhe: f'l"OJImfd facllml le solullon II .ppmu~ltly cl'.,pl4'\ + ,2~. (c 1+up(c2)12)+c.p(4·!j. 11m ~UggClls Inal "'.., ,."" l'h(l(>Se c2 :ub!lrunly (uy d • 0)'" choo~ cl ~n lhal the magmluMI of lite ~u!iOns ntJI'h. UtIO\l' ". c~ d 10 mID lhem match Dt I. 18. Again lilt ,ruphl Igrtt "'-ell. though line. lhc ""UIlOlU _ .. a.b I~r bcIYl('tO I 17 and 18 th.>n 011 thr ~ of llIc 'nlt""" ". \.lnt1ud gl'Dp/I In a ~lt 6""". \Of sbowlkhlO ,WIUlIQIlS ;11 n "semilo," ,,,,ph. "here lilt ,... r1lc~1 •.,;! has a logonthlll>
I'art fe) }'an Cd)
Cll'lir \'lIri ulJlesll nd fi gures clear all closo all
"aI" (a): set up
. f100l ChapIe apfII'OIuwn,oo definitely bKorneJ b;ad for A
than !My lea'.., " ode4 5 (f. x .. ) d isp ( [t x aJ)
(0 : 20],
(I: ,
• 9
1 1 1
•
•• Part (e): discussion und
(2 . 5, 211:
", , m'",
. 1 9, 0 1 0
...,
1
se lJaralric~
The",,, nO pea«ful C(X'A' 11ClICe beca~se almo')!;l all the 'IlI.I"ClorieJle,1d toward an equihb.
nurn pomt "'r"'~nlln, a POS'II\'" popul . IIQf1 of 0111' ~I'«"C' and a l.tro popul~llon o f the Olher. I..". naillI'll'. for , he ,nitial conduio" It, pari (d) we 5aW thaI lbe popul ation o f x lends co U and Ihe population of y lends 10 O. hi the pha5e pOrtf1llt in pan (e), some solutIOn CUI\'e, approach lt~ ~Iabl e cqulhbnum (1 .5,0) Dnd ",,,,., approach {he OI lier stable cq,,,hbr;urn pomt (0.04 ). Th.. boundary between the imlla l condIti ons "'hose soluuons approach (1 !'I.O) and those whose solulIQfls aPJ>fOOCh (0,4) is formed by tWO5p«ial soluliOll
""In,
CUI",,! Illat appro:w:h the saddle po.nt ( 1.1) as I mc.ca~, Kp..nllriC~J.
~
loOluhon Curves are called
>C~lO«
IY~lCm
To ' PPro"'l\3'C the •• " '0 101"0 the for 1Ie" I"-r IlnlnKInltl>l 00nd'110ll. IIC~. lhe saddle po,nl 0,1) , h om Ille ponnlll In pan Ie), we c~p«, one sepu:t~i~ Nn . "mg f,om lhe origi., (which iJ llself lfI un, lable fqull,bnum poml) to (1,1); and lfIOlIlr. IIPJIIWChm. ( I,)) from Infinrly To find the fiUl sc:panuu , " 0 clloosc: at[ Inl~11 dil.l poIn, j U.1 10 the le ft and below ( I, I) I nd J.Oh-. badwards In li me; 10 find the M'e. 140 clA'"lar syn",..,try. 140 da~s.JI.IO).1I9
c lear. 21. 30. 35. 45. lOS. 249. 259 140, 148. 149, 153-
155.1511,1 61, 195,200 be ••• 11, ISS be ••• lj . ISS. 168, 174. 195 be. . . llt, ISS
be ••• l y , I SS. 168. 174. 196 l;IifurcalJon.84 t>l,,,,, ~.
122 blocl. phcli so[uuon. 5 1 .~ 18.254 u~ntlal decay. [53 Ul'O""nhai function, 18 u~nci31 function. nucrix. 18 ul'O""nlial gr(>YIch. 153 exponenCIalorder.l84 e.pr(~iion. 106 'AcemDI f()fCc. 160 aya. 110,250 • ...... h , 20-1 .,.plot. 23. 24. 26. 47, 52. 53. 55, 60, 104. III, 113. 114. 187, 19 1. 2S5. 267
n.
ra;:5Im,k, 142, 157. 158.210 factor, 48, 250, 259 fanong body. 201 flm,ly of appro."nale sol ution s. 89 famil y of WIUliOOS. 53. 60. 116. 140 fc~dbKk. 246 feval ,250 field. 106 figure. 3S, 39-41, 72, 112. 117. 2S5. 262 "'gure 1>Ulcuc. 112 l'igu.e Toolbar. 112 figure WindOW, 12
/",1", fIKu~,cum:nl,1 1 2
flmle lime, 69, 71. 72.91, 131. 135.224 fl~t ortlrl melhod. 9) HG:llInK pOint amhmelK, 14. 16 nG:lllnM pO,nl numbrr. 10), I ~ Au,d dynanuci. 207 I·OII1S,...,. 114 tor, 38. 40. 53. 117. 22 1. 257. 263 for-loop. 311. 40. 53 f(>rc~. ~Ilor;nll. 163 forcmll. 136 forc'ng func lu,IfI. 164. 199.201.202.204 forcln" period ,c. 161. 164.201 to .... h u i ••. 173. 177.273 formal. 119 to .... t . .13-36. 90. 2.50 t o .... t long. 14 t o .... t .bort.1 4 formula 'oOlulIOn. 5 I. 63. 87
l'ouflcr Clpatliioo. 203 I·~q ... ""y.
160
frequcncy.272 friction. 168 friction coeffi cicnt 168 Fru1.K-muHc: ric:s. 175. 177. 194 FlOm Worklp3te:. 205. 2S8 front en d. 12 1 funt" ....... 106 fll.Dc tioQ.36. 169. 257 funct,OII body. 109 funcliOO defimtioo line:. 109 functIOn h:oodle:. 103. 115 fU!KIIOII h:oodlc: lltTlIy. 20. 21 funcllon M file:, 34. 36. 88. 94. 107. 108.
'"
funtllon. Airy. 149, 154. 193 fl",c lmn. Hesscl. 149, 155. 1511. 195.200 f" nC IlQII. buill.in. 134. 135. 138. 149. 195, 196 fUlIClton. gumma. 193 (UntIlOO. uscr defined. 19 fundan .. nlal lalO'. 1 fundamental sct. 149. 155. 208. 210-213
28' huo. 2). 43. 49. 62. 17_79. 144. 162. 195. ljO. 263
Glm. 145,146.241. 258 II. - .60. 193,254.275 11" • • 114.255 IIcf.114.25j 11"0.1 14
,ene:rll ,.,lullon. 51, 75. 149. 151. 154. 196,208. 210-213. W . 23 1.
m
I"n In
Signal Prol"'rtits...., 12.'1 aia, 126,2.'12 at.;pUfr, IS. 72.2.'12 aillllplot ,2S6 Simulation. 126 Sunul.llon o,agno.lict, lUi S,m"hni. 121, 136. 11II.1M at.ulialt, 121 S,muhnlLibrary,12 1.124
Simuhnl mod.l. 122 a1rl.18,2l.254 Sille Integral, US, 149 S,n~ W.. ", 1J6. 160,258 !,naulor poinl, 174 l ingul"ruy, 16, I 11. 154. ISa. 113. In.
'"
$mlu lanly, ,lTtgulor. 171. 196
~inguIUl'), ~,ngul",,\).
loga.nthmK". 196 rtguillf. IN. 175, 196
Student Vtt1ion. S,
'"
TI~()rcm.
~ingului'). ~mo'~l:>k. U5
Sturm Comp.uison
ata!>. In. 254, :!11 atnint ,254 sm};. 218 Smks l ,brury. 122, 124, 127 ai •• ,66,IIO,252
S,"rm tiou"lle. 150 ~ubmalm. 110 a\lbplot . 113, 256
slasl!. 110 sof,,,,,,,,, pac kagt, 5 sohd hnc, 99 solu';on, ;mphe." 28
aolv. , 10,22.48,49,62,79,83.84. 107,1.\4.162.226. 2H, 252 so.m:e, 218 Sowns l ,brury. 122. 124.160 ~pec.alfllncllon, 51. 52, 60, 87. 149. 174,
193 'pir.al, 224, 228 spring eoo~,am_ 168 spring nw.s syslcm. 207. 209
aqrt . 13. 18. 66. 254 aq\aar. , 24. 28 sqn:rn: wu"e. 20 1 stul>il uy. 5. 51. 94. 133. 224. 229. 231. 214 -237. 277 sllIblc. 57-59. 79. 81. 82. 84. 99-10 1. 152.228.235.236.238 standmg IIInc. 142
147. 148.
165 167
a\lba. 15.53.60, (>4, 72.101,174,180. 187.200,253.274 Sum. 125.258 a ...... 25] supprcuing OUtput, 18 , w,'eh.188 aya, 16. 20. 104. lOS, 111. 200. 212. 214,215.253 sym obJecl. 20 symboh~ computation. 17 1 symbolIC C1~SSlon. 16, 21. 52. IOJ.
105, 107 SymbolIC Malh TooIbo~. 8. 29. 60. 186.
188.190 symbohcoulput.15 symholic solution. 51. 87, 172. 207 Symbolic Toolbox. 15. 16 symbolic vnriahlc. 20 .yma, 15. 16.20.24,29. !OS. 186.253,
m
.yma ...... 49. 253 system. Dum_rical solutIOn of. 219
Start. 126 ~w',"g MATv..B. 8 S\.Ilf1up,m.32 StitH: fricHon, 168 S'tp.45 Steps' ze. 92. 93,97. 136 shIT. 98
t .... 18.254 Wlg_nt h"" 'J1Pro~;malion. 92. 95 tlngenl '-«lor. 225
atr~nWll,
rerminal velocily. 161
104.253 atreat.253 String. 16,21. 103. II).!. 106, 107.248 stn ng concatenation. !OS atrnp.2oo atno e t . 106. 253 slructurc. 105, 115. 127.253
tanh,254 tay lor, 194.201.253 Taylor polynonual, 193-195. 197. 274 Tay!orlCries.193 195, 197 114. 256 tigh t, 25. 53. 66. 68. 225. 226. 228
ta K t.
'"ne.57 '"ne delay. 223, 242 tit la. 24. 26, 39, 40. 53. 66. 68. In.
114.256,265
Inde.•
To WOIh~~. 121. ~8 '001 tw. 10.14. 112 100100 • . 8. II . 121 It>rqUC'.245 In',Ie(;lo.y. 216, 211. 22 1. 223, 229. 2ll. 233-23g.2S1 uunlform. 183 1r.u\\J1O~. ! 10 t r.... po ••• I? 110,253 TnIlOllOlTl