F.A. Harris

Jan. 18, 2000

Lab 2 Exercises

1.) Redo Table 2.1 numerically using Dx = 0.05. (Do this at home but leave space for this in your lab book.)

2.) Type in program Example. Run with step size 0.1. Compare the results with the book example. Do they agree? This checks that you have not made a mistake in entering the program.

Also run with step sizes 0.01 and 0.001. What is the difference (error) between the calculated value and the true value at x = 2.0 for each case? Is there a simple relationship between this error and the step size? What is it?

3.) Do Problem 2.1 (not Exercise 2.1!), parts a - d and f. For part a, just check the program results with a hand calculation for a few steps. In part b, determine the values of r that give agreement at t = 2 min and at t = 40 min. Use trial and error to find the r values, i.e., make a table in your lab book of trial r values versus the calculated temperature at these two times. Do these values of r that you find agree? (This pertains to part f)

Note: You must check the program that you have typed very carefully, and you must check results of programs extremely carefully. Don't just assume that programs give correct results. Assume the program is guilty until proven innocent. When you obtain spurious results, check the logic of the program. Feel free to improve the logic.

Summary: For this weeks summary, please describe Euler's Method, Newton's Law of Cooling, and its applicability to a cooling cup of coffee. Please use double line spacing and keep your summary to less than one page. Tape your summary at the end of your lab report.