Stability of Heuns Method for lambda = -1000 & Step Size Calculation

  • Thread starter Larsson
  • Start date
  • Tags
    Method
In summary, the stability condition for Heun's method is given by A = 1 + h*lambda/2, and a suitable step size for lambda = -1000 is h = -0.002.
  • #1
Larsson
28
0
Consider the differential equation y' = lambda(y-sin(x)) + cos(x) and it's general solution y(x) = (y(x_0)- sin(x_0)) * exp(lambda(x-x_0)) + sin(x)

Determine the stability condition (derive the amplification factor) for Heuns method (improved euler). What would be a suitable step size for heuns method such that the method is stable sith lambda = -1000


Heuns method is the following if I haven't missunderstood it:
k_1 = f(x_n , y_n)
k_2 = f(x_(n+1) , y_n + h*k_1)
f(x_n,y_n) = y'
y_(n+1) = y_n + h/2(k_1 + k_2)

the correct answear should be
y_(n+1) = y_n + h/2(lambda*y_n + lambda(y_n + h*lambda*y_n))

but when I calculate k_2 I get
k_2 = k_2 = lambda(y_n + h(L(y-sin(x))+cos(x)) - sin(x+h)) + cos(x+h)
and there clearly something is wrong because the real answear doesn't contain any x+h. So... Where do I go wrong?
I mean when I calculate k_2, isn't the only thing I should do to calculate y'(x = x+h, y = y_n + h*k_1) ?
 
Physics news on Phys.org
  • #2
The stability condition for the Heun's method is given by the amplification factor A = 1 + h*lambda/2. The method is stable if |A| <= 1, which implies that h*lambda <= 2. Therefore, for lambda = -1000, a suitable step size for Heun's method such that the method is stable is h = -2/1000 = -0.002.
 

FAQ: Stability of Heuns Method for lambda = -1000 & Step Size Calculation

What is Heun's method and how does it relate to stability?

Heun's method is a numerical method used for solving ordinary differential equations. It is a two-step method that uses a predictor-corrector approach. Stability refers to the ability of the method to produce accurate results without excessive error accumulation over time.

How does the value of lambda affect the stability of Heun's method?

Lambda, or the eigenvalue of the linearized differential equation, plays a crucial role in determining the stability of Heun's method. For lambda values close to zero, the method is stable, but for large negative values, the method becomes increasingly unstable.

Why is lambda = -1000 considered a challenging case for Heun's method?

Lambda = -1000 is considered a challenging case for Heun's method because it is a large negative value, making the method highly unstable. This means that even small errors in the initial conditions or calculations can result in significant deviations from the true solution.

How is the step size calculated for Heun's method?

The step size, or h, is determined by dividing the total interval of the differential equation by the desired number of steps. For Heun's method, the step size must be small enough to ensure stability, but not too small that it increases computational time.

Can Heun's method be used for other values of lambda?

Yes, Heun's method can be used for other values of lambda. However, for large negative values, the method becomes increasingly unstable. For these cases, it is recommended to use alternative methods such as the implicit Euler method or the Runge-Kutta method, which are more stable for a wider range of lambda values.

Similar threads

Back
Top