Runge kutta Definition and 50 Threads

  1. hagopbul

    MATLAB Problem with Runge-Kutta script file

    Hello : trying to run mutiple script files on matlab (matlab basic online) but it is giving an error message the files are about runge - kutta method and applying them on a ODEs the 1 script file Lornz : function dy = Lornz(t,y,sigma,beta,rho) % y is the 3 dimentional state vector % y(1)...
  2. Z

    Wrong solution order using Runge Kutta 4

    Hi, I'm trying to simulate a 3-body problem with a star at the center of reference system and 2 body orbiting around it using Runge Kutta 4. The 2 bodies perturb each other orbits gravitationally, so my ode system is actually a coupled armonic oscillator and I evaluate the solution of both...
  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. J

    Help with 2nd order Runge Kutta and series expansion

    So here's my homework question: This is the reference formula along with the Rung-Kutta form with the variables mentioned in the question Here is my attempt so far: Problem is that i am unsure how to expand this to even get going. I tried referencing my text Math Methods by Boas which has...
  5. R

    A Runge-Kutta: Maintaining Units in Numerical Methods

    When conducting numerical methods using 4th Order Runge-Kutta do the physical units have to be maintained? This never occurred to me until I was writing out all the steps in detail when showing someone I work with the method using a simple projectile motion with drag. It had 4th Order time...
  6. mertcan

    A Runge Kutta finite difference of differential equations

    Hi PF, initially I would like you to focus on that link https://books.google.com.tr/books?id=Dkp6CwAAQBAJ&pg=PA389&lpg=PA389&dq=runge+kutta+method++is+tvd+proof&source=bl&ots=47ULQDVwcC&sig=e2zjdnXENJ7WxBbrf6hXkSouvLI&hl=tr&sa=X&ved=0ahUKEwjU5Z2XsbXZAhUMCMAKHWpnATQ4ChDoAQhKMAQ#v=onepage&q=runge...
  7. M

    Runge Kutta to solve higher order ODE

    Homework Statement Edit* should say F'(0) = F(0) = 0 Homework Equations I know that I typically need 3 equations for a 3rd order ODE, does this apply if the is no F'? In the picture above are the equations I came up with, am I on the right trail? Lastly I am familiar with RK4, however I have...
  8. ATY

    A I need some help with the derivation of fourth order Runge Kutta

    Hey guys, I need your help regarding the derivation of the fourth runge kutta scheme. So, I found http://www.ss.ncu.edu.tw/~lyu/lecture_files_en/lyu_NSSP_Notes/Lyu_NSSP_AppendixC.pdf this derivation. Maybe you have a clue what tehy are doing in C.54. So before this they are calculating the...
  9. T

    Python Runge Kutta for nonlinear system of equation

    I am applying a 4th order Runge-Kutta code to solve the following: \begin{equation} \frac {\partial y_1}{\partial t} = y_2 y_3 - C_1 y_1 \end{equation} \begin{equation} \frac {\partial y_2}{\partial t} = y_3y_1 - C_2 y_2 \end{equation} \begin{equation} \frac {\partial y_3}{\partial z} = y_4...
  10. A

    Second Order Runge Kutta for Simple Harmonic Motion

    Homework Statement The ordinary differential equation describing shm is d^2x/dt^2=-w^2x where x is the displacement, t is the time and w is the frequency. If x=0 at t=0, the analytical solution is x=Asin(wt), where A is the amplitude. 1) Rewite equation 1 as two first oder ode's suitable for...
  11. J

    MATLAB Solving Orbital Motion Equations with RK4 Using MATLAB

    I'm trying to plot the solutions of the second order differential equation d^2R/dt^2 = GM/R^2 + Lz^2/R^3. I'm reducing this to a system of first order ODEs and then using RK4 to solve this system. My code is given by function RK4system() Tsim = 10...
  12. Johnny_Sparx

    A Numerical Solution for Complex PDE (Ginzburg-Landau Eqn.)

    I am looking to numerically solve the (complex) Time Domain Ginzburg Landau Equation. I wish to write a python simulator to observe the nucleation of fluxons over a square 2D superconductor domain (eventually 3D, cubic domain). I am using a fourth order Runge Kutta solver for this which I made...
  13. N

    4th order Runge Kutta Matlab with 2 2nd order ode

    Homework Statement Hi There! MX''=Fn(sin θ - uCos θ ) MZ''=Fn(cos θ + uSin θ ) - Mg Fn,M,θ,u is constant fn/M = 0.866 M = 6000 θ = 30 u = 0.5774 i split my motion equation into 2 individual 1st ode, X' = Vx Z' = Vz Vx'=[fn*(sin θ - uCos θ )]/M Vz'={[fn(cos θ + uSin θ )]/M} - g...
  14. S

    Oribit integrator for a logarithmic potential

    Hello! Right know I'm trying to make an orbit integrator for solving a logarithmic potential with the form: \begin{equation} \Phi= \frac{v_0^2}{2} ln(x^2+ \frac{y^2}{u^2} + r_0^2) \end{equation} where v0, u, and r0 are constants My approach is to use, \begin{equation} \ddot{q} =...
  15. seyfi

    4th ODE runge kutta (hiemenz equation)

    Hi all i want to write a MATLAB code by runge kutta solution for hiemenz equation. F''' + FF'' + 1 - F'^2 = 0 BCs F(0)=F'(0)=0 and F'(inf)=1 I have programmed for RK Fehlberg, RK4 and RK5 method but the results of these three methods are not matching with actual values. In the cod I defined...
  16. B

    What is the semantic error in my code

    Note that the code I am using is Python. Currently, I am attempting to numerically solve the equations of state that give rise to the Chandrasekar limit for a white dwarf star. My code works for a simple harmonic oscillator given the correct equations of motion, but does not compute the correct...
  17. Alexandre

    Is this correct second order approximation?

    I have a second order differential equation of the form (theta is a function of time): \theta ''=F\left(\theta ,\theta '\right) Turning them to two first order equations I get: \begin{cases} \theta '\:=\omega \\ \omega '=F\left(\theta ,\omega \right) \end{cases} And here's the algorithm...
  18. B

    Using the Runge Kutta Method to determine mass

    I am confused on how to use the Runge Kutta method to solve for a relationship between the Chrandrasekhar Mass and radius on the following two equations of state: dx/dr = (-5/3)*(M/r^2)*[sqrt(1+x^2) /x] where x(r=0) = x_c dM/dr = +3*(r^2)*(x^3) where M(r=0) = 0 where M is the mass, r is...
  19. N

    MATLAB Runge Kutta Method: Solve Example with MATLAB

    hello all dear please help me can solve this Example By Simulation With matlab
  20. S

    Runge Kutta question, equation has dx/dt in it and non linear term ?

    How does one set up the Runge Kutta for \frac {d^2y} {dt} m = b(\frac {dy} {dt} - \frac {dx} {dt}) + k (y-x) ? Set up the substitution variables: a = \frac {d^2y}{dt} v = \frac{dy} {dt} Then what ? Is there a way to get \frac{dx} {dt} out of the equation ? If not, I have to...
  21. 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)## ...
  22. D

    MHB Plotting runge kutta 4 stability region

    How can I plot the runge kutta 4 stability region? I know on the i axis the max is \(\pm 2\sqrt{2}\). The plot makes a heart type shape. I don't know how to plot it though but would like to.
  23. M

    Runge Kutta method to solve second order ODE

    Homework Statement Need to solve xy''+y'+xy=0 using Runge Kutta on x[1,3] Couldn't find algorythm to solve second order ODE using this method I know how to do 1st order Homework Equations The Attempt at a Solution I know I have to make this equation into 2 first order ODE...
  24. G

    Help in runge kutta problem to determine period of a comet

    Hi everyone: I have trouble in an assignment I was given. The instructions are to utilize Runge-Kutta order 2 and 4 to determine the period of the comet Halley (perihelion = 0.586 AU and aphelion = 35.1 AU). The period of the orbit is given by Kepler's third law: Period = Sm3/2 where...
  25. H

    A basic ODE where Runge Kutta doesn't work?

    From a cubic function where y(0)=1, y(1)=0, and where there is a local max at y(5/13) I created a basic separable differential equation problem. I wanted to analyze how well different ordered Runge Kutta methods works in an interval [0,1]. Here it is: dy/dt=-6(6/13)1/3(y-343/468)2/3 , y(0)=1...
  26. H

    Can Runge-Kutta be used for problems with more than 2 independent variables?

    Hi, I am trying to use the Runge-Kutta method for a problem that looks like this: dy/dt= f(u,v,r) where y= r*L I was wondering if dy/dt can be a function of more than 2 independent variables? Also do I need to do some kind of uncoupling of r and L? (I think L can be in a way...
  27. A

    Solve DiffEq for Runge-Kutta 4th Order Input

    Hi, Hi. I am trying to enter some differential equations into a Runge-Kutta 4th order spreadsheet which requires input in the form y' = ...? My differential equations are in the form : dvx/dt = -FDvx/mv (i.e relate velocity derivative with respect to time to acceleration). Can anyone...
  28. B

    Approaches to Runge Kutta step size adjustments

    I've written a Runge Kutta algorithm that uses a fixed step size. It works fine for many of my problems dealing with chemical reaction kinetics but I would like to make it faster and more robust by implementing automatic step size adjustments. I have looked at the at the step-doubling...
  29. N

    Solving Second Order Differential Equations using Runge Kutta

    Homework Statement In aerodynamics, one encounters the following initial value problem for Airy’s equations: y''(x) + xy = 0, y(0) = 1, y'(0) = 0 Using the Runge-Kutta method with h=0.005 and determine values between x=0 and x=10 sufficient to sketch the relationship...
  30. S

    Finding the Initial Point for Runge Kutta 4th Order

    Hi guys I have two points A and B (in 2 dimensions) and want to use runge kutta 4th order to give me points between these two points starting from A __> B (NOT B___> A). How can I choose the initial point then. Cheers,:smile:
  31. I

    Particle rotation in galaxy - runge kutta 2nd order help

    Homework Statement Hi everyone, I'm a bit stuck and have been staring at my fortran code all day. For my project this year I'm writing a program to model a spiral galaxy in which gas clouds circulate, collide and produce star formation. I've written code for gravitational acceleration due to...
  32. S

    How Does the 4th Order Runge-Kutta Method Solve Coupled First Order Linear ODEs?

    I just need to know the general form of the 4th order Runge-Kutta method? For two coupled first order linear ODEs. I can not find it specifically written online, I need it to write a program for the structure of white dwarfs stars, but I am okay with the Physics, just I have never used the...
  33. C

    4th order Runge Kutta method for 2nd order ODE

    Hello, i have a bit of a problem with uderestanding how exactly we use RK4 method for solving 2nd order ODE. And last conversation with my proffesor only added up to my confiusion. Further more i couldn't find any example dealing with this problem if any1 could provide link explaining this...
  34. M

    How to Determine Taylor Order for M2 in Runge Kutta Method?

    Homework Statement h is the timestep Y' = F(Y) Mk,1 = F(Yk) Mk,2 = F(Yk + 0.5*Mk,1) Mk,3 = F(Yk + h*Mk,2) Mk,4 = F(Yk + h*Mk,3) Yk+1 = Yk + (h/6)*(Mk,1 + 4Mk,2 + Mk,4) Show that the local error is of fourth order The Attempt at a Solution I have written down the...
  35. S

    Runge Kutta Sine-Gordan equaiton.

    Apologies if this is in the wrong place, but could someone explain to me how I go about converting the sine-gordan equation with 2 double derivatives into one with a single derivative, or how I alter the rung-kutta algorithm to accommodate such a double derivative?
  36. F

    C/C++ Adaptive step size algorithm in c++ for runge kutta

    Hey guys, Attempting to write an adaptive step size function into a 4th order runge kutta integrator for basic orbits. The problems (so far) are as follows: 1.) The step size does not seem to change as one would expect if the recursive definition of the StepSize function was working...
  37. C

    Numerical Solution for Coupled Differential Equations using Runge-Kutta Method

    Hi, I have got a coupled Differential equation : \ x_1''\ =\ \frac{F_1}{M_1}\ =\ \gamma\cdot{}\left[-\,\frac{M_S}{|\overrightarrow{x_1}|^3}\cdot{}\overrightarrow{x_2}+\frac{M_2}{|\overrightarrow{x_2-x_1}|^3}\cdot{}(\overrightarrow{x_2-x_1})\right] \ x_2''\ =\ \frac{F_2}{M_2}\ =\...
  38. C

    Reverse Runge-Kutta: Solving e^(x) + y = dy/dx [-1,1]

    Homework Statement e^(x) + y = dy/dx, [-1,1], y(0) = 1, N = 4. Homework Equations The Attempt at a Solution h = b-a / N = 0.5 x0= 0, y0 =1 x1= 0.5, y1 = 2.472 x2= 1, y2 = 5.433 x3= 1.5, y3= 11.195 x4=2, y4= 22.146 ===================== These were the values I got for the...
  39. H

    Solve ODE with Runge Kutta of Order 4 on [-1,1] n=5

    Homework Statement apply the runge kutta of order 4 to solve the ode on [-1,1] with n = 5 of (e^x+y)dx-dy=0 Homework Equations The Attempt at a Solution the problems i have done so far gave me an initial condition to find the k values, then to plus them into the formula...i...
  40. H

    How can I use Runge Kutta to solve coupled first order DE's in Matlab?

    Hello All, I need to utilize a Runge Kutta second order approach to solve two coupled first order DE's simultaneously given some initial conditions and a conservation relationship. The DE's are as follows: \frac{dp}{dt} = aq - bp \frac{dq}{dt} = -aq + bp Where a and b are...
  41. P

    Why Is My Runge Kutta Implementation Not Working for Car Simulation?

    I've been browsing the forum, but I haven't found a way to solve this thing, which has been frustrating me for quite a while, I'm trying to develop a simulation of cue formation and propagation on cars on a single lane road, and of course, I have to compute the acceleration of vehicles obeying a...
  42. O

    C/C++ Runge Kutta Script | C++ | Beginner

    Hi. I am working on a runge kutta/integral finder. my goal is to make it "exact to the dx", so to speak. im a beginner at c++, so bear with me. the compiler I am using is dev cpp, incase it matters. my main problem was that apparently i can't have a long double array of size greater than...
  43. B

    How Can I Model a Damped Pendulum Using Runge-Kutta in C++?

    Im using a C++ class to try and model the motion of a simple pendulum using numerical analysis, at this stage of my implementation I am trying to produce oscillatory output values of theta and v denoting the displacement and velocity of the pendulum of a period of time. I have successfully...
  44. C

    Using Runge Kutta Method for T.I.S.E in Electron Motion Approximation

    Homework Statement I really am desperate for help on this one. I need to use the runge kutta method to approximate the motion of an electron in the potential below. The T.I.S.E is known, and I have to try and use the runge kutta method to find the wavefunction of the particle. V(x) =...
  45. G

    Errors in Adaptive Runge Kutta Method?

    Hi I am using adaptive stepsize Runge Kutta (order4) method to solve a set of Lotka Volterra system of equations. But I am getting the errors 1) Step size too small 2) Too many steps in the routine Can somebody please help me on this.
  46. B

    Explain 4th Order Runge Kutta Method in Layman's Terms

    can anyone please explain the fourth order runge kutta method in laymans terms. I've to describe in detail for a report.
  47. S

    H value in runge kutta method 2nd order

    hi can anyone explain to me how to get the H value for runge kutta second method? I've searched everywhere online but i just don't understand it. if found h = tn - to/n?? i know what value of "to" is but no clue what values to put in for n and tn? thanks
  48. M

    Solve RK4 in C++ for Sekhar Mass White Dwarf Star

    Runge Kutta Method in C++ Please Help Me This is for an RK4 second order equation. I have run this program several times and am getting the incorrect limit for the Sekhar Mass of the White dwarf star. I was wondering if anyone has a suggestion. Ill post my Source here as well. The program...
  49. H

    Symplectic runge kutta for hamiltonian system

    Hi ! I'm trying to solve the restricted problem of three bodies, where a negligeable mass particule is moving in the gravitationnal field of two heavy objects which are in circular orbit around their common center of mass. this is a plane problem... I describe the mouvment in the mobile...
  50. A

    Runge Kutta 4: problems in application in computer simulation

    Hi everyone! Despite I have not too much knowledge of ODE's I'm trying to implement a more or less general 3D physics simulator. By now, the simulator (only kinematics and simple rotations of a body rigid, at the moment) works with euler integrator but I'd like to move to some more...
Back
Top