Comments embedded below.
Dennis J. Darland
dennis.darland at yahoo.com
http://dennisdarland.com/http://dennisdarland.com/dennisdaze/http://dennisdarland.com/philosophy/
"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>
> Cc: "maxima at math.utexas.edu" <maxima at math.utexas.edu>
> Date: Tuesday, June 19, 2012, 10:07 AM
> Over the years I've looked at
> Corliss/Chang and Barton/Willers and Henrici papers on using
> Taylor series
> for solving ODEs, specifically initial value problems.
> (e.g.? Corliss & Chang,
> Solving Ordinary Differential
> Using Taylor Series,
> ACM TOMS Vol 8, No. 2, June 1982, Pages 114-144)
>
> I think that starting with the technology in Maxima allows
> for vast simplification in the setup.
> Basically, you don't need a separate compiler in language 1
> to produce code in language 2. (FORTRAN? C?)
Chang wrote a program in FORTRAN to write another program in FORTRAN.
But it was very difficult to understand. (I have a copy of it.)
Mine is a Ruby program which writes either a Maple or Maxima program.
Ruby is better suited to this than FORTAN, Maple, or Maxima, and I have tried to make my program as easy to understand as I can (though it is necessarily complex). Chang seemed to be deliberately obscure.
>
> You can write a program to generate the needed Taylor series
> coefficients
> using Maxima, starting with the initial condition and the
> DE. You can then evaluate
> the series as needed, and also run whatever code you had in
> mind to estimate
> the radius of convergence. In Maxima.? If you want more
> speed, there are some
> tricks that can be used that do not require generating
> FORTRAN etc.
It would be interesting to compare what I'm doing with what is provided in Maple and Maxima. As I am dealing with systems of ordinary differential equations, 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?
1>
> I suggest that writing a Maxima program to generate Taylor
> series solutions to ODEs would
> be a nice project, and probably can be demonstrated using a
> half-page of code.
> Doing a fancy job would naturally require more code.
>
> The basic problem with these methods is that people who
> solve ODEs for a living
> have their own methods that are not directly comparable to
> Taylor series methods,
> and generally show no interest in changing.
>
I'm just a hobbyist looking for something interesting to do. For me, it's more interesting than, say, playing games. It keeps my brain working.
> (I have not found the code to be readable, but I doubt that
> any sizable percentage of the time
> need be spent computing factorials.)
I think the generated code is easier to understand than the Ruby code which generates it. The change I made for factorials significantly helped Maple (which surprised me as it memoizes these sorts of things I thought) more than Maxima.
I am now working on other improvements in efficiency.
Generating code for both Maple and Maxima has proved fruitful. In several cases, one or the other has given much better diagnostic information than the other. I, generally, prefer open source and encourage it, but sometimes commercial software is superior. I didn't start (name) this thread, but with the problems I've been working with Maple does seem 50-60 times faster than Maxima.
>
> RJF
>
>
>
>
>