A snowplow heads out to plow a 50 mile stretch of highway when there is already an inch of snow on the ground. The snow is falling steadily at a rate of one inch per hour. The speed of the plow is 50/d mph where d is the depth of the snow in inches.
How long does the plow travel this 50 mile stretch of road? (one way)
DEFDBL A-Z
goal = 50
d = 1
spd = 50# / d
dt = 1# / 3600# / 10000
DO
dist = dist + spd * dt
t = t + dt
d = d + dt
spd = 50# / d
LOOP UNTIL dist >= goal
PRINT t * 3600; dist
finds
6185.814605709057 50.00000047703609
which indicates
6185.814605709057 seconds to traverse 50.00000047703609 miles.
That's 1 hour 43 minutes 5.8146 seconds to get 1/33 inch past the finish line.
Adding the final speed to the print statement shows the plow going at 18.39397199298262 mi/hr at that points, so the extra 0.00000047703609 miles took about 0.00009 seconds, so bring that time back to 1 hour 43 minutes 5.8145 seconds, to the nearest tenth of a millisecond.
|
Posted by Charlie
on 2010-09-13 13:35:52 |