1/* Filename hill1.mac
2
3   ***************************************************************
4   *							         *
5   *                     <package name>                          *
6   *                <functionality description>                  *
7   *                                                             *
8   *          from: Computer Algebra in Applied Math.            *
9   *                   by Rand (Pitman,1984)                     *
10   *                Programmed by Richard Rand                   *
11   *      These files are released to the public domain          *
12   *            						 *
13   ***************************************************************
14*/ /*
15(d4) This program generates truncated Hill's determinants
16
17
18for Mathieu's equation.  To call it, type one of:
19
20
21            MAKEAEVEN(P)
22
23
24        or  MAKEBEVEN(P)
25
26
27        or  MAKEAODD(P)
28
29
30where P is the truncation size.
31
32*/
33
34makeaeven(p):=(icaeven(),for k from 2 thru p do (w:eqeven(),v:u,u:w),u)$
35makebeven(p):=(icbeven(),for k from 3 thru p do (w:eqeven(),v:u,u:w),u)$
36makeaodd(p):=(icaodd(),for k from 3 thru p do (w:eqodd(),v:u,u:w),u)$
37eqeven():=(d-k^2)*u-e^2/4*v$
38eqodd():=(d-(2*k-1)^2/4)*u-e^2/4*v$
39icaeven():=(u:d*(d-1)-e^2/2,v:d)$
40icbeven():=(u:(d-1)*(d-4)-e^2/4,v:d-1)$
41icaodd():=(u:(d-1/4+e/2)*(d-9/4)-e^2/4,v:d-1/4+e/2)$
42