1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405 |
- Sat Jun 29 14:16:00 PDT 1991
- REDUCE 3.4, 15-Jul-91 ...
- 1: 1:
- 2: 2:
- *** ^ redefined
- 3: 3: % Vector test routine
- % Author: David Harper (algebra@liverpool.ac.uk)
- % Computer Algebra Support Officer
- % University of Liverpool Computer Laboratory.
- % Please compare carefully the output from running this test file with the
- % log file provided to make sure your implementation is correct.
- linelength 72;
- 80
- off allfac;
- on div;
- vec a,b,c;
- matrix q;
- a := avec(ax,ay,az);
- VEC(X) := AX
- VEC(Y) := AY
- VEC(Z) := AZ
- b := avec(bx,by,bz);
- VEC(X) := BX
- VEC(Y) := BY
- VEC(Z) := BZ
- q := mat((q11,q12,q13),(q21,q22,q23),(q31,q32,q33));
- [Q11 Q12 Q13]
- [ ]
- Q := [Q21 Q22 Q23]
- [ ]
- [Q31 Q32 Q33]
- c := a+b;
- VEC(X) := AX + BX
- VEC(Y) := AY + BY
- VEC(Z) := AZ + BZ
- c := a-b;
- VEC(X) := AX - BX
- VEC(Y) := AY - BY
- VEC(Z) := AZ - BZ
- c := a cross b;
- VEC(X) := AY*BZ - AZ*BY
- VEC(Y) := - AX*BZ + AZ*BX
- VEC(Z) := AX*BY - AY*BX
- d := a dot b;
- D := AX*BX + AY*BY + AZ*BZ
- a dot c;
- 0
- b dot c;
- 0
- q*a;
- VEC(X) := AX*Q11 + AY*Q12 + AZ*Q13
- VEC(Y) := AX*Q21 + AY*Q22 + AZ*Q23
- VEC(Z) := AX*Q31 + AY*Q32 + AZ*Q33
- c:=2*f*a - b/7;
- 1
- VEC(X) := 2*F*AX - ---*BX
- 7
- 1
- VEC(Y) := 2*F*AY - ---*BY
- 7
- 1
- VEC(Z) := 2*F*AZ - ---*BZ
- 7
- c(0);
- 1
- 2*F*AX - ---*BX
- 7
- c(1);
- 1
- 2*F*AY - ---*BY
- 7
- c(2);
- 1
- 2*F*AZ - ---*BZ
- 7
- 1/vmod(a);
- 2 2 2 - 1/2
- (AX + AY + AZ )
- b/vmod(a);
- 2 2 2 - 1/2
- VEC(X) := (AX + AY + AZ ) *BX
- 2 2 2 - 1/2
- VEC(Y) := (AX + AY + AZ ) *BY
- 2 2 2 - 1/2
- VEC(Z) := (AX + AY + AZ ) *BZ
- (a cross b)/(a dot b);
- AY*BZ - AZ*BY
- VEC(X) := -----------------------
- AX*BX + AY*BY + AZ*BZ
- - AX*BZ + AZ*BX
- VEC(Y) := -----------------------
- AX*BX + AY*BY + AZ*BZ
- AX*BY - AY*BX
- VEC(Z) := -----------------------
- AX*BX + AY*BY + AZ*BZ
- 2/3*vmod(a)*a*(a dot c)/(vmod(a cross c));
- 28 2 2 2 2
- VEC(X) := ----*(AX *BY + AX *BZ - 2*AX*AY*BX*BY
- 3
- 2 2 2 2
- - 2*AX*AZ*BX*BZ + AY *BX + AY *BZ
- 2 2 2 2 - 1
- - 2*AY*AZ*BY*BZ + AZ *BX + AZ *BY )**------
- 2
- 2 2 2 3 28 2 2
- *SQRT(AX + AY + AZ )*F*AX + ----*(AX *BY
- 3
- 2 2
- + AX *BZ - 2*AX*AY*BX*BY - 2*AX*AZ*BX*BZ
- 2 2 2 2 2 2
- + AY *BX + AY *BZ - 2*AY*AZ*BY*BZ + AZ *BX
- 2 2 - 1 2 2 2
- + AZ *BY )**------*SQRT(AX + AY + AZ )*F*AX
- 2
- 2 28 2 2 2 2
- *AY + ----*(AX *BY + AX *BZ - 2*AX*AY*BX*BY
- 3
- 2 2 2 2
- - 2*AX*AZ*BX*BZ + AY *BX + AY *BZ
- 2 2 2 2 - 1
- - 2*AY*AZ*BY*BZ + AZ *BX + AZ *BY )**------
- 2
- 2 2 2 2 2 2 2
- *SQRT(AX + AY + AZ )*F*AX*AZ - ---*(AX *BY
- 3
- 2 2
- + AX *BZ - 2*AX*AY*BX*BY - 2*AX*AZ*BX*BZ
- 2 2 2 2 2 2
- + AY *BX + AY *BZ - 2*AY*AZ*BY*BZ + AZ *BX
- 2 2 - 1 2 2 2 2
- + AZ *BY )**------*SQRT(AX + AY + AZ )*AX *BX
- 2
- 2 2 2 2 2
- - ---*(AX *BY + AX *BZ - 2*AX*AY*BX*BY
- 3
- 2 2 2 2
- - 2*AX*AZ*BX*BZ + AY *BX + AY *BZ
- 2 2 2 2 - 1
- - 2*AY*AZ*BY*BZ + AZ *BX + AZ *BY )**------
- 2
- 2 2 2 2 2 2
- *SQRT(AX + AY + AZ )*AX*AY*BY - ---*(AX *BY
- 3
- 2 2
- + AX *BZ - 2*AX*AY*BX*BY - 2*AX*AZ*BX*BZ
- 2 2 2 2 2 2
- + AY *BX + AY *BZ - 2*AY*AZ*BY*BZ + AZ *BX
- 2 2 - 1 2 2 2
- + AZ *BY )**------*SQRT(AX + AY + AZ )*AX*AZ
- 2
- *BZ
- 28 2 2 2 2
- VEC(Y) := ----*(AX *BY + AX *BZ - 2*AX*AY*BX*BY
- 3
- 2 2 2 2
- - 2*AX*AZ*BX*BZ + AY *BX + AY *BZ
- 2 2 2 2 - 1
- - 2*AY*AZ*BY*BZ + AZ *BX + AZ *BY )**------
- 2
- 2 2 2 2 28 2 2
- *SQRT(AX + AY + AZ )*F*AX *AY + ----*(AX *BY
- 3
- 2 2
- + AX *BZ - 2*AX*AY*BX*BY - 2*AX*AZ*BX*BZ
- 2 2 2 2 2 2
- + AY *BX + AY *BZ - 2*AY*AZ*BY*BZ + AZ *BX
- 2 2 - 1 2 2 2 3
- + AZ *BY )**------*SQRT(AX + AY + AZ )*F*AY
- 2
- 28 2 2 2 2
- + ----*(AX *BY + AX *BZ - 2*AX*AY*BX*BY
- 3
- 2 2 2 2
- - 2*AX*AZ*BX*BZ + AY *BX + AY *BZ
- 2 2 2 2 - 1
- - 2*AY*AZ*BY*BZ + AZ *BX + AZ *BY )**------
- 2
- 2 2 2 2 2 2 2
- *SQRT(AX + AY + AZ )*F*AY*AZ - ---*(AX *BY
- 3
- 2 2
- + AX *BZ - 2*AX*AY*BX*BY - 2*AX*AZ*BX*BZ
- 2 2 2 2 2 2
- + AY *BX + AY *BZ - 2*AY*AZ*BY*BZ + AZ *BX
- 2 2 - 1 2 2 2
- + AZ *BY )**------*SQRT(AX + AY + AZ )*AX*AY
- 2
- 2 2 2 2 2
- *BX - ---*(AX *BY + AX *BZ - 2*AX*AY*BX*BY
- 3
- 2 2 2 2
- - 2*AX*AZ*BX*BZ + AY *BX + AY *BZ
- 2 2 2 2 - 1
- - 2*AY*AZ*BY*BZ + AZ *BX + AZ *BY )**------
- 2
- 2 2 2 2 2 2 2
- *SQRT(AX + AY + AZ )*AY *BY - ---*(AX *BY
- 3
- 2 2
- + AX *BZ - 2*AX*AY*BX*BY - 2*AX*AZ*BX*BZ
- 2 2 2 2 2 2
- + AY *BX + AY *BZ - 2*AY*AZ*BY*BZ + AZ *BX
- 2 2 - 1 2 2 2
- + AZ *BY )**------*SQRT(AX + AY + AZ )*AY*AZ
- 2
- *BZ
- 28 2 2 2 2
- VEC(Z) := ----*(AX *BY + AX *BZ - 2*AX*AY*BX*BY
- 3
- 2 2 2 2
- - 2*AX*AZ*BX*BZ + AY *BX + AY *BZ
- 2 2 2 2 - 1
- - 2*AY*AZ*BY*BZ + AZ *BX + AZ *BY )**------
- 2
- 2 2 2 2 28 2 2
- *SQRT(AX + AY + AZ )*F*AX *AZ + ----*(AX *BY
- 3
- 2 2
- + AX *BZ - 2*AX*AY*BX*BY - 2*AX*AZ*BX*BZ
- 2 2 2 2 2 2
- + AY *BX + AY *BZ - 2*AY*AZ*BY*BZ + AZ *BX
- 2 2 - 1 2 2 2 2
- + AZ *BY )**------*SQRT(AX + AY + AZ )*F*AY
- 2
- 28 2 2 2 2
- *AZ + ----*(AX *BY + AX *BZ - 2*AX*AY*BX*BY
- 3
- 2 2 2 2
- - 2*AX*AZ*BX*BZ + AY *BX + AY *BZ
- 2 2 2 2 - 1
- - 2*AY*AZ*BY*BZ + AZ *BX + AZ *BY )**------
- 2
- 2 2 2 3 2 2 2
- *SQRT(AX + AY + AZ )*F*AZ - ---*(AX *BY
- 3
- 2 2
- + AX *BZ - 2*AX*AY*BX*BY - 2*AX*AZ*BX*BZ
- 2 2 2 2 2 2
- + AY *BX + AY *BZ - 2*AY*AZ*BY*BZ + AZ *BX
- 2 2 - 1 2 2 2
- + AZ *BY )**------*SQRT(AX + AY + AZ )*AX*AZ
- 2
- 2 2 2 2 2
- *BX - ---*(AX *BY + AX *BZ - 2*AX*AY*BX*BY
- 3
- 2 2 2 2
- - 2*AX*AZ*BX*BZ + AY *BX + AY *BZ
- 2 2 2 2 - 1
- - 2*AY*AZ*BY*BZ + AZ *BX + AZ *BY )**------
- 2
- 2 2 2 2 2 2
- *SQRT(AX + AY + AZ )*AY*AZ*BY - ---*(AX *BY
- 3
- 2 2
- + AX *BZ - 2*AX*AY*BX*BY - 2*AX*AZ*BX*BZ
- 2 2 2 2 2 2
- + AY *BX + AY *BZ - 2*AY*AZ*BY*BZ + AZ *BX
- 2 2 - 1 2 2 2 2
- + AZ *BY )**------*SQRT(AX + AY + AZ )*AZ *BZ
- 2
- a := avec(x**2*y**3,log(z+x),13*z-y);
- 2 3
- VEC(X) := X *Y
- VEC(Y) := LOG(X + Z)
- VEC(Z) := - Y + 13*Z
- df(a,x);
- 3
- VEC(X) := 2*X*Y
- 1
- VEC(Y) := -------
- X + Z
- VEC(Z) := 0
- df(a,x,y);
- 2
- VEC(X) := 6*X*Y
- VEC(Y) := 0
- VEC(Z) := 0
- int(a,x);
- 1 3 3
- VEC(X) := ---*X *Y
- 3
- VEC(Y) := LOG(X + Z)*X + LOG(X + Z)*Z - X
- VEC(Z) := - X*Y + 13*X*Z
- exp(a);
- 2 3
- X *Y
- VEC(X) := E
- VEC(Y) := X + Z
- - Y + 13*Z
- VEC(Z) := E
- log sin b;
- VEC(X) := LOG(SIN(BX))
- VEC(Y) := LOG(SIN(BY))
- VEC(Z) := LOG(SIN(BZ))
- a := avec(ax,ay,az);
- VEC(X) := AX
- VEC(Y) := AY
- VEC(Z) := AZ
- depend ax,x,y,z;
- depend ay,x,y,z;
- depend az,x,y,z;
- depend p,x,y,z;
- c := grad p;
- VEC(X) := DF(P,X)
- VEC(Y) := DF(P,Y)
- VEC(Z) := DF(P,Z)
- div c;
- DF(P,X,2) + DF(P,Y,2) + DF(P,Z,2)
- delsq p;
- DF(P,X,2) + DF(P,Y,2) + DF(P,Z,2)
- div a;
- DF(AX,X) + DF(AY,Y) + DF(AZ,Z)
- curl a;
- VEC(X) := - DF(AY,Z) + DF(AZ,Y)
- VEC(Y) := DF(AX,Z) - DF(AZ,X)
- VEC(Z) := - DF(AX,Y) + DF(AY,X)
- delsq a;
- VEC(X) := DF(AX,X,2) + DF(AX,Y,2) + DF(AX,Z,2)
- VEC(Y) := DF(AY,X,2) + DF(AY,Y,2) + DF(AY,Z,2)
- VEC(Z) := DF(AZ,X,2) + DF(AZ,Y,2) + DF(AZ,Z,2)
- depend h1,x,y,z;
- depend h2,x,y,z;
- depend h3,x,y,z;
- scalefactors(h1,h2,h3);
- grad p;
- -1
- VEC(X) := DF(P,X)*H1
- -1
- VEC(Y) := DF(P,Y)*H2
- -1
- VEC(Z) := DF(P,Z)*H3
-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div curl a;
- 0
- % Examples of integration : (1) Volume integrals
- getcsystem 'spherical;
- (R THETA PHI)
- % Example 1 : integration of r**n over a sphere
- origin := avec(0,0,0);
- VEC(R) := 0
- VEC(THETA) := 0
- VEC(PHI) := 0
- upperbound := avec(rr,pi,2*pi);
- VEC(R) := RR
- VEC(THETA) := PI
- VEC(PHI) := 2*PI
- volintegral(r**n,origin,upperbound);
- N 3
- 4*RR *PI*RR
- --------------
- N + 3
- % Substitute n=0 to get the volume of a sphere
- sub(n=0,ws);
- 4 3
- ---*PI*RR
- 3
- % Example 2 : volume of a right-circular cone
- getcsystem 'cylindrical;
- (R Z PHI)
- upperbound := avec(pp*z,h,2*pi);
- VEC(R) := Z*PP
- VEC(Z) := H
- VEC(PHI) := 2*PI
- volintorder := avec(2,0,1);
- VEC(R) := 2
- VEC(Z) := 0
- VEC(PHI) := 1
- % Integrate in the order : phi, r, z
- cone := volintegral(1,origin,upperbound);
- 1 3 2
- CONE := ---*H *PP *PI
- 3
- % Now we replace P*Z by RR to get the result in the familiar form
- let pp*h=rr;
- cone := cone;
- 1 2
- CONE := ---*H*PI*RR
- 3
- % This is the familiar form
- clear pp*h;
- % Example 3 : line integral to obtain the length of a line of latitude
- % on a sphere
- getcsystem 'spherical;
- (R THETA PHI)
- a := avec(0,0,1);
- VEC(R) := 0
- VEC(THETA) := 0
- VEC(PHI) := 1
- % Function vector is the tangent to the
- % line of latitude
- curve := avec(rr,latitude,phi);
- VEC(R) := RR
- VEC(THETA) := LATITUDE
- VEC(PHI) := PHI
- % Path is round a line of latitude
- deflineint(a,curve,phi,0,2*pi);
- 2*SIN(LATITUDE)*PI*RR
- end;
- 4: 4:
- Quitting
- Sat Jun 29 14:16:18 PDT 1991
|