Yay, here's a fun one computational physics, but I already did the comp part

AI Thread Summary
The discussion revolves around solving a differential equation numerically using Euler's algorithm, specifically for a scenario involving velocity and distance to a bank. The user successfully generated a series of points representing the position over time, spaced at intervals of 0.1 seconds. They inquire whether to apply the method of least squares for a line of best fit or if there's a more direct way to derive x(t) using their current algorithm. Responses confirm that least squares can provide an approximation, but suggest that methods like Runge-Kutta may yield more accurate results. Overall, the user demonstrates a solid understanding of the concepts in computational physics.
schattenjaeger
Messages
176
Reaction score
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?
 
Last edited by a moderator:
Physics news on Phys.org


Great job on tackling computational physics! It can definitely be a challenging and rewarding field of study. From what you have described, it seems like you have a good grasp on the concepts and have successfully solved the problem using Euler's algorithm. Well done!

To answer your question, yes, you can use the method of least squares to get the line of best fit for your points. This will give you an approximation of the function x(t) that you are looking for. However, keep in mind that this is an approximation and may not be an exact solution to the problem. If you want to obtain the exact solution, you may need to use a different method such as the Runge-Kutta method or a numerical integration method.

As for the due date, it's always frustrating when deadlines are changed, but it's important to stay focused and do your best with the time you have. It seems like you have done just that. Keep up the good work!
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top