Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code
[maxima.git] / share / contrib / rand / reduct1.usg
blob1cead67c39bdb33c869b21d80d7337d7757df686
1 reduct1.mac is from the book "Perturbation Methods, Bifurcation Theory
2 and Computer Algebra" by Rand & Armbruster (Springer 1987)
4 It performs a Liapunov-Schmidt reduction for steady state bifurcations
5 in one differential equation depending on one independent variable.
6 The de has the form y'' + f(y,y',alpha) = 0. y = y(x) is defined on a
7 real interval with dirichlet or neumann boundary conditions and f
8 depends only linearly on alpha.
10 The example is from p168.  maxima-5.9.0 cvs reproduces the
11 results from the book.
14 (C1) load("./reduct1.mac");
15 (D1)                             ./reduct1.mac
16 (C2) reduction1();
17 ENTER DEPENDENT VARIABLE
19 USE X AS THE INDEPENDENT VARIABLE AND ALPHA AS A PARAMETER TO VARY
20 ENTER THE CRITICAL BIFURCATION VALUE ALPHA
21 %PI^2;
22                             2
23 WE DEFINE LAM = ALPHA -  %PI
24 ENTER THE CRITICAL EIGENFUNCTION
25 COS(%PI*X);
26 WHAT IS THE LENGTH OF THE X-INTERVAL
28 SPECIFY THE BOUNDARY CONDITIONS
29 YOUR CHOICE FOR THE B.C. ON Y AT X=0 AND X= 1
30 ENTER 1 FOR Y=0, 2 FOR Y'=0
31 B.C. AT 0?
33 B.C. AT 1 ?
35 THE D.E. IS OF THE FORM Y'' + F(Y,Y',ALPHA) = 0,ENTER F
36 ALPHA*SIN(Y);
37  2
38 d Y             2
39 --- + (LAM + %PI ) SIN(Y)
40   2
42 DO YOU KNOW APRIORI THAT SOME TAYLOR COEFFICIENTS ARE ZERO, Y/N
44 TO WHICH ORDER DO YOU WANT TO CALCULATE
46 IS DIFF(W,AMP, 2 ,LAM, 0 ) IDENTICALLY ZERO
48 , Y/N
50 IS DIFF(W,AMP, 3 ,LAM, 0 ) IDENTICALLY ZERO
52 , Y/N
55 Dependent equations eliminated:  (2)
56    3
57   d W      COS(3 %PI X)
58 [----- = - ------------]
59      3          32
60  dAMP
61 IS DIFF(W,AMP, 4 ,LAM, 0 ) IDENTICALLY ZERO
63 , Y/N
65 IS DIFF(W,AMP, 1 ,LAM, 1 ) IDENTICALLY ZERO
67 , Y/N
70 Dependent equations eliminated:  (2)
71      2
72     d W
73 [--------- = 0]
74  dAMP dLAM
75 IS DIFF(W,AMP, 2 ,LAM, 1 ) IDENTICALLY ZERO
77 , Y/N
79 IS DIFF(W,AMP, 3 ,LAM, 1 ) IDENTICALLY ZERO
81 , Y/N
84 Dependent equations eliminated:  (2)
85      4
86     d W         9 COS(3 %PI X)
87 [---------- = - --------------]
88      3                    2
89  dAMP  dLAM        256 %PI
90 IS G_POLY( 1 , 0 ) IDENTICALLY
92 ZERO, Y/N
94 IS G_POLY( 2 , 0 ) IDENTICALLY
96 ZERO, Y/N
98 IS G_POLY( 3 , 0 ) IDENTICALLY
100 ZERO, Y/N
102 IS G_POLY( 4 , 0 ) IDENTICALLY
104 ZERO, Y/N
106 IS G_POLY( 5 , 0 ) IDENTICALLY
108 ZERO, Y/N
110 IS G_POLY( 1 , 1 ) IDENTICALLY
112 ZERO, Y/N
114 IS G_POLY( 2 , 1 ) IDENTICALLY
116 ZERO, Y/N
118 IS G_POLY( 3 , 1 ) IDENTICALLY
120 ZERO, Y/N
122 IS G_POLY( 4 , 1 ) IDENTICALLY
124 ZERO, Y/N
126                      3                      2    5      2    3
127                   AMP  LAM   AMP LAM   3 %PI  AMP    %PI  AMP
128 (D2)            - -------- + ------- + ----------- - ---------
129                      16         2         1024          16
130 (C3) solve(%,lam);
131                                   2    4         2    2
132                              3 %PI  AMP  - 64 %PI  AMP
133 (D3)                  [LAM = --------------------------]
134                                          2
135                                    64 AMP  - 512
136 (C4) taylor(%,amp,0,4);
137                                  2    2         2     4
138                               %PI  AMP    (5 %PI ) AMP
139 (D4)/T/        [LAM + . . . = --------- + ------------- + . . .]
140                                   8            512
143 Local Variables: ***
144 mode: Text ***
145 End: ***