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

КОМЕНТАРІ • 22

  • @JohnVKaravitis
    @JohnVKaravitis 4 роки тому +21

    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.

  • @nefereous9082
    @nefereous9082 3 роки тому +8

    this video is really good and quick, now i have the intuition to study further

  • @deniz.7200
    @deniz.7200 9 місяців тому

    The explanation with code is really helpful

  • @fxbros5034
    @fxbros5034 5 місяців тому

    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"

  • @jasonthomas2908
    @jasonthomas2908 4 місяці тому

    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

  • @shahriarhabibi8382
    @shahriarhabibi8382 5 місяців тому

    Very nice!

  • @shahriarhabibi8382
    @shahriarhabibi8382 5 місяців тому

    Thanks a lot!

  • @pppooppoo7763
    @pppooppoo7763 Рік тому

    Shouldn't the k equations be timestep * function?

  • @ddylancristo9229
    @ddylancristo9229 6 років тому +1

    thanks a lot :)

  • @misterx8934
    @misterx8934 4 роки тому +2

    Hi, shouldn't it be x_ecm = x_ecm + fun(t, x_ecm)*dt? :)

  • @NZIT1
    @NZIT1 6 років тому +1

    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

    • @LetsCodePhysics
      @LetsCodePhysics  6 років тому +2

      This series' codes are made with VPython (Vpython.org). You can also access the code from the video description.

  • @WhateverOwO
    @WhateverOwO Місяць тому

    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?

    • @AgnaktoreX
      @AgnaktoreX Місяць тому

      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)

    • @WhateverOwO
      @WhateverOwO 23 дні тому

      Oh, oh, OH.... dude, math notation gets confusing if there's no clarification or footnotes or anything, Wikipedia sucks at explaining the thing ​@@AgnaktoreX

  • @abhimanyusinghkhichi6515
    @abhimanyusinghkhichi6515 4 роки тому

    can you please explain rate(100) line in the code ?

    • @LetsCodePhysics
      @LetsCodePhysics  4 роки тому

      rate controls the animation speed in frames per second. It has no impact on the physics model.

    • @abhimanyusinghkhichi6515
      @abhimanyusinghkhichi6515 4 роки тому

      @@LetsCodePhysics thanks for explaining

  • @zman97211
    @zman97211 2 роки тому

    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.

    • @zman97211
      @zman97211 2 роки тому

      Oh, I see, immediately afterward you DO use x in fun(). You should avoid that name collision though. Thanks again.

  • @gopnikboy
    @gopnikboy 5 місяців тому

    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