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)(adsbygoogle = window.adsbygoogle || []).push({});

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 havent 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 doesnt contain any x+h. So... Where do I go wrong?

I mean when I calculate k_2, isnt the only thing I should do to calculate y'(x = x+h, y = y_n + h*k_1) ?

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Using Heuns method

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**