{VERSION 5 0 "APPLE_PPC_MAC" "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 Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 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 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 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 0 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 1 0 0 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 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 1 0 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 0 }{CSTYLE "" -1 274 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 275 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 276 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 277 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 278 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 279 "" 0 1 0 0 0 0 0 1 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 0 }{CSTYLE "" -1 281 "" 0 1 0 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 0 } {CSTYLE "" -1 287 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 288 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{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 "Title" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 12 12 1 0 1 0 2 2 19 1 } {PSTYLE "Author" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 1 2 2 2 1 1 1 1 }3 1 0 0 8 8 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 258 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 1 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 37 "MidTerm Exam --- Spring \+ Semester 2002" }}{PARA 257 "" 0 "" {TEXT -1 19 "Put your name here." } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 68 "Type your solutions in the spaces given. Add more prompts if neede d." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 48 "SAVE YOUR WORK FREQUENTLY IN CASE MAPLE CRASHES!" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 43 "It is also good to b egin each problem with " }{MPLTEXT 1 0 8 "restart;" }{TEXT -1 3 " \n\n " }{TEXT 281 92 "The first 6 problems are each worth 100/6 points. Pro blem 7 is worth 5 extra credit points. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 257 10 "Problem 1." }{TEXT -1 15 " (a) Fin d the " }{TEXT 261 11 "exact value" }{TEXT -1 17 " of the integral " } {XPPEDIT 18 0 "int(exp(x)*cos(x)*x^2,x = 0 .. Pi);" "6#-%$intG6$*(-%$e xpG6#%\"xG\"\"\"-%$cosG6#F*F+F*\"\"#/F*;\"\"!%#PiG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "(b) Find the " }{TEXT 262 28 "floating point approximation" }{TEXT -1 27 " of the integral in (a ) to " }{TEXT 264 18 "20 decimal digits." }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 267 10 "Problem 2." }{TEXT -1 26 " (a) Use Map le to plot " }{XPPEDIT 18 0 "x^x;" "6#)%\"xGF$" }{TEXT -1 49 " and (b ) its derivative on the interval [0,1]. " }}{PARA 0 "" 0 "" {TEXT -1 33 "(c) Find the value of x at which " }{XPPEDIT 18 0 "x^x;" "6#)% \"xGF$" }{TEXT -1 108 " takes the minimum value on [0,1]. Find the exa ct value as well as a 10 digit approximation to the value. \n\n" } {TEXT 280 6 "Hints:" }{TEXT -1 167 " If you click on the lowest point \+ in the graph you will see the coordinates on the upper left of the men u bar. You can judge if your answer is close to this. Just use " } {TEXT 274 5 "solve" }{TEXT -1 69 " to find where the derivative is 0. \+ No further analysis is required. " }{TEXT 276 47 "Shrink the plots bef ore printing to save paper." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 266 9 "Problem 3" }{TEXT -1 97 ". Find the number of ordere d pairs of integers [a,b] such that a and b are between 1 and 100 and \+ " }{XPPEDIT 18 0 "a^b <= 1024;" "6#1)%\"aG%\"bG\"%C5" }{TEXT -1 4 ". \+ " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 79 "For \+ example [2,3] and [3,2] are among the ordered pairs we want to count s ince " }{XPPEDIT 18 0 "2^3 <= 1024;" "6#1*$\"\"#\"\"$\"%C5" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "3^2 <= 1024;" "6#1*$\"\"$\"\"#\"%C5" }{TEXT -1 22 ". On the other hand, " }{XPPEDIT 18 0 "1024 < 3^7;" "6#2\"%C5* $\"\"$\"\"(" }{TEXT -1 54 " so [3,7] is not counted, but [7,3] is cou nted since " }{XPPEDIT 18 0 "7^3 <= 1024;" "6#1*$\"\"(\"\"$\"%C5" } {TEXT -1 2 ". " }{TEXT 273 5 "[Hint" }{TEXT -1 38 ": Use two \"do loop s\" and a \"counter\".]" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 256 11 "Problem 4. " }{TEXT -1 88 "Let s(n) be the sum of the cu bes of the digits of the positive integer n. (For example, " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 18 " s(12510) \+ = " }{XPPEDIT 18 0 "1^3+2^3+5^3+1^3+0^3 = 1+8+125+1;" "6#/,,*$\"\"\" \"\"$F&*$\"\"#F'F&*$\"\"&F'F&*$F&F'F&*$\"\"!F'F&,*F&F&\"\")F&\"$D\"F&F &F&" }{TEXT -1 19 " = 135. \n\nFind the" }{TEXT 265 1 " " }{TEXT 277 3 "set" }{TEXT 278 1 " " }{TEXT -1 53 "of positive integers n <= 1000 \+ such that s(n) = n. [" }{TEXT 268 6 "Hints:" }{TEXT -1 21 " If L is a list then " }{MPLTEXT 1 0 13 "add(i^3,i=L);" }{TEXT -1 165 " will giv e the sum of the cubes of the entries in L. You will need to convert \+ an interger to a list of its digits before applying this as we did wit h the digits of " }{XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT -1 25 ".] As \+ a check note that " }{XPPEDIT 18 0 "s(1) = 1^3;" "6#/-%\"sG6#\"\"\"*$F '\"\"$" }{TEXT -1 9 " = 1 and " }{XPPEDIT 18 0 "s(153) = 1^3+5^3+3^3; " "6#/-%\"sG6#\"$`\",(*$\"\"\"\"\"$F**$\"\"&F+F**$F+F+F*" }{TEXT -1 7 " = 153." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 260 10 "Problem 5." }{TEXT -1 15 " (a) Find the " } {TEXT 258 3 "lis" }{TEXT 279 1 "t" }{TEXT -1 37 " of all primes p < 1 00 that satisfy " }{XPPEDIT 18 0 "sin(p) < 1/2;" "6#2-%$sinG6#%\"pG*& \"\"\"F)\"\"#!\"\"" }{TEXT -1 29 ". Note you will need to use " } {TEXT 269 13 "evalf(sin(p))" }{TEXT -1 43 " to avoid \"Error, cannot \+ evaluate boolean\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 13 "(b) Find the " }{TEXT 259 2 "se" }{TEXT -1 44 "t of all primes p < 100 that satisfy both \+ " }{XPPEDIT 18 0 "p^7;" "6#*$)%\"pG\"\"(\"\"\"" }{TEXT -1 13 " mod 17 = 7 " }{TEXT 275 4 " and" }{TEXT -1 3 " " }{XPPEDIT 18 0 "p^4;" "6# *$)%\"pG\"\"%\"\"\"" }{TEXT -1 13 " mod 4 = 1." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 263 10 "Problem 6." }{TEXT -1 5 " Let " }{XPPEDIT 18 0 "c[i];" "6#&%\"cG6# %\"iG" }{TEXT -1 85 " be the number of times that the digit i occurs i n the first 5000 decimal digits of " }{XPPEDIT 18 0 "sqrt(2);" "6#-%% sqrtG6#\"\"#" }{TEXT -1 7 ". Find " }{XPPEDIT 18 0 "c[i];" "6#&%\"cG6# %\"iG" }{TEXT -1 79 " for i from 0 to 9. You may print them as a colu mn or just print the sequence " }{XPPEDIT 18 0 "c[0];" "6#&%\"cG6#\"\" !" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "c[1];" "6#&%\"cG6#\"\"\"" }{TEXT -1 10 ", . . . , " }{XPPEDIT 18 0 "c[9];" "6#&%\"cG6#\"\"*" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 270 33 "Problem 7. Extra Credit \+ Problem:" }{TEXT -1 150 " (You may make a perfect score without doing \+ this problem. ) Write a procedure that will simulate the throwing of a pair of dice. Name the procedure " }{TEXT 286 5 "throw" }{TEXT -1 19 ". When you execute " }{TEXT 287 8 "throw() " }{TEXT -1 153 "the ou tput will be a list [x,y] where x and y are each random integers from \+ 1 to 6.\n\n(a) Demonstrate the \"throwing\" of the dice 10 times. For \+ output use " }{TEXT 288 4 "seq." }{TEXT -1 252 "\n\n(b) Then execute t his 5000 times, each time add the results x and y. Determine the sum w hich occurs most frequently in the 5000 \"throws\" of the dice. DO NOT PRINT OUT THE 5000 THROWS! Just print the number of times each sum oc curs in the 5000 throws." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "36 0 0" 12 }{VIEWOPTS 0 0 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 1 1 2 33 1 1 }