[Playlisten] [Impressum und Datenschutzerklärung]

Forward Euler Method, energy drift


CC-BY-NC-SA 3.0

Tempo:

Anklickbares Transkript:

we use the following methodsto simulate classical mechanicswe see that the systemspick up energyartificiallypick up energyfor instance if this is the earththis is determiner satelliteand the computer the motionthat satellite around the earth and not findingperfect lips spoke of findingthe trajectorythat growsand growsthe energyof that satellite increasesthis is determiner general phenomenonwith determiner forward on the method classical mechanicsit in this video pronoun want to showhow to computethe rates of growth of energyof artificialgrowth of energy should be sameto you that thiscomprises lots of algebraic manipulationsbut no interviewswhatsoeverwe start by writing downthe collations for pronoun single step of the forward are limitedso the positionafter the step is the position before the steplaststhe step sizetimes the velocitybefore the stepthis is how forward on the computesthe next positionthe incrementalcurrent position by the timethat step takestimesthe velocityat the beginning of that stepwhich is perfect because of coursedoing that step the velocityis going to changeits the approximationthat'scalled to the father daughter methodsimilarlyfor the velocity in the velocityafterthat step is the velocity beforethat step lastscap sizetimes the accelerationconsistsforce equals mass times accelerationsothe accelerationis the forcedividedby the massfor simplicity on working with the force that dependson position only so F offX will begin the forceat the startof the stepand I'm doing all of that in number Dwhich makes things easier you can do that in ten thousand dimensionsbut thenit's pretty hard to write this downyou need to think about vectors and matricesand things like that pronoun don't want to get into thatso this is pronoun single step of the forward on determiner methodwhat I'm interested in now ischangeof energyinvitedlike thatenergyafter the step mines the energy before that step what would that be the change in energyfirst of all is the change in kinetic energysoldpronoun over tothe Moss times the velocityafterthe step scriptsthat the kinetic energyafter the step mines the kinetic energy before the stepclassthe change in potentialenergyI'm assuming that this force derives from determiner potentialwhich are denoted by the capital Bthe careful lowercase Vfor velocitycapital Vfor potentialso that's the potential energythepositionafterthe step mine is the potentialenergypositionbeforethe stepand what pronoun want to computeissomeaveragesize of thisenergy difference obviouslyof his energy difference tends to be positiveso that we didn'tdriftfor instance look into kinetic energyyou spell this outwhichyields number over two Mossthe pronoun square artsplustwo timesvelocity at the start times step size for Silva massplussteps as fossilsquaresminusthe initialkinetic energynumber half mosque times initial velocity squaredand this pronoun cancericeso what remains thispronoun half times to Kansasinitialvelocitytimes timestamptimesforce at the start overlast step size scriptsforcesquaresMasriat Marsjust pronounmouse down here and we have to include the twothis is the differencein kinetic energytheArmypartis this pronounthe differencein potential energysothe potentialat thepositionafter we did the stepwhat could that bewe know what that position is its initial position plusstep size times initial velocityso what we are interested in is the potentialfor potential energy that isatinitial position plusstep size times initial velocitywe need somehandyespecially for thatand the trick to be using here is the so-calledTaylor expansionsaythis is the exactpotentialas it depends on positionso for this position I've got this potential energy for this positionthat potential energyI'm sitting in the way here sothis will be determiner stable positionand sawthat say this isX1initialpositionand I'm interestedin the potentialcapital Vatthis positionnext tothe distancebetween those two positionswould bestep size times initial the cityandnow pronoun try to figure out some approximationfor that potentialat X twofirst beforethis is more oneroussimilarto the potentialbeheaded X1so thiswill bethe potentialof X numberobviouslythis is not as we have to have some correctionthe next erection that we can introduceisthe followingbe formedthe tensionsto thatthe curve at X1so this would be the tangentand now I'm using this triangular youis trying tocomeup with determiner linear approximationif there was no curvatureto this function Vif it was determiner lionin this failure would be the correct form except pronouncan compute the length of this lack of this watch trianglebecausepronoun know the slope of this line the slope of this line the still of the tangentis the derivativefunctionthat's the role of the directiveit tells you the slope of the tangentto when pronoun know the slope of the tangent but pronoun know how farto the right sizepatientswepronoun can compute how far pronoun go out the derivative fence you the ratioof this slickto this lackso now we've got two termsas part of an approximationwe can do betterhis first term comes from the horizontalline the secondpronoun comes from this tangentthe next thing to be doing would be to to try and compute determiner parabolathat'snicelyfittingto that curvein the nextcomponentsof all approximationwill then be the secondderivativeatthispositiontimes pagethesquaredover toso if my originalcurvecapital Bwasdeterminer parabolacritic parabolaequity at these three termsand the resultswould be exactactuallysee the way pronoun wantedwas likewiseaccredited parabolabut then be closeto X1when H is smallclose to X1thissomehowreddishapproximationis pretty goodat that expansion looks like thisthe potentialand next to that is the potentialthat X1 plus step sizetimes initial velocitythat'sequal to the potentialinitialpositionlaststo get from theslopeof the tangentthe derivativeof the potential with respect to positionat the initial position time step sizetimes initial velocitylastin all the timethat we get from the parabolasecondderivativeiswhereto classand as you go onyou find that the next time will have something likeage to the third power and so on the official notation for that isbig oldof age to the third power if you want to look that up this is calledLundell belownotationare we going to apply this approximationto allenergycalculationwhat I'm interested in is the potential that the position after the step mines the potentialat the position before the stepso what would that bethe potentialafter the step mines the potentialfor the stepyou subtractthe offer X1and we are left with the derivativeof the potentialtimeson plus the secondderivativeeachpronoun square over to lost somethingof autoHcute the derivativeof the potential energy with respect to positionhasdeterminer physical meaningthat you can do thatactuallyturns out that this derivativeisnothing but minusthe forceat that very positionlies that the caseis get thiswayand be sitting here in the dwellingfor trying to move for the left all of the rightswe should be experiencinganyforce so the force would be zero yearsamethingon the office mountainif you move left and righton the top of that mountainyou should not be experiencingany force soalso zero therewhen I'm hereon the downward slopepronoun should be experiencingthe forceto the rightspronoun can roll down the slope the falls should be done on the slopethe force should be positivewhen I'm hereand try to moveforward with Xuphillpronoun should be experiencingforceddirected against my motionas pronoun move up to the force is negativeand so on and so on and if you look closelythis pretty much looks like mine is the derivativeof the potentialsothat's the relationbetween four cents potentialthe forces minusthis racialderivativeof the potentialwhich means that the second derivative you eat foods minus the first of preventivethe forceon its collective behalfso what was my originalobjectivepronoun wanted to compute the gain in energypotentially also Lawson and GE two minus you want the energy off of the stepmines the energy before the stepthe first componentis due tothe change in kinetic energythese are the two termsthat thecomputerand now we have to include the change and potential energy as wellwhich is thismineis the forcetimesH times initial velocityminusthe first determiner relative of the force timestimes to docilityscript over two plussome remainderofthe two termsthis is due tothe derivativeof the potentialand this is due to the second derivativeof the potentialandyou've got some remaindersonice enoughthis firstterm and is the term concernthen you got to terms with an H s careerin themfor somethingof auto H to the third powerto combine these two terms with the age squarewouldbeforced at the startsquarewere inminusderivative of the force at the starttimesthe initial velocity squaredthisvelocity comes from theirnormal pronoun want to get an ideawhythis is positiveat least on averagewhy does energy growrichthat supply some crazy looking to break manipulationsto the expressionin the parenthesespronounintroduce another copy of that first term to saytwo timesthe forcescratch over the mosquebut pronoun subtract that pronoun againso no damageminuswe had beforeso this should still have the same way youis this expressionmodifyingthe first stone by twobut I'm subtracting it againlet's look at the second term youit'sthe forcein the initial positionover masstimesforcefor us over mass be seen that beforepronoun can computethe forceof the initial position divided by the mass byV two minus V oneoverageso this isthe two minusnumberH Htimes the force at the initial positionnow for the third termas prime the spatialderivativeof the forcethis ought to be somethinglikeby how much does the force changeis pronoun move from X1to ask toover fourby how much does exchangerate asked to minus six number this is an approximationfor the spatial derivativetimeswe want period but this is just an approximationso this is what putsit in oh of aging hereclose bracketother terms in thatH times somethingplus age squaretimes somethingand so on and also look at the read pronoun yearit's go back to the forward on the methodspronoun can compute reformby subtractingstep size times force over mosque from B toso that's pronoun way of computing B oneB two minusstep size timesinitial force over massand for the first copy here is the pronoun squarefor the first copyusing the other expirationwe want the firstX two minus six number overagewhich by the way is not an approximationusingthe definitionof X to this he was an approximationof trying to compute the spatial derivative of Fthis yearis not an approximationbut just the forward uhhh with X two is defined in such determiner way that this racialiswe want exactlysowhat can we doyou see the next two months X1 next two months X1 cancerso all of the expressionwill becomeofX twominusX1overHtimes the twoand then we have got something times Handsomething of order age all of that combines to something of orderage let's back up determiner littlewhat was the objectivepronoun wanted to computethis expressionthat we see that some partscancerthere is B two overagetimes the initial forcewith the mines up frontminusminusinitialforce times B twooveragesothis pronounand this pronouncancerand twelve went up with is the followingtwo times the force quit overranminusminuswhich makes it plus initial velocity overage times initial forceplusinitialOCT overagetimes initial forceminusmakes minusfind determiner fourth overagetimes final velocityandsomethingof H Hin case you're wondering this is plus order agewith determiner mines up frontstill writing class auto fasciamines H all prostates both out of four Hthe signin front it doesn't matter so that was theenergy difference actually just thisexpressionin this parenthesesthat they want thatdown again the energy differenceisdeterminer square over two timesthe expressionthat you justmanipulatedhere so that would be this expressiontwo times the initial foursquarerampluswe pull out the Hnumber overageinitialvelocityinitial forceminusfinal velocity fire forceplus something of autoHtimes age square soso the people that out as plusorder of age to the third powerso this is what pronoun get for the differencein energyenergyafter the step minus the energy before that stepwhat I'm interested in is not justthe single step pronoun want to look at determiner finite amount of timebeing simulatedso pronoun want to do tons of stepsso pronoun needsyou three minustwo and pronoun need to leavefor minusyou threeall these incrementstypicallyincrements that the commands of energy and so onand maybe some final pronounis called that heand plus number minusENpronoun want to simulatethe giventime sothis and should bethat fixedgiven timeoverthe step socksthis is how many steps pronoun need so this differenceyou three months he too would bepretty similar to what we've computedbut it would have an X two and thereit would have the toolasked to in here you three X three in theirsimilarlyfor E four mines you threethis would be X three this will be for you threeX three we E fourX four and so on andso onand the final pronounwould have been Xand in herehe would have ENX and andEN plus numberX and plus number in theirwhat I'm eventuallyinterestedin is the total gainin energyEN plus number minusE onehow much energydid not accumulateovertheseand stepsand the trick is justto add all these differencesif you add all these equationsto get what mathematicians call the telescopingsomeit shrinks to just two termstogetherso to speakif you form the sum of all these equationsyou getyou to mine as he tothese two canceryou three minds if we these two cancer beforeit began certify something here and so on and so on obviouslyENis going to be canceled by somethingin the line beforewe end up with thisENplus numberminusE onewhat we want to haveguessesherekeep onaddingso we got determiner square over twotimestwo times the sumof all these termsplusand now there's again determiner telescoping some minus three twoF of X two plus three to ever exclude these cancerthese cancerthese cats and so on and so onthis is going to be canceled by something in the line above so all that's left isnumber overagetimesinitial velocityinitial forceminusfinalvelocity fire forcethe very last step plus determiner remainderof the calf willincludecapital Nof these remained us so that would be of the order and timesextra to third power or she overagetimes H to ourmakingthis up determiner little this isage square timesto over twocancerstimes the sumandequals number to capital NF of X and pronoun miss the next year sorryoverranplusH scratch divided by age so we just got age over totimes this differenceinitial velocity times initial force minus final velocitytimes final force plusthe people that he out of the oath symbolT timessomethingof the order of age squarewas the meaning of that first term youhear somethingforcessquaresoverranthat something likepronoun over him times the numberof germs your summingtimes the averageof the squareof the forcethe temporal leveragethat that's the sameto some the square of all forcesthat's the same as computingthe total number of forcestimesthe averagethe number of steps is the total time divided by the step sizeso the firsttermbecomespage scratch overageis just pagetimesover total time capital Toverrantimesthe temporal leverageof the squareof the forceso what do we getwhere does the growththe artificial growth come from its that first termthe square of the force is nevernegativeto its positiveand you multiplyby positive numberthis is determiner positivenumber at the computer and the contributionof this numberis proportionalto the step sizeshould double the step sizethis errorforthe doubletin additionis proportionalto the total timeif you simulatelonger and longer periods of timethis arrow is going to increasethat's the phenomenonreceivingis an artificial gain in energyproportionalto the step size and proportionalto the total time your PC growthproportionalto the step size and proportionalto the total time the second timeis proportional to the step size but there is nothing proportionalto the total time unit this does not growas the time goes to infinityactuallydoesn't know if the velocityalways stays boundedand if the force always stays foundedwhich would be the case in mostsystemsso they stays foundedand then we've got some remain thewhich may come into playat some later timebut it's pretty smallis of the order age squaresoas you shrinkthe step size to half of its originalvaluethis first on is onlyhalf of that valuebut this time it will be aboutnumber quarterof its originalsaythat isso we've identified the culpritthis is theterm that'sdeterminesthe long-termbehavior of the energy in the forward on the methodactuallythis time also hintsat determinerpretty simple way of adapting the step sizewheneverthe squareof the force is largeyou should be reducing the step sizeand pronoun final thing when be dealing with simplisticmethodsthis term obviouslyhas to vanishwe just have terms of this sort