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 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
dennis.darland at yahoo.com
http://dennisdarland.com/http://dennisdarland.com/dennisdaze/http://dennisdarland.com/philosophy/http://sode.sourceforge.net/
"According to the World Health Organization, the warming of the planet caused an additional 140,000 deaths in 2004, as compared with the number of deaths there would have been had average global temperatures remained as they were during the period 1961 to 1990. This means that climate change is already causing, every week, as many deaths as occurred in the terrorist attacks on September 11, 2001"
-- Peter Singer _Practical Ethics, Third Edition_, p. 216.
--- On Sun, 7/22/12, Richard Fateman <fateman at eecs.berkeley.edu> wrote:
> From: Richard Fateman <fateman at eecs.berkeley.edu>
> Subject: Re: [Maxima] maxima is 100 times slower than maple
> To: "Dennis Darland" <dennis.darland at yahoo.com>
> Date: Sunday, July 22, 2012, 9:26 AM
> On 7/22/2012 7:07 AM, Dennis Darland
> wrote:
> > Corliss mentioned to me (in email) a couple days ago
> that he & Chang, had been asked about the example you
> gave, y' = y, one of the 1st times they presented their
> program. They had to admit they could not handle it at that
> time. So it occurs to me now that perhaps you thought my
> program could not handle it. That had not occurred to me
> before. See "diff0.ode" and "diff.ode" in the table:
> >
> > http://sode.sourceforge.net/omniresults/special_cases_007/table.html
> >
> > diff0.ode is y'=y-1
> > diff.ode is y''=y'
> >
> > Anyway I suspect your method is likely to have trouble
> with systems of non-linear equations.
> You have to solve for y'.
>
> I don't understand your table, but if you are running a 30
> term taylor
> series for 10^5 steps, it seems excessive. As does a
> run time in hours or days.
>
> I expect that if one uses a taylor series, one also takes
> very large
> steps, though approaching a singularity requires more work.
>
> RJF
>
> >???I haven't tested these yet - you walk
> before running, but I have plans to.
> >
> > Dennis J. Darland
> > dennis.darland at yahoo.com
> > http://dennisdarland.com/
> > http://dennisdarland.com/dennisdaze/
> > http://dennisdarland.com/philosophy/
> > http://sode.sourceforge.net/
> > "According to the World Health Organization, the
> warming of the planet caused an additional 140,000 deaths in
> 2004, as compared with the number of deaths there would have
> been had average global temperatures remained as they were
> during the period 1961 to 1990. This means that climate
> change is already causing, every week, as many deaths as
> occurred in the terrorist attacks on September 11, 2001"
> > -- Peter Singer _Practical Ethics, Third Edition_, p.
> 216.
> >
> >
> > --- On Tue, 6/19/12, Richard Fateman <fateman at eecs.berkeley.edu>
> wrote:
> >
> >> From: Richard Fateman <fateman at eecs.berkeley.edu>
> >> Subject: Re: [Maxima] maxima is 100 times slower
> than maple
> >> To: "Dennis Darland" <dennis.darland at yahoo.com>,
> "maxima List" <maxima at math.utexas.edu>
> >> Date: Tuesday, June 19, 2012, 2:51 PM
> >> On 6/19/2012 12:25 PM, Dennis Darland
> >> wrote:
> >>
> >> ...
> >>> C, however, it is not as simple as producing a
> Taylor
> >> series for a given function. If you had the
> function, you
> >> would already have the solution! I.e. you have
> equations
> >> each with a derivative in the LHS (left hand side)
> and a
> >> functions on the RHS's also possibly involving
> derivatives.
> >> How, from this, cam Maxima determine the Taylor
> series?
> >> Here's how.
> >> Let us say that you have a function f(x)? that
> solves
> >> the differential equation f'(x)=f(x)? and also
> f(0)=1.
> >> Type into Maxima:
> >>
> >> gradef(f(x),f(x));
> >> tellsimp(f(0),1);
> >> taylor(f(x),x,0,10);
> >>
> >>???.... the result is the solution to
> the DE, namely the
> >> taylor series for exp(x).
> >>
> >>
> >>
> >> higher order DEs can be accomodated by making up
> names for
> >> first, second, etc derivatives,
> >> and defining their properties.
> >>
> >> This neglects many issues that eventually come up
> like
> >> convergence, singularities, etc.
> >>
> >> It should not be expensive to evaluate a taylor
> series with
> >> numerical coefficients, even in Lisp.
> >>
> >> RJF
> >>
>
>