NDSolve quite a lot and have noticed that setting values for
PrecisionGoal can greatly affect the solution outcome, and can also greatly increase the calculation time required to produce a solution. As such, I have a few questions:
If, for example, I set
AccuracyGoal -> 18and
PrecisionGoal -> 10, will this essentially make
AccuracyGoal -> 10due to the limitation in possible decimal places available from the
PrecisionGoalsetting? Would there be a point in having different values of
PrecisionGoalor is it best to set them to the same value?
WorkingPrecisionfit into the picture? What I usually do is just set
PrecisionGoalas high as possible without making the calculation time "unbearably" slow. When I try and use
WorkingPrecisionI always get and error saying
"The precision of the differential equation ... is less than WorkingPrecision ...", so tend to ignore its use.
If computation time is not an issue, what would be the best way to set
PrecisionGoal? Would they be set in such a way that you settle on a value once the
NDSolveoutput solutions from various test values of
PrecisionGoalstart to converge?
I've noticed that when using
NMinimizeon the output
NDSolvesolution, setting values for
NMinimizedoesn't seem to have an effect on the minimized value attained, and only seems to depend of what your
PrecisionGoalvalues were in
NDSolve(although using low values of AG and PG in
NMinimizedoes make a large difference). Is it pointless to set values for
And finally, I know this is a very broad question and most likely has many different ways of attacking the problem based on what you are doing, but are there any tricks or tips that may speed up
NMinimizecalculations without affecting accuracy too much? This is what I'm struggling with most at the moment.
- Is there a way to see how much error has accumulated in your NDSolve output in order to see if you need to up the accuracy and/or precision settings? I see that Mathematica uses "Numerical Precision Tracking" (http://www.ordinate.de/wolfram/TechGuide/EN/technology/offlineguide/precisiontracking.html), could this somehow be used to show error accumulation?