Semi-implicit Euler method: Difference between revisions

Content deleted Content added
The method: second variant of the method, link to Verlet/Leapfrog
Example: Further details for the example
Line 44:
The motion of a [[spring (device)|spring]] satisfying [[Hooke's law]] is given by
 
:<math> {dx \over dtbegin{align} = v(t) </math>
\frac{dx}{dt} &= v(t)\\[0.2em]
 
:<math> {dv \over frac{dv}{dt} &= -\frac{k \over }{m}\,x. =-\quad</math>omega^2\,x.
\end{align}</math>
 
The semi-implicit Euler for this equation is
 
:<math>\begin{align}
:<math> v_{n+1} &= v_n - {k \over m}omega^2\,x_n\,\Delta t \quad</math>\[0.2em]
:<math> x_{n+1} &= x_n + v_{n+1} \,\Delta t. \quad</math>
\end{align}</math>
 
The iteration preserves the modified energy functional <math>E_h(x,v)=\tfrac12\left(v^2+\omega^2\,x^2-\omega^2\Delta t\,vx\right)</math> exactly, leading to stable periodic orbits that deviate by <math>O(\Delta t)</math> from the exact orbits. The exact circular frequency <math>\omega</math> increases in the numerical approximation by a factor of <math>1+\tfrac1{24}\omega^2\Delta t^2+O(\Delta t^4)</math>.
:<math>x_{n+1} = x_n + v_{n+1} \,\Delta t. \quad</math>
 
== References ==