Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (unklerhaukus):

Build a program that utilises the "leapfrog" method of numerical integration

OpenStudy (unklerhaukus):

The equation for the leapfrog method are given as: \[x_{n+1} = x_n+v_{n+1/2}\delta t\\v_{n+1/2} =v_{n-1/2}+a_n\delta t\\v_{1/2} = v_0+\tfrac12a_0\delta t\]

OpenStudy (unklerhaukus):

The Non-linear equation is \[\frac{\mathrm d^2 x}{\mathrm dt^2}=-\omega_0^2x+\beta x^2\] Initial conditions are \(x_0 = A\), \(v_0=0\), \(a_0=-\omega_0^2x_0+\beta x_0^2\) \(\omega_0=2\pi\), \(T=2\pi/\omega_0\)

OpenStudy (unklerhaukus):

This is what i have at the moment, but it is clearly not quite right

OpenStudy (unklerhaukus):

OpenStudy (e.mccormick):

matlab?

OpenStudy (unklerhaukus):

yes MATLAB.

OpenStudy (unklerhaukus):

@dan815

OpenStudy (dan815):

ok

OpenStudy (dan815):

okay lemme get wht u are trying to do so we can code this fast

OpenStudy (dan815):

can u explain leapfrop method with a picture

OpenStudy (unklerhaukus):

the green line should be more like this |dw:1417060575412:dw|

OpenStudy (dan815):

k so what is leapfrop integration though

OpenStudy (dan815):

is it like i just take a look at the slope, see where i end up with a linear estimation plot point there and continue

OpenStudy (dan815):

ud have to do 2 approximations for first integration and then 2nd

OpenStudy (dan815):

dy/dx numerical approxximation, then y

OpenStudy (dan815):

right?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!