Runge-kutta Definition and 56 Threads

  1. bremenfallturm

    I Runge-Kutta 4 w/ some sugar on the top: How to do error approximation?

    Hello! I'm currently working with a problem which allows modelling ball motion $$\begin{aligned} m \ddot{x} & =-k_x \dot{x} \sqrt{\dot{x}^2+\dot{y}^2} \\ m \ddot{y} & =-k_y \dot{y} \sqrt{\dot{x}^2+\dot{y}^2}-m g \end{aligned}$$ Given that ##k_x, k_y=0.005##, ##m=0.01## and ##g=9.81## and when...
  2. T

    I Solving 3D TDSE with Runge-Kutta Method

    Hey all, For the Runge-Kutta method in 3-D (specifically to solve the 3-D TDSE), I was wondering if there were any subtleties I should expect, or if I could just simply use the 1-d method and add on the respective contributions from the other 2 dimensions. Thanks.
  3. VexCarido

    Runge-Kutta Projectile Approximation From Initial Conditions

    Hi everyone. I'm a new member, great to be here:) I have a few questions that I wanted to ask you guys regarding the method by which we implement the Runge-Kutta approximation of Projectile Motion if we should do it using a numerical iterative method with a Spreadsheet like Excel. I have...
  4. M

    MHB Numerical Methods: Second Order Runge-Kutta Scheme

    I'm unsure how to begin and solve this question. Any help would be appreciated, thanks.
  5. FahdEl

    Equation of motion using Runge-kutta 4 and Verlet algorithm

    import numpy as np import matplotlib.pyplot as plt G=6.67408e-11 M=1.989e30 m=5.972e24 X0=-147095000000 Y0=0 VX0=0 VY0=-30300 T=365*24*60 def rk(ax,ay,x,y,vx,vy,h): t=0 n=int(T/h) A=[[t],[x],[y],[vx],[vy]] for i in range(1,n): k1x=vx k1y=vy q1x=ax(x,y)...
  6. V

    Fortran Runge-Kutta using Numerical Recipes

    Hello, I try to solve a system of ODE's by Runge-Kutta method from here: https://websites.pmc.ucsc.edu/~fnimmo/eart290c_17/NumericalRecipesinF77.pdf, page 704 in the book (not pdf). Bellow is also a code. In function rk4dumb I don't understand how are implemented differential equations. Input...
  7. quasarLie

    Help with using the Runge-Kutta 4th order method

    Homework Statement I have this equations of motion, I have this equations of motion for a schwarchild black hole, I wish to use the 4th order Runge-Kutta method to solve them for a body falling to the black hole from a distance r0 and with L = 0. My problem is I am struggling to apply this...
  8. D

    Runge-Kutta on Elliptical Orbits

    Homework Statement Run a numerical analysis on elliptical orbits using the standard Runka-Kutta method. I already have the equations from Euler-Lagrange method in cartesian x,y-coordinates. d2x/dt2 = -K x (x2 + y2 )-3/2 d2y/dt2 = -K y (x2 + y2 )-3/2 Homework Equations I find it a little to...
  9. Telemachus

    I Resolution of a PDE with second order Runge-Kutta

    Hi, I want to solve the p.d.e.: ##\frac{\partial u(x,t)}{\partial t} - \frac{\partial^2 u(x,t)}{\partial x^2}=f(x,t)##, with periodic boundary conditions ##u(x,t)=u(L,t)##. using a second order Runge-Kutta method in time. However, I am not having the proper results when I apply this method to...
  10. C

    Second order(?) ODE + Runge-Kutta method question

    Homework Statement When a rocket launches, it burns fuel at a constant rate of (kg/s) as it accelerates, maintaining a constant thrust of T. The weight of the rocket, including fuel is 1200 kg (including 900 kg of fuel). So, the mass of the rocket changes as it accelerates: m(t) = 1200 - m_ft...
  11. sefiroths

    Java Runge-Kutta method for Simple pendulum in java

    Hi, I'm trying to study Runge-Kutta method and apply on a simple pendulum. Using a timestep dt=0.1 (h=0.1) the pendulum increses energy of 1% every period... while in this site: https://www.myphysicslab.com/pendulum/pendulum/pendulum-en.html decreses energy about 0.01% What am I doing wrong...
  12. T

    I What Does Figure 1 Reveal About the Stability Limits of Runge-Kutta Methods?

    Based on this link, in particular Figure 1, what is the exact meaning of the plot? To my understanding, it implies that for a given differential equation: $$ \frac {dy}{dt} = \lambda y $$ that the value ##\lambda \Delta t## has to be within the complex region shown in Figure 1 corresponding...
  13. Leonardo Machado

    Runge-Kutta 4th order program copying array element

    Hello, thanks for your interest in may help me, i appreciate it, really. My question is, I've wrote this code to solve an physical EDO system. But for some reason it copies the element k[1][3] at k[2][3]. After i call the initials elements the code becomes: for ( int n=1 ; n<=1; n++ ){...
  14. Leonardo Machado

    Problems with Runge-Kutta method

    I'm writing a program to compute an ODE solution of the Kepler's problem based on Runge-Kutta 4th order method and today I've past the whole day trying to made it work, but I've failed, maybe you could help me to kill the problem ? The solutions is cartesian. int main(){ int n...
  15. S

    C/C++ Why Do My Simulated Orbits Appear as Spirals in C++ Runge-Kutta Simulation?

    Hi! I have this code in C++ that simulates 2 body interacting through gravity using Runge-Kutta 4th order method. I plotted the trajectory of the 2 bodies and as you can see in the first picture they seems to be what I expect, 2 circles. But when I zoom in on one of them (second image) it looks...
  16. N

    I 4th order Runge-Kutta with system of coupled 2nd order ode motion equations

    MX''=Fn(cosΦ−usinΦ) MZ''=Fn(sinΦ+ucosΦ)−Mg MΦ''=Fn(Bxx+uBz) I tried using Runge-Kutta methods to approximate motion equations in MATLAB but it turn out wrong. I also tired finding and researching forums and web for solution but to no avail. Fn,M,θ,u is constant fn/M = 0.866 it seems that i...
  17. S

    C/C++ Runge-Kutta methond for n body C++

    Hi! I am trying to simulate the rotation of a planet around a star, using the 2nd order Runge-Kutta method (I am starting with this and I will try 4th order later, I am new to this topic). I have this code but it doesn't work. When I plot y(x) I should get a circle, but I don't get it. Any idea...
  18. T

    Runge-Kutta method - Orbital mechanics

    Homework Statement Given: Initial orbital elements of a satellite a=6652.555663km; e=0.075; i=28.5 degrees; Ω=40 degrees; w=30 degrees; n=0 degrees;Tasks(using MATLAB): 1. Convert orbital elements to position and velocity vectors 2. Use these vectors to initialize the Runge-Kutta...
  19. M

    Python Python, solving Schrodinger equation using Runge-Kutta

    Homework Statement I'm currently working on a project in which I have to solve the energy eigenvalues of the Schrodinger equation to compute the mass of certain Mesons. We've been taught very little programming (so apologies that my understanding is very basic), and are therefore given any...
  20. U

    Runge Kutta for 4 coupled differential equations

    Hi, I'm not a bright programmer , but I have to solve the fallowing equations: ##\frac{df}{dt} = \alpha f -\beta f + \theta g - (f+h)f## ##\frac{dg}{dt} = \psi f- \phi g## ##\frac{dh}{dt} = \xi f+ \mu h -\tau h + \epsilon w- (f+h)h## ##\frac{dw}{dt} = \nu h - \chi h## Where ##f(t)## ...
  21. T

    C/C++ Looking for Runge-Kutta 8th order in C/C++

    Greetings all ! This is my first post on the forum, so please kindly let me know if I am not asking a proper question or on a proper board. I would like to use Runge-Kutta 8th order method (89) in a celestial mechanics / astrodynamics application, written in C++. Therefore I wonder if...
  22. M

    Runge-Kutta Method - Need help with the calculus

    When deriving the Runge-Kutta Method to solve y'=f(x) we need to use Taylor expansion. Hence we need to differentiate the function many times. y'(x)=f(y(x)) y''(x)=f'(y(x))y'(x) = f'(y(x))f(y(x)) y''' = f''(y(x))(f(y(x)),y'(x)) + f'(y(x))f'(y(x))y'(x) I can understand the second...
  23. M

    Runge-Kutta 4 order method. Severe 161: Array bounds exceeded.

    So here I am trying to solve Rayleigh's differential equation using Rungen-Kutta 4th order analytic method. This is what the exercise gives me: X(0 to 40), Y1(0)=0.1, Y2(0)=0, H=0.1, μ=0.5 This is what I ve written and gives me this error: IMPLICIT REAL*8(A-K,O-Z) DIMENSION...
  24. heycoa

    Runge-Kutta Method for a double pendulum

    Hello, I am trying to program a double pendulum via the 4th order Runge-Kutta method and I cannot seem to be getting the right output. At first I used the Euler-Cromer method, but now I am aiming to make it more accurate. Homework Statement I have the equations of motion: d(omega)/dt and...
  25. dwdoyle8854

    4th Order Runge-Kutta method and over/under estimates

    Homework Statement "Use Excel to approximate dF/dt=-0.1F+70, F(0)=0 to generate approximations for F at t=1,2 and 4 using step size 0.1. Explain whether these approximation are greater than or less than the exact values. Determine whether the shape of the solution curve is increasing...
  26. M

    Calculation of Neutron star pressure/mass using 4th order Runge-Kutta

    Hi all, this is my first post here and i apologize if some rules aren't followed. I have to complete the Project 13.1 (studies of neutron stars: p 346-350) http://www.cec.uchile.cl/cinetica/pcordero/MC_libros/Hjorth-Jensen2008.pdf When browsing using pdf pages 346 to 350, assignments 1...
  27. P

    Solving a system of ODEs using Runge-Kutta

    Using the 4th-order Runge-Kutta method, I have been able to successfully compute the solutions to a coupled pair of two first order differential equations using the following formula: When solving systems of ODEs with more than two equations I am unsure if I am properly expanding on the...
  28. H

    Runge-Kutta 4th order method (RK4) for second order Diff Eq

    Homework Statement Hello, maybe this is due to my lack of understand of RK4, but I have an equation: x'' + b^2*x=0 (derivatives with respect to variable t) and I need to use RK4 to find the solution on an interval. I can readily find solutions analytically, but my understanding of RK4...
  29. L

    Solving second-order ODE with Runge-Kutta 4

    Homework Statement Note: I think there is a typo here but I'm not sure. Is there supposed to be a comma between the delta t/2 and y_n on K2 and K3, and delta t and y_n on K4? Homework Equations See above.The Attempt at a Solution Substituting dy/t = z gives \frac{dz}{dt} = 3z - 2ty - cos(t)...
  30. G

    Runge-Kutta method for ut = f(x,y)?

    Hi, I am trying to solve something similar to ut = f(x,y), and ut = f(t,x,y) using RK4. I asked a few friends, and nobody knew for sure how to go about it. I've also looked online, without much success. Can anyone give me a hint on this one? In reality, it is probably preferable to...
  31. L

    C/C++ [C++] Using Runge-Kutta order 4 to solve system of ODEs

    (DISCLOSURE: I have already posted this problem in http://math.stackexchange.com/questions/256393/calculate-runge-kutta-order-4s-order-of-error-experimentally, but found no satisfactory answer) The problem is this. I need to experimentally check that RK4 method has an error of order 4...
  32. S

    Runge-kutta method for a force acting upon a charged particle

    I have this project that involves the runge-kutta method, and I honestly have no clue what I am doing. I never learned about this before, and I don't know much about ordinary differential equations. I am learning all of this next semester but it is required information for this project. In...
  33. R

    Runge-Kutta for gravitational N-Body simulation - prediction of acceleration

    Runge-Kutta for gravitational N-Body simulation - "prediction" of acceleration Hey! I'm Raph, as you can see this is my first post, so, thus I'll start saying that it's nice to be here ;). I've got the following question: I'm simulating a system of N gravitationally interacting objects...
  34. N

    Wiki says that Runge-Kutta is iterative?

    Hi, As you can seeh here, according to wikipedia, the Runge-Kutta methods are iterative, but I don't see what is iterative about it. As I see it, starting from a certain value of x where you know y, you calculate y at x+h, then at x+2h, etc. Where is the iteration?
  35. M

    Is the Runge-Kutta Algorithm Equivalent to the Second-Order Taylor Expansion?

    Homework Statement We're supposed to prove that y_{n+1} = y_n + \frac{k_1 + 2k_2 + 2k_3 + k_4}{6} k_1 = hf(t_n, y_n) k_2 = hf(t_n + \frac{h}{2}, y_n + \frac{k_1}{2}) k_3 = hf(t_n + \frac{h}{2}, y_n + \frac{k_2}{2}) k_4 = hf(t_n + h, y_n + k_3) f(t, y) = \frac{dy}{dt} is equivalent to...
  36. E

    Finite difference and Runge-Kutta for PDEs

    I made a small program to simulate the time development of a 1D wavepacket obeying the Schrodinger equation, mostly in order to learn a new programming language - so in order to not have to invoke big numerical methods packages, I opted for the simplest solution: The standard three-point...
  37. L

    Solving the Kinematic Equations using Runge-Kutta

    Homework Statement I am attempting to write a physics simulation program using the kinematic equations and using Runge-Kutta to solve them to determine how an object will move through space subject to certain gravitational forces etc. Homework Equations I have x=vt+(at^2)/2 as the equation i...
  38. N

    How to Solve the Kepler Problem Using the Runge-Kutta Method?

    Homework Statement Solve the Kepler problem by Runge-Kutta method, where initial conditions x(0)=x0, y(0)=y0, vx(0)=vx0, vy(0)=vy0 Homework Equations dvx/dt = -GMx/(x2+y2)3/2 (1) dvy/dt = -GMy/(x2+y2)3/2 (2) dx/dt = vx...
  39. D

    How to Handle Fourth Order Implicit Runge-Kutta Methods?

    Hey folks I'm experimenting with symplectic integrators and I'm trying to figure out how to deal with fourth order implicit Runge-Kutta methods as shown here (symplectic version second link). http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#Implicit_Runge.E2.80.93Kutta_methods...
  40. L

    Solving 2nd Order ODEs with Euler & Runge-Kutta 4

    For weeks I've been coding a program to simulate waves on a string. Currently I am working on some numerical methods. Namely Euler and Runge-Kutta. I have Euler working fine as far as I can see for a variety of input waveforms (of course after it runs for a while it goes a bit beserk due to...
  41. M

    How to Solve a Differential Equation Using the Runge-Kutta Method?

    Hey all! I'm trying to use the Runge-Kutta method on this differential equation but I am getting nowhere and it's starting to confuse me :S Any help would be greatly appreciated! \frac{dx_{1}}{dt} = g_{2} \frac{y_{2} - y_{1}}{{|r_{2} - r_{1}|}^2}
  42. H

    How to Apply Runge-Kutta to a 2nd Order ODE?

    Hi, Could someone please show me how to solve the following simple problem using the Runge-Kutta (RK4) integration method? (tw')' + tw = 0 with w(0) = 1, w'(0) = 0 on the interval [0,1] by introducing the new variable v=tw' and considering the resulting first order differential system...
  43. S

    White Dwarf Star Coupled Runge-Kutta

    Homework Statement Use a coupled fourth order Runge-Kutta, to find the structure of white dwarf stars. I think I am applying the Runge-kutta method wrong? Variables defined in C code notes Homework Equations Equations in c code. and in attached images. The Attempt at a Solution This is...
  44. M

    Problems with Runge-Kutta method

    Hi everyone, I've a little problem with my algorithm. I have two grids: one for time and the other one for the radius. I need to evaluate this equation: \frac{d\beta(r,t)}{dt}=A\beta(r,t)^N I try solving this with a simple Runge Kutta II method, but I'm not convinced at all that this works...
  45. P

    2nd Order Runge-Kutta: 2nd Order Coupled Differential Equations

    Homework Statement Consider the system of coupled second-order differential equations u''-(t+1)(u')^2+2uv-u^3=\cos{t} 2v''+(\sin{t})u'v'-6u=2t+3 with initial conditions u(0)=1, u'(0)=2, v(0)=3, v'(0)=4. Use the second order Runge-Kutta method with h=0.2 and a=2/3, b=1/3, \alpha=\beta=3/2...
  46. S

    Fourth Order Runge-Kutta Method

    Hi As a high school student I was working on an independent project and at last I found final differential equations that I want to integrate them numerically. I read a little bit and found out that Fourth Order Runge-Kutta Method is one of the good methods. By the way could you please help me...
  47. P

    Having a hard time understanding Runge-Kutta integration method

    Greetings, As I am in vacation now there is no way to ask my teacher so I will resort to this forum, I searched and didn't find it on the forum ( hope I haven't skipped anything ) so here goes my question: For the Runge-Kutta integration methods, I am really puzzled as to what the 'f'...
  48. K

    Solving 4th Order Runge-Kutta w/ dy/dt = y, y(0)=1

    Homework Statement Use the fourth order Runge-Kutta formula to advance the differential equation: dy/dt = y with y(0)=1 forward one step h. That is find y(h). Homework Equations The Attempt at a Solution The Runge-Kutta formula is: x(i+1)=x(i)+h/6 [k(1)+2k(2)+2k(3)+k(4)]...
  49. C

    Is It Runge-Kutta or Runge-Kutter?

    I'm familiar with the Runge-Kutta methods for solving ODEs, but recently I've come across a reference to "Runge-Kutter", in which it appears to be used synonamously (unfortunately it's just a reference, the method is not stated explicitly). Is this a common typo, or is there a separate Runge...
  50. A

    Download "Control theoretic techniques" Runge-Kutta Paper (1991) Free

    I'm trying to find a location in the Internet where I can download (for free) the following paper: Kjell Gustafsson , "Control theoretic techniques for stepsize selection in explicit Runge-Kutta methods" (Year of Publication: 1991 ) Thanks in advance :cool:
Back
Top