1 averm.mac is from the book "Perturbation Methods, Bifurcation Theory
2 and Computer Algebra" by Rand & Armbruster (Springer 1987)
4 The routine performs m-th order averaging on an n-dimensional system
5 of nonautonomous odes. Averaging is performed by converting trig
6 terms to complex exponentials, then killing exponentials. It is noted
7 that for most practical problems the routine is proabaly too slow and
8 creates intermediate expressions that are too large.
10 The example is from p 130. maxima-5.9.0 cvs reproduces the
11 results from the book.
13 (C1) load("averm.mac");
16 DO YOU WANT TO ENTER A NEW PROBLEM? (Y/N)
18 ARE YOU CONSIDERING A WEAKLY NONLINEAR OSCILLATOR OF THE FORM
19 Z'' + OMEGA0^2 Z = EPS F(Z,ZDOT,T) ? (Y/N)
21 ENTER NUMBER OF DIFFERENTIAL EQUATIONS
23 THE ODE'S ARE OF THE FORM:
26 SCALE TIME T SUCH THAT AVERAGING OCCURS OVER 2 PI
27 ENTER RHS( 1 )=EPS*...
30 D X1 /DT = EPS SIN (T) (X1 - X1 )
31 ENTER ORDER OF AVERAGING
33 THE TRANSFORMATION: [X1] =
35 [- ((2 EPS COS(4 T) - 8 EPS COS(2 T)) Y1
38 + (- 3 EPS COS(4 T) - 16 EPS SIN(2 T) + 12 EPS COS(2 T)) Y1
41 + (EPS COS(4 T) + 16 EPS SIN(2 T) - 4 EPS COS(2 T) - 64) Y1)/64]
43 EPS Y1 EPS Y1 EPS Y1 EPS Y1 EPS Y1
44 (D2) [- -------- + -------- - -------- - ------- + ------]