On 7/22/2012 12:17 PM, Dennis Darland wrote:
> The step sizes I used there were for test purposes. Because I use the analytic solution for the initial conditions, as well as comparison to the numeric solution. They start identical. If all is well, with a very small step size they stay very close.
The justification for the taylor series solution (not exactly analytic...)
is that it will take much longer per step, but each step will be huge,
at least away from singularities.
You should be seeing how large a step size you can take and
still have substantial agreement.
As far as evaluating the taylor series rapidly, it is definitely plausible
to create and compile a program to do so, all within Maxima/lisp,
that would be considerably faster. It would help to reduce all the
coefficients to double-floats and declare their types appropriately.
With some skill and perhaps luck in choosing the right implementation
of Lisp under the Maxima, you can certainly get a factor of 100X
speedup. Or more.
The major issue with these methods is that they are unpopular with
the people who actually might use them (computational scientists)
because (a) the methods are quite different and in some sense
not comparable to the familiar old methods. (b) They do not push on the
driving edge of faster / parallel / hardware but rather smarter software.
(c) Computer algebra systems are, for the most part, under utilized by
computational scientists. (d) Such systems are generally
not presented to students at appropriate times in survey/introductory
computational courses, but -- if taught at all-- relegated to some
special (often theoretical) advanced
course.
> The difference between the analytic solution (numerically evaluated) and the numeric solution is usually much less than the step size. (This is not a necessary truth - there could be a VERY large derivative). But if there is any significant divergence this usually indicates either I have the analytic solution wrong, or there is some error in my program. I am testing at this point. Really, practically, solving problems no doubt you would need & try a larger step size or it would take too long. But you need to make sure your program works correctly first. A very small step size seems to me to be helpful in this regard. The time estimate would be especially useful in practical problems, but I find it
> interesting even here. (BTW it goes up to millennia.) You can run the problem for a small number of iterations, and get a good idea how long the whole problem would take. My interest is all theoretical anyway. I have, myself, no problems to solve. But I would not mind if it turned out to be useful for something. (BTW I did not name the thread and am not worried about the speed of maxima - though my testing seems to confirm it is much slower at what I am doing than Maple is.)
> Also there are some links elsewhere on the home page to tests with various sizes of increment and I do need to do more of that. That is of theoretical interest as well as practical. But being correct comes first.
>
>
> Dennis J. Darland