2nd Order Runge Kutta help: (dx^2) / (dt^2) =x(-w^2)

AbiEng

New member
Joined
Oct 6, 2016
Messages
1
Really stuck on this revision problem and can't seem to find anything that helps, any help is appreciated.
The ordinary differential equation (ODE) describing simple harmonic motion is (dx2) / (dt2) =x(-w2)
where x is the displacement in metres, t is the time in seconds, and w is the (fixed) frequency in rad/sec. If x = 0 at t = 0, the analytic solution is x = Asin(wt), where A is the amplitude in metres.
(a) Rewrite Equation (1) as two first-order ODEs suitable for solution using Runge-Kutta methods.
I have done this and gotten dx/dt=v and dv/dt=x(-w2)
(b) Determine the second order Runge-Kutta solution for this system after the first time step h and show that the leading error term in x(h) is proportional to h3.
This is where I am lost. I'm not sure how to solve with two equations and also with no initial conditions, which aren't given and I thought were necessary.
Thank you
 
Then use whatever initial condition is convenient to "show that the leading error term in x(h) is proportional to \(\displaystyle h^3\)." The Runge-Kutta method is normally used for first order differential equations. To use it for two equations as here, set up two "Runge-Kutta solvers" that run simultaneously. The first will be to solve dx/dt= v, using the initial value of v, then use that value of x to solve \(\displaystyle dv/dt= -w^2 x\)/
 
Top