{VERSION 3 0 "SUN SPARC SOLARIS" "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 "Hyperlink" -1 17 "" 0 1 0 128 128 1 0 0 1 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 "2 D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" 20 256 " " 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 259 "" 0 1 0 116 103 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 128 20 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 64 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 24 59 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 271 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 272 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 274 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 275 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 276 "Symbol" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 277 "Symb ol" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 278 "Symbol" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 279 "Symbol" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 280 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 281 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 282 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 283 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 284 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 285 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 286 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 287 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 288 "" 1 12 0 0 0 0 0 2 2 0 0 0 0 0 0 } {CSTYLE "" -1 289 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 290 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 291 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 292 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 293 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 294 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 295 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 296 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 297 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 298 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 299 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 300 "" 0 1 0 0 7 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 301 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 302 "" 0 1 0 0 236 0 0 1 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 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "W arning" 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 }{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 }{PSTYLE "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 24 0 0 0 0 0 1 0 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "" 18 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }2 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {SECT 1 {PARA 256 "" 0 "" {TEXT -1 48 "Chapter 2\n\nThe First \+ Steps: Calculus on Numbers\n" }}{PARA 0 "" 0 "" {TEXT 288 65 "\251 Cop yright 1997, Latin American Maple Center, Petr\363polis, Brasil" }} {PARA 0 "" 0 "" {HYPERLNK 17 "About the Worksheets" 1 "about.mws" "" } }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 0 "" 0 "" {TEXT 257 2 "1." }{TEXT -1 38 " Consider the following Maple session\n" }{TEXT 0 20 " > 3^2:\n > 4^2;\n" }{TEXT -1 13 " " }{TEXT 2 30 " " }{TEXT 20 2 "16" }{TEXT 2 1 "\n" } {TEXT 0 13 " > % + %%;\n" }{TEXT 256 78 "does the last instruction m ake sense? If so, what is the result? if not, why?\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "3^2:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "4^2; " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "% + %%;" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#\"#D" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 39 "Yes . Maple adds the last power result (" }{TEXT 0 1 "%" }{TEXT -1 32 ") t o the power before this one (" }{TEXT 0 2 "%%" }{TEXT -1 2 ")." }} {PARA 0 "" 0 "" {TEXT -1 88 "The first power is not displayed because \+ the author has used a colon to hide the output." }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 258 2 "2." }{TEXT -1 67 " Explain the different results of the following Maple co mmands.\n " }{TEXT 297 4 "(a) " }{TEXT 0 5 " x:y;" }{TEXT -1 4 "\n \+ " }{TEXT 298 3 "(b)" }{TEXT -1 1 " " }{TEXT 0 5 " x/y;" }{TEXT -1 4 " \n " }{TEXT 299 3 "(c)" }{TEXT -1 1 " " }{TEXT 0 6 " x\\y;\n" }} {SECT 1 {PARA 0 "" 0 "" {TEXT 300 3 "(a)" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 " x:y;" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#%\"yG" }}}{PARA 0 "" 0 "" {TEXT -1 33 "The command shows only the te rm \"" }{TEXT 260 1 "y" }{TEXT -1 22 "\" and hides the term \"" } {TEXT 259 1 "x" }{TEXT -1 54 "\". Don't confuse the colon with the div ision operator " }{TEXT 0 1 "/" }{TEXT -1 1 "." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 301 3 "(b)" } }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "x/y;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#*&% \"xG\"\"\"%\"yG!\"\"" }}}{PARA 0 "" 0 "" {TEXT -1 51 "The previous com mand shows a quotient of two terms." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 302 3 "(c)" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "x\\y;" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#xyG" }}}{PARA 0 "" 0 "" {TEXT -1 48 "The backslash just concatenates the expressions " } {TEXT 263 1 "x" }{TEXT -1 5 " and " }{TEXT 264 1 "y" }{TEXT -1 15 " in this order." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 261 2 "3." }{TEXT -1 82 " In this exercise you can practice your skills in using the help system of Maple.\n" } {TEXT 289 3 "(a)" }{TEXT -1 61 " Suppose that you can want to select f rom an equation, e.g., " }{XPPEDIT 18 0 "1=cos(x)^2+sin(x)^2" "6#/\"\" \",&*$-%$cosG6#%\"xG\"\"#\"\"\"*$-%$sinG6#F*\"\"#F," }{TEXT -1 69 ", o nly the left or right side. How can you easily do this in Maple?\n\n" }{TEXT 290 3 "(b)" }{TEXT -1 162 " Suppose that you want to compute th e continued fraction approximation of the exponential function; can Ma ple do this for you? If yes, carry out the computation.\n" }{TEXT 291 3 "(c)" }{TEXT -1 49 " Suppose that you want to factor the polynomial \+ " }{XPPEDIT 18 0 "x^8+x^6+10*x^3+8*x^2+2*x+8" "6#,.*$%\"xG\"\")\"\"\" *$F%\"\"'F'*&\"#5F'*$F%\"\"$F'F'*&\"\")F'*$F%\"\"#F'F'*&\"\"#F'F%F'F' \"\")F'" }{TEXT -1 69 " modulo 13. Can Maple do this? If yes, carry ou t this factorization.\n" }{TEXT 292 4 "\n(d)" }{TEXT -1 59 " Suppose t hat you want to determine all subsets of the set " }{XPPEDIT 18 0 "\{1 ,2,3,4,5\}" "6#<'\"\"\"\"\"#\"\"$\"\"%\"\"&" }{TEXT -1 32 ". How can y ou do this in Maple?\n" }}{SECT 1 {PARA 0 "" 0 "" {TEXT 262 3 "(a)" } {TEXT -1 1 " " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "1 = cos(x)^2 + sin(x)^2;" } }{PARA 11 "" 1 "" {XPPMATH 20 "6#/\"\"\",&*$)-%$cosG6#%\"xG\"\"#\"\"\" F$*$)-%$sinGF*F,F-F$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "lhs( %); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"\"" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 8 "rhs(%%);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&* $)-%$cosG6#%\"xG\"\"#\"\"\"\"\"\"*$)-%$sinGF(F*F+F," }}}{PARA 0 "" 0 " " {TEXT -1 9 "The name " }{TEXT 0 3 "lhs" }{TEXT -1 12 " stands for " }{TEXT 0 1 "l" }{TEXT -1 4 "eft-" }{TEXT 0 1 "h" }{TEXT -1 4 "and " } {TEXT 0 1 "s" }{TEXT -1 5 "ide; " }{TEXT 0 3 "rhs" }{TEXT -1 12 " stan ds for " }{TEXT 0 1 "r" }{TEXT -1 5 "ight-" }{TEXT 0 1 "h" }{TEXT -1 4 "and " }{TEXT 0 1 "s" }{TEXT -1 4 "ide." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 265 3 "(b)" } {TEXT -1 1 " " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "convert(exp(x), confrac, x) ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&\"\"\"F$*&%\"xG\"\"\",&F$F$*&F& F',&!\"#F$*&F&F',&!\"$F$*&F&F',&\"\"#F$F&#F$\"\"&!\"\"F$F4F$F4F$F4F$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 266 3 "(c)" }{TEXT -1 1 " " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "Factor(x^8+x^6+10*x^3+8*x^2+2*x+8) mod 13;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#**,(*$)%\"xG\"\"#\"\"\"\"\"\"F'\"\")\"\"*F*F*,(*$)F'\" \"$F)F*F'\"\"'\"\"%F*F*,&F'F*\"\"(F*F*,(F%F*F'\"#6\"#7F*F*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 267 3 "(d)" }{TEXT -1 2 " \n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "with(combina t):" }}{PARA 7 "" 1 "" {TEXT -1 31 "Warning, new definition for Chi" } }}{PARA 0 "" 0 "" {TEXT -1 43 "Two ways to compute the set of all subs ets:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "powerset(5);" }} {PARA 12 "" 1 "" {XPPMATH 20 "6# " 0 "" {MPLTEXT 1 0 22 "powerset(\{1,2,3,4,5\});" }} {PARA 12 "" 1 "" {XPPMATH 20 "6# " 0 "" {MPLTEXT 1 0 70 "S := subsets(\{1,2,3,4,5\}): \nwhile not S[finished] do S[nextvalue]() od;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<\"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<#\"\"\"" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#<#\"\"#" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<#\"\"$" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<#\"\"%" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#<#\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<$\" \"\"\"\"#" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<$\"\"\"\"\"$" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<$\"\"\"\"\"%" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<$\"\"\"\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<$\"\"#\"\"$" } }{PARA 11 "" 1 "" {XPPMATH 20 "6#<$\"\"#\"\"%" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<$\"\"#\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<$\"\"$ \"\"%" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<$\"\"$\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<$\"\"%\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<% \"\"\"\"\"#\"\"$" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<%\"\"\"\"\"#\"\"% " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<%\"\"\"\"\"#\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<%\"\"\"\"\"$\"\"%" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<%\"\"\"\"\"$\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<%\"\"\"\" \"%\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<%\"\"#\"\"$\"\"%" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#<%\"\"#\"\"$\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<%\"\"#\"\"%\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<% \"\"$\"\"%\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<&\"\"\"\"\"#\"\"$ \"\"%" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<&\"\"\"\"\"#\"\"$\"\"&" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#<&\"\"\"\"\"#\"\"%\"\"&" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#<&\"\"\"\"\"$\"\"%\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<&\"\"#\"\"$\"\"%\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<'\"\"\"\"\"#\"\"$\"\"%\"\"&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 268 2 "4." }{TEXT -1 10 " \+ Load the " }{TEXT 0 9 "numtheory" }{TEXT -1 21 " package by entering \+ " }{TEXT 0 16 "with(numtheory);" }{TEXT -1 140 " You may recognize som e functions from number theory; some of the routines in this package a re useful in answering the following questions.\n" }{TEXT 293 4 "\n(a) " }{TEXT -1 64 " Build a list of all integers that divide 987654321012 3456789.\n\n" }{TEXT 294 3 "(b)" }{TEXT -1 64 " Find the prime number \+ that is closest to 9876543210123456789.\n\n" }{TEXT 295 3 "(c)" } {TEXT -1 36 " What is the prime factorization of " }{XPPEDIT 18 0 "5^( 5^(5^5)):" "6#)\"\"&)\"\"&*$\"\"&\"\"&" }{TEXT -1 3 "?\n\n" }{TEXT 296 3 "(d)" }{TEXT -1 90 " Expand the base E of the natural logarithm \+ as a continued fraction up to 10 levels deep.\n" }}{SECT 1 {PARA 0 "" 0 "" {TEXT 269 3 "(a)" }{TEXT -1 1 " " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with(numtheory);" }}{PARA 7 "" 1 "" {TEXT -1 33 "Warning, new definit ion for order" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#7gn%\"BG%\"FG%&GIgcdG %\"JG%\"LG%\"MG%*bernoulliG%)bigomegaG%&cfracG%)cfracpolG%+cyclotomicG %)divisorsG%&eulerG%)factorEQG%*factorsetG%'fermatG%(ifactorG%)ifactor sG%)imagunitG%&indexG%/integral_basisG%)invcfracG%'invphiG%'isolveG%(i sprimeG%*issqrfreeG%)ithprimeG%'jacobiG%*kroneckerG%'lambdaG%)legendre G%)mcombineG%)mersenneG%*minkowskiG%(mipolysG%%mlogG%'mobiusG%&mrootG% &msqrtG%)nearestpG%*nextprimeG%*nthconverG%)nthdenomG%)nthnumerG%'nthp owG%&orderG%)pdexpandG%$phiG%*pprimrootG%*prevprimeG%)primrootG%(quadr esG%+rootsunityG%*safeprimeG%&sigmaG%*sq2factorG%(sum2sqrG%$tauG%%thue G" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "divisors(9876543210123 456789);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#\",fxxxx&\"-xKL LL<\"+VWWWW\",HLLLL\"\"04V.uSNA\"\"0FH5AA1n$\"1\"y3jm'=,6\"/zjabbBG\"/ P\"Rmm1Z)\"0d,C'HOF<\"0r/s)))3#=&\"189;mmia:\"/n#4AAi)R\"0,yimme>\"\"' ,Lu\"&f!>\"&xr&\"4@ur8+p$R(4\"\"4jA:T+2\"=#H$\"3^KZ&p(pWKD\"3`(>k3$4M( f(\"+BAAAA\"+pmmmm\"*r,%4<\"*80#G^\"#8\"#R\"$<\"\"\"\"\"\"$\"\"*\"2 " 0 "" {MPLTEXT 1 0 23 "sort(convert(%, list));" }} {PARA 12 "" 1 "" {XPPMATH 20 "6#7R\"\"\"\"\"$\"\"*\"#8\"#R\"$<\"\"%`j \"%p*)\"&f!>\"&2p#\"&xr&\"&@2)\"&*e#)\"'(f;\"\"'nxC\"'\"z\\$\"',Lu\"(t $\\5\")d+)p&\"*r,%4<\"*80#G^\"*T2uS(\"+\"[\"[\"[\"\"+BAAAA\"+VWWWW\"+p mmmm\",HLLLL\"\",`#f#f#>\",fxxxx&\"-xKLLL<\".$z[=&=T*\"/*3.uS(G8\"/zja bbBG\"/n#4AAi)R\"/P\"Rmm1Z)\"0,yimme>\"\"04V.uSNA\"\"0d,C'HOF<\"0FH5AA 1n$\"0r/s)))3#=&\"1\"y3jm'=,6\"189;mmia:\"2k3$4M(f(\"4@ur8+p$R(4\"\"4jA:T+2\"=#H$\"4*ycM75Kaw)*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 270 3 "(b)" }{TEXT -1 1 " " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with(numtheory );" }}{PARA 7 "" 1 "" {TEXT -1 33 "Warning, new definition for order" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#7gn%\"BG%\"FG%&GIgcdG%\"JG%\"LG%\"MG %*bernoulliG%)bigomegaG%&cfracG%)cfracpolG%+cyclotomicG%)divisorsG%&eu lerG%)factorEQG%*factorsetG%'fermatG%(ifactorG%)ifactorsG%)imagunitG%& indexG%/integral_basisG%)invcfracG%'invphiG%'isolveG%(isprimeG%*issqrf reeG%)ithprimeG%'jacobiG%*kroneckerG%'lambdaG%)legendreG%)mcombineG%)m ersenneG%*minkowskiG%(mipolysG%%mlogG%'mobiusG%&mrootG%&msqrtG%)neares tpG%*nextprimeG%*nthconverG%)nthdenomG%)nthnumerG%'nthpowG%&orderG%)pd expandG%$phiG%*pprimrootG%*prevprimeG%)primrootG%(quadresG%+rootsunity G%*safeprimeG%&sigmaG%*sq2factorG%(sum2sqrG%$tauG%%thueG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "p := 9876543210123456789;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"pG\"4*ycM75Kaw)*" }}}{PARA 0 "" 0 "" {TEXT -1 50 "We compute the smallest prime number greater than " } {XPPEDIT 18 0 "p" "6#%\"pG" }{TEXT -1 30 " and calculate the differenc e." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "nextprime(p);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"4.oXB,@Vl()*" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 6 "% - p;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#9 " }}}{PARA 0 "" 0 "" {TEXT -1 46 "We compute the largest prime number \+ less than " }{XPPEDIT 18 0 "p" "6#%\"pG" }{TEXT -1 30 " and calculate \+ the difference." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "prevprime (p);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"4\"ycM75Kaw)*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "p - %;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\")" }}}{PARA 0 "" 0 "" {TEXT -1 68 "We conclude that 98765432 10123456781 is the prime number closest to " }{XPPEDIT 18 0 "p" "6#%\" pG" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 17 "In one statement:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 104 "if nextprime(p)-p > p-pre vprime(p) then \n closest := prevprime(p) \nelse \n closest := nextp rime(p) \nfi;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%(closestG\"4\"ycM75 Kaw)*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 271 3 "(c)" }{TEXT -1 1 " " }}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with(numtheory);" }}{PARA 7 "" 1 "" {TEXT -1 33 "Warning, new \+ definition for order" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#7gn%\"BG%\"FG% &GIgcdG%\"JG%\"LG%\"MG%*bernoulliG%)bigomegaG%&cfracG%)cfracpolG%+cycl otomicG%)divisorsG%&eulerG%)factorEQG%*factorsetG%'fermatG%(ifactorG%) ifactorsG%)imagunitG%&indexG%/integral_basisG%)invcfracG%'invphiG%'iso lveG%(isprimeG%*issqrfreeG%)ithprimeG%'jacobiG%*kroneckerG%'lambdaG%)l egendreG%)mcombineG%)mersenneG%*minkowskiG%(mipolysG%%mlogG%'mobiusG%& mrootG%&msqrtG%)nearestpG%*nextprimeG%*nthconverG%)nthdenomG%)nthnumer G%'nthpowG%&orderG%)pdexpandG%$phiG%*pprimrootG%*prevprimeG%)primrootG %(quadresG%+rootsunityG%*safeprimeG%&sigmaG%*sq2factorG%(sum2sqrG%$tau G%%thueG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "5^(5^(5^5)):" } }{PARA 8 "" 1 "" {TEXT -1 35 "Error, integer too large in context" }}} {PARA 0 "" 0 "" {TEXT -1 123 "A typical case where thinking before act ing helps. The attempted input is a power of the prime number 5 to a h igh exponent " }{XPPEDIT 18 0 "e" "6#%\"eG" }{TEXT -1 40 ". Therefore, the prime factorization is " }{XPPEDIT 18 0 "5^e" "6#)\"\"&%\"eG" } {TEXT -1 85 ". For your interest, the exponent is an integer with 2185 digits in decimal notation." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "e := 5^(5^5):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "length (e);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"%&=#" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 272 3 "(d) " }{TEXT -1 1 " " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with(numtheory);" }} {PARA 7 "" 1 "" {TEXT -1 33 "Warning, new definition for order" }} {PARA 12 "" 1 "" {XPPMATH 20 "6#7gn%\"BG%\"FG%&GIgcdG%\"JG%\"LG%\"MG%* bernoulliG%)bigomegaG%&cfracG%)cfracpolG%+cyclotomicG%)divisorsG%&eule rG%)factorEQG%*factorsetG%'fermatG%(ifactorG%)ifactorsG%)imagunitG%&in dexG%/integral_basisG%)invcfracG%'invphiG%'isolveG%(isprimeG%*issqrfre eG%)ithprimeG%'jacobiG%*kroneckerG%'lambdaG%)legendreG%)mcombineG%)mer senneG%*minkowskiG%(mipolysG%%mlogG%'mobiusG%&mrootG%&msqrtG%)nearestp G%*nextprimeG%*nthconverG%)nthdenomG%)nthnumerG%'nthpowG%&orderG%)pdex pandG%$phiG%*pprimrootG%*prevprimeG%)primrootG%(quadresG%+rootsunityG% *safeprimeG%&sigmaG%*sq2factorG%(sum2sqrG%$tauG%%thueG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "cfrac(exp(1), 10);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&\"\"#\"\"\"*&\"\"\"F',&F%F%*&F'F',&F$F%*&F'F',&F %F%*&F'F',&F%F%*&F'F',&\"\"%F%*&F'F',&F%F%*&F'F',&F%F%*&F'F',&\"\"'F%* &F'F',&F%F%*&F'F',&F%F%%$...GF%!\"\"F%F>F%F>F%F>F%F>F%F>F%F>F%F>F%F>F% F>F%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 273 2 "5." }{TEXT -1 42 " In Maple, what is the \+ difference between " }{XPPEDIT 18 0 "1/3+1/3+1/3" "6#,(*&\"\"\"\"\"\" \"\"$!\"\"F&*&\"\"\"F&\"\"$F(F&*&\"\"\"F&\"\"$F(F&" }{TEXT -1 5 " and \+ " }{XPPEDIT 18 0 "1.0/3.0+1.0/3.0+1.0/3.0" "6#,(*&$\"#5!\"\"\"\"\"$\"# I!\"\"!\"\"F(*&$\"#5!\"\"F($\"#I!\"\"F,F(*&$\"#5!\"\"F($\"#I!\"\"F,F( " }{TEXT -1 3 " ?\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restar t;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "1/3 + 1/3 + 1/3;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "1.0/3.0 + 1.0/3.0 + 1.0/3.0;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+**********!#5" }}}{PARA 0 "" 0 "" {TEXT -1 275 "In \+ the first calculation, Maple computes with rational numbers doing exac t arithmetic. In the second calculation it computes with floating-poin t number doing approximate computations (with round-off errors). A fur ther illustration of approximate computation is the following:" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "% + 1.0;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+++++?!\"*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 274 2 "6." }{TEXT -1 42 " Fin d the floating-point approximation of " }{XPPEDIT 18 0 "exp(1)^(Pi*sqr t(163)/3)" "6#)-%$expG6#\"\"\"*(%#PiG\"\"\"-%%sqrtG6#\"$j\"F*\"\"$!\" \"" }{TEXT -1 59 " using a precision of 10, 20, and 30 digits, respect ively.\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "exp(1/3*Pi*sqrt(163));" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#-%$expG6#,$*&%#PiG\"\"\"-%%sqrtG6#\"$j \"\"\"\"#F)\"\"$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "evalf(% ,10);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+)***>.k!\"%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "evalf(%%,20);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"5V01++++?.k!#9" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "evalf(%%%,30);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\" ?O!\\]tj[g+++++KS'!#C" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}}{SECT 1 {PARA 0 "" 0 "" {TEXT 275 2 "7." }{TEXT -1 11 " Calculate \+ " }{XPPEDIT 18 0 "Pi^(Pi^Pi))" "6#)%#PiG)F$F$" }{TEXT -1 25 " to nine \+ decimal places.\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "x := Pi^(Pi^Pi);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"xG)%#PiG)F&F&" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 11 "evalf(x,9);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"*mj,M\"\"#5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "evalf( x,10);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+SU;S8\"\"*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "seq( evalf(x,k), k=11..15);" }} {PARA 12 "" 1 "" {XPPMATH 20 "6'$\",W=k,M\"\"\")$\"-+$=k,M\"\"\"($\".G I=k,M\"\"\"'$\"/m+$=k,M\"\"\"&$\"0)f+$=k,M\"\"\"%" }}}{PARA 0 "" 0 "" {TEXT -1 126 "Apparently, you have to raise the precision up to 12 or \+ 13 to see convergeance in the first nine deimals of the approximation. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 280 2 "8." }{TEXT -1 107 " Compute this exercise in a float ing-point precision of eight decimal places. What is the result of \n3 10.0 " }{TEXT 276 1 "\264" }{TEXT -1 7 " 320.0 " }{TEXT 277 1 "\264" } {TEXT -1 7 " 330 - " }{XPPEDIT 18 0 "sqrt(310.0*320.0)" "6#-%%sqrtG6#* &$\"%+J!\"\"\"\"\"$\"%+K!\"\"F*" }{TEXT 278 2 " \264" }{TEXT -1 1 " " }{XPPEDIT 18 0 "sqrt(320.0*330.0)" "6#-%%sqrtG6#*&$\"%+K!\"\"\"\"\"$\" %+L!\"\"F*" }{TEXT 279 2 " \264" }{TEXT -1 1 " " }{XPPEDIT 18 0 " sqrt (330.0*310.0)" "6#-%%sqrtG6#*&$\"%+L!\"\"\"\"\"$\"%+J!\"\"F*" }{TEXT -1 2 "?\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "Digits := 8:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "310.0 * 320.0 * 330.0 -\nsqrt(310.0 *320.0) * sqrt(320.0*330.0) * sqrt(330.0*310.0);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$!\"\"\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 281 2 "9." }{TEXT -1 38 " Do yo u remember which of the numbers " }{XPPEDIT 18 0 "19/6" "6#*&\"#>\"\" \"\"\"'!\"\"" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "22/7" "6#*&\"#A\"\"\"\" \"(!\"\"" }{TEXT -1 6 ", and " }{XPPEDIT 18 0 "25/8" "6#*&\"#D\"\"\"\" \")!\"\"" }{TEXT -1 44 " is a fairly good rational approximation of " }{XPPEDIT 18 0 "Pi" "6#%#PiG" }{TEXT -1 90 "? Use Maple to find the be st of these three numbers. Find the best rational approximation " } {XPPEDIT 18 0 "a/b" "6#*&%\"aG\"\"\"%\"bG!\"\"" }{TEXT -1 4 " of " } {XPPEDIT 18 0 "Pi" "6#%#PiG" }{TEXT -1 8 ", where " }{XPPEDIT 18 0 "a " "6#%\"aG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 87 " are natural numbers less than 1000 (Hint: look at the continue d fraction expansion of " }{XPPEDIT 18 0 "Pi" "6#%#PiG" }{TEXT -1 4 ") .\n " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "convert(evalf(Pi), confrac, cvgts); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7(\"\"$\"\"(\"#:\"\"\"\"$$H\"#6" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "cvgts;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7(\"\"$#\"#A\"\"(#\"$L$\"$1\"#\"$b$\"$8\"#\"'[V5\"&:K$# \"($=[6\"'yaO" }}}{PARA 0 "" 0 "" {TEXT -1 4 "So, " }{XPPEDIT 18 0 "22 /7" "6#*&\"#A\"\"\"\"\"(!\"\"" }{TEXT -1 49 " is the best approximatio n of the given ones and " }{XPPEDIT 18 0 "355/113" "6#*&\"$b$\"\"\"\"$ 8\"!\"\"" }{TEXT -1 42 " is the best with integers less than 1000." }} {PARA 0 "" 0 "" {TEXT -1 64 "The same result you get with the appropri ate procedues from the " }{TEXT 0 9 "numtheory" }{TEXT -1 9 " package. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with(numtheory):" }} {PARA 7 "" 1 "" {TEXT -1 33 "Warning, new definition for order" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "pi := cfrac(Pi);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#piG,&\"\"$\"\"\"*&\"\"\"F),&\"\"(F'*&F)F) ,&\"#:F'*&F)F),&F'F'*&F)F),&\"$#HF'*&F)F),&F'F'*&F)F),&F'F'*&F)F),&F'F '*&F)F),&\"\"#F'*&F)F),&F'F'*&F)F),&F&F'%$...GF'!\"\"F'FBF'FBF'FBF'FBF 'FBF'FBF'FBF'FBF'FBF'" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "se q(nthconver(pi,k), k=1..10);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6,#\"#A \"\"(#\"$L$\"$1\"#\"$b$\"$8\"#\"'$*R5\"&-J$#\"'[V5\"&:K$#\"'T$3#\"&P$)\"'\"Ql##\"(3k9\"\"'8\\O#\"(VHF%\"(?,O\"" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 " " {TEXT 282 3 "10." }{TEXT -1 12 " Check that " }{XPPEDIT 18 0 "sqrt(2 *sqrt(19549)+286)" "6#-%%sqrtG6#,&*&\"\"#\"\"\"-F$6#\"&\\&>F)F)\"$'GF) " }{TEXT -1 13 " is equal to " }{XPPEDIT 18 0 "sqrt(113)+sqrt(173)" "6 #,&-%%sqrtG6#\"$8\"\"\"\"-F%6#\"$t\"F(" }{TEXT -1 2 ".\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 26 "'sqrt(2*sqrt(19549)+286)';" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%%sqrtG6#,&-F$6#\"&\\&>\"\"#\"$'G\"\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "%;" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#,&*$-%%sqrtG6#\"$t\"\"\"\"\"\"\"*$-F&6#\"$8\"F)F*" }}}{PARA 0 "" 0 " " {TEXT -1 8 "Maple's " }{TEXT 0 4 "sqrt" }{TEXT -1 185 " function aut omatically simplifies nested square roots of numbers. But if you had u sed fractional powers instead of the sqrt function it would have been \+ neccessary to simplify with the " }{TEXT 0 8 "simplify" }{TEXT -1 11 " procedure." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "(2*(19549)^(1 /2)+286)^(1/2);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#*$-%%sqrtG6#,&*$-F% 6#\"&\\&>\"\"\"\"\"#\"$'G\"\"\"F," }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*$- %%sqrtG6#\"$t\"\"\"\"\"\"\"*$-F&6#\"$8\"F)F*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 283 3 "11." } {TEXT -1 21 " In Maple, transform " }{XPPEDIT 18 0 "1/(sqrt(3)+1)" "6# *&\"\"\"\"\"\",&-%%sqrtG6#\"\"$F%\"\"\"F%!\"\"" }{TEXT -1 32 " into an expression of the form " }{XPPEDIT 18 0 "a+b*sqrt(3)" "6#,&%\"aG\"\" \"*&%\"bGF%-%%sqrtG6#\"\"$F%F%" }{TEXT -1 24 ", with rational numbers \+ " }{XPPEDIT 18 0 "a" "6#%\"aG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 2 ".\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "1/(sqrt(3)+1); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#*&\"\"\"F$,&*$-%%sqrtG6#\"\"$F$\" \"\"F+F+!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "rationaliz e(%);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&#!\"\"\"\"#\"\"\"*$-%%sqrtG 6#\"\"$\"\"\"#F'F&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 1 {PARA 0 "" 0 "" {TEXT 284 3 "12." }{TEXT -1 5 " Let " } {XPPEDIT 18 0 "theta" "6#%&thetaG" }{TEXT -1 29 " be a root of the pol ynomial " }{XPPEDIT 18 0 "theta^3-theta-1" "6#,(*$%&thetaG\"\"$\"\"\"F %!\"\"\"\"\"F(" }{TEXT -1 66 " and consider the extension of the field of rational numbers with " }{XPPEDIT 18 0 "theta" "6#%&thetaG" } {TEXT -1 42 ". So, we consider expressions of the form " }{XPPEDIT 18 0 "a+b*theta+c*theta^2" "6#,(%\"aG\"\"\"*&%\"bGF%%&thetaGF%F%*&%\"cGF% *$F(\"\"#F%F%" }{TEXT -1 8 ", where " }{XPPEDIT 18 0 "a" "6#%\"aG" } {TEXT -1 2 ", " }{XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 6 ", and " } {XPPEDIT 18 0 "c" "6#%\"cG" }{TEXT -1 88 " are rational numbers, and i n calculations with these expressions we apply the identity " } {XPPEDIT 18 0 "theta^3=theta+1" "6#/*$%&thetaG\"\"$,&F%\"\"\"\"\"\"F( " }{TEXT -1 23 ". Transform with Maple " }{XPPEDIT 18 0 "1/(theta^2+1) " "6#*&\"\"\"\"\"\",&*$%&thetaG\"\"#F%\"\"\"F%!\"\"" }{TEXT -1 32 " in to an expression of the form " }{XPPEDIT 18 0 "a+b*theta+c*theta^2" "6 #,(%\"aG\"\"\"*&%\"bGF%%&thetaGF%F%*&%\"cGF%*$F(\"\"#F%F%" }{TEXT -1 8 ", where " }{XPPEDIT 18 0 "a" "6#%\"aG" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 6 ", and " }{XPPEDIT 18 0 "c" "6#%\"cG" } {TEXT -1 23 " are rational numbers.\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "alias(theta=RootOf(theta^3-theta-1,theta));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$%\"IG%&thetaG" }}}{EXCHG {PARA 11 "" 1 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "1/(theta^2+1);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#*&\"\"\"F$,&*$)%&thetaG\"\"#F$\"\"\"F* F*!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#,(#\"\"%\"\"&\"\"\"*$)%&thetaG\"\"#\" \"\"#!\"#F&F*#F'F&" }}}{EXCHG {PARA 11 "" 1 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "sort(%, theta);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(*$)%&thetaG\"\"#\"\"\"#!\"#\"\"&F&#\"\"\"F+# \"\"%F+F-" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 285 3 "13." }{TEXT -1 5 " Let " }{XPPEDIT 18 0 " alpha=sqrt(2)" "6#/%&alphaG-%%sqrtG6#\"\"#" }{TEXT -1 2 ", " } {XPPEDIT 18 0 "beta=sqrt(3)" "6#/%%betaG-%%sqrtG6#\"\"$" }{TEXT -1 6 " , and " }{XPPEDIT 18 0 "gamma=sqrt(5)" "6#/%&gammaG-%%sqrtG6#\"\"&" } {TEXT -1 20 ". Use the procedure " }{TEXT 0 9 "Primfield" }{TEXT -1 32 " to compute a primitive element " }{XPPEDIT 18 0 "zeta" "6#%%zetaG " }{TEXT -1 25 " for the field extension " }{XPPEDIT 18 0 "Q(alpha, be ta, gamma)" "6#-%\"QG6%%&alphaG%%betaG%&gammaG" }{TEXT -1 55 " and com pare the result with the last example of \2472.5.\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "alpha := convert(sqrt(2),RootOf);" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#>%&alphaG-%'RootOfG6#,&*$)%#_ZG\"\"#\"\"\"\"\"\"!\"#F ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "beta := convert(sqrt(3 ),RootOf);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%%betaG-%'RootOfG6#,&*$ )%#_ZG\"\"#\"\"\"\"\"\"!\"$F." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "unprotect(gamma):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 " gamma := convert(sqrt(5),RootOf);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#> %&gammaG-%'RootOfG6#,&*$)%#_ZG\"\"#\"\"\"\"\"\"!\"&F." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "evala(Primfield(\{alpha, beta, gamm a\}));" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#7$7#/-%'RootOfG6#,,*$)%#_ZG \"\")\"\"\"\"\"\"*$)F,\"\"'F.!#S*$)F,\"\"%F.\"$_$*$)F,\"\"#F.!$g*\"$w& F/,(-F'6#,&F8F/!\"$F/F/-F'6#,&F8F/!\"&F/F/-F'6#,&F8F/!\"#F/F/7%/F>,**$ )F&\"\"$F.#!#h\"#C*$)F&\"\"&F.#\"#P\"#'**$)F&\"\"(F.#!\"\"FXF&#\"#:F6/ FB,*F&#!#`\"#7FM#\"#&*\"#OFS#!#(*\"$)GFY#FUF " 0 "" {MPLTEXT 1 0 17 "op([1, 1,1,1], %);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,,*$)%#_ZG\"\")\"\"\"\" \"\"*$)F&\"\"'F(!#S*$)F&\"\"%F(\"$_$*$)F&\"\"#F(!$g*\"$w&F)" }}}{PARA 0 "" 0 "" {TEXT -1 62 "The primitive element is the root of the follo wing polynomial" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "subs(_Z=z eta, %);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,,*$)%%zetaG\"\")\"\"\"\" \"\"*$)F&\"\"'F(!#S*$)F&\"\"%F(\"$_$*$)F&\"\"#F(!$g*\"$w&F)" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 " " {TEXT 286 3 "14." }{TEXT -1 176 " Show that Maple knows that the exp onential power of a complex number can be written in terms of cosine a nd sine of the real and imaginary parts of that number. Also calculate " }{XPPEDIT 18 0 "exp(Pi*I/12)" "6#-%$expG6#*(%#PiG\"\"\"%\"IGF(\"#7! \"\"" }{TEXT -1 15 " in that form.\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "assume(x,real, y, real):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "interface(showassumed=2):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "exp(x+I*y);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%$expG6#,&%#x|ir G\"\"\"*&%\"IGF(%#y|irGF(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalc(%);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&-%$expG6#%#x|irG\" \"\"-%$cosG6#%#y|irGF)F)*(%\"IGF)F%\"\"\"-%$sinGF,F)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "exp(Pi*I/12);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%$expG6#,$*&%\"IG\"\"\"%#PiGF)#F)\"#7" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalc(%);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&-%%sqrtG6#\"\"'\"\"\",&\"\"\"F+*$-F&6#\"\"$F)#F+F/F +#F+\"\"%*(%\"IGF+F%F),&F+F+F,#!\"\"F/F+F1" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 26 "cos(Pi/12) + I*sin(Pi/12);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&-%%sqrtG6#\"\"'\"\"\",&\"\"\"F+*$-F&6#\"\"$F)#F+F/F +#F+\"\"%*(%\"IGF+F%F),&F+F+F,#!\"\"F/F+F1" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 287 3 "15." } {TEXT -1 22 " Show with Maple that " }{XPPEDIT 18 0 "tanh(z/2)=(sinh(x )+I*sinh(y))/(cosh(x)+cos(y))" "6#/-%%tanhG6#*&%\"zG\"\"\"\"\"#!\"\"*& ,&-%%sinhG6#%\"xGF)*&%\"IGF)-F/6#%\"yGF)F)F),&-%%coshG6#F1F)-%$cosG6#F 6F)F+" }{TEXT -1 25 ", for any complex number " }{XPPEDIT 18 0 "z=x+y* I" "6#/%\"zG,&%\"xG\"\"\"*&%\"yGF'%\"IGF'F'" }{TEXT -1 11 " with real \+ " }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 2 ".\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "assume(x,real, y, real):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "interface(sho wassumed=2):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "tanh(z/2); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%%tanhG6#,$%\"zG#\"\"\"\"\"#" }}} {EXCHG {PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "expand(%, sincos);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #*&,&-%%coshG6#%\"zG\"\"\"!\"\"F)\"\"\"-%%sinhGF'!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "subs(z=x+I*y, %);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#*&,&-%%coshG6#,&%#x|irG\"\"\"*&%\"IGF*%#y|irGF*F*F*! \"\"F*\"\"\"-%%sinhGF'!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "expand(%);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(*&*&-%%coshG6#%#x| irG\"\"\"-%$cosG6#%#y|irGF*F*,&*&-%%sinhGF(\"\"\"F+F3F3*(%\"IGF3F&F3-% $sinGF-F3F3!\"\"F3*&*(F5F*F1F*F6F*F*F/F8F3*&F*F*F/F8!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#*&,&-%%sinhG6#%#x|irG\"\"\"*&%\"IGF)-%$sinG6#%#y|irGF)F )\"\"\",&-%%coshGF'F)-%$cosGF.F)!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{MARK "0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }