{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 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 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 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 271 "" 0 1 0 0 0 0 0 1 0 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 0 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 274 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 277 "" 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 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 35 "MidTerm Exam --- Fall Se mester 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 needed." }}}{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 begin \+ each problem with " }{MPLTEXT 1 0 8 "restart;" }{TEXT -1 2 " \n" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 58 "When you \+ have finished, print out the exam and hand it in." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 257 10 "Problem 1." }{TEXT -1 22 " (10pts) (a) Find 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$*(-%$expG6#%\"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) Fi nd the " }{TEXT 262 28 "floating point approximation" }{TEXT -1 27 " o f 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 74 " (20 pts) \n(a) Use Maple to plot the graph of the function f where f(x) = " }{XPPEDIT 18 0 "x^x;" "6#)%\"xGF$" }{TEXT -1 30 " for x in the int erval [0,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 -1 61 "(b) Find and \+ plot the derivative of f on the interval [0,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 -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 13 "(c) Find the " } {TEXT 298 11 "exact value" }{TEXT -1 15 " of x at which " }{XPPEDIT 18 0 "x^x;" "6#)%\"xGF$" }{TEXT -1 42 " takes the minimum value on [0, 1] and the " }{TEXT 299 11 "exact value" }{TEXT -1 17 " of this minimu m." }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "x^x;" "6#)%\"xGF$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 71 "(d ) Find 10 \+ digits approximations to the two answers obtained in (c).)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 "\013" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 1 "\n" }{TEXT 278 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 menu bar. You can judge if your answer is close to this. Just use " }{TEXT 272 5 "solve" }{TEXT -1 69 " to find where the derivative is 0. No further analysis is required. " }{TEXT 274 47 "Shrink the plots before printi ng to save paper." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT 266 9 "Problem 3" }{TEXT -1 105 ". (10pts ) Find the number of ordered 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 110 ". Just give the number of such ordered pai rs. It is not necessary to find the set of all such ordered pairs." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 79 "For examp le [2,3] and [3,2] are among the ordered pairs we want to count since \+ " }{XPPEDIT 18 0 "2^3 <= 1024;" "6#1*$\"\"#\"\"$\"%C5" }{TEXT -1 5 " a nd " }{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 counte d since " }{XPPEDIT 18 0 "7^3 <= 1024;" "6#1*$\"\"(\"\"$\"%C5" }{TEXT -1 2 ". " }{TEXT 271 5 "[Hint" }{TEXT -1 38 ": Use two \"do loops\" an d 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 290 11 "Problem 4. " }{TEXT -1 96 "(20pts ) Let s(n) be the sum of the cubes of the digits of the positive integ er 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 123 " = 135. \n\n(a) Writ e a procedure to compute the function s just defined. Show that it giv es the correct value for s(12510)." }}}{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 12 "(b) Find the" }{TEXT 291 1 " " }{TEXT 293 3 "set" }{TEXT 294 1 " " }{TEXT -1 21 "of positive integers " }{XPPEDIT 18 0 "n <= 10 00;" "6#1%\"nG\"%+5" }{TEXT -1 22 " such that s(n) = n. " }}}{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 1 "[" }{TEXT 295 6 "Hints:" }{TEXT -1 21 " If L is a list then " }{TEXT 297 13 "add(i^3,i=L);" }{TEXT -1 165 " will give the sum of the cubes of the entries in L. You will ne ed to convert an interger to a list of its digits before applying this as we did with the digits of " }{XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT -1 2 ". " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT 260 10 "Problem 5." }{TEXT -1 23 " (20pts) (a) Find the \+ " }{TEXT 258 3 "lis" }{TEXT 277 1 "t" }{TEXT -1 37 " of all primes p \+ < 100 that satisfy " }{XPPEDIT 18 0 "sin(p) < 1/2;" "6#2-%$sinG6#%\"pG *&\"\"\"F)\"\"#!\"\"" }{TEXT -1 34 ". Note that you will need to use \+ " }{TEXT 269 13 "evalf(sin(p))" }{TEXT -1 44 " to avoid \"Error, cann ot 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 273 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 "P roblem 6." }{TEXT -1 13 " (20pts) Let " }{XPPEDIT 18 0 "c[i];" "6#&%\" cG6#%\"iG" }{TEXT -1 85 " be the number of times that the digit i occu rs in 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 44 " for i from 0 to 9. Print out 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 19 " using the command " } {TEXT 296 3 "seq" }{TEXT -1 16 ". Recall that " }{XPPEDIT 18 0 "c[i] ;" "6#&%\"cG6#%\"iG" }{TEXT -1 23 " = c[i] in Maple input." }}}{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 12 "Problem 7. " }{TEXT -1 6 "(5pts) " }{TEXT 301 22 " Extra Credit Problem:" }{TEXT -1 156 " (You may make a perfect score without doing this problem. ) \n\n(a) Write a procedu re that will simulate the throwing of a pair of dice. Name the proced ure " }{TEXT 280 5 "throw" }{TEXT -1 19 ". When you execute " }{TEXT 281 8 "throw() " }{TEXT -1 153 "the output will be a list [x,y] where \+ x and y are each random integers from 1 to 6.\n\n(b) Demonstrate the \+ \"throwing\" of the dice 10 times. For output use " }{TEXT 282 4 "seq. " }{TEXT -1 271 "\n\n(c) Then execute this 5000 times, each time add t he results x and y. DO NOT PRINT OUT THE 5000 THROWS! Just print the \+ number of times each sum occurs in the 5000 throws.\n\n(d). Determine \+ by looking at the output the sum which occurs most frequently in the \+ 5000 throws." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 21 }{VIEWOPTS 0 0 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 1 1 2 33 1 1 }