~ubuntu-branches/ubuntu/karmic/maxima/karmic

« back to all changes in this revision

Viewing changes to share/contrib/rand/reduct3.usg

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-11-13 18:39:14 UTC
  • mto: (2.1.2 hoary) (3.2.1 sid) (1.1.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041113183914-ttig0evwuatnqosl
Tags: upstream-5.9.1
ImportĀ upstreamĀ versionĀ 5.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
reduct2.mac is from the book "Perturbation Methods, Bifurcation Theory
 
2
and Computer Algebra" by Rand & Armbruster (Springer 1987)
 
3
 
 
4
it performs a liapunov-schmidt reduction for steady state bifurcations
 
5
in systems of partial differential equations depending on one
 
6
independent space variable.
 
7
 
 
8
The example is from p187.  maxima-5.9.0 cvs reproduces the
 
9
results from the book.
 
10
 
 
11
 
 
12
 
 
13
(C1) load("reduct3.mac");
 
14
Warning - you are redefining the MACSYMA function SETIFY
 
15
(D1)                              reduct3.mac
 
16
(C2) reduction3();
 
17
ENTER THE NUMBER OF DIFFERENTIAL EQUATIONS
 
18
2;
 
19
ENTER THE DEPENDENT VARIABLES AS A LIST
 
20
[y1,y2];
 
21
ENTER THE SPATIAL COORDINATE
 
22
x;
 
23
ENTER THE BIFURCATION PARAMETER
 
24
alpha;
 
25
ENTER THE CRITICAL BIFURCATION VALUE
 
26
1;
 
27
WE DEFINE LAM =  ALPHA - 1
 
28
ENTER THE CRITICAL EIGENFUNCTION AS A LIST
 
29
sin(x)*[1,0];
 
30
ENTER THE ADJOINT CRITICAL EIGENFUNCTION AS A LIST
 
31
2/%pi*sin(x)*[1,1];
 
32
ENTER THE DIFFERENTIAL EQUATION NUMBER 1
 
33
y2;
 
34
ENTER THE DIFFERENTIAL EQUATION NUMBER 2
 
35
'diff(y1,x,2)+alpha*y1-y2-y1^3-a*y1^5;
 
36
             2
 
37
            d Y1       5     3
 
38
[Y2, - Y2 + ---- - a Y1  - Y1  + (LAM + 1) Y1]
 
39
              2
 
40
            dx
 
41
WHAT IS THE LENGTH OF THE SPACE INTERVAL
 
42
%pi;
 
43
DO YOU KNOW APRIORI THAT SOME TAYLOR COEFFICIENTS ARE 0
 
44
Y,N
 
45
Y;
 
46
TO WHICH ORDER DO YOU WANT TO CALCULATE
 
47
5;
 
48
IS DIFF(W(AMP, 2 ,LAM, 0 ) IDENTICALLY ZERO, Y/N
 
49
Y;
 
50
IS DIFF(W(AMP, 3 ,LAM, 0 ) IDENTICALLY ZERO, Y/N
 
51
N;
 
52
 
 
53
Dependent equations eliminated:  (1)
 
54
  3                               3
 
55
 d W1    3 SIN(3 x) + 72 SIN(x)  d W2      9 SIN(x)
 
56
[----- = ----------------------, ----- = - --------]
 
57
     3             16                3        2
 
58
 dAMP                            dAMP
 
59
IS DIFF(W(AMP, 4 ,LAM, 0 ) IDENTICALLY ZERO, Y/N
 
60
Y;
 
61
IS DIFF(W(AMP, 1 ,LAM, 1 ) IDENTICALLY ZERO, Y/N
 
62
N;
 
63
 
 
64
Dependent equations eliminated:  (2)
 
65
    2                     2
 
66
   d W1                  d W2
 
67
[--------- = - SIN(x), --------- = SIN(x)]
 
68
 dAMP dLAM             dAMP dLAM
 
69
IS DIFF(W(AMP, 2 ,LAM, 1 ) IDENTICALLY ZERO, Y/N
 
70
Y;
 
71
IS DIFF(W(AMP, 3 ,LAM, 1 ) IDENTICALLY ZERO, Y/N
 
72
N;
 
73
 
 
74
Dependent equations eliminated:  (1)
 
75
     4                                         4
 
76
    d W1        69 SIN(3 x) + 2304 SIN(x)     d W2
 
77
[---------- = - -------------------------, ---------- = 18 SIN(x)]
 
78
     3                     128                 3
 
79
 dAMP  dLAM                                dAMP  dLAM
 
80
IS G_POLY( 1 , 0 )IDENTICALLY ZERO, Y/N
 
81
Y;
 
82
IS G_POLY( 2 , 0 )IDENTICALLY ZERO, Y/N
 
83
Y;
 
84
IS G_POLY( 3 , 0 )IDENTICALLY ZERO, Y/N
 
85
N;
 
86
IS G_POLY( 4 , 0 )IDENTICALLY ZERO, Y/N
 
87
Y;
 
88
IS G_POLY( 5 , 0 )IDENTICALLY ZERO, Y/N
 
89
N;
 
90
IS G_POLY( 1 , 1 )IDENTICALLY ZERO, Y/N
 
91
N;
 
92
IS G_POLY( 2 , 1 )IDENTICALLY ZERO, Y/N
 
93
Y;
 
94
IS G_POLY( 3 , 1 )IDENTICALLY ZERO, Y/N
 
95
N;
 
96
IS G_POLY( 4 , 1 )IDENTICALLY ZERO, Y/N
 
97
Y;
 
98
                                                            5        3
 
99
             3                 (- 1200 %PI a - 3195 %PI) AMP    3 AMP
 
100
(D2)    3 AMP  LAM + AMP LAM + ------------------------------ - ------
 
101
                                          1920 %PI                4
 
102
(C3)  solve(%,lam);
 
103
                                             4         2
 
104
                             (80 a + 213) AMP  + 96 AMP
 
105
(D3)                  [LAM = ---------------------------]
 
106
                                          2
 
107
                                   384 AMP  + 128
 
108
(C4) taylor(%,amp,0,4);
 
109
                                   2                  4
 
110
                              3 AMP    (80 a - 75) AMP
 
111
(D4)/T/        [LAM + . . . = ------ + ---------------- + . . .]
 
112
                                4            128
 
113
 
 
114
 
 
115
Local Variables: ***
 
116
mode: Text ***
 
117
End: ***
 
 
b'\\ No newline at end of file'