Name
Physics 305
Midterm 1 - Spring 2000
Closed book. Show all work. Use backs of pages if more room is necessary. Calculators and math tables are ok.
1.) Use the Euler method to solve the first order differential equation:
dy/dx = 4
Assume y = 0 at x = 0. Determine y at x = 2 using D x = 1. Draw a sketch. What is the "true" answer?
2.) Describe the uses of computers in physics. What has been our main use so far in this course?
3.) What mechanisms apply in the cooling of coffee? What law is used to describe it? Write it. Is it accurate?
4.) Why is networking useful? How are the computers networked in Wat 415? What are some programs that help us to make use of it?
5.) What methods are available for "debugging" programs? Why is "strong typing" useful?
6.) State Kepler's Laws.
7.) What determines the accuracy of a numerical calculation? What methods can we use to check whether the step size is small enough? What is stability?
8.) Describe what the following statements do:
SET WINDOW 0.0, 1.0, -10., 10.
PLOT pos(1), pos(2)
LET ij = MOD(10,3)
ASK PIXELS px, py
BOX CIRCLE -r, r, -r, r
9.) Write SUB CROMER, a subroutine using the Euler-Cromer algorithm, for the problem of an object falling without friction near the surface of the earth. For this problem, describe how well the Euler, Euler Cromer, and Euler Richardson algorithms worked. Why was the velocity correct in all cases?
10.) What is wrong with the following program? There may be more than one, but bad guesses count off.
PROGRAM Test
CALL Initial(x, v, t, dt, nshow)
DO
LET count = 0
CALL update(x, v, t dt)
IF count = nshow then
CALL output(x, v, t)
count = 0
ENDIF
LOOP until key input
END
SUB initial(x, v, t, dt)
LET x = 1.0
LET v = 0.
LET t = 0
LET dt = 0.001
END
SUB update(y, v, t, dt)
LET y = y + v*dt
LET t = t + dt
END
SUB output(s, vel, time)
PRINT "x, vel, time = ", x, vel, time
END