{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 "" 0 1 0 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 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 2 6 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 2 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "M aple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 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 }{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 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 36 "L-15 MCS 320 Monday 17 Feb ruary 2003" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 130 "#2. 6 Explain the difference between the symbolic and numerical facto rization of a polynomial in one variable into linear factors." } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 151 "Answer: the \+ numerical factorization consists in finding all complex roots. Symbol ically, we add formal roots, extending the field of rational numbers. " }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "p := x^3 + 2*x - 1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"pG,(*$)%\"xG\" \"$\"\"\"F**&\"\"#F*F(F*F*F*!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "r := fsolve(p,x,complex);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"rG6%^$$!+e#))pE#!#5$!+4:rn9!\"*^$F'$\"+4:rn9F,$\"+: l(R`%F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "nf := (x-r[1])*( x-r[2])*(x-r[3]);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%#nfG*(,&%\"xG\" \"\"^$$\"+e#))pE#!#5$\"+4:rn9!\"*F(F(,&F'F(^$F*$!+4:rn9F/F(F(,&F'F($\" +:l(R`%F,!\"\"F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "expand( nf) - p;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&$\"\"\"!#5F&)%\"xG\"\" #F&F&*&$F&!\"*F&F)F&F&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "f actor(p);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(*$)%\"xG\"\"$\"\"\"F(*& \"\"#F(F&F(F(F(!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "ali as(alpha=RootOf(p));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%&alphaG" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "q := evala(p/(x-alpha));" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"qG,**$)%\"xG\"\"#\"\"\"F**&%&alpha GF*F(F*F*F)F**$)F,F)F*F*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "alias(beta=RootOf(q));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$%&alphaG%%b etaG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "q1 := evala(q/(x-be ta));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#q1G,(%\"xG\"\"\"%&alphaGF' %%betaGF'" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "sf := (x-alpha )*(x-beta)*q1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#sfG*(,&%\"xG\"\" \"%&alphaG!\"\"F(,&F'F(%%betaGF*F(,(F'F(F)F(F,F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "expand(sf);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,.*$)%\"xG\"\"$\"\"\"F(*(F&F(%%betaGF(%&alphaGF(!\"\"*&F&F()F*\" \"#F(F,*&)F+F/F(F&F(F,*&F*F(F1F(F(*&F.F(F+F(F(" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 9 "evala(%);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,( *$)%\"xG\"\"$\"\"\"F(*&\"\"#F(F&F(F(F(!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "evalf(alpha); evalf(beta);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+:l(R`%!#5" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#^$$!+e #))pE#!#5$\"+4:rn9!\"*" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 55 "#2. 8 G ive the Maple command to build the expression..." }{MPLTEXT 1 0 0 "" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "sum(c['i']*product(x['j',' i'],'j'=0..2),'i'=0..17);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#,F**&%\"c G6#\"\"!\"\"\"&%\"xG6$F(F(F)&F+6$F)F(F)&F+6$\"\"#F(F)F)**&F&6#F)F)&F+6 $F(F)F)&F+6$F)F)F)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##*F*)F,\"\"'F*F**&\"#VF*)F,F&F*F**&\"#iF*)F,\"\"% F*F'*&\"#xF*)F,\"\"$F*F**&\"#mF*)F,\"\"#F*F**&\"#aF*F,F*F*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "codegen[cost](p);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&\"#:\"\"\"%*additionsGF&F&*&\"$?\"F&%0multiplica tionsGF&F&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "codegen[cost] (convert(p,horner));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&\"#:\"\"\" %*additionsGF&F&*&F%F&%0multiplicationsGF&F&" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 90 "In general we need d additions and d multiplications to evaluate a polynomial of degree d." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 40 "#2.7 Give the Maple command to transform " }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "p := (x+(z^2+1))*(y-(z^2+1));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"pG*&, (%\"xG\"\"\"*$)%\"zG\"\"#F(F(F(F(F(,(%\"yGF(F)!\"\"F(F/F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "pu := algsubs(z^2+1=u,p);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#puG*&,&%\"xG\"\"\"%\"uGF(F(,&%\"yGF(F)!\" \"F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "epu := expand(pu); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$epuG,**&%\"xG\"\"\"%\"yGF(F(*&F 'F(%\"uGF(!\"\"*&F+F(F)F(F(*$)F+\"\"#F(F," }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 18 "subs(u=z^2+1,epu);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,**&%\"xG\"\"\"%\"yGF&F&*&F%F&,&*$)%\"zG\"\"#F&F&F&F&F&!\"\"*&F)F&F 'F&F&*$)F)F-F&F." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 8 "#2.3(c) " } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "p := 2*x^3 + 4*x + 3;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"pG,(*&\"\"#\"\"\")%\"xG\"\"$F(F( *&\"\"%F(F*F(F(F+F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "alia s(alpha=RootOf(p));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%&alphaG" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "q := evala(p/(x-alpha));" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"qG,**&\"\"#\"\"\")%\"xGF'F(F(*(F'F (%&alphaGF(F*F(F(\"\"%F(*&F'F()F,F'F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "Expand(q*(x-alpha)) mod 5;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(*&\"\"#\"\"\")%\"xG\"\"$F&F&*&\"\"%F&F(F&F&F)F&" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 14 "To answer (b):" }{MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "Expand((alpha+1)^7) mod 5;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*$)%&alphaG\"\"#\"\"\"F(F&F( " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "evala((alpha+1)^7) mod \+ 5;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&-%'RootOfG6#,(*$)%#_ZG\"\"$\" \"\"F,*&\"\"#F,F*F,F,\"\"%F,F,*$)F$F.F,F," }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 14 "To answer (a):" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 17 "Irreduc(p) mod 5;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%%trueG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "F actor(p) mod 5;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(*&\"\"#\"\"\")%\" xG\"\"$F&F&*&\"\"%F&F(F&F&F)F&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 8 " #2.5 (c)" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "p := x^16 - 3*x^4 + 9;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"pG,( *$)%\"xG\"#;\"\"\"F**&\"\"$F*)F(\"\"%F*!\"\"\"\"*F*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "codegen[C](p,'optimized');" }}{PARA 6 "" 1 "" {TEXT -1 15 " t1 = x*x;" }}{PARA 6 "" 1 "" {TEXT -1 17 " \+ t2 = t1*t1;" }}{PARA 6 "" 1 "" {TEXT -1 17 " t3 = t2*t2;" }} {PARA 6 "" 1 "" {TEXT -1 17 " t4 = t3*t3;" }}{PARA 6 "" 1 "" {TEXT -1 25 " t6 = t4-3.0*t2+9.0;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "py := algsubs(x^4=y,p);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#pyG,(*&\"\"$\"\"\"%\"yGF(!\"\"*$)F)\"\"%F(F(\"\"*F(" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "pyz := algsubs(y^2=z,py);" } }{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$pyzG,(*&\"\"$\"\"\"%\"yGF(!\"\"\" \"*F(*$)%\"zG\"\"#F(F(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 81 "For thi s polynomial, we need 5 multiplications, one addition and one subtract ion." }{MPLTEXT 1 0 0 "" }}}}{MARK "45 0 0" 81 }{VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }