How to use Runge-Kutta 4th order method without direct dependence between variables

1k Views Asked by At

Following equation shall be solved using Runge-Kutta method of 4th order: $$ \frac{\partial E(z,t)}{\partial z} = \frac{\partial P(t)}{\partial t} $$ $P(t)$ is given as an array, so that the derivative has to be computed numerical.

According to Runge-Kutta method $$ f(E,z,t) = \frac{\partial P(t)}{\partial t} $$

The 4th order Runge-Kutta formula is in this case $$ E_{i+1}=E_i + \frac{dt}{6}(k_1 + 2k_2 + 2k_3 + k_4) $$ where $$ k_1 = f(E,z,t) = \frac{\partial P(t)}{\partial t} $$

In which way are $k_2, k_3, k_4$ formulated and how is $f$ applied in those cases? Is Runge-Kutta a good choice for this kind of problem?

1

There are 1 best solutions below

1
On

This is trivial to solve, no Runge-Kutta needed: $$ E(z,t)=E(z_0,t)+\frac{∂P(t)}{∂t}·(z-z_0) $$ for every fixed parameter $t$.