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

Click For Summary

Discussion Overview

The discussion revolves around the phenomenon of oscillations observed when using Euler's method of integration on stochastic differential equations. Participants explore the conditions under which these oscillations occur, their characteristics, and the underlying reasons for their emergence, particularly in relation to step size and stability.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes the application of Euler's method to a stochastic differential equation and notes that if the time step Δt is not sufficiently small, oscillations appear around the analytic solution, with increasing amplitude over time.
  • Another participant suggests that these oscillations arise from the instability of single-step numerical integration for non-stochastic problems when the step size is large enough to cause overshooting of the analytic solution.
  • A further contribution discusses a non-stochastic ordinary differential equation (ODE) and derives the error associated with Euler's method, indicating that if the product of step size and a constant exceeds 2, the error oscillates and diverges.
  • One participant questions whether the oscillation frequency corresponds to the step size and inquires if the oscillations can be expressed in terms of a sine function.

Areas of Agreement / Disagreement

Participants express varying views on the nature of the oscillations and their mathematical representation, with no consensus reached on whether these oscillations can be described using sine functions or other forms.

Contextual Notes

The discussion includes assumptions about the stability of numerical methods, the dependence on step size, and the specific characteristics of stochastic versus non-stochastic equations, which remain unresolved.

ErezAgh
Messages
5
Reaction score
0
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?
 
Physics news on Phys.org
ErezAgh said:
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.

ErezAgh said:
What is the period of these oscillations?

Er, the step size.
 
ErezAgh said:
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).
 
pasmith said:
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?
 
Last edited:

Similar threads

  • · Replies 25 ·
Replies
25
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 19 ·
Replies
19
Views
4K
Replies
5
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
551
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 0 ·
Replies
0
Views
5K