aŅ5 vec_calc/init2*‡–˜* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‡–˜<D with* student –˜* plots –˜* linalg readlib* mtaylorø–˜* piecewiseø–˜* polarø–˜* unassign: map_unapplyø–˜* vec_calc/map_unapply: MuInt_noChkø–˜* vec_calc/MuInt_noChk: type/alg_list6* list* alg_list array —˜ algebraic: type/proc_const_list6*—˜* proc_const_list—˜+—˜ name string—˜ constant procedure: type/GDargs6*,+—˜,*,—˜6*—˜* integerZ—˜ø–˜* help/text/Curve: help/text/Cvb—˜: help/text/Cab—˜: help/text/Cjb—˜: help/text/CTb—˜: help/text/CNb—˜: help/text/CBb—˜: help/text/Ckb—˜: help/text/Ctb—˜: help/text/CLb—˜: help/text/CaTb—˜: help/text/CaNb—˜: help/text/Cforgetb—˜: help/text/Frenetb—˜ø–˜* help/text/map_Diff: help/text/map_Limit՗˜: help/text/map_Int՗˜: help/text/map_eval՗˜ø–˜* help/text/muint: help/text/MuIntś—˜: help/text/Muintś—˜ø–˜* help/text/d2r: help/text/r2d˜˜ø–˜* help/text/CoordConversion2D: help/text/p2r$˜˜: help/text/r2p$˜˜ø–˜* help/text/CoordConversion3D: help/text/c2r@˜˜: help/text/r2c@˜˜: help/text/s2r@˜˜: help/text/r2s@˜˜: help/text/s2c@˜˜: help/text/c2s@˜˜ø–˜* help/text/len: help/text/norm2|˜˜ø–˜* help/text/emcl: help/text/evall˜˜ lprint* Initializing Package: print* vec_calc Version 3 (without changes to help)œ˜˜* This package automatically loads the packages:Ŗ˜˜* student linalg plotsœ˜˜* This package automatically loads the commands:Ŗ˜˜* mtaylor piecewise polar unassignœ˜˜* See the HELP on:Ŗ˜˜* vec_calc Curve Diffops Multi_Max_MinŖ˜˜* CoordConversion2D CoordConversion3Dœ˜˜* or any of the package's commands:‡–˜$*Ł–˜ģ–˜’–˜—˜I—˜i—˜q—˜y—˜—˜‘—˜‰—˜™—˜”—˜©—˜±—˜¹—˜Į—˜Ź—˜˜˜ ˜˜ƒ˜˜”˜˜˜˜.˜˜6˜˜J˜˜R˜˜Z˜˜b˜˜r˜˜j˜˜Ż—˜ę—˜ļ—˜ vec_calc/InitializedaŅ5 vec_calc/ss2* expr** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜ simplify*0 symbolic‹–˜‹–˜aŅ5 vec_calc/emcl2* m** Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜ convert* evalm*0 listlist‹–˜‹–˜aŅ5 vec_calc/evall2* m** Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜ convert* evalm*0 listlist‹–˜‹–˜aŅ5 vec_calc/dot2* v w** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMUŽ–˜ dotprod*00 orthogonalŽ–˜Ž–˜aŅ5 vec_calc/norm22* v** Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜ sqrt* dot*0¬–˜ symbolic‹–˜‹–˜aŅ5 vec_calc/len2* v** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜ sqrt* dot*0¬–˜ symbolic‹–˜‹–˜aŅ5 vec_calc/cross2* v w** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMUŽ–˜ convert* crossprod*00 listŽ–˜Ž–˜aŅ5 vec_calc/map_Limit2* exprs var** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU–˜> type*06* array list map* map_Limit­–˜0 Limit*­–˜Ä–˜–˜–˜aŅ5 vec_calc/map_Diff2* exprs var** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU–˜> type*06* array list map* map_Diff­–˜0 Diff*­–˜Ä–˜–˜–˜aŅ5 vec_calc/map_Int2* exprs var** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU–˜> type*06* array list map* map_Int­–˜0 Int*­–˜Ć–˜–˜–˜aŅ5 vec_calc/map_unapply2* exprs* C* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*> type*06* array list map* map_unapply®–˜ 0’’’’*40D unapply*®–˜.ז˜Å–˜ subs*Ł–˜ "¦–˜¦–˜aŅ5 vec_calc/map_eval2* exprs** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU–˜> type*06* array list map* map_evalŖ–˜ eval*Ŗ–˜–˜–˜aŅ5 vec_calc/MF2*4 vars6* list* name”–˜4 exprs alg_list** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU£–˜ map_unapply*0 op*0£–˜£–˜aŅ5 vec_calc/GD2* fprocs* k* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D>& type*,*0’’’’ GDargs ERROR* invalid argument(s)>ؖ˜*06* array list map* GDʖ˜ Ɩ˜*40D>į–˜:.ē–˜:ź–˜ op* Ɩ˜*ߖ˜  D*ź–˜*ʖ˜£–˜£–˜aŅ5 vec_calc/Cv2* r** remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMUŠ–˜ GD*0Š–˜Š–˜aŅ5 vec_calc/Ca2* r** remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMUŠ–˜ GD* Cv*0Š–˜Š–˜aŅ5 vec_calc/Cj2* r** remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMUŠ–˜ GD* Ca*0Š–˜Š–˜aŅ5 vec_calc/CT2* r* t v* remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*°–˜*“–˜ map* eval0:. Cv*Ɩ˜*­–˜ map_unapply* simplify* emcl*ʖ˜“–˜ norm2*ʖ˜­–˜Ŗ–˜Ŗ–˜aŅ5 vec_calc/CB2* r* cp t* remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*°–˜*“–˜ map* eval0:. crossprod* Cv*Ɩ˜*­–˜ CaŌ–˜Ö–˜ map_unapply* simplify* emcl*ʖ˜“–˜ norm2*ʖ˜­–˜Ŗ–˜Ŗ–˜aŅ5 vec_calc/CN2* r* t* remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*­–˜*±–˜ map* eval0 crossprod* CB*Ą–˜*Ŗ–˜ CTĪ–˜Š–˜ map_unapply* simplify* convert* " listŖ–˜§–˜§–˜aŅ5 vec_calc/Ck2* r* t v* remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*°–˜*“–˜ map* eval0:. Cv*Ɩ˜*­–˜ unapply* simplify* norm2* crossprod*ʖ˜ CaĶ–˜Ļ–˜“–˜ą–˜*ʖ˜­–˜Ŗ–˜Ŗ–˜aŅ5 vec_calc/Ct2* r* cp t* remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*°–˜*“–˜ map* eval0:. crossprod* Cv*Ɩ˜*­–˜ CaŌ–˜Ö–˜ unapply* simplify* dot*ʖ˜ CjŌ–˜Ö–˜“–˜ī–˜*ʖ˜Ę–˜­–˜Ŗ–˜Ŗ–˜aŅ5 vec_calc/CL2* r* a b t* remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*³–˜*·–˜ map* eval0 unapply* Int* simplify* norm2* Cv*ʖ˜*°–˜°–˜4..ģ–˜ī–˜­–˜­–˜aŅ5 vec_calc/CaT2* r* t* remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*®–˜*²–˜ map* eval0 unapply* simplify* diff* norm2* Cv*Į–˜*«–˜«–˜«–˜Ø–˜Ø–˜aŅ5 vec_calc/CaN2* r* t v* remember Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*±–˜*µ–˜ map* eval0:. Cv*˘*®–˜ unapply* simplify* CkĪ–˜Š–˜µ–˜ dot*Ē–˜Ē–˜µ–˜®–˜«–˜«–˜aŅ5 vec_calc/Cforget2*ˆ–˜* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMUˆ–˜ D readlib* forget¦–˜* Cv0’’’’¦–˜* Ca°–˜¦–˜* Cj°–˜¦–˜* CT°–˜¦–˜* CB°–˜¦–˜* CN°–˜¦–˜* Ck°–˜¦–˜* Ct°–˜¦–˜* CL°–˜¦–˜* CaT°–˜¦–˜* CaN°–˜ˆ–˜ˆ–˜aŅ5 vec_calc/r2d2* theta** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMUŒ–˜D0 Pi“> hastype*„–˜ float evalf* "Ā–˜Œ–˜Œ–˜aŅ5 vec_calc/d2r2* theta** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMUŒ–˜D0 Pi§–˜§–˜“> hastype*„–˜ float evalf* "Ɩ˜Œ–˜Œ–˜aŅ5 vec_calc/p2r2* pc** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜,* op*0©–˜ cos*„–˜*«–˜©–˜¤–˜©–˜ sin²–˜©–˜‹–˜‹–˜aŅ5 vec_calc/r2p2* rc** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜,* norm2*,* op*40 simplify* arctan*¬–˜*³–˜µ–˜¬–˜*±–˜µ–˜‹–˜‹–˜aŅ5 vec_calc/c2r2* cc** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜,* op*0©–˜ cos*„–˜*«–˜©–˜¤–˜©–˜ sin²–˜©–˜„–˜*«–˜‹–˜‹–˜aŅ5 vec_calc/r2c2* rc** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜,* norm2*,* op*40 simplify* arctan*¬–˜*³–˜µ–˜¬–˜*±–˜µ–˜¬–˜*µ–˜‹–˜‹–˜aŅ5 vec_calc/s2r2* sc** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜,* op*0©–˜ sin*„–˜*«–˜©–˜ cos*„–˜*«–˜©–˜¤–˜©–˜®–˜©–˜Ɩ˜¾–˜©–˜¤–˜©–˜»–˜²–˜©–˜‹–˜‹–˜aŅ5 vec_calc/r2s2* rc** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜,* norm2*0 simplify* arctan* op*©–˜¹–˜*©–˜¬–˜*³–˜*¤–˜*,*¹–˜*4Ɩ˜½–˜©–˜¹–˜*©–˜‹–˜‹–˜aŅ5 vec_calc/c2s2* cc** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜,* norm2*,* op*0¬–˜*²–˜¬–˜*²–˜ simplify* arctanŖ–˜‹–˜‹–˜aŅ5 vec_calc/s2c2* sc** Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‹–˜,* op*0©–˜ sin*„–˜*«–˜©–˜„–˜*«–˜¤–˜©–˜ cos²–˜©–˜‹–˜‹–˜aŅ5 vec_calc/MuInt_noChk2** i my_int* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‰–˜D:. 0’’’’*<.Ɩ˜0 true:©–˜ Int*©–˜ ¬–˜*²–˜‰–˜‰–˜aŅ5 vec_calc/MuInt2*‡–˜* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‡–˜D>"0 ERROR* An integral needs at least one variable of integration>& type*,* 0’’’’*4£–˜”–˜ list*6* name rangeՖ˜¦–˜* Each variable of integration must be a name or a name = range MuInt_noChk*ʖ˜‡–˜‡–˜aŅ5 vec_calc/Muint2*‡–˜* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‡–˜D>"0 ERROR* An integral needs at least one variable of integration>& type*,* 0’’’’*4£–˜”–˜ list*6* name rangeՖ˜¦–˜* Each variable of integration must be a name or a name = range MuInt_noChk*ʖ˜‡–˜‡–˜aŅ5 vec_calc/muint2*‡–˜* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‡–˜ value* Muint*0’’’’‡–˜‡–˜aŅ5 vec_calc/smuint2* * integrand i var_range var rnge antider lower upper subsantider* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU‡–˜D>"0 ERROR* An integral needs at least one variable of integration>& type*,* 0’’’’*4Ȗ˜Ę–˜ list* name rangeĖ–˜* Each variable of integration must be a name = range print* MuInt_noChk*ė–˜:. ė–˜*<.Ȗ˜&—˜ʖ˜&—˜&—˜ true D:. ė–˜*)—˜:. lhs*9—˜:. rhsF—˜:. op*&—˜I—˜:.T—˜*Ȗ˜I—˜:. int*!—˜@—˜:.  array*,*c—˜&—˜ matrix*,*,*  *@—˜[—˜,*…—˜,* …—˜*@—˜Q—˜&—˜:!—˜ subs*@—˜L—˜*I—˜c—˜&—˜œ—˜*@—˜C—˜„—˜c—˜0—˜—˜*  vec_calc/MuInt_noChk*m—˜ ė–˜*4)—˜&—˜&—˜&—˜Ę–˜—˜*·—˜—˜*!—˜Å—˜:9—˜ ė–˜*ʖ˜?—˜H—˜P—˜Z—˜b—˜l—˜˜—˜—˜*·—˜m—˜—˜*·—˜!—˜!—˜‡–˜*—˜aŅ5 vec_calc/GRAD2*4 f procedure* i* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*,* seq*  D*.*0·–˜4 nops*,* op*斘Ź–˜*斘ŗ–˜©–˜©–˜aŅ5 vec_calc/DIV2*4 F list*6* name constant procedure* ncomp varseq nvar i* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. nops*0:. op*ז˜*Ū–˜ map* evalі˜:.Ģ–˜*,*Ō–˜>ɖ˜ģ–˜ ERROR* The number of components must equal the number of variables. unapply* simplify* sum*  D*.* і˜)—˜ņ–˜*—˜4Ū–˜ģ–˜Ō–˜Ę–˜Ę–˜aŅ5 vec_calc/CURL2*4 F list*6* name constant procedure* ncomp varseq nvar* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. nops*0:. op*Ō–˜*Ų–˜ map* evalĪ–˜:.ɖ˜*,*і˜>(ʖ˜閘õ–˜ ERROR* There must be 3 components and 3 variables.,*  D** Ī–˜*õ–˜Ų–˜ —˜—˜* Ī–˜—˜ —˜* Ī–˜*Ų–˜Ų–˜ —˜/—˜—˜'—˜3—˜#—˜Ų–˜—˜,—˜'—˜ļ–˜ MF*ī–˜ simplify* "Ɩ˜Ć–˜aŅ5 vec_calc/LAP2*4 fprocs proc_const_list* varseq nvar i* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*> type*06* array list map* LAP»–˜D:. op*Ֆ˜*Ł–˜»–˜:. nops*,*Ņ–˜ unapply* simplify* sum*  D*.—˜*»–˜ź–˜—˜4Ł–˜į–˜Ņ–˜³–˜³–˜aŅ5 vec_calc/HESS2*4 f procedure* nvar i j* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. nops*,* op*¾–˜*Ā–˜0,* seq*,*Ķ–˜*  D*..*Ȗ˜Ž–˜4Ā–˜³–˜ܖ˜ä–˜°–˜°–˜aŅ5 vec_calc/LPMD2*4 H6* listlist matrix* k D LPMD* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. seq* det* submatrix*04.Ī–˜і˜4Ļ–˜ rowdim*Ģ–˜ print* LPMDs:<і˜Ļ–˜Ļ–˜Ų–˜ trueą–˜* .*і˜ ¹–˜ł–˜¹–˜¶–˜¶–˜aŅ5 vec_calc/JAC2*4 F list*6* name constant procedure* ncomp nvar i j* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. nops*0:.Ė–˜*,* op*Ū–˜*ߖ˜ map* evalŠ–˜,* seq*,*ņ–˜*  D*.* Š–˜*.—˜4ߖ˜Ó–˜—˜4ߖ˜Č–˜Å–˜Å–˜aŅ5 vec_calc/JAC_DET2*4 F list*6* name constant procedure* ncomp varseq nvar i j* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. nops*0:. op*Ū–˜*ߖ˜ map* evalՖ˜:.Š–˜*,*Ų–˜>Ķ–˜š–˜ ERROR* The number of components must equal the number of variables.,* seq*,*—˜*  D*.* Ֆ˜*.ö–˜'—˜4ߖ˜š–˜-—˜4ߖ˜Ķ–˜ unapply* simplify* det* "Ų–˜Ź–˜Ź–˜aŅ5 vec_calc/POT2*4 F6* list*6* name constant procedure vector“–˜ f* a exist* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*Ļ–˜*Ӗ˜ map* eval0:. potential*ā–˜*Ģ–˜,š–˜0>喘D:õ–˜ MF*ņ–˜Ž–˜*õ–˜ true falseɖ˜É–˜aŅ5 vec_calc/VEC_POT2*4 F6* list*6* name constant procedure vector”–˜ f* a exist* Copyright 1995 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*Š–˜*Ō–˜ map* eval0:. vecpotent*斘*Ķ–˜,ń–˜0>ꖘD:ö–˜ MF*ó–˜ convert*ߖ˜*ö–˜–˜ true falseŹ–˜Ź–˜aŅ5 vec_calc/Lis2* f r rng* comp speed t* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*·–˜*»–˜ map* eval0> type*“–˜ constant:“–˜“–˜:. ss*0*·–˜*Ź–˜*“–˜:.į–˜* norm2* GD*Ź–˜ī–˜ MuInt*Ž–˜»–˜ń–˜»–˜“–˜·–˜*0±–˜±–˜aŅ5 vec_calc/lis2* f r rng* comp speed t* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*·–˜*»–˜ map* eval0> type*“–˜ constant:“–˜“–˜:. ss*0*·–˜*Ź–˜*“–˜:.į–˜* norm2* GD*Ź–˜ī–˜į–˜* smuint*Ž–˜»–˜ń–˜»–˜“–˜·–˜*0±–˜±–˜aŅ5 vec_calc/Liv2* F r rng* comp t velo* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*·–˜*»–˜ map* eval0> type*“–˜ constant:“–˜“–˜:.0*·–˜*Ź–˜*“–˜:. GD*Ź–˜é–˜ MuInt* ss* dot*Ž–˜ģ–˜“–˜·–˜*0±–˜±–˜aŅ5 vec_calc/liv2* F r rng* comp t velo* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*·–˜*»–˜ map* eval0> type*“–˜ constant:“–˜“–˜:.0*·–˜*Ź–˜*“–˜:. GD*Ź–˜é–˜ ss* smuint*÷–˜* dot*Ž–˜ģ–˜“–˜·–˜*0±–˜±–˜aŅ5 vec_calc/Sis2* f r inner_rng outer_rng* comp magcross rargs u v* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*ʖ˜*Ź–˜0:. Ɩ˜*Ź–˜:. Ɩ˜*:. ss*0*ʖ˜*Š–˜*Ӗ˜Ś–˜:.喘* norm2* cross* GD*Š–˜Ź–˜ņ–˜ —˜*Š–˜ß–˜ņ–˜ MuInt*ā–˜Ź–˜ö–˜Ź–˜00Ą–˜Ą–˜aŅ5 vec_calc/sis2* f r inner_rng outer_rng* comp magcross rargs u v* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*ʖ˜*Ź–˜0:. Ɩ˜*Ź–˜:. Ɩ˜*:. ss*0*ʖ˜*Š–˜*Ӗ˜Ś–˜:.喘* norm2* cross* GD*Š–˜Ź–˜ņ–˜ —˜*Š–˜ß–˜ņ–˜喘* smuint*ā–˜Ź–˜ö–˜Ź–˜00Ą–˜Ą–˜aŅ5 vec_calc/Siv2* F r inner_rng outer_rng* comp parmcross rargs u v* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*ʖ˜*Ź–˜0:. Ɩ˜*Ź–˜:. Ɩ˜*:.0*ʖ˜*Š–˜*Ӗ˜Ś–˜:. cross* GD*Š–˜Ź–˜ķ–˜ū–˜*Š–˜ß–˜ķ–˜ MuInt* ss* dot*ā–˜ń–˜00Ą–˜Ą–˜aŅ5 vec_calc/siv2* F r inner_rng outer_rng* comp parmcross rargs u v* Copyright 1996 by Arthur Belmonte and Philip B. Yasskin, Math, TAMU*D:. op*ʖ˜*Ź–˜0:. Ɩ˜*Ź–˜:. Ɩ˜*:.0*ʖ˜*Š–˜*Ӗ˜Ś–˜:. cross* GD*Š–˜Ź–˜ķ–˜ū–˜*Š–˜ß–˜ķ–˜ ss* smuint* —˜* dot*ā–˜ń–˜00Ą–˜Ą–˜aŅ5 help/text/vec_calc TEXT+* HELP FOR: Introduction to the vec_calc Package: Version 2  CALLING SEQUENCE: (args) vec_calc[](args)ž–˜ SYNOPSIS: - The vec_calc package is a collection of functions designed to simplify calculations which arise from vector calculus problems. It is loaded by the command with(vec_calc); provided the system variable libname has been set to include the path to the package.ž–˜ - The functions available are: CB CL CN CT CURL Ca CaN CaT Cforget Cj Ck Ct Cv DIV GD GRAD HESS JAC JAC_DET LAP LPMD MF MuInt POT VEC_POT c2r c2s cross d2r dot emcl len map_Diff map_Int map_Limit map_eval muint norm2 p2r r2c r2d r2p r2s s2c s2r smuint ssž–˜ - As an example, to calculate the dot product of two vectors A and B, usež–˜ with(vec_calc,dot); dot(A,B);ž–˜ - For more information on a particular function see vec_calc[].ž–˜ - The vec_calc functions were written by A. Belmonte and P. B. Yasskin The functions were organized into a package by James Warren and P. B. Yasskin The help pages were written by David Arnold, James Warren and P. B. Yasskin Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University with all rights reserved.ž–˜ SEE ALSO: libname, with, vec_calc[], Curve, Diffops, Multi_Max_Min, CoordConversion2D, CoordConversion3DaŅ5 help/text/dot TEXT%* FUNCTION: vec_calc[dot] - Compute the Dot Product of Two Vectors  CALLING SEQUENCE: dot(u, v)Ÿ–˜ PARAMETERS: u, v - lists or vectors of the same lengthŸ–˜ SYNOPSIS: - vec_calc[dot] calculates the dot product of two vectorsŸ–˜ - vec_calc[dot] is a modification of linalg[dotprod] where the 'orthogonal' option is always selected.Ÿ–˜ - This function is part of the vec_calc package, and so can be used in the form dot(..) only after performing the command with(vec_calc) or with(vec_calc,dot). The function can always be accessed in the long form vec_calc[dot](..).Ÿ–˜ EXAMPLE: > with(vec_calc); > u:=[1,2,3]; v:=[4,5,6]; dot(u,v);Ÿ–˜ u := [1, 2, 3]Ÿ–˜ v := [4, 5, 6]Ÿ–˜ 32Ÿ–˜ > dot([a,b,c],[d,e,f]); a d + b e + c fŸ–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M UniversityŸ–˜ SEE ALSO: linalg[dotprod], vec_calc, vec_calc[cross], vec_calc[len]aŅ5 help/text/len TEXT&* FUNCTION: vec_calc[len] - Calculate the Length of a Vector vec_calc[norm2] - Calculate the 2-Norm of a Vector  CALLING SEQUENCE: len(vec) norm2(vec)Ɩ˜ PARAMETERS: vec - a vector or listƖ˜ SYNOPSIS: - norm2 and len are synonyms.Ɩ˜ - vec_calc[len] calculates the length or magnitude or 2-norm of a (real) vector defined as the square root of the dot product of the vector with itself.Ɩ˜ - This function is part of the vec_calc package, and so can be used in the form len(..) only after performing the command with(vec_calc) or with(vec_calc,len). The function can always be accessed in the long form vec_calc[len](..).Ɩ˜ EXAMPLE: > with(vec_calc); > len([a,b,c]); 2 2 2 1/2 (a + b + c )Ɩ˜ > linalg[norm]([a,b,c],2);Ɩ˜ 2 2 2 1/2 (abs(a) + abs(b) + abs(c) )Ɩ˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M UniversityƖ˜ SEE ALSO: linalg[norm], vec_calc, vec_calc[dot]aŅ5 help/text/cross TEXT'* FUNCTION: vec_calc[cross] - Calculate the Cross Product of Two Vectors  CALLING SEQUENCE: cross(u, v) –˜ PARAMETERS: u, v - lists or vectors, each with three elements –˜ SYNOPSIS: - vec_calc[cross] calculates the cross product of two 3-dimensional vectors and returns the answer as a list. –˜ - vec_calc[cross] is a modification of linalg[crossprod] to return a list instead of a vector. –˜ - This function is part of the vec_calc package, and so can be used in the form cross(..) only after performing the command with(vec_calc) or with(vec_calc,cross). The function can always be accessed in the long form vec_calc[cross](..). –˜ EXAMPLE: > with(vec_calc); > u:=[1,2,3]; v:=[4,5,6]; cross(u,v); –˜ u := [1, 2, 3] –˜ v := [4, 5, 6] –˜ [-3, 6, -3] –˜ > cross([a,b,c],[d,e,f]); –˜ [b f - c e, c d - a f, a e - b d] –˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University –˜ SEE ALSO: linalg[crossprod], vec_calc, vec_calc[dot]aŅ5 help/text/ss TEXT* FUNCTION: vec_calc[ss] - Symbolic Simplification of an Expression  CALLING SEQUENCE: ss(expr)Ÿ–˜ PARAMETERS: expr - any expressionŸ–˜ SYNOPSIS: - ss(expr) is entirely equivalent to simplify(expr,symbolic).Ÿ–˜ - The symbolic parameter is not well documented but basically it permits simplification to real answers avoiding any complex answers. Unfortunately, it may also lose some real answers. So caution is advised.Ÿ–˜ - This function is part of the vec_calc package, and so can be used in the form ss(..) only after performing the command with(vec_calc) or with(vec_calc, ss). The function can always be accessed in the long form vec_calc[ss](..).Ÿ–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M UniversityŸ–˜ SEE ALSO: simplify, simplify[radical], vec_calcaŅ5 help/text/emcl TEXT&* FUNCTION: vec_calc[emcl] - Evaluate as a Matrix and Convert to a List  CALLING SEQUENCE: emcl(expr) –˜ PARAMETERS: expr - an expression –˜ SYNOPSIS: - emcl(expr) is entirely equivalent to convert(evalm(expr),list). –˜ - emcl performs calculations on lists by converting the expression into matrices, simplifying the expression, and converting the result back to a list. –˜ - This function is part of the vec_calc package, and so can be used in the form emcl(..) only after performing the command with(vec_calc) or with(vec_calc, emcl). The function can always be accessed in the long form vec_calc[emcl](..). –˜ EXAMPLE: > with(vec_calc); > A:=[4,-1]; B:=[1,2]; A := [4, -1] –˜ B := [1, 2] –˜ > B-A; [1, 2] - [4, -1] –˜ > emcl(B-A); [-3, 3] –˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University –˜ SEE ALSO: evalm, convert, convert[list], vec_calcaŅ5 help/text/MF TEXT%* FUNCTION: vec_calc[MF] - Make a Function  CALLING SEQUENCE: MF(in,out)™–˜ PARAMETERS: in - a name or a list of names representing the independent variables out - an expression or list of expressions representing the scalar or vector value of the function.™–˜ SYNOPSIS: - MF defines a scalar or vector valued function of one or more variables.™–˜ - This function is part of the vec_calc package, and so can be used in the form MF(..) only after performing the command with(vec_calc) or with(vec_calc,MF). The function can always be accessed in the long form vec_calc[MF](..).™–˜ EXAMPLE: > with(vec_calc); > f:=MF([x,y,t],[[x^2,x+t,y-x^3*t^2],[t,y,x^2]]);™–˜ 2 3 2 f := [[(x,y,t) -> x , (x,y,t) -> x + t, (x,y,t) -> y - x t ],™–˜ 2 [(x,y,t) -> t, (x,y,t) -> y, (x,y,t) -> x ]]™–˜ > f[1][2](xx,yy,tt); xx + tt™–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University™–˜ SEE ALSO: vec_calc, Curve, Diffops, vec_calc[map_Limit], vec_calc[map_Diff], vec_calc[map_Int], vec_calc[GD]aŅ5 help/text/GD TEXT5* FUNCTION: vec_calc[GD] - Generalized Derivative Command for Vector Calculus  CALLING SEQUENCE: GD(f,vars)„–˜ PARAMETERS: f - a procedure, constant or name or a list thereof to be differentiated vars - an integer or list of integers specifying the variable or variables of differentiation.„–˜ SYNOPSIS: - GD is a generalized derivative command which can be used to calculate derivatives and partial derivatives for scalar and vector valued functions.„–˜ - This function is part of the vec_calc package, and so can be used in the form GD(..) only after performing the command with(linalg) or with(linalg, GD). The function can always be accessed in the long form vec_calc[GD](..).„–˜ EXAMPLES: > with(vec_calc); > f:=MF([x,y],sin(2*x)*cos(3*y));„–˜ f := (x,y) -> sin(2 x) cos(3 y)„–˜ > f_x:=GD(f,1); f_x := (x,y) -> 2 cos(2 x) cos(3 y)„–˜ > f_y:=GD(f,2); f_y := (x,y) -> - 3 sin(2 x) sin(3 y)„–˜ > f_xy:=GD(f,[1,2]); f_xy := (x,y) -> - 6 cos(2 x) sin(3 y)„–˜ > g:=MF(t,[t^2,t^3,1/t]); 2 3 g := [t -> t , t -> t , t -> 1/t]„–˜ > GD(g); 2 1 [t -> 2 t, t -> 3 t , t -> - ----] 2 t„–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University„–˜ SEE ALSO: D, vec_calc, Curve, Diffops, vec_calc[MF], vec_calc[map_Diff], vec_calc[Cv], vec_calc[Ca], vec_calc[Cj]aŅ5 help/text/map_Diff TEXTs* HELP FOR: Mapping Operations onto Lists, Using the vec_calc Package  FUNCTIONS: vec_calc[map_Limit] - determines the limit of a list vec_calc[map_Int] - performs integration of a list vec_calc[map_Diff] - performs differentiation of a list vec_calc[map_eval] - performs evaluation on a list”–˜ CALLING SEQUENCE: map_Limit(r,t=value) map_Diff(r,t) map_Int(r,t) map_Int(r,t=range) map_eval(s,t)”–˜ PARAMETERS: r - an expression or a list or array of such. t - a variable representing the independent variable. value - number that t approaches in map_Limit procedure. range - a range to be used as the limits of integration in a definite integral. s - an expression or procedure to be evaluated or a list or array of such.”–˜ SYNOPSIS: - These functions perform the desired operation on each element of a list or array of expressions. Nested lists or arrays are allowed.”–˜ - The functions map_Limit, map_Diff, and map_Int are part of the vec_calc package, and so can be used in the form map_Limit(..), map_Diff(..) and map_Int(..) only after performing the command with(vec_calc) or with(vec_calc,..). The functions can always be accessed in the long forms vec_calc[map_Limit](..), vec_calc[map_Diff](..) or vec_calc[map_Int](..). - The value command will evaluate the results.”–˜ EXAMPLES: > with(vec_calc); > r := MF(t,[(t^2-4)/(t-2),(t^2-5*t+6)/(t-2)]);”–˜ 2 2 t - 4 t - 5 t + 6 r := [t -> ------, t -> ------------] t - 2 t - 2”–˜ > map_Limit(r(t),t=2); 2 2 t - 4 t - 5 t + 6 [Limit ------, Limit ------------] t -> 2 t - 2 t -> 2 t - 2”–˜ > value("); [4, -1]”–˜ > map_Diff([(t^2-4)/(t-2),(t^2-5*t+6)/(t-2)],t);”–˜ 2 2 d t - 4 d t - 5 t + 6 [---- ------, ---- ------------] dt t - 2 dt t - 2”–˜˜˜ 2 2 t t - 4 2 t - 5 t - 5 t + 6 [2 ----- - --------, ------- - ------------] t - 2 2 t - 2 2 (t - 2) (t - 2)”–˜ > map_Int(r(t),t); / 2 / 2 | t - 4 | t - 5 t + 6 [ | ------ dt, | ------------ dt] | t - 2 | t - 2 / /”–˜˜˜ 2 2 [1/2 t + 2 t, 1/2 t - 3 t]”–˜ > map_Int(r(t),t=1..2); 2 2 ™˜'™˜1™˜=™˜E™˜ 1 1”–˜˜˜ [7/2, -3/2]”–˜ > f:=x->x^2; g:=x->x^3; h:=x->x^3; v:=[f,g,h];”–˜ 2 f := x -> x”–˜ 3 g := x -> x”–˜š™˜ h := x -> x”–˜ v := [f, g, h]”–˜ > eval(v); map_eval(v); [f, g, h]”–˜ 2 3 3 [x -> x , x -> x , x -> x ]”–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University”–˜ SEE ALSO: Limit, Diff, Int, eval, map, vec_calc, vec_calc[MF], vec_calc[GD]aŅ5 help/text/Curve TEXT* HELP FOR: Frenet Analysis of a Curve, Using the vec_calc Package  FUNCTIONS: vec_calc[Cv] - Calculate the Velocity vec_calc[Ca] - Calculate the Acceleration vec_calc[Cj] - Calculate the Jerk vec_calc[CT] - Calculate the Unit Tangent vec_calc[CN] - Calculate the Unit Principal Normal vec_calc[CB] - Calculate the Unit Binormal vec_calc[Ck] - Calculate the Curvature vec_calc[Ct] - Calculate the Torsion vec_calc[CL] - Calculate the Arc Length vec_calc[CaT] - Calculate the Tangential Acceleration vec_calc[CaN] - Calculate the Normal Acceleration vec_calc[Cforget] - Clear the remember tables for the above functionsŸ–˜ CALLING SEQUENCE: Cv(r) Ca(r) Cj(r) CT(r) CN(r) CB(r) Ck(r) Ct(r) CL(r) CaT(r) CaN(r) Cforget(r)Ÿ–˜ PARAMETERS: r - a curve in the form of a list of three procedures.Ÿ–˜ SYNOPSIS: - The function Cx computes the property x for a general curve.Ÿ–˜ - The functions Cx are the standard functions calulated in a Frenet analysis of a curve.Ÿ–˜ - These commands are designed to be used with the MF (Make Function) command in the vec_calc package to define the curve, and with the spacecurve command in the plots package to plot the curve.Ÿ–˜ - Each function Cx uses a remember table to speed up the computation. These tables may be cleared after finishing the Frenet analysis of a curve to avoid cluttering the memory. This is done by using the Cforget command.Ÿ–˜ - These functions are part of the vec_calc package, and so can be used in the form Cx(..) only after performing the command with(vec_calc) or with(vec_calc,Cx). The functions can always be accessed in the long forms vec_calc[Cx](..).Ÿ–˜ EXAMPLES: > with(vec_calc); > r:=MF(t,[t*cos(t),t*sin(t),t]);Ÿ–˜ r := [t -> t cos(t), t -> t sin(t), t -> t]Ÿ–˜ > spacecurve([op(r(t)),t=-2*Pi..2*Pi]);Ÿ–˜ > Cv(r); [t -> cos(t) - t sin(t), t -> sin(t) + t cos(t), 1]Ÿ–˜ > Ca(r);Ÿ–˜ [t -> - 2 sin(t) - t cos(t), t -> 2 cos(t) - t sin(t), 0]Ÿ–˜ > Cj(r);Ÿ–˜ [t -> - 3 cos(t) + t sin(t), t -> - 3 sin(t) - t cos(t), 0]Ÿ–˜ > CT(r);Ÿ–˜ cos(t) - t sin(t) sin(t) + t cos(t) 1 [t -> -----------------, t -> -----------------, t -> -----------] 2 1/2 2 1/2 2 1/2 (2 + t ) (2 + t ) (2 + t )Ÿ–˜ > CN(r); 2 3 4 sin(t) + 3 t cos(t) + sin(t) t + t cos(t) [t -> - ---------------------------------------------, 2 4 1/2 2 1/2 (5 t + 8 + t ) (2 + t )Ÿ–˜ 2 3 4 cos(t) + cos(t) t - 3 t sin(t) - t sin(t) t -> ---------------------------------------------, 2 4 1/2 2 1/2 (5 t + 8 + t ) (2 + t )Ÿ–˜ t t -> - ------------------------------] 2 4 1/2 2 1/2 (5 t + 8 + t ) (2 + t )Ÿ–˜ > CB(r); 2 cos(t) - t sin(t) 2 sin(t) + t cos(t) [t -> - -------------------, t -> - -------------------, 2 4 1/2 2 4 1/2 (5 t + 8 + t ) (5 t + 8 + t )Ÿ–˜ 2 2 + t t -> ------------------] 2 4 1/2 (5 t + 8 + t )Ÿ–˜ > Ck(r); 2 4 1/2 (5 t + 8 + t ) t -> ------------------ 2 3/2 (2 + t )Ÿ–˜ > Ct(r); 2 6 + t t -> ------------- 2 4 5 t + 8 + tŸ–˜ > L:=CL(r); L(0,2*Pi); value(");Ÿ–˜ b / | 2 1/2 L := (a,b) -> | (2 + t ) dt | / aŸ–˜ 2 Pi / | 2 1/2 | (2 + t ) dt | / 0Ÿ–˜ 2 1/2 1/2 (2 + 4 Pi ) Pi + arcsinh(2 Pi)Ÿ–˜ > CaT(r); t t -> ----------- 2 1/2sš˜Ÿ–˜ > CaN(r);Tš˜Zš˜bš˜"›˜sš˜Ÿ–˜ > Cforget(r);Ÿ–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M UniversityŸ–˜ SEE ALSO: vec_calc, vec_calc[MF], vec_calc[GD], spacecurve vec_calc[Cforget]aŅ5 help/text/Cforget TEXT$* FUNCTION: vec_calc[Cforget] - Clears Remember Tables From Curve Analysis  CALLING SEQUENCE: Cforget(r)¢–˜ PARAMETERS: r - a curve in the form of a list of three procedures.¢–˜ SYNOPSIS: - The commands Cv, Ca, Cj, CT, CN, CB, Ck, Ct, CL, CaT and CaN in the vec_calc package use remember tables to store their results. This cuts down on computing time for other functions. The Cforget(r) command clears these remember tables for the curve r.¢–˜ - This function is part of the vec_calc package, and so can be used in the form Cforget(..) only after performing the command with(vec_calc) or with(vec_calc, Cforget). The function can always be accessed in the long form vec_calc[Cforget](..).¢–˜ EXAMPLE: > with(vec_calc); > r:=MF(t,[t,sin(t),cos(t)]);¢–˜ r := [t -> t, sin, cos]¢–˜ > CB(r); 1/2 1/2 1/2 [t -> - 1/2 2 , t -> 1/2 2 cos(t), t -> - 1/2 2 sin(t)]¢–˜ > Cforget(r);¢–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University¢–˜ SEE ALSO: vec_calc, Curve, vec_calc[MF], vec_calc[GD]aŅ5 help/text/Diffops TEXT+* HELP FOR: Procedural Differential Operstors, Using the vec_calc Package  FUNCTIONS: vec_calc[GRAD] - Calculate the Gradient vec_calc[DIV] - Calculate the Divergence vec_calc[CURL] - Calculate the Curl vec_calc[LAP] - Calculate the Laplacian vec_calc[HESS] - Calculate the Hessian vec_calc[LPMD] - Calculate the Leading Principal Minor Determinants vec_calc[JAC] - Calculate the Jacobian Matrix vec_calc[JAC_DET] - Calculate the Jacobian Determinant vec_calc[POT] - Finds a Scalar Potential vec_calc[VEC_POT] - Finds a Vector Potential¢–˜ CALLING SEQUENCE: GRAD(f) DIV(F) CURL(F) LAP(f) LAP(F) HESS(f) LPMD(A) JAC(T) JAC_DET(T) POT(F) VEC_POT(F)¢–˜ PARAMETERS: f - a scalar function of n variables in the form of a procedure. F - a vector function of n variables in the form of a list of n procedures. For CURL and VEC_POT, n must be 3. A - a square matrix of expressions. T - a coordinate transformation in the form of a list of n procedures in n variables.¢–˜ SYNOPSIS: - These commands are designed to be used with the MF (Make Function) command in the vec_calc package to define the scalar or vector field or the coordinate transformation.¢–˜ - Each command has its own help page with examples.¢–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University¢–˜ SEE ALSO: vec_calc, vec_calc[MF], vec_calc[GD], vec_calc[GRAD], vec_calc[DIV], vec_calc[CURL], vec_calc[LAP], vec_calc[HESS], vec_calc[LPMD], vec_calc[JAC], vec_calc[JAC_DET], vec_calc[POT], vec_calc[VEC_POT]aŅ5 help/text/Multi_Max_Min TEXT* HELP FOR: Multivariable Max-Min Problems, Using the vec_calc Package  FUNCTIONS: vec_calc[GRAD] - Calculate the Gradient student[equate] - Set Gradient to Zero or set up Lagrange Multiplier Equations solve - Solve for Critical Points vec_calc[HESS] - Calculate the Hessian vec_calc[LPMD] - Calculate the Leading Principal Minor Determinants to Test Interior Critical Points¢–˜ CALLING SEQUENCE: GRAD(f) HESS(f) LPMD(A)¢–˜ PARAMETERS: f - a function of n variables in procedural form A - a square matrix, typically the Hessian at a critical point¢–˜ SYNOPSIS: - These commands will help with multidimensional max-min problems. Below are examples of both the unconstrained and constrained problems.¢–˜ - These functions are part of the vec_calc package, and so can be used in the form GRAD(..), HESS(..) and LPMD(..) only after performing the command with(vec_calc) or with(vec_calc, ..). The functions can always be accessed in the long forms vec_calc[GRAD](..), vec_calc[HESS](..) and vec_calc[LPMD](..).¢–˜ EXAMPLES: > with(vec_calc);¢–˜ The Unconstrained Problem:¢–˜ Find all critical points of a function and classify each as a local maximum, a local minimum or a saddle point.¢–˜ For example, extremize the function:¢–˜ > f:=(x,y)->x*y*exp(-x^2/2-y^2/8); 2 2 f := (x,y) -> x y exp(- 1/2 x - 1/8 y )¢–˜ Solution:¢–˜ Compute the gradient of f, set it equal to zero and solve for the critical points:¢–˜ > delf:=GRAD(f);¢–˜ delf := [ 2 2 2 2 2 (x,y) -> y exp(- 1/2 x - 1/8 y ) - x y exp(- 1/2 x - 1/8 y ),¢–˜ 2 2 2 2 2 (x,y) -> x exp(- 1/2 x - 1/8 y ) - 1/4 x y exp(- 1/2 x - 1/8 y )]¢–˜ > eqs:=equate(delf(x,y),0);¢–˜ 2 2 eqs := {y %1 - x y %1 = 0, x %1 - 1/4 x y %1 = 0}¢–˜ 2 2 %1 := exp(- 1/2 x - 1/8 y )¢–˜ > critpts:=solve(eqs,{x,y});¢–˜ critpts := {y = 0, x = 0}, {y = 2, x = 1}, {y = -2, x = 1},¢–˜ {y = 2, x = -1}, {y = -2, x = -1}¢–˜ Use the second derivative test to determine if each critical point is a maximum, a minimum or a saddle point. Note, the test may fail.¢–˜ Compute the Hessian¢–˜ > Hf:=HESS(f):¢–˜ At each critical point, evaluate the Hessian, compute the leading principal minor determinants and interpret the results:¢–˜ > critpts[1]; {y = 0, x = 0}¢–˜ > s1:=op(subs(critpts[1],[x,y]));¢–˜ s1 := 0, 0¢–˜ > H1:=Hf(s1): convert(H1,matrix);¢–˜ [ 0 1 ] [ ] [ 1 0 ]¢–˜ > LPMD(H1): LPMDs:¢–˜ D[1] = 0¢–˜ D[2] = -1¢–˜ Since D[2] is negative, the first critical point (0,0) is a saddle point.¢–˜ > critpts[2]; {y = 2, x = 1}¢–˜ > s2:=op(subs(critpts[2],[x,y]));¢–˜ s2 := 1, 2¢–˜ > H2:=Hf(s2): convert(H2,matrix);¢–˜ [ - 4 exp(-1) 0 ] [ ] [ 0 - exp(-1) ]¢–˜ > LPMD(H2):ؙ˜¢–˜ D[1] = - 4 exp(-1)¢–˜ 2 D[2] = 4 exp(-1)¢–˜ Since D[2] is positive and D[1] is negative, the second critical point (1,2) is a local maximum.¢–˜ > critpts[3]; {y = -2, x = 1}¢–˜ > s3:=op(subs(critpts[3],[x,y]));¢–˜ s3 := 1, -2¢–˜ > H3:=Hf(s3): convert(H3,matrix);¢–˜ [ 4 exp(-1) 0 ] [ ] [ 0 exp(-1) ]¢–˜ > LPMD(H3):ؙ˜¢–˜ D[1] = 4 exp(-1)¢–˜3š˜7š˜¢–˜ Since D[2] is positive and D[1] is positive, the third critical point (1,-2) is a local minimum.¢–˜ > critpts[4]; {y = 2, x = -1}¢–˜ > s4:=op(subs(critpts[4],[x,y]));¢–˜ s4 := -1, 2¢–˜ > H4:=Hf(s4): convert(H4,matrix);¢–˜š˜—š˜žš˜¢–˜ > LPMD(H4):ؙ˜¢–˜°š˜¢–˜3š˜7š˜¢–˜ Since D[2] is positive and D[1] is positive, the fourth critical point (-1,2) is a local minimum.¢–˜ > critpts[5]; {y = -2, x = -1}¢–˜ > s5:=op(subs(critpts[5],[x,y]));¢–˜ s5 := -1, -2¢–˜ > H5:=Hf(s5): convert(H5,matrix);¢–˜š˜š˜š˜¢–˜ > LPMD(H5):ؙ˜¢–˜*š˜¢–˜3š˜7š˜¢–˜ Since D[2] is positive and D[1] is negative, the fifth critical point (-1,-2) is a local maximum.¢–˜ Alternatively, use a contour plot to test the critical points: (Try rotating the plot.)¢–˜ > contourplot(f(x,y),x=-2..2,y=-3..3);¢–˜ The Constrained Problem:¢–˜ Find the absolute maximum and minimum values of a function inside or on the boundary of a region.¢–˜˜˜¢–˜˜˜(˜˜.˜˜¢–˜ inside or on the ellipse g(x,y)=0 where¢–˜ > g:=(x,y)->x^2/4 + y^2/16 - 1; 2 2 g := (x,y) -> 1/4 x + 1/16 y - 1¢–˜=˜˜¢–˜ The interior critical points were found in the unconstrained example. There are two methods of finding the critical points on the boundary.¢–˜ Boundary Method I: Parametrize the Boundary¢–˜ > r:=MF(t,[2*cos(t),4*sin(t)]);¢–˜ r := [t -> 2 cos(t), t -> 4 sin(t)]¢–˜ Restrict the function to the boundary:¢–˜ > fr:=MF(t, simplify( f( op(r(t)) ) ) ); (The spaces are unnecessary.)¢–˜ fr := t -> 8 cos(t) sin(t) exp(-2)¢–˜ Find the critical points on the boundary:¢–˜ > Dfr:=D(fr); 2 2 Dfr := t -> - 8 sin(t) exp(-2) + 8 cos(t) exp(-2)¢–˜ > bndcritpts:=solve(Dfr(t)=0,t);¢–˜ bndcritpts := 1/4 Pi, - 1/4 Pi¢–˜ Since the equation is non-polynomial, solve may not give all solutions. So we plot the function for one period.¢–˜ > plot(Dfr,-Pi..Pi);¢–˜ From the plot, it is obvious that solve missed two more solutions.¢–˜ > bndcritpts:=bndcritpts,3*Pi/4,-3*Pi/4;¢–˜ bndcritpts := 1/4 Pi, - 1/4 Pi, 3/4 Pi, - 3/4 Pi¢–˜ Tabulate the values of the function at all interior and boundary critical points and identify the maximum and minimum:¢–˜ > s1; f(s1); 0, 0¢–˜ 0¢–˜ > s2; f(s2); evalf("); 1, 2¢–˜ 2 exp(-1)¢–˜ .7357588824¢–˜ > s3; f(s3); evalf("); 1, -2¢–˜ - 2 exp(-1)¢–˜ -.7357588824¢–˜ > s4; f(s4); evalf("); -1, 2¢–˜¦˜¢–˜®˜¢–˜ > s5; f(s5); evalf("); -1, -2¢–˜†˜¢–˜Ž˜¢–˜ > b1:=op(r(bndcritpts[1])); f(b1); evalf(");¢–˜ 1/2 1/2 b1 := 2 , 2 2¢–˜ 4 exp(-2)¢–˜ .5413411328¢–˜ > b2:=op(r(bndcritpts[2])); f(b2); evalf(");¢–˜ 1/2 1/2 b2 := 2 , - 2 2¢–˜ - 4 exp(-2)¢–˜ -.5413411328¢–˜ > b3:=op(r(bndcritpts[3])); f(b3); evalf(");¢–˜ 1/2 1/2 b3 := - 2 , 2 2¢–˜*ž˜¢–˜2ž˜¢–˜ > b4:=op(r(bndcritpts[4])); f(b4); evalf(");¢–˜ 1/2 1/2 b4 := - 2 , - 2 2¢–˜ū˜¢–˜ž˜¢–˜ So we see that the absolute maxima occur at the interior points (1,2) and (-1,-2), and the absolute minima occur at the interior points (1,-2) and (-1,2).¢–˜ Boundary Method II: Lagrange Multiplier Method¢–˜ Find the gradient of the constraint, set up the Lagrange multiplier equations and solve for critical points on the boundary:¢–˜ > delg:=GRAD(g);¢–˜ delg := [(x,y) -> 1/2 x, (x,y) -> 1/8 y]¢–˜ > eqs:=equate(delf(x,y)-lambda*delg(x,y),0);¢–˜ 2 eqs := {y %1 - x y %1 - 1/2 lambda x = 0,¢–˜ 2 x %1 - 1/4 x y %1 - 1/8 lambda y = 0}¢–˜Ę˜˜Ė˜˜¢–˜ > solve({op(eqs),g(x,y)},{x,y,lambda}); bndcritpts:=allvalues(["],d);¢–˜ 2 2 {y = RootOf(_Z - 8), x = 1/2 RootOf(_Z - 8), lambda = - 4 exp(-2)},¢–˜ 2 2 {y = RootOf(_Z - 8), x = - 1/2 RootOf(_Z - 8), lambda = 4 exp(-2)}¢–˜ 1/2 1/2 bndcritpts := [{lambda = - 4 exp(-2), x = 2 , y = 2 2 },¢–˜ 1/2 1/2 {lambda = 4 exp(-2), y = 2 2 , x = - 2 }],¢–˜ 1/2 1/2 [{lambda = - 4 exp(-2), x = - 2 , y = - 2 2 },¢–˜ 1/2 1/2 {lambda = 4 exp(-2), x = 2 , y = - 2 2 }]¢–˜B˜U˜ (This was done with the first method but we redo one boundary point to show how to extract the values of x and y.)¢–˜ > bndcritpts[1][1]; 1/2 1/2 {lambda = - 4 exp(-2), x = 2 , y = 2 2 }¢–˜ > b1:=op(subs(bndcritpts[1][1],[x,y])); f(b1); evalf(");¢–˜ī˜ó˜¢–˜ū˜¢–˜ž˜¢–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University¢–˜ SEE ALSO: vec_calc, vec_calc[GRAD], student[equate], solve, vec_calc[HESS], vec_calc[LPMD]aŅ5 help/text/GRAD TEXT#* FUNCTION: vec_calc[GRAD] - Calculates the Gradient of a Scalar Function in Procedural Form.  CALLING SEQUENCE: GRAD(proc)©–˜ PARAMETERS: proc - a procedure in n variables©–˜ SYNOPSIS: - GRAD calculates the gradient of a procedure in n variables. It returns a list of n procedures which are the partial derivatives of the input function.©–˜ - This function is part of the vec_calc package, and so can be used in the form GRAD(..) only after performing the command with(vec_calc) or with(vec_calc, GRAD). The function can always be accessed in the long form vec_calc[GRAD](..).©–˜ EXAMPLE: > with(vec_calc); > f:=(x,y,z)->x^2*y^3*z^4; 2 3 4 f := (x,y,z) -> x y z©–˜ > GRAD(f); 3 4 2 2 4 2 3 3 [(x,y,z) -> 2 x y z , (x,y,z) -> 3 x y z , (x,y,z) -> 4 x y z ]©–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University©–˜ SEE ALSO: linalg[grad], vec_calc, Diffops, Multi_Max_Min, vec_calc[CURL], vec_calc[DIV]aŅ5 help/text/DIV TEXT+* FUNCTION: vec_calc[DIV] - Calculates the Divergence of a Vector Field in Procedural Form.  CALLING SEQUENCE: DIV([f1,...,fn])©–˜ PARAMETERS: f1 - a procedure in n variables f2 ... fn - each is a procedure in n variables or a constant or a name©–˜ SYNOPSIS: - DIV calculates the divergence of an n-dimensional vector field and returns a scalar function in the form of a procedure.©–˜ - DIV will not work if the first component of the input list is not a procedure of n arguments, n being the number of items in the list.©–˜ - This command is designed to be used with the MF (Make Function) command in the vec_calc package to define the vector field.©–˜ - This function is part of the vec_calc package, and so can be used in the form DIV(..) only after performing the command with(vec_calc) or with(vec_calc, DIV). The function can always be accessed in the long form vec_calc[DIV](..).©–˜ EXAMPLE: > with(vec_calc); > f:=MF([x,y,z],[x^2+y^3+x*y*z^4, y^2*z, x^2*z^3]);©–˜ 2 3 4 2 2 3 F := [(x,y,z) -> x + y + x y z , (x,y,z) -> y z, (x,y,z) -> x z ]©–˜ > DIV(F); 4 2 2 (x,y,z) -> 2 x + y z + 2 y z + 3 x z©–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University©–˜ SEE ALSO: linalg[diverge], vec_calc, Diffops, vec_calc[GRAD], vec_calc[CURL]aŅ5 help/text/CURL TEXT+* FUNCTION: vec_calc[CURL] - Calculates the Curl of a Three-Dimensional Vector Field in Procedural Form  CALLING SEQUENCE: CURL([f1,f2,f3])¬–˜ PARAMETERS: f1 - a procedure in three variables f2, f3 - each is a procedure in three variables or a constant or a name¬–˜ SYNOPSIS: - CURL calculates the curl of a three-dimensional vector field and returns a vector function as a list of three procedures.¬–˜ - CURL will not work if the first component of the input list is not a procedure in three variables.¬–˜ - This command is designed to be used with the MF (Make Function) command in the vec_calc package to define the vector field.¬–˜ - This function is part of the vec_calc package, and so can be used in the form CURL(..) only after performing the command with(vec_calc) or with(vec_calc, CURL). The function can always be accessed in the long form vec_calc[CURL](..).¬–˜ EXAMPLE: > with(vec_calc); > f:=MF([x,y,z],[x^2+y^3+x*y*z^4, y^2*z, x^2*z^3]);¬–˜ 2 3 4 2 2 3 F := [(x,y,z) -> x + y + x y z , (x,y,z) -> y z, (x,y,z) -> x z ]¬–˜ > CURL(F); 2 3 3 2 4 [(x,y,z) -> - y , (x,y,z) -> 4 x y z - 2 x z , (x,y,z) -> - 3 y - x z ]¬–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University¬–˜ SEE ALSO: linalg[curl], vec_calc, Diffops, vec_calc[GRAD], vec_calc[DIV]aŅ5 help/text/LAP TEXT/* FUNCTION: vec_calc[LAP] - Calculates the Laplacian of a Function or List of Functions in Procedural Form  CALLING SEQUENCE: LAP(proc)¬–˜ PARAMETERS: proc - a procedure or list of procedures¬–˜ SYNOPSIS: - LAP calculates the Laplacian of each procedure in the input and returns a procedure or list of procedures.¬–˜ - LAP will not work if any component is not a procedure.¬–˜ - LAP is not yet working for lists of procedures.¬–˜ - This function is part of the vec_calc package, and so can be used in the form LAP(..) only after performing the command with(vec_calc) or with(vec_calc, LAP). The function can always be accessed in the long form vec_calc[LAP](..).¬–˜ EXAMPLE: > with(vec_calc); > f:=(x,y,z)->x^2+y^3+x*y*z^4; 2 3 4 f := (x,y,z) -> x + y + x y z¬–˜ > LAP(f); 2 (x,y,z) -> 2 + 6 y + 12 x y z¬–˜ > F:=MF([x,y,z],[x^2+y^3+x*y*z^4, y^2*z, x^2*z^3]);¬–˜ 2 3 4 2 2 3 F := [(x,y,z) -> x + y + x y z , (x,y,z) -> y z, (x,y,z) -> x z ]¬–˜ > LAP(F); 2 3 2 [(x,y,z) -> 2 + 6 y + 12 x y z , (x,y,z) -> 2 z, (x,y,z) -> 2 z + 6 x z]¬–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University¬–˜ SEE ALSO: linalg[laplacian], vec_calc, Diffops, vec_calc[GRAD], vec_calc[DIV], vec_calc[HESS]aŅ5 help/text/HESS TEXT(* FUNCTION: vec_calc[HESS] - Calculates the Hessian Matrix of a Function in Procedural Form  CALLING SEQUENCE: HESS(proc)©–˜ PARAMETERS: proc - a procedure in n variables©–˜ SYNOPSIS: - HESS calculates the Hessian matrix of a function in procedural form and returns a matrix of procedures.©–˜ - This function is part of the vec_calc package, and so can be used in the form HESS(..) only after performing the command with(vec_calc) or with(vec_calc, HESS). The function can always be accessed in the long form vec_calc[HESS](..).©–˜ EXAMPLE: > with(vec_calc); > f:=(x,y,z)->x^2+y^3+x*y*z^4; 2 3 4 f := (x,y,z) -> x + y + x y z©–˜ > K:=HESS(f); 4 3 K := [[2, (x,y,z) -> z , (x,y,z) -> 4 y z ],©–˜ 4 3 [(x,y,z) -> z , (x,y,z) -> 6 y, (x,y,z) -> 4 x z ],©–˜ 3 3 2 [(x,y,z) -> 4 y z , (x,y,z) -> 4 x z , (x,y,z) -> 12 x y z ]]©–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University©–˜ SEE ALSO: linalg[hessian], vec_calc, Diffops, Multi_Max_Min, vec_calc[GRAD], vec_calc[LAP], vec_calc[LPMD]aŅ5 help/text/LPMD TEXT^* FUNCTION: vec_calc[LPMD] - Calculate the Leading Principal Minor Determinants  CALLING SEQUENCE: LPMD(A)¦–˜ PARAMETERS: A - an n x n matrix of expressions¦–˜ SYNOPSIS: - LPMD computes and prints out the determinants of the 1 x 1, 2 x 2 3 x 3, . . . and n x n square sub-matrices in the top left corner of the matrix A. It then returns the sequence of these determinants¦–˜ - This function is part of the vec_calc package, and so can be used in the form LPMD(..) only after performing the command with(vec_calc) or with(vec_calc, LPMD). The function can always be accessed in the long form vec_calc[LPMD](..).¦–˜ EXAMPLE: > with(vec_calc); > A:=vandermonde([x,y,z]); [ 2 ] [ 1 x x ] [ ]e—˜ A := [ 1 y y ]u—˜e—˜ [ 1 z z ]¦–˜ > DA:=LPMD(A); LPMDs:¦–˜ D[1] = 1¦–˜ D[2] = y - x¦–˜ 2 2 2 2 2 2 D[3] = y z - y z - x z + x z + x y - x y¦–˜ 2 2 2 2 2 2 DA := 1, y - x, y z - y z - x z + x z + x y - x y¦–˜ > DA[3]; 2 2 2 2 2 2 y z - y z - x z + x z + x y - x y¦–˜ > det(A);č—˜ó—˜¦–˜ > B:=vandermonde([1,2,3,4]);¦–˜ [ 1 1 1 1 ] [ ] [ 1 2 4 8 ] B := [ ] [ 1 3 9 27 ]˜˜ [ 1 4 16 64 ]¦–˜ > DB:=LPMD(B);•—˜¦–˜—˜¦–˜ D[2] = 1¦–˜ D[3] = 2¦–˜ D[4] = 12¦–˜ DB := 1, 1, 2, 12¦–˜ > B3:=submatrix(B,1..3,1..3);¦–˜ [ 1 1 1 ] [ ] B3 := [ 1 2 4 ]ƒ˜˜ [ 1 3 9 ]¦–˜ > det(B3); 2¦–˜ > det(B); 12¦–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University¦–˜ SEE ALSO: linalg[det], vec_calc, Diffops, Multi_Max_Min, vec_calc[HESS]aŅ5 help/text/JAC TEXTG* FUNCTION: vec_calc[JAC] - Calculates the Jacobian Matrix of a Coordinate Transformation or a Parametrized k-Surface in n-Space  CALLING SEQUENCE: JAC(T)±–˜ PARAMETERS: T - a coordinate transformation in the forn of a list of n procedures in k variables±–˜ SYNOPSIS: - JAC calculates the Jacobian matrix of a coordinate transformation, returning a k x n matrix of procedures. The i'th row is the partial derivatives of the coordinates with respect to the i'th variable.±–˜ - JAC will not work if the first component is not a procedure.±–˜ - This function is part of the vec_calc package, and so can be used in the form JAC(..) only after performing the command with(vec_calc) or with(vec_calc, JAC). The function can always be accessed in the long form vec_calc[JAC](..).±–˜ EXAMPLE: > with(vec_calc); > T:=MF([u,v],[u^2+v^2, u+v, u*v]);±–˜ 2 2 T := [(u,v) -> u + v , (u,v) -> v + u, (u,v) -> u v]±–˜ > JAC(T);±–˜ [[(u,v) -> 2 u, 1, (u,v) -> v], [(u,v) -> 2 v, 1, (u,v) -> u]]±–˜ > T:=MF([rho,phi,theta], > [rho*sin(phi)*cos(theta),rho*sin(phi)*sin(theta),rho*cos(phi)]);±–˜ T := [(rho,phi,theta) -> rho sin(phi) cos(theta),±–˜ (rho,phi,theta) -> rho sin(phi) sin(theta),±–˜ (rho,phi,theta) -> rho cos(phi)]±–˜®—˜±–˜ [[(rho,phi,theta) -> sin(phi) cos(theta),±–˜ (rho,phi,theta) -> sin(phi) sin(theta),±–˜ (rho,phi,theta) -> cos(phi)],±–˜ [(rho,phi,theta) -> rho cos(phi) cos(theta),±–˜ (rho,phi,theta) -> rho cos(phi) sin(theta),±–˜ (rho,phi,theta) -> - rho sin(phi)],±–˜ [(rho,phi,theta) -> - rho sin(phi) sin(theta),±–˜ (rho,phi,theta) -> rho sin(phi) cos(theta), 0]]±–˜ > JAC_DET(T); 2 (rho,phi,theta) -> sin(phi) rho±–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University±–˜ SEE ALSO: linalg[jacobian], vec_calc, Diffops, vec_calc[JAC_DET], vec_calc[MuInt], vec_calc[smuint], CoordConversion2D, CoordConversion3DaŅ5 help/text/JAC_DET TEXT?* FUNCTION: vec_calc[JAC_DET] - Calculates the Jacobian Determinant of a Coordinate Transformation  CALLING SEQUENCE: JAC_DET(T)Ŗ–˜ PARAMETERS: T - a coordinate transformation in the forn of a list of n procedures in n variablesŖ–˜ SYNOPSIS: - JAC_DET calculates the Jacobian determinant of a coordinate transformation, returning a procedure.Ŗ–˜ - JAC_DET will not work if the first component is not a procedure. Moreover, the number of components must equal the number of variables.Ŗ–˜ - This function is part of the vec_calc package, and so can be used in the form JAC_DET(..) only after performing the command with(vec_calc) or with(vec_calc, JAC_DET). The function can always be accessed in the long form vec_calc[JAC_DET](..).Ŗ–˜ EXAMPLES: > with(vec_calc); > T:=MF([rho,phi,theta], > [rho*sin(phi)*cos(theta),rho*sin(phi)*sin(theta),rho*cos(phi)]);Ŗ–˜ T := [(rho,phi,theta) -> rho sin(phi) cos(theta),Ŗ–˜ (rho,phi,theta) -> rho sin(phi) sin(theta),Ŗ–˜ (rho,phi,theta) -> rho cos(phi)]Ŗ–˜ > JAC(T);Ŗ–˜ [[(rho,phi,theta) -> sin(phi) cos(theta),Ŗ–˜ (rho,phi,theta) -> sin(phi) sin(theta),Ŗ–˜ (rho,phi,theta) -> cos(phi)],Ŗ–˜ [(rho,phi,theta) -> rho cos(phi) cos(theta),Ŗ–˜ (rho,phi,theta) -> rho cos(phi) sin(theta),Ŗ–˜ (rho,phi,theta) -> - rho sin(phi)],Ŗ–˜ [(rho,phi,theta) -> - rho sin(phi) sin(theta),Ŗ–˜ (rho,phi,theta) -> rho sin(phi) cos(theta), 0]]Ŗ–˜ > JAC_DET(T);Ŗ–˜ 2 (rho,phi,theta) -> sin(phi) rhoŖ–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M UniversityŖ–˜ SEE ALSO: linalg[jacobian], linalg[det], vec_calc, Diffops, vec_calc[JAC], vec_calc[MuInt], vec_calc[smuint], CoordConversion2D, CoordConversion3DaŅ5 help/text/POT TEXTC* FUNCTION: vec_calc[POT] - Computes the Scalar Potential of a Vector Field  CALLING SEQUENCE: POT(F,'f')”–˜ PARAMETERS: F - a vector field in the form of a list of procedures 'f' - the name for the potential to be returned.”–˜ SYNOPSIS: - POT determines wheter a given vector field is the gradient of a scalar potential, and determines that potential if it exists.”–˜ - The function returns true if the function F has a scalar potential, and false if it does not. The scalar potential exists only if the curl of F is zero.”–˜ - If a scalar potential for F exists, it will be assigned to the name given in the second argument f. Further the second argument must be contained in quotes.”–˜ - POT will not work unless the first element of F contains the same number of arguments as there are components in F.”–˜ - This function is part of the vec_calc package, and so can be used in the form POT(..) only after performing the command with(vec_calc) or with(vec_calc, POT). The function can always be accessed in the long form vec_calc[POT](..).”–˜ EXAMPLE: > with(vec_calc); > g:=MF([x,y,z],x^2+exp(y)*sin(z));”–˜ 2 g := (x,y,z) -> x + exp(y) sin(z)”–˜ > G:=GRAD(g);”–˜ G := [(x,y,z) -> 2 x, (x,y,z) -> exp(y) sin(z),”–˜ (x,y,z) -> exp(y) cos(z)]”–˜ > POT(G,'h'); true”–˜ > eval(h); 2 (x,y,z) -> x + exp(y) sin(z)”–˜ > F:=MF([x,y,z],[2*y, exp(y)*sin(z), exp(y)*cos(z)]);”–˜ F := [(x,y,z) -> 2 y, (x,y,z) -> exp(y) sin(z),”–˜ (x,y,z) -> exp(y) cos(z)]”–˜ > POT(F,'f'); false”–˜ > eval(f); f”–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University”–˜ SEE ALSO: linalg[potential], vec_calc, Diffops, vec_calc[GRAD], vec_calc[CURL], vec_calc[VEC_POT]aŅ5 help/text/VEC_POT TEXTK* FUNCTION: vec_calc[VEC_POT] - Computes the Vector Potential of a Vector Field  CALLING SEQUENCE: VEC_POT(F,'A')¬–˜ PARAMETERS: F - a vector field in the form of a list of 3 procedures 'A' - the name for the vector potential to be returned.¬–˜ SYNOPSIS: - VEC_POT determines wheter a given vector field is the curl of a vector potential, and determines that vector potential if it exists.¬–˜ - The function returns true if the function F has a vector potential, and false if it does not. The vector potential exists only if the divergence of F is zero.¬–˜ - If a vector potential for F exists, it will be assigned to the name given in the second argument A. Further the second argument must be contained in quotes.¬–˜ - VEC_POT will not work unless the first element of F is a procedure with 3 arguments and there are 3 components in F.¬–˜ - This function is part of the vec_calc package, and so can be used in the form VEC_POT(..) only after performing the command with(vec_calc) or with(vec_calc, VEC_POT). The function can always be accessed in the long form vec_calc[VEC_POT](..).¬–˜ EXAMPLE: > with(vec_calc); > A:=MF([x,y,z],[x+y+z, x*y*z, x*y+y*z+z*x]);¬–˜ A := [ (x,y,z) -> x + y + z, (x,y,z) -> x y z, (x,y,z) -> x y + y z + z x ]¬–˜ > VEC_POT(A,'V'); false¬–˜ > eval(V); V¬–˜ > C:=CURL(A);¬–˜ C := [(x,y,z) -> x + z - x y, (x,y,z) -> 1 - y - z, (x,y,z) -> y z - 1]¬–˜ > VEC_POT(C,'B'); true¬–˜ > eval(B); 2 2 [(x,y,z) -> z - y z - 1/2 z + y, (x,y,z) -> - z x + x y z - 1/2 z , 0]¬–˜ Although B is not A, they differ by a gradient as the following shows:¬–˜ > G:=MF([x,y,z],emcl(A(x,y,z)-B(x,y,z)));¬–˜ 2 2 G := [(x,y,z) -> x + y z + 1/2 z , (x,y,z) -> z x + 1/2 z ,¬–˜ (x,y,z) -> x y + y z + z x]¬–˜ > POT(G,'g');Q˜˜¬–˜ > eval(g); 2 2 2 (x,y,z) -> 1/2 x + x y z + 1/2 x z + 1/2 y z¬–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University¬–˜ SEE ALSO: linalg[vecpotent], vec_calc, Diffops, vec_calc[CURL], vec_calc[DIV], vec_calc[POT]aŅ5 help/text/muint TEXT9* FUNCTIONS: vec_calc[MuInt] - Displays an Inert Mulitiple Integral vec_calc[muint] - Computes a Multiple Integral  CALLING SEQUENCE: MuInt(F,x1,x2,..,xn) muint(F,x1,x2,..,xn)®–˜ PARAMETERS: F - an expression to be used as the integrand x1 ... xn - each must be a name or a name = range, to specify a variable of integration and optionally its limits of integration. The variables appear in the order they are to be evaluated.®–˜ SYNOPSIS: - MuInt displays a multiple integral, where the first argument is the integrand and the following arguments are the variables of integration, which can include numerical ranges. The integral can then be evaluated using value.®–˜ - muint calculates a multiple integral without first displaying the integral.®–˜ - These functions are part of the vec_calc package, and so can be used in the form MuInt(..) or muint(..) only after performing the command with(vec_calc) or with(vec_calc,..). The functions can always be accessed in the long form vec_calc[MuInt](..) or vec_calc[muint](..).®–˜ EXAMPLES: > with(vec_calc); > MuInt(x^4*y^3*z^2,x=1..2,y=3..4,z=5..6); value(");®–˜ 6 4 2 / / / | | | 4 3 2 | | | x y z dx dy dz | | | / / / 5 3 1®–˜ 98735 ----- 12®–˜ > muint(x^4*y^3*z^2,x=1..2,y=3..4,z=5..6);®–˜%˜˜*˜˜/˜˜®–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University®–˜ SEE ALSO: Int, value, int, vec_calc, vec_calc[smuint], vec_calc[JAC], vec_calc[JAC_DET], CoordConversion2D, CoordConversion3DaŅ5 help/text/smuint TEXTT* FUNCTION: vec_calc[smuint] - Stepwise Multiple Integral  CALLING SEQUENCE: smuint(F,x1,x2,..,xn)–˜ PARAMETERS: F - an expression to be used as the integrand x1 ... xn - each must be a name = range, to specify a variables of integration and its limits of integration. The variables appear in order they are to be evaluated.–˜ SYNOPSIS: - smuint is an extended version of vec_calc[MuInt] and vec_calc[muint] which evaluates a multiple integral, but displays each step of the calculation.–˜ - This function is part of the vec_calc package, and so can be used in the form smuint(..) only after performing the command with(vec_calc) or with(vec_calc, smuint). The function can always be accessed in the long form vec_calc[smuint](..).–˜ EXAMPLE: > with(vec_calc); > smuint(x^4*y^3*z^2,x=1..2,y=3..4,z=5..6);–˜ 6 4 2 / / / | | | 4 3 2 | | | x y z dx dy dz | | | / / / 5 3 1–˜ 6 4 / / | | 5 3 2 2 = | | [ 1/5 x y z ] dy dz | | x = 1 / / 5 3–˜ 6 4 / / | | 3 2 = | | 31/5 y z dy dz | | / / 5 3–˜ 6 / | 31 4 2 4 = | [ ---- y z ] dz | 20 y = 3 / 5–˜ 6 / | 2 = | 1085/4 z dz | / 5–˜ 1085 3 6 = [ ---- z ] 12 z = 5–˜ 98735 = ----- 12–˜ 98735 ----- 12–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University–˜ SEE ALSO: Int, value, int, vec_calc, vec_calc[MuInt], vec_calc[muint], vec_calc[JAC], vec_calc[JAC_DET], CoordConversion2D, CoordConversion3DaŅ5 help/text/d2r TEXT3* FUNCTIONS: vec_calc[d2r] - Converts Angles from Degrees to Radians vec_calc[r2d] - Converts Angles from Radians to Degrees  CALLING SEQUENCE: d2r(theta) r2d(theta)²–˜ PARAMETERS: theta - a number, variable or expression representing an angle²–˜ SYNOPSIS: - d2r converts angles measured in degrees to angles measured in radians.²–˜ - r2d converts angles measured in radians to angles measured in degrees.²–˜ - If theta contains any floating point decimal numbers, then d2r and r2d return decimal answers. Otherwise, they return exact numbers or symbolic expressions.²–˜ - These functions are part of the vec_calc package, and so can be used in the form d2r(..) and r2d(..) only after performing the command with(vec_calc) or with(vec_calc,..). The functions can always be accessed in the long form vec_calc[d2r](..) or vec_calc[r2d](..).²–˜ EXAMPLE: > with(vec_calc); > d2r(a); 1/180 a Pi²–˜ > r2d(a); a 180 ---- Pi²–˜ > d2r(45); 1/4 Pi²–˜ > r2d(Pi/6); 30²–˜ > d2r(45.); .7853981635²–˜ > r2d(1.); 57.29577950²–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University²–˜ SEE ALSO: vec_calc, CoordConversion2D, CoordConversion3DaŅ5 help/text/CoordConversion2D TEXT=* HELP FOR: 2 Dimensional Coordinate Conversions, Using the vec_calc Package  FUNCTIONS: vec_calc[p2r] - Converts Coordinates from Polar to Rectangular vec_calc[r2p] - Converts Coordinates from Rectangular to Polar¤–˜ CALLING SEQUENCE: p2r([r,theta]) r2p([x,y])¤–˜ PARAMETERS: [x,y] - rectangular coordinates x - the horizontal axis, positive on the right y - the vertical axis, positive upward [r,theta] - polar coordinates r - the radial distance from the origin theta - the angle measured in radians counterclockwise from the positive x-axis¤–˜ SYNOPSIS: - The rectangular and polar coordinates are related by the equations:¤–˜ x = r cos(theta) y = r sin(theta)¤–˜ r = sqrt(x^2 + y^2) theta = arctan(y/x) in quadrants I and IV arctan(y/x) + Pi in quadrant II arctan(y/x) - Pi in quadrant III¤–˜ - Maple's arctan function with 2 arguments is designed to produce exactly what is needed for theta.¤–˜ - r >= 0 and -Pi < theta <= Pi.¤–˜ - p2r converts polar coordinates to rectangular coordinates.¤–˜ - r2p converts rectangular coordinates to polar coordinates.¤–˜ - These functions return floating point decimal numbers if the input contains any decimals.¤–˜ - These functions are part of the vec_calc package, and so can be used in the forms p2r(..) and r2p(..) only after performing the command with(vec_calc) or with(vec_calc,..). The function can always be accessed in the long form vec_calc[p2r](..) or vec_calc[r2p](..).¤–˜ EXAMPLES: > with(vec_calc); > p2r([a,b]); [a cos(b), a sin(b)]¤–˜ > r2p([a,b]); 2 2 1/2 [(a + b ) , arctan(b, a)]¤–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University¤–˜ SEE ALSO: vec_calc, CoordConversion3D, d2r, r2daŅ5 help/text/CoordConversion3D TEXT€* HELP FOR: 3 Dimensional Coordinate Conversions, Using the vec_calc Package  FUNCTIONS: vec_calc[c2r] - Converts Coordinates from Cylindrical to Rectangular vec_calc[r2c] - Converts Coordinates from Rectangular to Cylindrical vec_calc[s2r] - Converts Coordinates from Spherical to Rectangular vec_calc[r2s] - Converts Coordinates from Rectangular to Spherical vec_calc[s2c] - Converts Coordinates from Spherical to Cylindrical vec_calc[c2s] - Converts Coordinates from Cylindrical to Spherical¤–˜ CALLING SEQUENCE: c2r([r,theta,z]) r2c([x,y,z]) s2r([r,theta,phi]) r2s([x,y,z]) s2c([r,theta]) c2s([r,theta,z])¤–˜ PARAMETERS: [x,y,z] - rectangular coordinates x - first horizontal axis y - second horizontal axis z - vertical axis, positive upward and related by the right hand rule [r,theta,z] - cylindrical coordinates r - the perpendicular distance from the z-axis theta - the azimuthal angle measured in radians counterclockwise from the positive x-axis z - same as rectangular z [rho,theta,phi] - spherical coordinates rho - the radial distance from the origin theta - same as cylindrical theta phi - the polar angle measured in radians from the positive z-axis¤–˜ SYNOPSIS: - The rectangular coordinates are related to cylindrical and spherical coordinates by the equations:¤–˜ x = r cos(theta) = rho sin(phi) cos(theta) y = r sin(theta) = rho sin(phi) sin(theta) z = z = rho cos(phi)¤–˜ - The cylindrical coordinates are related to rectangular and spherical6˜˜¤–˜ r = sqrt(x^2 + y^2) theta = arctan(y/x) in quadrants I and IV arctan(y/x) + Pi in quadrant II arctan(y/x) - Pi in quadrant III z = z¤–˜ r = rho sin(phi) theta = theta z = rho cos(phi)¤–˜ - The spherical coordinates are related to rectangular and cylindrical6˜˜¤–˜ rho = sqrt(x^2 + y^2 + z^2)†˜˜”˜˜”˜˜ phi = arctan(sqrt(x^2 + y^2)/z) for z>=0 arctan(sqrt(x^2 + y^2)/z) + Pi for z<=0¤–˜ rho = sqrt(r^2 + z^2)¼˜˜ phi = arctan(r/z) for z>=0 arctan(r/z) + Pi for z<=0¤–˜ - Maple's arctan function with 2 arguments is designed to produce exactly what is needed for theta.¤–˜ - r >= 0 and -Pi < theta <= Pi.¤–˜ - rho >= 0, 0 <= phi <= Pi and -Pi < theta <= Pi.¤–˜ - c2r converts cylindrical coordinates to rectangular coordinates.¤–˜ - r2c converts rectangular coordinates to cylindrical coordinates.¤–˜ - s2r converts spherical coordinates to rectangular coordinates.¤–˜ - r2s converts rectangular coordinates to spherical coordinates.¤–˜ - s2c converts spherical coordinates to cylindrical coordinates.¤–˜ - c2s converts cylindrical coordinates to spherical coordinates.¤–˜ - These functions return floating point decimal numbers if the input contains any decimals.¤–˜ - CAUTION: The spherical coordinate system used by Maple is left handed.¤–˜ - These functions are part of the vec_calc package, and so can be used by name only after performing the command with(vec_calc) or with(vec_calc,..). The function can always be accessed in the long form vec_calc[..](..).¤–˜ EXAMPLES: > with(vec_calc); > c2r([r,t,z]); [r cos(t), r sin(t), z]¤–˜ > r2c([x,y,z]); 2 2 1/2 [(x + y ) , arctan(y, x), z]¤–˜ > s2r([r,t,p]); [r sin(p) cos(t), r sin(p) sin(t), r cos(p)]¤–˜ > r2s([x,y,z]); 2 2 2 1/2 2 2 1/2 [(x + y + z ) , arctan(y, x) , arctan((x + y ) , z)]¤–˜ > s2c([r,t,p]); [r sin(p), t, r cos(p)]¤–˜ > c2s([r,t,z]);{š˜ [(r + z ) , t, arctan(r, z)]¤–˜ - Copyright 1995 by Arthur Belmonte and Philip B. Yasskin Department of Mathematics, Texas A&M University¤–˜ SEE ALSO: vec_calc, CoordConversion2D, d2r, r2daŅ5 vec_calc8* falseJH r2c readlib* vec_calc/r2cH JAC’–˜* vec_calc/JACH MF’–˜* vec_calc/MFH POT’–˜* vec_calc/POTH Lis’–˜* vec_calc/LisH MuInt’–˜* vec_calc/MuIntH evall’–˜* vec_calc/evallH emcl’–˜* vec_calc/emcl lis’–˜* vec_calc/lisH norm2’–˜* vec_calc/norm2H cross’–˜* vec_calc/crossH map_Int’–˜* vec_calc/map_Int Liv’–˜* vec_calc/LivH CURL’–˜* vec_calc/CURLH HESS’–˜* vec_calc/HESSH LPMD’–˜* vec_calc/LPMD liv’–˜* vec_calc/livH JAC_DET’–˜* vec_calc/JAC_DETH VEC_POT’–˜* vec_calc/VEC_POTH Sis’–˜* vec_calc/SisH ss’–˜* vec_calc/ssH sis’–˜* vec_calc/sisH Siv’–˜* vec_calc/SivH siv’–˜* vec_calc/sivH dot’–˜* vec_calc/dotH len’–˜* vec_calc/lenH Cforget’–˜* vec_calc/CforgetH map_Limit’–˜* vec_calc/map_LimitH map_Diff’–˜* vec_calc/map_DiffH map_eval’–˜* vec_calc/map_evalH GD’–˜* vec_calc/GDH Cv’–˜* vec_calc/CvH Ca’–˜* vec_calc/CaH Cj’–˜* vec_calc/CjH CT’–˜* vec_calc/CTH CB’–˜* vec_calc/CBH CN’–˜* vec_calc/CNH Muint’–˜* vec_calc/MuintH Ck’–˜* vec_calc/CkH Ct’–˜* vec_calc/CtH smuint’–˜* vec_calc/smuintH CaT’–˜* vec_calc/CaTH CaN’–˜* vec_calc/CaNH CL’–˜* vec_calc/CLH GRAD’–˜* vec_calc/GRADH r2d’–˜* vec_calc/r2dH d2r’–˜* vec_calc/d2rH s2r’–˜* vec_calc/s2rH p2r’–˜* vec_calc/p2rH r2s’–˜* vec_calc/r2sH r2p’–˜* vec_calc/r2pH c2s’–˜* vec_calc/c2sH c2r’–˜* vec_calc/c2rH s2c’–˜* vec_calc/s2cH DIV’–˜* vec_calc/DIVH muint’–˜* vec_calc/muintH LAP’–˜* vec_calc/LAP