5.11's problems...

3 views
Skip to first unread message

zenkalia

unread,
Nov 21, 2006, 2:52:10 AM11/21/06
to Math128a-Berkeley
i'm trying to apply the backwards trapezoidal rule, and my answers are
very blatantly off... i'm probably missing something stupid, since
it's such a simple concept, so here's my code:

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.

Soroosh Yazdani

unread,
Nov 21, 2006, 2:41:32 PM11/21/06
to Math128a...@googlegroups.com
Hmm, I don't know what backwards trapazoidal rule is. I can't find
it in the book. Looking at your code, there are few things that don't
make sense to me. You are dividing by f(i-h,w(j-1)), this seems like
a bad idea, since that means your method is going to fail for y'=0,
since you have division by zero. Also, it seems to me that f(i-h,w(j-1)) is
approximating f(t_{i-1},w(t_{i})), which again is very unusual.

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

Reply all
Reply to author
Forward
0 new messages