Write the code with a test block, so that it gets easy to either import functions from the module, or to run it as a program.
1.A general ODE problem u (t) = f (u, t), u(0) = U0, may be solved numerically by the third order Runge-Kutta method. The computational scheme reads un+1 = un + Δt 6 (k1 + 4k2 + k3) , n = 0, 1,…,Nt − 1, k1 = f (un, tn), k2 = f (un + … Read more