Runge-Kutta 2nd order (Midpoint method) confusion (for y=vtsin(θ) -0.5gt^2 )

sba

New member
Joined
Nov 19, 2017
Messages
2
I'm doing the midpoint method on the trajectory equation and for some reason I'm finding that the values I find using the midpoint method are exactly the same as the exact solutions that I find with the trajectory equation. In other words, there is no error at any point while using Runge-Kutta 2. Is this because I've done it wrong or is that meant to happen? I was thinking that a possible reason for this is because the differential equations are only in terms of time and not y or x.
I'm using y=vtsin(θ) -0.5gt^2 so dy/dt=vsin(θ) -gt whereas normally for Runge-Kutta dy/dt would be in terms of both y and t. Just wondering if there was a reason for this as initially I would not have expected Runge-Kutta 2nd order to have no error?
 
The fourth order RK has an error term in the neighborhood of \(\displaystyle O\left(h^{5}\right)\). What is the magnitude of the error term for second order RK and are you within that tolerance?
 
Top