Inroducion o Nuerical Analysis oion In his lesson you will be aen hrough a pair of echniques ha will be used o solve he equaions of and v dx d a F d for siuaions in which F is well nown, and he iniial condiions are saed. In he lesson you will find he soluion o he above equaions for a sydiver using he nuerical echnique called he Euler (pronounced oiler ) or Euler- Cauchy ehod. In he lab ha follows you will be provided wih an Excel spreadshee ha perfors such calculaions for a haronic oscillaor and you will be able o copare he nuerical resuls wih experienal resuls. Many ies--paricularly in inroducory courses--he coplee exploraion of a opic in physics is haled when he heory leads up o a differenial equaion. The deailed soluion of he equaion would yield valuable resuls, and provide new insighs ino he concep being covered, bu is usually beyond he scope of he course. Ofen a liiing siplifying assupion is inroduced, which allows he soluion o proceed in a for ha is easier o handle. These siplifying assupions are ofen quie sufficien. This lab gives you soehing o ry when hey are no. A variey of easy o use ehods exis o handle he soluion of differenial equaions, called nuerical ehods. These ehods involve "chopping up" a proble ino any "bie-size" pars ha are easy o analyze. Siple copuaional echniques are hen applied o each of hese pars. The resul is ha a very nearly exac soluion o he equaion, buil ou of any siple calculaions. The reainder of his lesson will deal wih: () a descripion of he Euler ehod, and () he use of his ehod o solve he proble of finding he oion of a sydiver wihou neglecing air resisance. THE EULER METHOD Noaion specific o one diensional oion will be used here insead of general aheaical noaion found in os exs on nuerical analysis, in order o sooh he ransiion o solving he physics proble wih unfailiar aheaics. The proble sars wih a differenial equaion whose soluion is sough. The equaion is nohing ore han a saeen of Newon's Second Law. a F ne d In he sydiver case, wo ajor forces wor on such an objec: graviy pulling sraigh down, and fricion, or air resisance, rearding he fall. Acually, here is a hird force acing upward ha is oied because i is sall copared o he oher wo forces. Wha is i?
Forces Acing on he Sydiver Typically his fricion force can be approxiaed as being proporional o he square of he sydiver's speed. The oal force acing on he objec can hen be wrien: Fne g v In his case is a consan ha describes he air resisance, wih unis of g/. As he objec begins falling, wih zero iniial velociy, i begins acceleraing downward a 9.8 /s. As he sydiver gains speed, he upward viscous daping force begins acing o decrease he downward acceleraion, unil he body reaches an equilibriu sae, or erinal velociy. A his poin he ne force acing on i is zero, since he acceleraion is zero. Thus: g v er Thus, he erinal velociy is easily found o be: v er g If we assued ha he sydiver reached erinal velociy very quicly, hen he proble is quie easy o solve. However, he exac soluion of he sydiver s oion, which is far ore ineresing, is raher difficul. The applicaion of Euler's ehod o his oion, however, allows us o find his soluion nuerically, so ha we can sudy he behavior of his syse in deail. We can wach he objec approach equilibriu, see he effecs of varying he value of, or see he effec of assuing differen odels for he daping force (i.e. have i depend on v or v 3 ). Fro he above equaion for F ne we have: d g v where g = acceleraion due o graviy, = fricional daping consan, and = ass of falling body. The nuerical approach will ae he enire ie inerval during which he oion is sudied and divide i ino sall (usually very sall) inervals ). The proble hen aouns o producing a soluion a a succession of oens in ie, where each oen is separaed fro he nex by ). To begin, iniial values are required, i.e., values for v o, x o, and a o (or equivalenly F o /) a =. In our case,
d a g v Noice ha if v =, hen a = g, as expeced. Over he ) seconds of he firs ie inerval, we preend ha a and v are consan. Thus, a = + ): v v a v g x x v F a g v v As long as he iniial condiions are specified, a, v, and x are all easily calculaed. A he end of he second inerval, when = + ), we have v v a x x v a g v Again, he quaniies v, x and a are all easily copued, since v, x and a have already been evaluaed. As you can see, he soluion proceeds sep by sep over inervals in which he values of he velociy, posiion, and acceleraion a he beginning of he inerval serve as consan inpus o calculae hose sae quaniies a he end of he inerval. Thus, he saller he inerval, he beer he approxiaion will be. The process hen repeas iself, revealing he oion of he falling sydiver. The following figure displays he approach for a general case in which he force law has no ye been saed. 3
"Original" Euler Mehod Soluions Le's loo a he soluion in ore deail.. Sar a he iniial values of all quaniies which are eiher nown, or as in he case of F o, easily copued. A he end of he firs inerval, x v x v F a g v F F( v, x, ) g v x x v v v a F a F F( v, x, ) g v A he end of he second inerval, 4
x x v v v a F a F F( x, v, ) g v These equaions can be wrien ore generally. For he n h inerval, we have: n n n xn xn vn v v a n n n Fn an F F( x, v, ) g v n n n n n Using his repeaing procedure i is possible o ge an approxiae picure of he oion, wihou acually solving he differenial equaion. The accuracy of his ehod depends on he size of ); beer accuracy generally being achieved as ) is ade saller. Noe ha such repeiive copuaions, alhough each siple in and of iself, represen quie a edious ariheic barrage when seen ogeher. Here's where a spreadshee, lie Excel, is ideal. I can be prograed boh wih he nuerical ehod and he force law and carry ou he evaluaions necessary a each value of ). You can hen rapidly plo x vs. or v vs. and ge a quic picure of he oion. The ehod we have oulined above is called he Euler Mehod, also called a "full increen ehod" or "angen line" ehod of soluion. In general, his ehod produces only approxiae resuls, and very sall ) values are required. Hence, here are any ieraions o achieve reasonable accuracy. Deails on how o esiae he errors encounered in a Euler's ehod soluion are covered in any exs on differenial equaions or nuerical ehods. 5
SOME MATHEMATICAL DETAILS The naure of he approxiae soluion can be seen by saring wih he original differenial equaion: a d where we see values of v a ie and all laer ies. The soluion is generaed by expanding v in a Taylor series: d v v ( ) v ( ) d 3 d! 3 d 3! 3 The derivaives are evaluaed a ie and ) is assued sall. When ) is sall, ers in higher orders of ) becoe negligible. In he Euler ehod only he firs er in ) is reained and he ajoriy of he error, hen, is conained in he second order er, ()). Thus, he Euler ehod is called a firs order ehod, and he ajor error er wih he ()) is called he runcaion error. Clearly he saller ) is he closer he calculaed v() will be o he acual value he sydiver has. Of course, he saller ) is he ore calculaions are required o produce a coplee picure of he sydiver's oion. Addiionally, large increens of ) will be ore ap o give poor resuls for funcions ha change rapidly, even hough he larger increens will save copuer ie and eory. For exaple, if he funcion oscillaes several ies during he inerval ), hen he approxiaion will iss he oscillaions and give a slowly varying funcion as a soluion. Thus, he Euler ehod is no ideal for rapidly varying funcions, especially when sufficienly sall ) inervals are no pracical. EXERCISES Use a spreadshee progra o solve he following probles. You should urn in a daa able and plo for posiion, velociy, and acceleraion for each siuaion.. Solve he sydiver proble under he following condiions: verical free fall (no horizonal coponens of velociy), v o = /s, =.5 g/, = 7 g, x o =, = s and f = 5. s o Produce soluions for: ) =. s, ) =.5 s, and ) =. s.. Using ) =.5 s, change he value of or and copare o he original soluion. 6
QUESTIONS Q. For each ) inerval in proble, a wha value of was erinal velociy, v T, reached, if i was reached, and wha were he values of v T? Q. How do you suppose he erinal velociy (fro Q) would change if was reduced o g, while is lef he sae? Q3. How do you suppose he erinal velociy (fro Q) would change if he force law were F ne = g - v 3? How would he erinal velociy change if F ne = g - v? 7