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?

  • $\begingroup$ Please give more context. Is this a partial differential equation or an ordinary differential equation with parameter $t$? What are the initial conditions? $\endgroup$ – Lutz Lehmann Jan 18 '16 at 19:06

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$.

  • $\begingroup$ These are ODEs. We know $P(t)$ and $E(z_0,t)$ and want $E(z_0+1,t)$. Hereby $E$ has no dependence on $z$ or $z_0$. It behaves like an index. This is why I do not know how to apply your first posted solution. $\endgroup$ – George713 Jan 18 '16 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.