Semi-implicit Euler method: Difference between revisions

Content deleted Content added
clarify and format
add some stuff, mostly on symplectic
Line 1:
In mathematics, the '''Euler-CromerEuler–Cromer algorithm''' or '''symplectic Euler method''' is a modification of the [[Euler integration|Euler method]] for solving [[Hamilton's equations]], a system of [[ordinary differential equation]]s. Itthat givesarises muchin better[[classical resultsmechanics]]. forIt is a [[Oscillation|oscillatorysymplectic integrator]] solutionsand hence it yields better results than the standard Euler method.
 
== Setting ==
Given a pair of [[differential equation]]s of the form
 
GivenThe Euler–Cromer algorithm can be applied to a pair of [[differential equation]]s of the form
:<math> {dx \over dt} = v(t) </math>
 
:<math> {dvdx \over dt} = af(xt,v,t), </math>
 
:<math> {dxdv \over dt} = vg(t,x), </math>
where ''a'' is a given function, and initial conditions
 
where ''f'' and ''g'' are given functions. Here, ''x'' and ''v'' may be either scalars or vectors. The equations of motion in [[Hamiltonian mechanics]] take this form if the Hamiltonian is of the form
:<math> (x_0,v_0), \quad</math>
 
:<math> H = T(x_0t,v_0v) + V(t,x). \quad, </math>
the Euler-Cromer algorithm produces an approximate [[Discrete mathematics|discrete]] solution by iterating
 
The differential equations are to be solved with the initial condition
:<math> v_{n+1} = v_n + a_n \Delta t \quad</math>
 
:<math> x_{n+1}x(t_0) = x_nx_0, +\qquad v_{n+1}v(t_0) \Delta= tv_0. \quad</math>
 
== SeeThe alsomethod ===
where <math> \Delta t </math> is the timestep and <math>a_n = a(x_n,v_n,t_n)</math> is the acceleration at the current timestep.
 
theThe Euler-CromerEuler–Cromer algorithm produces an approximate [[Discrete mathematics|discrete]] solution by iterating
Note the difference from the Euler method: <math>x_{n+1}</math> depends on <math>v_{n+1}</math> rather than <math>v_n</math>.
 
:<math> v_{n+1} = v_n + a_nf(t_n, x_n) \, \Delta t \quad</math>
 
:<math> x_{n+1} = x_n + g(t_n, v_{n+1}) \, \Delta t \quad</math>
 
where <math> \Delta t </math> is the timesteptime step and <math>a_nt_n = a(x_n,v_n,t_n)t_0 + n\Delta t</math> is the accelerationtime at theafter current''n'' timestepsteps.
 
Note theThe difference fromwith the standard Euler method: is that the Euler–Cromer method uses <math>x_v_{n+1}</math> dependsin onthe equation for <math>v_x_{n+1}</math>, ratherwhile the Euler method thanuses <math>v_n</math>.
 
The Euler–Cromer method is a [[Numerical ordinary differential equations#Consistency and order|first-order integrator]], just as the standard Euler method. This means that it commits an global error of the order of &Delta;t. However, the Euler–Cromer method is a [[symplectic integrator]], unlike the standard method. As a consequence, the Euler–Cromer method almost conserves the energy (when the Hamiltonian is time-independent). Often, the energy decreases steadily when the standard Euler method is applied, making it far less accurate.
 
== Example ==
Line 29 ⟶ 39:
:<math> {dv \over dt} = -{k \over m}x. \quad</math>
 
The Euler-CromerEuler–Cromer algorithm for this equation is
 
:<math>v_{n+1} = v_n - {k \over m}x_n\Delta t \quad</math>
 
:<math>x_{n+1} = x_n + v_{n+1} \Delta t. \quad</math>
 
== See also ===
* [[Numerical ordinary differential equations]]
 
== References ==
Line 56 ⟶ 63:
| url = http://www.physics.udel.edu/~jim/Ordinary%20Differential%20Equations/Euler-Cromer%20Method.htm
| accessdate = 2007-03-03}}
* {{cite book |last= Vesely
|first= Franz J.
|title= Computational Physics: An Introduction
|edition= 2nd edition
|publisher= Springer
|year= 2001
|isbn= 978-0-306-46631-1
|pages=page 117}}
 
 
{{mathapplied-stub}}
[[Category:Numerical differential equations]]