Question 1 (a) 2.04e+1 + 4.50e-1 = 2.0850e+1 => 2.08e+1 (b) 9.04e+9 + 9.55e+8 = 9.995e+9 => 1.00e+10 => overflow => +inf (c) 1.44e-8 - 4.45e-9 = 9.95e-9 => 9.95e-9 (d) 1.44e-8 - 4.45e-9 = 9.95e-9 => 9.95e-9 (e) 9.99e-1 + 5.00e-4 = 9.995e-1 => 1.00e0 => so 5.00e-4 is too big. 9.99e-1 + 4.99e-4 = 9.99499e-1 => 9.99e-1 => so 4.99e-4 is the answer. (f) a*a must be at least .995e-9 (rounds to the smallest representable number), but a*a*a must be strictly smaller than .995e-9. Result: sqrt(.995e-9) < 3.16e-5 <= answer <= 9.98e-4 < cuberoot(.995e-9) (g) X . Y Z e +/-W | | | | 9 * 10 * 10 * 19 = 17100 (h) 0 . Y Z e -9 | | | | 1 * 10 * 10 * 1 - 1 = 100 - 1 = 99 (need to subtract 1 in order to not include 0.00e-9) Question 2 (a) s3(.25) = 1.28385416 exp(.25)= 1.28402541 absolute error = difference = 1.71e-4. relative error = abs_err/true_answer = 1.71e-4/1.28 = 1.334e-4 s3(-1.000001199) = .333332733 exp(-1.000001199)= .367879000 absolute error = difference = .034546266 relative error = abs_err/true_answer = .093906600 (b) We find that |s3(x)-exp(x)| < .01 for -.72453 < x < .675601 . This gives the range in which the absolute error is less than 1/100. Similarly |s3(x)-exp(x)|/exp(x) < .01 for -.61781 < x < .823248 This gives the range in which the relative error is less than 1/100. These answers can be obtained by (a) plotting s3(x) - exp(x) in the range of interest [-2,2], (b) noticing that it is always negative in this range [-2,2], and then (c) solving the non-linear equations s3(x)-exp(x)+.01=0 and (s3(x)-exp(x))/exp(x)+.01=0 by, say, the secant method. One can figure that the interval [-2,2] must contain the answers because the next term in the series expansion for exp(x), namely x^4/24, is obviously too big outside this interval. Question 3 (a) backward error = p(1) = .001 (b) of the intervals [-1,0], [0,1], [1,2], only the last one has a change in sign. So that's the only one that will work for bisection. (c) p'(1.0) = -.01 . That means the forward error estimate is approximately -p(1.0)/p'(1.0) = .1 . Note that this is a very rough estimate, but is enough to show the accuracy of the approximate answer is at most 1 digit. Question 4 First one much find a range of values where the water makes it as far as 17 m. I found that range to be something like 23 degrees to about 67 degrees. Then the easiest method is to use the secant method to find the answers, starting at several points in the interval 40 to 60. The answers I came up with are 42.5484 and 60.6920 degrees. But I also found I had to stay away from 53 degrees since the function was close to a maximum there (so the derivative was close to zero).