MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Numerical Problem

Tony Harker wrote:
> Dear Steve,
>           I agree with all you say: the result returned by Version 5 was
> anomalous (and obscured the very point I was originally trying to make with
> the example, taken from a course, about the different characteristics of
> explicit, predictor-corrector, and implicit methods of the same order). I'm
> happy with what version 7 is doing -- but I was surprised when I saw the
> difference between versions 5 and 7.
>   Tony  

To see what an anomaly your example was, try this variation. You will 
not get "nice" results on any platform.

epcm[h_, y_List, f_List] := y + 1/2*h*(f.y + f.(y + h*f.y))
app[0] = {3., -1.};
mat = {{997, 2997}, {-999, -2999}};

Do[Print[InputForm[app[j] = epcm[1/10., app[j - 1], mat]]], {j, 1, 10}]

Remains true if you use precision tricks (though raising precision will 
maintain reasonable results longer.

The reason, as Steve alluded or maybe stated outright, is that we can 
represent exactly ratios of 2/1 in floating point approximations. And 
this is what happens to the vector components of your original example, 
when extended precision downsizes to fit into standard double precision 
reals. Cannot do this when the ratio is 3/1, and that's the case for the 
component magnitudes of the eigenvector corresponding to the smaller 
eigenvalue of the matrix above.

Daniel Lichtblau
Wolfram Research

  • Prev by Date: Covariant derivatives of tensors?
  • Next by Date: Re: Localize Pattern variables
  • Previous by thread: Re: Re: Numerical Problem
  • Next by thread: Re: Re: Re: Numerical Problem