1composite.mac is from "The Use of Symbolic Computation in Perturbation 2Analysis" by R. H. Rand in Symbolic Computation in Fluid Mechanics and 3Heat Transfer ed H.H.Bau (ASME 1988) (http://tam.cornell.edu/Rand.html) 4 5The routine performs the Method of Composite Expansions. Given a 6differential equation 7 8 ey''+a(x)y'+b(x)y=0 9 10with boundary conditions y(0)=y0 and y(1)=y1 11 12where: 13 e << 1 14 a(x) and b(x) are analytic functions of x 15 a(x) > 0 on 0 <= x <= 1 16 17The function composite() is called without arguments. The user is 18prompted for: 19 - a(x) 20 - b(x) 21 - y0 22 - y1 23 - the truncation order 24 25The example in the paper is from Nayfeh, p425 26 27 e*y'' + (2*x+1)*y' +2*y = 0 28 y(0) = alpha 29 y(1) = beta 30 31The results from maxima-5.9.0-cvs match those in the paper. 32 33(C1) load("./composit.mac"); 34(D1) ./composit.mac 35(C2) composite(); 36The d.e. is: ey''+a(x)y'+b(x)y=0 37with b.c. y(0)=y0 and y(1)=y1 38enter a(x) > 0 on [0,1] 392*x+1; 40enter b(x) 412; 42enter y0 43alpha; 44enter y1 45beta; 46The d.e. is: ey''+( 2 x + 1 )y'+( 2 )y=0 47with b.c. y(0)= ALPHA and y(1)= BETA 48enter truncation order 493; 50 2 51 x + x 52 3 2 - ------ 53 85312 BETA e 928 BETA e 16 BETA e e 54(D2) (- ------------- - ----------- - --------- - 3 BETA + ALPHA) %E 55 243 27 3 56 57 3 6 5 4 3 58 - e (5120 BETA x + 15360 BETA x + 21504 BETA x + 17408 BETA x 59 60 2 61 + 16032 BETA x + 9888 BETA x - 85312 BETA) 62 63 7 6 5 4 3 2 64/(31104 x + 108864 x + 163296 x + 136080 x + 68040 x + 20412 x + 3402 x 65 66 2 4 3 2 67 e (128 BETA x + 256 BETA x + 336 BETA x + 208 BETA x - 928 BETA) 68 + 243) - -------------------------------------------------------------------- 69 5 4 3 2 70 864 x + 2160 x + 2160 x + 1080 x + 270 x + 27 71 72 2 73 e (8 BETA x + 8 BETA x - 16 BETA) 3 BETA 74 - ---------------------------------- + ------- 75 3 2 2 x + 1 76 24 x + 36 x + 18 x + 3 77 78References: 79 80A. Neyfeh, Perturbation Methods, Wiley (1973) 81 82 83Local Variables: *** 84mode: Text *** 85End: ***