# Questions tagged [runge-kutta-methods]

For questions about the family of Runge–Kutta methods and their application in numerical methods.

468 questions
Filter by
Sorted by
Tagged with
22 views

### Why RK3 is more stable than forward euler

I'm working on hyperbolic equations. I implemented RK1 (Euler), RK2 and RK3 for the convection equation with a central scheme in space. For a smooth solution, I have a perfect solution while for RK1 ...
1 vote
68 views

• 11
23 views

### Solving $y'=(x-1)y$ $y(0)+2$ using $RK2$

Solve the following cauchy problem: $y'=(x-1)y$ and also given $y(0)=2$ using the runge kutta 2 method $(RK2)$ for $\alpha=0.2$ on the interval $[0,0.6]$ with step $h=0.2$ The answer in the book: for ...
• 913
1 vote
28 views

### Computing the relative error of two Runge Kutta Methods for Convergence Analysis

I am currently endeavoring to assess the relative error between the classical Runge-Kutta (RK4) method and another RK variant. I've opted to employ the Ordinary Differential Equation (ODE) governing a ...
• 11
29 views

### 3N low storage method for ssprk(5,4)

I am trying to understand how the SSPRK(5,4) integrator can be implemented using 3N storage registers (as is done in Athena++). I cannot seem to find a reference explicitly stating the algoirthm ...
• 13
81 views

### Simulation of a pendulum on a spinning Disk

I don't know if this is the right place to ask this Question, but I have previously asked a similar question where i asked how to write a simulation on this phenomenon. I got a great answer with a ...
• 119
55 views

### Runge Kutta with multiple variables

How can I apply 4th order Runge Kutta to a function that requires multiple inputs (instead of $\dot x = f(x, t)$, something like $\dot x = f(a, b, c, d, t)$). For $\dot x = f(x, t)$, the Runge Kutta ...
• 293
21 views

### What is a converging explicit Nyström method for an object experiencing friction?

Consider the dynamic simulation of an object that is sliding across a level surface and experiencing friction. The friction is a lower kinetic friction if the object is sliding faster than some ...
• 123
135 views

### Standard way to do Runge-Kutta (4th order) for coupled ODE's in Python?

I am somewhat familiar with using RK4 for coupled ODE's, I found a very elegant way (in my opinion) to utilize it in Python, like so: ...
38 views

### How to find out the Runge-Kutta 4 constants for numerically evaluating an nth order IVP?

I know how to use the RK 4 method for a first order differential equation of the form: $$y' = f(x, y(x))$$ $$y_{k+1} = y_k + (G_1 + 2G_2 + 2G_3 + G_4)*dx/6$$ where $G_1 + 2G_2 + 2G_3 + G_4$ are ...
70 views

### How do I obtain the standard ODE for this system of equations?

I am attempting to numerically simulate a specific physical model, and I have obtained the system of equations using the Lagrange method. I'm not sure if this question is better suited for the Physics ...
• 21
85 views

• 19
225 views

### Showing Runge-Kutta implicit method local truncation error

Consider the implicit Runge-Kutta method: \begin{equation*} y_{n+1} = y_n + hf\left(t_n + \frac{2}{3}h, \frac{1}{3}(y_n + 2y_{n+1})\right) \end{equation*} a) Show that the local truncation error ...
1 vote
67 views

### Runge Kutta 4th order with coupled equations where derivatives are linked [closed]

I have 2 coupled second order equations as below: $$\ddot{y}(t) + a\dot{y}(t) + by(t)=q(t)$$ $$\ddot{q}(t) + c\dot{q}(t) + dq(t) = A\ddot{y}(t)$$ I'm wondering if it is possible to solve this ...
• 11
128 views

### Total energy oscillations with Runge-Kutta 4th order method - how to avoid them?

Consider a free ideal pendulum, which obeys the equations: $$\frac{d\varphi}{dt}=p \\ \frac{dp}{dt}=-\omega_{0}^{2}\sin\varphi$$ I am applying two 4th order Runge-Kutta schemes: the usual explicit one,...
• 31.7k
74 views

### Why the weights are 1-2-2-1 in Runge-Kutta method? [closed]

The well-known 4th order Runge-Kutta formula for the ODE $y'=f(x,y(x)$ is given by $$y_{n+1} = y_{n} + \dfrac{1}{6}h(K_1 + 2 K_2 + 2K_3 +K_4),$$ where $K_1,K_2,K_3,K_4$ are essentially approximations ...
• 279
209 views

### Global truncation error of backward Euler method

It's often found in books that the global truncation error of the forward Euler method applied to $\dot{y} (t) = f(t, y(t))$ is given by something like $$\frac{\exp(LT) -1}{L} \frac{Mh}{2},$$ with $L$...
• 3,366
90 views

### Runge Kutta Method for in $1+1$ dimension

Given a partial differential equation $\partial_t u(t,x) = F(t,x,u,u')$ Suppose I know the functions $u(t_0,x)$ and $u'(t_0,x)$ at some point $t_0$ for all $x$. In order to obtain the function $u$ at ...
• 700
68 views

• 3,439
107 views

### What numerical integration method can solve a integral over a function that depends on a differential equation without an analytic solution?

Suppose we have a differential equation of the form $\frac{dy}{dx}=f_{p_x,p_y}(y,x)$. After solving this differential equation for particular values of $p_x$ and $p_y$, we obtain $y_{p_x,p_y}(x)$. ...
108 views

### Velocity field integration

Suppose we have a velocity field $$\mathbb{v}=\begin{bmatrix}v_x(x,y)\\ v_y(x,y)\end{bmatrix}$$ and the relation $$\frac{d\mathbb{v}}{dt}=f(\mathbb{v},t).$$ I am currently using Runge-Kutta's Method ...
• 85
52 views

### Rules for Choosing Bounds and Initial Conditions when Using 2nd Order Runge Kutta Methods

I have a question regarding 2nd order Runge-Kutta methods, specifically where it regards the bounds of the solution. Let's say I have to solve a 1st order ODE $\frac{dy}{dx}=f(x,y)$ numerically using ...
• 433
127 views

• 21
358 views

### An adaptive step size solver for an ODE

I am trying solve an ordinary differential equation numerically, $\,dy/dt=10e^{-(t-2)^2/2(0.075)^2}-0.6y\,\,$ with an initial value and initial step size between $t=0\, and\, t=4$. In my code I ...
• 157
1 vote