![]() Volume 10, Issue 1 Articles Trott's Corner New Products New Publications Calendar News Bulletins New Resources Classifieds Download This Issue Editorial Policy Staff and Contributors Submissions Subscriptions Advertising Back Issues Contact Information |
Approximating Solutions of Linear Ordinary Differential Equations with Periodic Coefficients by Exact Picard Iterates
4. Fast Implementation of Picard Iteration for Systems of Linear ODEs with Periodic Coefficients and the FastPicard PackageBy constructing an alternative function, we will see that the main reason for the slowness of picard is that it uses the built-in function Integrate for integration. Integrate is of course very good for general purposes, but it is too slow in cases such as ours, in which we have to calculate a very large number of integrals of functions in a limited class. As shown in the previous section, we do not need all the generality of Integrate because all integrands belong to the family We created a new function, specialized for definite and indefinite integration of functions in First, NewIntegrate recognizes a linear combination of terms and uses the fact that the integral is a linear operator. This is a standard trick used, for example, in the implementation of Laplace transforms [9, 13]. It then readily performs indefinite integrals of constants, powers, sines, and cosines. The more difficult functions in In calculating definite integrals, a trick for further speed is to use The reader is invited to test the accuracy and performance of NewIntegrate by producing a large random function in The package also exports the function FastPicard[matrix, tzero, xzero, n] that is similar to picard but uses NewIntegrate. For functions in Of course, times are much shorter than the ones obtained by picard. This is shown in the following example, which also illustrates the syntax.
Besides using NewIntegrate, FastPicard incorporates other improvements we discovered after some experimenting. Here is a list of the differences.
The package also exports the functions FundamentalMatrix and FloquetMatrix. A fundamental matrix solution to a linear system such as equation (4) is a matrix whose columns are solutions to the system with linear independent initial conditions. The function FundamentalMatrix[matrix, tzero, n] calculates
is obtained by
One advantage of having a fundamental matrix solution calculated at initial time
These values can be compared with the corresponding exact ones. In fact, the exact fundamental matrix solution for the system is given in [1]. Using it, we obtain
The Floquet transition matrix for a linear system of differential equations with periodic coefficients of period For example, here is an approximation to the Floquet transition matrix for the Mathieu equation with
|
||||||||
About Mathematica | Download Mathematica Player © 2006 Wolfram Media, Inc. All rights reserved. |