{VERSION 3 0 "SGI MIPS UNIX" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 256 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE " " -1 261 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Error" 7 8 1 {CSTYLE "" -1 -1 "" 0 1 255 0 255 1 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 256 48 "Multiplica tion of Linear Differential Operators." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1412 "mult := proc(L1, L2, Dx, x)\n local answer,c0,the_rest,DxL2,i; \n # options trace;\n if nargs<4 then\n # The Dx and x are no t specified.\n if assigned(_Envdiffopdomain) then\n # Th e names of Dx and x are in _Envdiffopdomain:\n RETURN(procnam e(L1,L2, op(_Envdiffopdomain)))\n else\n # The two entri es Dx,x are not specified, and\n # these names are also not s pecified in\n # _Envdiffopdomain so we have no way to figure \+ out\n # which variable (here denoted by x) is the\n \+ # independent variable, and which one (here denoted\n # by Dx ) stands for differentiation. So all we can\n # do is:\n \+ ERROR(\"Variables were not specified\")\n fi\n fi;\n if \+ not has(L1,Dx) then\n # Dx does not appear in L1, in other words: \n # degree(L1,Dx)<1. So the product is commutative:\n answe r := L1*L2\n else\n c0:=coeff(L1,Dx,0);\n the_rest := add( coeff(L1,Dx,i)*Dx^(i-1),i=1..degree(L1,Dx));\n # Now L1 = c0 + th e_rest * Dx\n # Now compute Dx*L2 with the formula Dx*a=a'+a*Dx\n DxL2 := diff(L2,x) + L2*Dx;\n answer := c0*L2 + procname(th e_rest,DxL2,Dx,x)\n fi;\n # Now we have the answer, lets apply the f ollowing\n # two commands to make it look nicer:\n answer := collect (answer,Dx,normal);\n # Make sure Maple puts the x on the left and\n \+ # the Dx on the right side:\n sort(answer,[x,Dx])\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "mult(Dx,x);" }}{PARA 8 "" 1 "" {TEXT -1 45 "Error, (in mult) Variables were not specified" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "mult(Dx,x,Dx,x);" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#,&*&%\"xG\"\"\"%#DxGF&F&F&F&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "_Envdiffopdomain := [Dx,x];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%1_EnvdiffopdomainG7$%#DxG%\"xG" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 11 "mult(Dx,x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #,&*&%\"xG\"\"\"%#DxGF&F&F&F&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "mult(Dx^10,x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&%\"xG\"\" \")%#DxG\"#5\"\"\"F&*$)F(\"\"*F*F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "mult(Dx,x^10);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&* &)%\"xG\"#5\"\"\"%#DxG\"\"\"F**$)F&\"\"*F(F'" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "mult(Dx^2+x,Dx^2-x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(*$)%#DxG\"\"%\"\"\"\"\"\"*$)%\"xG\"\"#F(!\"\"F&!\"#" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "mult(Dx^2-x,Dx^2+x);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#,(*$)%#DxG\"\"%\"\"\"\"\"\"*$)%\"xG\" \"#F(!\"\"F&F-" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 257 42 "Division of Linear Differential Operators." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "L1 := x*Dx^5+3*x^2*Dx^3+Dx-1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#L1G,**&%\"xG\"\"\")%#DxG\"\"&\"\"\"F(*&)F'\"\"#F,)F* \"\"$F,F1F*F(!\"\"F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "L2 \+ := 2*Dx^3-x^3*Dx+x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#L2G,(*$)%#Dx G\"\"$\"\"\"\"\"#*&)%\"xGF)F*F(\"\"\"!\"\"F.F/" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 34 "Do a Right-Division, meaning that:" }}{PARA 0 "" 0 " " {TEXT -1 80 "Find an operator Q (right-hand quotient) and R (right-h and remainder) such that:" }}{PARA 0 "" 0 "" {TEXT -1 20 "L1 = Q*L2 + \+ R (*)" }}{PARA 0 "" 0 "" {TEXT -1 4 "AND:" }}{PARA 0 "" 0 "" {TEXT -1 37 "order(R) < order(L2), in other words:" }}{PARA 0 "" 0 "" {TEXT -1 34 "degree(R,Dx) < degree(L2,Dx) (**)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 54 "Note: A left-hand division would b e: L1 = L2 * Ql + Rl" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "Q:=0 ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"QG\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "R:=L1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\" RG,**&%\"xG\"\"\")%#DxG\"\"&\"\"\"F(*&)F'\"\"#F,)F*\"\"$F,F1F*F(!\"\"F (" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "L1 = mult(Q,L2) + R;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/,**&%\"xG\"\"\")%#DxG\"\"&\"\"\"F'* &)F&\"\"#F+)F)\"\"$F+F0F)F'!\"\"F'F$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "degree(R,Dx), degree(L2,Dx);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$\"\"&\"\"$" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 203 "As \+ we can see, with our choice of Q,R, we have that (*) holds, and (**) d oes not hold. Now we want to change Q,R, in such a way that (*) stays \+ true, and that order(R) drops so that we get closer to (**)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 77 "To make the ord er of R go down, we need to eliminate its highest coefficient:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "lcoeff(R,Dx);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#%\"xG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "s := normal(lcoeff(R,Dx)/lcoeff(L2,Dx)) * Dx^(degree(R,Dx) - degre e(L2,Dx));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"sG,$*&%\"xG\"\"\")%# DxG\"\"#\"\"\"#F(F+" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "Q:=Q +s; R:=R-mult(s,L2);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"QG,$*&% \"xG\"\"\")%#DxG\"\"#\"\"\"#F(F+" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>% \"RG,.*&)%\"xG\"\"#\"\"\")%#DxG\"\"$F*F-F,\"\"\"!\"\"F.*&)F(\"\"%F*F+F *#F.F)*(,&F(\"\"'F/F.F.F'F*)F,F)F*F3*(,&F(F-F/F.F.F(F.F,F.F." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "R:=collect(R,Dx,normal);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"RG,**&,&*$)%\"xG\"\"%\"\"\"#\"\"\" \"\"#*$)F*F/F,\"\"$F.)%#DxGF2F,F.*(,&F*\"\"'!\"\"F.F.F1F,)F4F/F,F-*&,& F.F.*&F*F.,&F*F2F8F.F.F.F.F4F.F.F8F." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "normal( L1 - (mult(Q,L2) + R) );" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "0, so (*) still holds, but:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "degre e(R,Dx), degree(L2,Dx);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$\"\"$F#" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "(**) does not yet hold. However, \+ we're getting closer. One more step:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "s := normal(lcoeff(R,Dx)/lcoeff(L2,Dx)) * Dx^(degree( R,Dx) - degree(L2,Dx));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"sG,&*$) %\"xG\"\"%\"\"\"#\"\"\"F)*$)F(\"\"#F*#\"\"$F/" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "Q:=Q+s; R:=R-mult(s,L2);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"QG,(*&%\"xG\"\"\")%#DxG\"\"#\"\"\"#F(F+*$)F'\"\"%F, #F(F0*$)F'F+F,#\"\"$F+" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"RG,,*(,& %\"xG\"\"'!\"\"\"\"\"F+)F(\"\"#\"\"\")%#DxGF-F.#F+F-*&,&F+F+*&F(F+,&F( \"\"$F*F+F+F+F+F0F+F+F*F+*(,&*$F,F.F+F)F+F+)F(\"\"&F.F0F.#F+\"\"%*&F8F .)F(F6F.#F*F=" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "R:=collect (R,Dx,normal);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"RG,**(,&%\"xG\" \"'!\"\"\"\"\"F+)F(\"\"#\"\"\")%#DxGF-F.#F+F-*&,(F+F+*&F(F+,&F(\"\"$F* F+F+F+*&)F(\"\"&F.,&*$F,F.F+F)F+F+#F+\"\"%F+F0F+F+*&F:F.)F(F6F.#F*F=F* F+" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "normal( L1 - (mult(Q, L2) + R) );" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "degree(R,Dx), degree(L2,Dx);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$\"\"#\"\"$" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 52 "Now (*) and (**) both hold. So we have written L1 as" }}{PARA 0 " " 0 "" {TEXT -1 45 "L1 = Q*L2 + R where order(R) < order(L2)." }} {PARA 0 "" 0 "" {TEXT -1 59 "We've computed the (right-hand) quotient \+ Q and remainder R." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 258 31 "Assignment: Write a procedure:\n" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 259 109 "rightdivision := proc(L1 , L2, Dx, x)\n ... compute Q, R as above\n ....\n [Q, R] # Outpu t is Q and R.\nend:" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 80 "You can get hints on how to write this pr ogram from the usual remainder program:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 220 "myREM:=proc(a,b,x)\n local R,Q,s;\n # options trac e;\n R:=a;\n Q:=0;\n while degree(R,x) >= degree(b,x) do\n s:=lc oeff(R,x)/lcoeff(b,x) * x^(degree(R,x)-degree(b,x));\n Q:=Q+s;\n \+ R:=expand(R-s*b)\n od;\n [Q,R]\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "a:=2*x^4-3*x^2; b:=2*x^3-3*x^2+x-1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"aG,&*$)%\"xG\"\"%\"\"\"\"\"#*$)F(F+F*!\"$" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"bG,**$)%\"xG\"\"$\"\"\"\"\"#*$)F(F +F*!\"$F(\"\"\"!\"\"F/" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "m yREM(a,b,x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7$,&%\"xG\"\"\"#\"\"$ \"\"#F&,(*$)F%F)\"\"\"#F&F)F%#!\"\"F)F'F&" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 13 "q,r := op(%);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>6 $%\"qG%\"rG6$,&%\"xG\"\"\"#\"\"$\"\"#F*,(*$)F)F-\"\"\"#F*F-F)#!\"\"F-F +F*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "a = q*b+r;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/,&*$)%\"xG\"\"%\"\"\"\"\"#*$)F'F*F)!\"$,**& ,&F'\"\"\"#\"\"$F*F1F1,**$)F'F3F)F*F+F-F'F1!\"\"F1F1F1F+#F1F*F'#F7F*F2 F1" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "expand(lhs(%) - rhs(% ));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"!" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 3 "OK." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 260 30 "Greatest Common Right Divisor." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 250 "myGCD:=proc(a,b,x)\n loca l r;\n if b=0 then\n # Make a monic, leads to smaller numbers: \n collect(a/lcoeff(a,x), x, normal)\n else\n r:=myREM(a ,b,x);\n r:=r[2]; # 1'st=quotient, 2'nd=remainder\n procna me(b,r,x)\n fi:\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 " myGCD(x^6-1,x^8-1,x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&!\"\"\"\"\" *$)%\"xG\"\"#\"\"\"F%" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 261 245 "Assignment:\nWrite a procedure:\nGCRD := proc(L1,L2, Dx,x)\n \+ ....\n ... use your procedure rightdivision\n ...\nend:\n\nThat \+ computes the Greatest Common Right Divisor of two operators L1, L2. If R=GCRD(L1,L2) then:\n V(R) = V(L1) intersect V(L2)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 133 "Why? Well, during the computation L1 and L2 are constantly changing. L2 is replaced by its \+ remainder modulo L1. So L2 is replaced by:" }}{PARA 0 "" 0 "" {TEXT -1 38 " new_L2 = remainder = L2 - quotient*L1" }}{PARA 0 "" 0 "" {TEXT -1 81 "Now it is not hard to see that V(L1) intersect V(L2) = V( L1) intersect V(new_L2)." }}{PARA 0 "" 0 "" {TEXT -1 359 "So this stay s truth throughtout the algorithm. However, at the end we have that L1 , L2 have become R, 0 (one of the operators becomes 0, that's where t he algorithm ends, and then the other one is the GCRD). So we have V(L 1) intersect V(L2) = V(R) intersect V(0), which equals V(R) because ev ery function in V(R) is automatically a solution of the operator 0." } }}}{MARK "43 5 0" 359 }{VIEWOPTS 1 1 0 1 1 1803 }