Re: Re: Re: Numerical Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg107170] Re: [mg107124] Re: [mg107063] Re: Numerical Problem
- From: "Tony Harker" <a.harker at ucl.ac.uk>
- Date: Thu, 4 Feb 2010 06:54:38 -0500 (EST)
- References: <hjulg2$sfk$1@smc.vnet.net> <201002020825.DAA08585@smc.vnet.net> <201002031111.GAA19569@smc.vnet.net> <4B69A3B8.70001@wolfram.com>
Dear Daniel,
Yes, that's a nice demonstration.
Tony
]-> -----Original Message-----
]-> From: Daniel Lichtblau [mailto:danl at wolfram.com]
]-> Sent: 03 February 2010 16:27
]-> To: Tony Harker
]-> Cc: mathgroup at smc.vnet.net
]-> Subject: Re: [mg107124] Re: [mg107063] 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
]->
]->
- References:
- Re: Numerical Problem
- From: schochet123 <schochet123@gmail.com>
- Re: Re: Numerical Problem
- From: "Tony Harker" <a.harker@ucl.ac.uk>
- Re: Numerical Problem