{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Map le Plot" 0 13 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } 3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "R-4 MCS 320 Wednesday 30 A pril 2003" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "#6 test the fund amental theorem of calculus" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 11 "f := 1/x^3:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "int_f := int(f,x=a..b);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&int_fG,$*(,&*$)%\"aG\"\"#\"\"\"F,*$)%\"bGF+F,!\"\"F,F/!\"#F*F 1#F0F+" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "subs(a=-2,b=4,int _f);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6##\"\"$\"#K" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 88 "This result is wrong, because of the origin which lies between a and b as a singularity." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "int(f,x=-2..4);" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#%*undefinedG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 " An even better solution to this problem is to work with a function:" } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "fun := \+ (a,b) -> int(1/x^3,x=a..b);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$funG f*6$%\"aG%\"bG6\"6$%)operatorG%&arrowGF)-%$intG6$*&\"\"\"F1*$)%\"xG\" \"$F1!\"\"/F4;9$9%F)F)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "fun(-2,4);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%*undefinedG" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 284 "# 2 The difference between unappl y and the arrow operator is that the arrow operator is a fast and conv enient way to define a small function (for example an anonymous functi on), while the unapply turns a formula into a function. We better us e unapply when we have already a formula." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "Here is an example how we can get around the unapply:" } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "f := x \+ + 3*x^2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fG,&%\"xG\"\"\"*&\"\"$ F')F&\"\"#F'F'" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "Suppose we do n ot have the unapply:" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "ff := y -> subs(x=y,f);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#ffGf*6#%\"yG6\"6$%)operatorG%&arrowGF(-%%subsG6$/%\"xG9$%\"fG F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "ff(3);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#I" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 31 "The alternative with unapply is" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "fff := unapply(f,x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$fffGf*6#%\"xG6\"6$%)operatorG%&arrowGF(,&9$\"\"\"*& \"\"$F.)F-\"\"#F.F.F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "fff(3);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#I" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 89 "If we would not have the arrow operator, we would \+ certainly miss the anonymous functions." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "h := matrix(2,3,(i,j) -> x^i+y^j); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"hG-%'matrixG6#7$7%,&%\"xG\"\" \"%\"yGF,,&F+F,*$)F-\"\"#F,F,,&F+F,*$)F-\"\"$F,F,7%,&*$)F+F1F,F,F-F,,& F8F,F/F,,&F8F,F3F," }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "#7 singular ities usually make it hard for Maple to plot algebraic curves:" } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "plots[i mplicitplot](x^4 + x^2*y^2 - y^2,x=-10..10,y=-10..10): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "polar_curve := subs(x=r*cos(t),y=r* sin(t),x^4 + x^2*y^2 - y^2);" }}{PARA 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$$!3m*HaOy1]m*F*$!3)*)H4bVz%ROF-7$$ !3Tp6JBn:-(*F*$!3EAmB*zZe)QF-7$$!3Q=mtj\\:P(*F*$!3i>B$G9qE;%F-7$$!3y$[ $=VP**p(*F*$!3i:e18=EwWF-7$$!3'p\"*>)ydm+)*F*F+-%'COLOURG6&%$RGBG$\"#5 !\"\"$\"\"!F]_lF\\_l-%%VIEWG6$%(DEFAULTGFa_l" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "# 13 a polynomial in sin(x):" }{MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "p := randpoly(sin(x),degree= 13,sparse);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"pG,.*$)-%$sinG6#%\" xG\"#7\"\"\"\"#X*&\"\")F-)F(\"#5F-!\"\"*&\"#$*F-)F(F0F-F3*&\"##*F-)F( \"\"%F-F-*&\"#VF-)F(\"\"$F-F-*&\"#iF-)F(\"\"#F-F3" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 22 "q := subs(sin(x)=y,p);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"qG,.*$)%\"yG\"#7\"\"\"\"#X*&\"\")F*)F(\"#5F*!\"\"*& \"#$*F*)F(F-F*F0*&\"##*F*)F(\"\"%F*F**&\"#VF*)F(\"\"$F*F**&\"#iF*)F(\" \"#F*F0" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "s := fsolve(q,y, complex);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%\"sG6.$!+=>7:7!\"*^$$!+ Ne,9$)!#5$!+[zV[RF,^$F*$\"+[zV[RF,^$$!+3$=cR#F,$!+<`&4:\"F(^$F3$\"+<`& 4:\"F($\"\"!F;F:^$$\"+rDU(*HF,$!+1Nk(4\"F(^$F=$\"+1Nk(4\"F($\"+*>a2o'F ,^$$\"+1WuW5F($!+i$f'y;F,^$FG$\"+i$f'y;F," }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 45 "For every solution in the sequence s we solve" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "solve(s[2]=sin(x ),x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#^$$!+e\"ez1)!#5$!+IXpNaF&" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "solve(s[10]=sin(x),x);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+%)H>;t!#5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 95 "Notice that this is a family of solutions: we may add \+ any multiple of 2*Pi to the answer above." }{MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "fsolve(p,x,complex);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#$\"\"!F$" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "This last command excludes many interesting solutions and is not a good answer." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 90 "#8 we compute the common intersection points of two algeb raic curves via a Groebner basis:" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "p := x^2 + y^2 - 1; q := 2*x*y + 2*x - 3; " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"pG,(*$)%\"xG\"\"#\"\"\"F**$)% \"yGF)F*F*F*!\"\"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"qG,(*&%\"xG\" \"\"%\"yGF(\"\"#*&F*F(F'F(F(\"\"$!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "grobner[gbasis]([p,q],[x,y],plex);" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#7$,,*$)%\"yG\"\"$\"\"\"\"\"#*&F*F)F'F)!\"\"*&F(F)%\"x GF)F)*&F*F))F'F*F)F)F*F,,*\"\"&F)*&\"\"%F))F'F4F)F)*&\"\")F)F&F)F)*&F7 F)F'F)F," }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 296 "With a Groebner basi s, we can write any set or list of polynomials ( not polynomial equati ons ) into a triangular form ( if we use pure lexicographical order ). We solve the last equation, which is an equation in one variable and substitute the values for that variable into the other equations." } {MPLTEXT 1 0 0 "" }}}}{MARK "40 0 0" 296 }{VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }