Register to reply

Why do we get oscillations in Euler's method of integration and what i

by ErezAgh
Tags: euler, integration, method, oscillations
Share this thread:
ErezAgh
#1
Jul8-14, 10:00 AM
P: 2
When using Euler's method of integration, applied on a stochastic differential eq. :

For example - given
d/dt v=−γvΔt+sqrt(ϵ⋅Δt)Γ(t)
we loop over

v[n+1]=v[n]−γv[n]Δt+sqrt(ϵ⋅Δt)Γn.
(where −γv[n] is a force term, can be any force and Γn is some gaussian distributed random variable. ) .

Then if we choose Δt not small enough, we eventually get (if we run over long times, meaning many repeated iterations) that the solutions become "unstable and oscillations appear around the analytic solution, with amplitude becoming larger and larger with time" (~ collected from many different sources I found on the internet that mention the problem but don't discuss it in depth).

Why are these actual OSCILLATIONS, and not simply random fluctuations? What is the period of these oscillations?
Phys.Org News Partner Mathematics news on Phys.org
Math journal puts Rauzy fractcal image on the cover
Heat distributions help researchers to understand curved space
Professor quantifies how 'one thing leads to another'
MrAnchovy
#2
Jul8-14, 10:33 AM
P: 543
Quote Quote by ErezAgh View Post
Why are these actual OSCILLATIONS, and not simply random fluctuations?
For the same reason single-step numerical integration is unstable for non-stochastic problems when the step size is large enough so that each step 'overshoots' the analytic solution.

Quote Quote by ErezAgh View Post
What is the period of these oscillations?
Er, the step size.
pasmith
#3
Jul8-14, 10:54 AM
HW Helper
Thanks
P: 1,022
Quote Quote by ErezAgh View Post
When using Euler's method of integration, applied on a stochastic differential eq. :

For example - given
d/dt v=−γvΔt+sqrt(ϵ⋅Δt)Γ(t)
we loop over

v[n+1]=v[n]−γv[n]Δt+sqrt(ϵ⋅Δt)Γn.
(where −γv[n] is a force term, can be any force and Γn is some gaussian distributed random variable. ) .

Then if we choose Δt not small enough, we eventually get (if we run over long times, meaning many repeated iterations) that the solutions become "unstable and oscillations appear around the analytic solution, with amplitude becoming larger and larger with time" (~ collected from many different sources I found on the internet that mention the problem but don't discuss it in depth).

Why are these actual OSCILLATIONS, and not simply random fluctuations?
Consider the non-stochastic ODE [tex]
y' = -ky[/tex] with [itex]k > 0[/itex] and [itex]y(0) = 1[/itex]. This can be solved analytically: [tex]y(t) = e^{-kt}.[/tex] Note that [itex]y \to 0[/itex] as [itex]t \to \infty[/itex]. Applying Euler's method with step size [itex]h > 0[/itex] we obtain [tex]
y_{n+1} = y_n - hky_n = y_n(1 - hk)[/tex] which again can be solved analytically:
[tex]
y_n = (1 - hk)^n.
[/tex] Thus the error at time [itex]t = nh[/itex] is given by [tex]
\epsilon_n = y(nh) - y_n = e^{-nhk} - (1 - hk)^n.
[/tex] If [itex]hk > 2[/itex] then [itex]1 - hk < -1[/itex], so that [tex]
\epsilon_n = e^{-nhk} - (-1)^n|1 - hk|^n.[/tex] Thus, since [itex]|1 - hk| > 1[/itex] and [itex]e^{-nhk} < 1[/itex], we see that [itex]|\epsilon_n| \to \infty[/itex] and that [itex]\epsilon_n[/itex] is alternatively positive and negative (which is what "oscillates" means in this context).

ErezAgh
#4
Jul8-14, 11:03 AM
P: 2
Why do we get oscillations in Euler's method of integration and what i

Quote Quote by pasmith View Post
Consider the non-stochastic ODE [tex]
y' = -ky[/tex] with [itex]k > 0[/itex] and [itex]y(0) = 1[/itex]. This can be solved analytically: [tex]y(t) = e^{-kt}.[/tex] Note that [itex]y \to 0[/itex] as [itex]t \to \infty[/itex]. Applying Euler's method with step size [itex]h > 0[/itex] we obtain [tex]
y_{n+1} = y_n - hky_n = y_n(1 - hk)[/tex] which again can be solved analytically:
[tex]
y_n = (1 - hk)^n.
[/tex] Thus the error at time [itex]t = nh[/itex] is given by [tex]
\epsilon_n = y(nh) - y_n = e^{-nhk} - (1 - hk)^n.
[/tex] If [itex]hk > 2[/itex] then [itex]1 - hk < -1[/itex], so that [tex]
\epsilon_n = e^{-nhk} - (-1)^n|1 - hk|^n.[/tex] Thus, since [itex]|1 - hk| > 1[/itex] and [itex]e^{-nhk} < 1[/itex], we see that [itex]|\epsilon_n| \to \infty[/itex] and that [itex]\epsilon_n[/itex] is alternatively positive and negative (which is what "oscillates" means in this context).
Thanks a lot both!

1) I see why it oscillates with a frequency of 1 step, (-1)^n, so this means you normalized the step size to be Er=1?
2) Silly question perhaps, but can this be written in the form of a sine() than?


Register to reply

Related Discussions
Integrating Euler's equations for rigid body dynamics with Euler's Method Differential Equations 0
Euler's method Calculus & Beyond Homework 2
Euler methond and the improved Euler method Differential Equations 4
Differential equations, euler's method and bisection method Calculus & Beyond Homework 3
Euler's Method Differential Equations 3