更新时间:2022-06-26 23:59:20
您在RK4实现中犯了一个经典错误:使用两个变体来定位要乘以dt
的乘法,您将同时使用这两个.
You are doing a classical error in the RK4 implementation: Having two variants to position the multiplication with dt
to choose from, you are using both.
是
k2 = dt*f(t+0.5*dt, y+0.5*k1)
或
k2 = f(t+0.5*dt, y+0.5*dt*k1)
并类似地在该算法的其他行中.
and analogously in the other lines of the algorithm.