Why I am trying what I am trying in my ode program
Subject: Why I am trying what I am trying in my ode program
From: Richard Fateman
Date: Fri, 10 Aug 2012 07:27:46 -0700
On 8/10/2012 12:40 AM, Dennis Darland wrote:
> First there is probably a way to symbolically derive equations for the terms of Taylor series terms from the differential equations in terms of the initial conditions.
Yes, Barton Willis showed how. David Barton (& others) showed how to do
this a few decades ago.
> But then you will still have to numerically evaluate these equations.
Not if you are happy with the semi-symbolic representation of a Taylor
series. For example, Here is
an approximate solution to a differential equation: 1+x+x^2/2.
Do you need to numerically evaluate? Maybe.
> The equations are likely to be very complex if you derive very many terms.
Not really, the solutions have a very specific format that is generally
not complex.
> Also I don't think the total amount of numerical calculation could be reduced by postponing that evaluation. I don't think the Taylor function would do this, unless you already had a solution to the equation say by integrating, which is not always possible.
If you have an equation y'=f(y,x) then you have an integration formula.
>
> The method, I am using, uses a theoretically exact derivation of the Taylor terms. And you can compute as many terms as you need (given enough space & time.)
This is, in Maxima, a program that fits on half a page.
> I usually use 30, but don't really know yet how to optimize that. Also need to optimize increment size. Both of those involve many factors, including how long it will take. I am just beginning to investigate those things. I need to make as sure as I can that the program is correct.
Have you read the papers
1 BARTON, D. On Taylor series and stiff equations. ACM Trans. Math.
Softw. 6, 3(Sept. 1980),
280-294.
2. BARTON, D., WILLERS, I.M, AND ZAHAR, R V.M. The automatic solution of
ordinary differential
equations by the method of Taylor series. Comput. J 14 (1971), 243-248
3. BARTON, D., WILLERS, I.M., AND ZAHAR, R.V.M. Taylor series methods
for ordinary differential
equations--An e~caluation. In Mathematical Software, John Rice (Ed.),
Academm Press, New
York, 1971, pp. 369-390.
attempting to translate a fortran program that you don't understand into
languages that
you don't understand is not such a good idea.
>
> The other numerical methods I know about use 'divided differences'. They are approximations to the first few (or perhaps several) terms of the Taylor series. And I suspect may (note 'differences') be subject to subtraction error. (When you subtract numbers close to each other significant digits cancel resulting in fewer significant digits.)
It should be possible for you to learn about numerical methods (for
ODEs, etc) by reading about them,
or maybe taking courses.
It is not necessary for you to reveal your unfamiliarity with these methods.
>
> So I have more and more accurate terms. So I am interested in trying to make it work. Dr Chang worked on it, but didn't use a good language for the code generation. He used FORTRAN. Snobol was around then. I used SPITBOL in classes at UNL where he was then, but he only used FORTRAN. I think that was a mistake.
Macsyma, Reduce, and other computer algebra languages, as well as Lisp,
were around for
a decade or two by the time Chang tried to do this work.
>
>
> There is a small bibliography on my sourceforge web page. Some of those books contain more extensive bibliographies. So there is some interest in the subject. Unless I do something, more than I can expect, I won't even be noticed. Most of the material in the books I have don't give me enough detail to help much. And I enjoy working out the details for myself anyway.
I suggest, once again, that you take the Barton, Willers, Zahar paper.
Read it carefully and see how to implement
the ideas in Maxima (or Maple or Mathematica or ...) in a page or so of
code. You don't need to declare or compile anything at all.
Then read the stuff in Henrici's book about Taylor series and
singularities and radius of convergence and errors.
You may realize that there will be more than one Taylor series of
interest, expanded at a single point, and that
there are mathematical (algebraic) questions about what you are trying
to do.
Finally, if you have everything "working" you can start worrying about
numerical stability, or computing Taylor series
of many many terms.