function w = crap(f, a,b,alpha, h)
w(1) = alpha;
j = 2;
for i = a+h:h:b
w(j) = w(j-1) +h*f(i, w(j-1) - w(j-1) / f(i-h,w(j-1)));
j++;
end
end
next... i don't understand the defintion of region of absolute
stability, nor a-stable. are we looking for pairs of numbers h and
lambda that are each complex numbers or a product of numbers, such that
the product is complex? if some method is a-stable, it's region R is
the entire left half-plane... what's the left hand plane? is that the
subset of non-real numbers of the complex numbers?
boo confuzzlement.
Regarding region of stabality: given a method and a specific problem
you are trying to find h to make the method stable. We pick the specific
problem to be y'=lambda*y. h is always a real number (step length), while
lambda can be a complex number. It turns out h*lambda is the quantity that
tells us if our method on this specific problem is stable or not. Note
that h*lambda is a complex number. Specifically, for onestep methods if
| Q(h*lambda) |<1, then the our method is stable. The multistep method
has similar definition, although more difficult, so I'm going to ignore that.
The region of absolute stability is precisely the set of complex numbers
z such that |Q(z)|<1.
I hope everything makes sense up to now, if not, I can try clarifying it
more. Now, we say our method is A-stable if the region contains the left
half plane of the complex plane, that is if for any z with the real part
negative satisfies |Q(z)|<1. Even more explicitly, if h*lambda=z=a+bi with
a<0 and b some real number (0 is a possibility), we have |Q(z)|<1.
Cheers,
Soroosh