- #1
schattenjaeger
- 178
- 0
http://pacific.uta.edu/~qiming/Project2.htm
Mind you this is solving NUMERICALLY(hence Euler's algorithm)not analytically
*THIS FOLLOWING PART IS JUST ME EXPLAINING WHAT I DID, it's hard to put into words, if you can follow it and spotted a mistake, let me know*
quick assist to get you up to speed, the differential equation you get out of the given info is (dx/dt)=(vl)/x
where v is that .8 velocity and x is the distance to the bank, of course. Using Euler's equation, I got that each subsequent point x is given by the starting point x + dt*((vl)/x) and as the site suggested, I used .1 for dt
so I basically outputted myself a list of each subsequent point x(so like the first one was 15m, the next was like 14.09 or so, all the way down 'till it hits the wall)and even spot checked a few points but just figuring out what the velocity should be at a point(since I had dx/dt)and making sure that velocity matched up with my points(since I knew the dt was .1)
*Ok, ENOUGH OF THAT STUFF
Anyways, long story short, I have all these points, I know they're .1 seconds apart...umm, is that what I need? Should I just use, say, the method of least squares to get the line of best fit across those points and be done with it?(I believe my error would be .1^2)
Or did I totally miss the point and is there a way to directly obtain x(t) with that algorithm? I think I'm doing it right, but hey, I'd like to be sure. Oh, and like the messed up due date?
Mind you this is solving NUMERICALLY(hence Euler's algorithm)not analytically
*THIS FOLLOWING PART IS JUST ME EXPLAINING WHAT I DID, it's hard to put into words, if you can follow it and spotted a mistake, let me know*
quick assist to get you up to speed, the differential equation you get out of the given info is (dx/dt)=(vl)/x
where v is that .8 velocity and x is the distance to the bank, of course. Using Euler's equation, I got that each subsequent point x is given by the starting point x + dt*((vl)/x) and as the site suggested, I used .1 for dt
so I basically outputted myself a list of each subsequent point x(so like the first one was 15m, the next was like 14.09 or so, all the way down 'till it hits the wall)and even spot checked a few points but just figuring out what the velocity should be at a point(since I had dx/dt)and making sure that velocity matched up with my points(since I knew the dt was .1)
*Ok, ENOUGH OF THAT STUFF
Anyways, long story short, I have all these points, I know they're .1 seconds apart...umm, is that what I need? Should I just use, say, the method of least squares to get the line of best fit across those points and be done with it?(I believe my error would be .1^2)
Or did I totally miss the point and is there a way to directly obtain x(t) with that algorithm? I think I'm doing it right, but hey, I'd like to be sure. Oh, and like the messed up due date?
Last edited by a moderator: