A small question in John Burkardt's stochastic_rk.f90 code

Dear all, I have a quick question wrt the famous guy John Burkardt’s stochastic_rk.f90 code.
The main description is here,
https://people.math.sc.edu/Burkardt/f_src/stochastic_rk/stochastic_rk.html
The stochastic_rk.f90 code is below,
https://people.math.sc.edu/Burkardt/f_src/stochastic_rk/stochastic_rk.f90

Now, In the subroutine for RK4
rk4_ti_step ( x, t, h, q, fi, gi, seed, xstar )
in the lines,
t4 = t1 + a41 * h + a42 * h + a43 * h
x4 = x1 + a41 * k1 + a42 * k2

I wonder, should the expression for x4 be
x4 = x1 + a41 * k1 + a42 * k2 + a43 * k3

I mean, should there be the term + a43 * k3 for x4?

Does anyone know? Thank you very much!

Also, does anyone know how to contact John Burkardt? I can only find his webpage, but not his email address.

Judging by Eq. 12 in the paper cited by Burkardt, it does look like a term is missing:

image

For k_4 (j = 4) the sum in the bracketed part of functions F and G, should go from i=1 to j - 1 = 3. This does seem to imply the line should read

x4 = x1 + a41 * k1 + a42 * k2 + a43 * k3
1 Like

Thank you very much @ivanpribec, I think you are right.
John Burkardt is likely missed the a43 * k3 term for the rk4_ti subroutine. ti means time-invariant.
In his rk4_tv subroutine, he did not miss the a43*k3 term.

What is more, John Burkardt’s version of stochastic_rk is a scalar version.
Kasdin’s paper’s solution is a vector version.