Skip to main content

Questions tagged [runge-kutta]

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

30 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
140 views

Runge-Kutta methods, higher derivative methods, and collocation methods

Consider an ODE system $$\dot x = f(t, x), \quad x(0) = \xi.$$ A collocation method to solve this ODE (1) assumes that $x$ can be approximated as a polynomial $x(t) \approx \sum_kx_kp_k(t)$ and (2) ...
Daniel Shapero's user avatar
4 votes
1 answer
215 views

Estimating the spectral radius when applying the method of lines

Some time integrators, notably the Runge-Kutta-Chebyshev method, implemented in the RKC code from Sommeijer & Verwer, gives the user an option to provide a callback with an estimate of the ...
IPribec's user avatar
  • 617
3 votes
0 answers
166 views

My discretization of a wave equation in first-order form does not give correct solutions. What should I do?

I haven't much experience with conservation laws, shocks, etc. After reformulating my wave equation to 1st order system (velocity-stress): $$ \frac{\partial v}{\partial t} + A \frac{\partial v}{\...
bjp's user avatar
  • 219
3 votes
0 answers
119 views

Is it normal to expect the error of simulation of a damped harmonic oscillator to decrease as the damping factor decreases?

I am simulating a damped harmonic oscillator using the RK4 method of numerical integration. I am comparing the simulated results with the analytical ones (for the free evolution case) and obtaining ...
turnip's user avatar
  • 263
3 votes
0 answers
82 views

Estimating eigenvalues from time-dependent non-linear operator

I have a very sparse non-linear system $N(u) = 0$ that can be solved as a time-dependent ODE, $\frac{du}{dt} = N(u)$, and explicitly integrated until $\frac{du}{dt} = N(u) = 0$, e.g. by forward euler, ...
Aurelius's user avatar
  • 2,375
2 votes
0 answers
100 views

Runge Kutta 4th order: unexpected result

My problem in brief: in some situations, the Runge Kutta 4th order method (RK4) doesn't seem to give 4th order improvement when using a smaller time step. I wonder how this worse-than-expected result ...
gamma1954's user avatar
  • 121
2 votes
0 answers
69 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 ...
Tor's user avatar
  • 243
2 votes
0 answers
55 views

Dispersion of Runge-Kutta methods when applied to systems of ODEs

I am interested in computing the dispersion / phase error(s ?) of an (explicit) Runge-Kutta method when applied to a linear system of ODEs $$ u'(t) = A u(t). \tag{1} \label{1} $$ To begin, consider ...
Dan Doe's user avatar
  • 1,083
2 votes
0 answers
159 views

Jacobian matrix cutoff in ODE solver

I am studying an implementation of a 3rd semi-implicit Runge Kutta method (siRK3) from the book by Villadsen & Michelsen (1978), Solution of differential equation models by polynomial ...
IPribec's user avatar
  • 617
2 votes
0 answers
157 views

Divergence on wave equation simulation

I'm currenly working on my own PDE solver for non-linear simulations in python. I've done succesfully simulations for KdV and Fisher's equation, but now I'm playing with second order derivatives in ...
Rafael Riveros Ávila's user avatar
2 votes
0 answers
268 views

What exactly is the cause(s) of blow-up for too-large step size in a method like RK4?

I have been working on creating a few home-made numerical methods, and I am using them to visualize text-book problems from my Strogatz dynamics textbook. It feels like a good way to learn numerical ...
rocksNwaves's user avatar
2 votes
0 answers
84 views

Reverse automatic differentiation and integration

In Symplectic Runge-Kutta schemes for adjoint equations, automatic differentiation, optimal control and more Sanz Serna writes: It is well known that the reverse mode of differentiation implies ...
homocomputeris's user avatar
2 votes
0 answers
226 views

How to implement adaptive step size Runge-Kutta Cash-Karp?

Trying to implement an adaptive step size Runge-Kutta Cash-Karp but failing with this error: ...
ZelelB's user avatar
  • 131
2 votes
0 answers
791 views

Scaling step size in adaptive runge-kutta method

I'm developing my own generic Runge-Kutta solver, and I'm currently implementing the adaptive step-size routine. I say generic because I want to be able to test different RK implementations by only ...
cbcoutinho's user avatar
2 votes
0 answers
53 views

Eigenvalues and Timestep restriction Follow up

This is a follow-up question to the previous questions I had on eigenvalues. Please let me know if I should edit the previous question itself for asking this. If the eigenvalues of a matrix ...
gk1's user avatar
  • 322
1 vote
0 answers
78 views

Solving perturbed Einstein Boltzmann equations using RK4

I'm trying to learn to numerically solve the perturbed Boltzmann-Einstein equations in cosmology using the RK4 method. These are the equations: $$\dot{\Theta}_{r,0}+k\Theta_{r,1}=-\dot{\Phi}$$ $$\dot{\...
hidenori's user avatar
1 vote
0 answers
187 views

Solving 1D Advection Equation Using Midpoint-Rule and Finite-Differences

I want to solve the advection equation ($v_0 \in \mathbb R$) $$ \frac{\partial f}{\partial t} + v_0 \frac{\partial f}{\partial x} = 0 $$ using 2nd order Runge Kutta like the midpoint rule for the time ...
xotix's user avatar
  • 241
1 vote
0 answers
107 views

RK4-method starts oscillating above certain input parameters

I am trying to solve an equation of the following type $$\partial_zE(z)=-c_0J$$ with $$J=c_1\beta E^3(z)$$ using the boost::odeint-framework and a fixed time stepper, with $c_0$, $c_1$ and $\beta$ ...
arc_lupus's user avatar
  • 563
1 vote
0 answers
125 views

Shooting Method with RK4 and Thermal Radiation

I am attempting to numerically solve the following problem. I decompose it into a system of two first order ODEs and then solve via the shooting method. I use the fourth order Runge-Kutta (RK4) method ...
Nukesub's user avatar
  • 163
1 vote
0 answers
2k views

Numerically solving a partial differential equation in python with Runge Kutta 4

I'm supposed to solve the following partial differential equation in python using Runge-Kutta 4 method in time. $$ \frac{\partial}{\partial t}v(y,t)=Lv(t,y) $$ where $L$ is the following linear ...
Andrew K's user avatar
1 vote
0 answers
458 views

Runge-Kutta for PID and system in separate calculations without filter

I need to calculate a closed-loop system in Python; specifically, obtain the PID response and then use the output to obtain the system response sample-by-sample with my own loop. For this, I am ...
kleiver carrasco's user avatar
1 vote
0 answers
81 views

Successive iteration method for solving eigenvalue ploblem

I have a question concerning the branch of successive iteration methods (Newton, Runge-Kutta). I definitely know (or can read in Wikipedia) the implementation of these methods. But I was wondering ...
MKM's user avatar
  • 11
1 vote
0 answers
101 views

How and when to use IMEX runge-kutta

i have come across method of IMEX Runge-Kutta written by Kennedy and Carpenter in july 2001. The method consist of two kind that is "implicit and explicit" can i use the ERK@explicit part only to ...
MamaKyle's user avatar
1 vote
0 answers
3k views

Using RK2 Method to solve the simple harmonic oscillator of a horizontal mass on a spring (1D)

Being new to numerical analysis techniques, in particular RK2, I decided the best way to jump in is by using python to solve the well known mass-spring oscillator using RK2 techniques. My problem is ...
kuantumbro's user avatar
1 vote
0 answers
572 views

Computing solutions with singularities using MATLAB ODE45

I am new to solving numerically ODES and thus it is difficult for me to judge the reliability/trustworthiness of the results that I have produced for the following problem: I am dealing with a 2nd ...
Hamurabi's user avatar
  • 131
0 votes
0 answers
55 views

ENO-Runge-Kutta discretization

One beginner's question about discretization of a Hamilton-Jacobi equation(non-linear) $$ u_t = H(u_x) $$ $u_x$ is discreated with 2nd order ENO-FD 1st order: $D_1^{\pm}u = \pm [u_{x\pm1} - u_x ] / \...
solanin's user avatar
0 votes
0 answers
2k views

Solving nonlinear pendulum using Runge-Kutta 4 for smaller steps

I am trying to solve nonlinear pendulum using 4th order Runge-Kutta method for limits between a=0.0 to b=110 seconds and simulated the results to observe the pendulum movement. But when I increase the ...
147875's user avatar
  • 276
0 votes
0 answers
96 views

Computing Trajectory Equations of Kerr Geodesics

I want to numerically solve the trajectory equations of a Kerr geodesic given by wikipedia in Matlab. The trajectories look like: I implemented the equations and solved it with the standard Runge-...
almost's user avatar
  • 1
0 votes
0 answers
499 views

Finding second excited state of Schrödinger equation with secant Runge Kutta method

In our assignment, we are required to find the energies of the ground state and the first two excited states of the Schrödinger equation in a harmonic potential: $$V = \frac{50 x^2}{(10^{-11})^2}\, .$...
Programmer's user avatar
0 votes
1 answer
406 views

Applying Runge-Kutta to nonlinear system of PDEs

I am applying a 4th order Runge-Kutta code, using the method of lines, to solve the following: \begin{equation} \frac {\partial y_1}{\partial t} = y_2 y_3 - C_1 y_1 \end{equation} \begin{equation} \...
Mathews24's user avatar
  • 568