Learning the Runge-Kutta Method 1. Basic Runge-Kutta
Вставка
- Опубліковано 8 жов 2024
- This series helps students learn how to use the Runge-Kutta Method in VPython. It assumes familiarity with the Euler-Cromer Method ( • Euler-Cromer Method fo... ) and VPython (www.youtube.co....
Codes available at www.glowscript...., www.glowscript..., www.glowscript....
Support this channel: ko-fi.com/LetsC..., / letscodephysics
Thank you, patrons!
Fan Xinyu
Super Mario 64 ReMix by DaMonz: "The Slumber of the Beast" [Piranha Plant's Lullaby] (#3462), ocremix.org
The value of this brief video is the overall explanation of k1 thru k4, what you're doing, and the revelation as to why it is so accurate. Thank you.
this video is really good and quick, now i have the intuition to study further
The explanation with code is really helpful
Just a fyi: at 2:09 it shows "x_ecm = x_ecm + fun(t,x)*dt". However in the actual code it is "x_ecm = x_ecm + fun(t,x_ecm)*dt"
Nice video. I just thought I'd mention, that when you say the Runge Kutta Method has 4 points to calculate, then you're specifically talking about the 4th Order Runge Kutta Method. There are other orders. There are also other coefficients, and you're using Runge's coefficients. Anyway, still a good video, cheers
Very nice!
Thanks a lot!
Shouldn't the k equations be timestep * function?
thanks a lot :)
Hi, shouldn't it be x_ecm = x_ecm + fun(t, x_ecm)*dt? :)
...but the mistake helps make my point!
Hi, I tried to follow step by step your code unfortunately when running the code the graph doesn't display. I am just wondering what kind of module in python do you import? In my case I have imported
1-Matplotlib.pyplot as plt and 2- numpy. Thanks
This series' codes are made with VPython (Vpython.org). You can also access the code from the video description.
I still don't get it. Like when you define the derivative what does the argument x do, you never use it in your calculations so what is it doing there?
This is indeed true for the first example:
x'(t) = 3 * t^2
The second example at 1:53 uses the parameter x:
x'(t) = x(t)
Oh, oh, OH.... dude, math notation gets confusing if there's no clarification or footnotes or anything, Wikipedia sucks at explaining the thing @@AgnaktoreX
can you please explain rate(100) line in the code ?
rate controls the animation speed in frames per second. It has no impact on the physics model.
@@LetsCodePhysics thanks for explaining
At ua-cam.com/video/8_PnCSsA_BQ/v-deo.html you pass x (and even refer to it in your voiceover), but it's not even used in fun()? In fun(), you're assigning the result (a real number) to a variable of the same name (fun). You're right, the weighted average happens on line 27, but the stuff highlighted immediately before has absolutely no effect, unless you've redefined the language somewhere I can't see.
Otherwise, I get the drift, and thanks for a quick 2 minute primer on this.
Oh, I see, immediately afterward you DO use x in fun(). You should avoid that name collision though. Thanks again.
still not the perfect explaination but getting closer for sure. how has there been no good visual explanations for numerical methods? man my studies are so much harder than they have to be its simple stuff always explained like the most complex shit