{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 Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 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 }{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 "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 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 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 "" {MPLTEXT 1 0 9 "with(MS):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 90 "This example looks at the Lucas numbers t ype I. Consider the linear recurrence relation " }{XPPEDIT 18 0 "b[i ] = b[i-1]+b[i-2];" "6#/&%\"bG6#%\"iG,&&F%6#,&F'\"\"\"\"\"\"!\"\"F,&F% 6#,&F'F,\"\"#F.F," }{TEXT -1 7 " where " }{XPPEDIT 18 0 "b[0] = 2;" "6 #/&%\"bG6#\"\"!\"\"#" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "b[1] = 1;" " 6#/&%\"bG6#\"\"\"\"\"\"" }{TEXT -1 49 ". Multisection this by 8 at 2. Notice that 8 = " }{XPPEDIT 18 0 "2^3;" "6#*$\"\"#\"\"$" }{TEXT -1 42 " and further that 2 = 0 (4) + 1 (2) + 0. " }{TEXT -1 112 " Any me thod can be used to compute the intermediate multisectioning. For thi s example the naive method is used." }}{PARA 0 "" 0 "" {TEXT -1 51 "So the first step is to calculate s^0_2 (x), where " }{XPPEDIT 18 0 "s(x ) = sum(b[i]*x^i/i!,i = 0 .. infinity);" "6#/-%\"sG6#%\"xG-%$sumG6$*(& %\"bG6#%\"iG\"\"\")F'F/F0-%*factorialG6#F/!\"\"/F/;\"\"!%)infinityG" } {TEXT -1 10 " with the " }{XPPEDIT 18 0 "b[i];" "6#&%\"bG6#%\"iG" } {TEXT -1 21 "s defined as above. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "s := b(i) = b(i-1) + b(i-2) , b, i, [b(0) = 2, b(1) = 1];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"sG6&/-%\"bG6#%\"iG,&-F(6#, &F*\"\"\"!\"\"F/F/-F(6#,&F*F/!\"#F/F/F(F*7$/-F(6#\"\"!\"\"#/-F(6#F/F/ " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "t := `egf/ms/naive`(s,2 ,0);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"tG6&/-%\"bG6#%\"iG,&-F(6#, &F*\"\"\"!\"#F/\"\"$-F(6#,&F*F/!\"%F/!\"\"F(F*7&/-F(6#\"\"!\"\"#/-F(6# F/F;/-F(6#F " 0 "" {MPLTEXT 1 0 39 "s2 \+ := readlib(`egf/compress`)(t, 2, 0);" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#>%#s2G6&/-%\"bG6#%\"iG,&-F(6#,&F*\"\"\"!\"\"F/\"\"$-F(6#,&F*F/!\"#F/ F0F(F*7$/-F(6#\"\"!\"\"#/-F(6#F/F1" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 74 "The second step is to calculate the multisectioning of the abov e function " }{XPPEDIT 18 0 "s2;" "6#%#s2G" }{TEXT -1 11 " by 2 at 1. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "t2 := `egf/ms/naive`(s2 , 2, 1);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#t2G6&/-%\"bG6#%\"iG,&-F (6#,&F*\"\"\"!\"#F/\"\"(-F(6#,&F*F/!\"%F/!\"\"F(F*7&/-F(6#\"\"!F;/-F(6 #F/\"\"$/-F(6#\"\"#F;/-F(6#F?\"#=" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "Now compress the result." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "s3 := `egf/compress`(t2, 2, 1);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#s3G6&/-%\"bG6#%\"iG,&-F(6#,&F*\"\"\"!\"\"F/\"\"(-F(6#,&F*F/!\"#F /F0F(F*7$/-F(6#\"\"!\"\"$/-F(6#F/\"#=" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 57 "Now the last step is to multisection the above function \+ " }{XPPEDIT 18 0 "s3;" "6#%#s3G" }{TEXT -1 11 " by 2 at 0." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "t3 := `egf/ms/naive`(s3, 2, 0);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#t3G6&/-%\"bG6#%\"iG,&-F(6#,&F*\"\" \"!\"#F/\"#Z-F(6#,&F*F/!\"%F/!\"\"F(F*7&/-F(6#\"\"!\"\"$/-F(6#F/F;/-F( 6#\"\"#\"$B\"/-F(6#F \+ " 0 "" {MPLTEXT 1 0 31 "s4 := `egf/compress`(t3, 2, 0);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>%#s4G6&/-%\"bG6#%\"iG,&-F(6#,&F*\"\"\"!\"\"F/\" #Z-F(6#,&F*F/!\"#F/F0F(F*7$/-F(6#\"\"!\"\"$/-F(6#F/\"$B\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 83 "Uncompressing this result to gives the an swer, as expected from the other commands." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 36 "readlib(`egf/uncompress`)(s4, 8, 2);" }}{PARA 12 " " 1 "" {XPPMATH 20 "6&/-%\"bG6#%\"iG,&-F%6#,&F'\"\"\"!\")F,\"#Z-F%6#,& F'F,!#;F,!\"\"F%F'72/-F%6#\"\"!F8/-F%6#F,F8/-F%6#\"\"#\"\"$/-F%6#F@F8/ -F%6#\"\"%F8/-F%6#\"\"&F8/-F%6#\"\"'F8/-F%6#\"\"(F8/-F%6#\"\")F8/-F%6# \"\"*F8/-F%6#\"#5\"$B\"/-F%6#\"#6F8/-F%6#\"#7F8/-F%6#\"#8F8/-F%6#\"#9F 8/-F%6#\"#:F8" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 134 "Notice that usi ng the naive method directly to multisection by 8 at 2 gives the same \+ result, but the method takes much longer to work." }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 22 "`egf/ms/naive`(s,8,2);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6&/-%\"bG6#%\"iG,&-F%6#,&F'\"\"\"!\")F,\"#Z-F%6#,&F'F,!#; F,!\"\"F%F'72/-F%6#\"\"!F8/-F%6#F,F8/-F%6#\"\"#\"\"$/-F%6#F@F8/-F%6#\" \"%F8/-F%6#\"\"&F8/-F%6#\"\"'F8/-F%6#\"\"(F8/-F%6#\"\")F8/-F%6#\"\"*F8 /-F%6#\"#5\"$B\"/-F%6#\"#6F8/-F%6#\"#7F8/-F%6#\"#8F8/-F%6#\"#9F8/-F%6# \"#:F8" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 174 "This process has been \+ automated with the Maple command `egf/ma/compress`. That last option \+ of the command specifies to use the naive method to do the underlying \+ computation." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "`egf/ms/com press`(s, 8, 2, naive);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6&/-%\"bG6#% \"iG,&-F%6#,&F'\"\"\"!\")F,\"#Z-F%6#,&F'F,!#;F,!\"\"F%F'72/-F%6#\"\"!F 8/-F%6#F,F8/-F%6#\"\"#\"\"$/-F%6#F@F8/-F%6#\"\"%F8/-F%6#\"\"&F8/-F%6# \"\"'F8/-F%6#\"\"(F8/-F%6#\"\")F8/-F%6#\"\"*F8/-F%6#\"#5\"$B\"/-F%6#\" #6F8/-F%6#\"#7F8/-F%6#\"#8F8/-F%6#\"#9F8/-F%6#\"#:F8" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "Which gives the same results." }}}}{MARK "16 0 \+ 0" 107 }{VIEWOPTS 1 1 0 1 1 1803 }