Questions tagged [runge-kutta]

The Runge–Kutta methods are a set of numerical methods for ordinary differential equations for the approximation of their solutions.

167 questions
Filter by
Sorted by
Tagged with
1k views

10th-order Runge-Kutta Method

I want to apply the 10th-order Runge-Kutta method, but I am having trouble finding the coefficients. I read Ernst Hairer's article, he used the stage s=17 and ...
1 vote
55 views

How to solve three coupled differential equations in python using RK-4 and shooting method? or using solve_bvp?

I am trying to solve three coupled differential equations in Python. I am using RK-4 techniques with Shooting method. I am trying to plot the f and N functions. ...
1 vote
87 views

Solving TOV equations that describes neutron stars in modified f(R, T) gravity

Sorry for the long post, tldr at bottom. I'm trying to use standard RK4 code in C/C++ to solve a coupled system of 2 modified TOV equations in f(R,T) gravity and reproduce some of the results of this ...
• 23
377 views

Order of numerical solver when calculating difference between forwards and backwards solution

I'm working in applied oceanography, where people are sometimes interested in calculating backwards trajectories'' of things floating on the ocean, i.e., going backwards in time to figure out where ...
• 243
65 views

solve_ivp method=ODE23 time step not decreasing in order

My time step with the function scipy.integrate.solve_ivp is not decreasing in t_span fluctuating (reaching values below or ...
79 views

How to modify adaptive step size Runge-Kutta cash karp algorithm for higher accuracy?

I'm following a paper on making your own cosmic microwave background perturbation solver code by Peter Callin https://arxiv.org/pdf/astro-ph/0606683.pdf In the programming techniques section V, the ...
• 23
1 vote
119 views

Can I combine the backward and forward euler methods - simialr to modified euler method?

Constructing Modified Euler Using the same strategy as done in the construction of Modified Euler. Starting from Trapezoidal Method $$y_1 = y_0 + \dfrac{h}{2}\left(f(x_0,y_0) + f(x_1,y_1)\right)$$ ...
• 11
722 views

What is the advantage of using a particular RK Scheme?

The Wikipedia article on Runge-Kutta Methods lists several examples of each order. My question is, are there any particular advantages using one particular scheme over another of the same order? I ...
• 193
103 views

From Runge-Kutta Butcher tableau to general linear methods matrices?

I am trying to understand how the relationship between Butcher tables for Runge-Kutta methods and their generalization to general linear methods matrices (by Butcher also). Runge-Kutta methods can be ...
• 343
1 vote
109 views

Educational Purpose: How to synchronize chaotic systems

The graph plots the X coordinate of the synchronized Lorenz chaotic system. I am self learning by reading research articles on how to synchronize identical chaotic systems. But as seen from the figure,...
• 119
134 views

Can the Runge-Kuta algorithm help in reducing numerical dispersion and anisotropy when using the FDM to solve the 2D wave equation? [closed]

I am currently studying the effects of group velocity on the finite difference solution of the wave equation. Most of what I learned is from this source. I understand that high frequency components in ...
80 views

How to improve and stabilize this code simulating a damped mass-spring oscillator? Runge-Kutta?

I wrote the following function which is simulating a damped mass-spring oscillator. It is being driven by the audio sample input at 44.1 kHz sampling to create the same effect as a resonant bandpass ...
• 123
1 vote
130 views

• 23
173 views

Runge Kutta Procedures for Incompressible Navier Stokes

I was playing a little bit with the Runge-Kutta procedure for the Incompressible Navier-Stokes equation and came up with something strange, so I would like to know where I'm wrong or doing something I ...
• 23
70 views

Order of local error when integrating ODE with discontinous derivatives

I'm working with ODEs, $$\dot{x} = f(x, t),$$ where the (higher) derivatives of the right-hand side have discontinuities. In particular, $f(x, t)$ is obtained by interpolation of discrete samples, and ...
• 243
256 views

483 views

Using the BDF and RK4 methods to solve this coupled system of ODEs in C++

I'm trying to solve a system of ODEs using the BDF order 4 method. I find the first 3 points using RK4, then for the implicit part of the BDF, I use Newton-Raphson iteration. Unfortunately my solution ...
164 views

252 views

Two RK4 method in one program

I want to solve this integral using RK4 by coding in Fortran: $$R=∫1/a(t) dt → dR/dt=1/a(t) =f(t)$$ Initial point: t=0 (or a=0.001) and R=0 And I have to get a(t) by solving another ...
• 11
200 views

Time independent Runge Kutta integration of SDE

I am trying to compare the result of numerical integration of time independent Runge_Kutta, github page for stochastic differential equations with the analytical solution. True answer match the ...
• 131
1 vote
I wrote a code in Fortran to solve this differential equation using RK4 method: $$\frac{dy}{dx}=A\sqrt{\frac{B}{y}+\frac{C}{y^2}}$$ $A$, $B$, and $C$ are some known constants. The problem is that ...