The Feynman algorithm needs to be modified slightly to deal with forces that depend on velocity. At the time acceleration is calculated, the only value available for velocity is the one from a half-step earlier. If we keep track of change in velocity as well as velocity itself, we can use the last change to project forward a half-step for the acceleration calculation. (We use a similar procedure when plotting fields). In this section we test the accuracy of the procedure by looking at a one-dimensional problem that has an analytic solution.

When a sphere the size of a baseball or golfball moves through air at a normal speed, momentum is transferred to it from the air with which it collides, i.e. the air exerts a force on the sphere that opposes the motion. The volume of air the ball sweeps through in one second is the product its velocity and cross-sectional area, so the momentum transferred will be this volume multiplied by the density of air, the velocity of the air relative to the ball, and a 'drag coefficient'. (Sleek automobiles quote drag coefficients of around 0.3, and a sphere does a bit better than that.) For a sphere moving through air at normal elevations, the force of turbulent drag is proportional to the radius squared times the velocity squared, and the proportionality constant is about 0.87 in S.I. units. At higher elevations the constant decreases in direct proportion to the decrease in the density of air.

The resistive force can be simplified by writing it in terms of the terminal velocity. The terminal velocity is the velocity at which the resistive force and the force of gravity balance: a ball falling at its terminal velocity accelerates no further. In terms of the terminal velocity, resistive force is weight multiplied by the square of the ratio of velocity to terminal velocity. Baseballs and golfballs travel at speeds well in excess of their terminal velocities, so air resistance is not something that can be ignored even to a first approximation.

We will begin by finding the speed at which a ball returns after being thrown upward at its terminal velocity. We can show using elementary calculus that it returns at the terminal velocity divided by the square root of two. We can also show that the maximum height it attains is the height with no air resistance multiplied by the natural logarithm of two. The program calculates these two quantities and their numeric/analytic ratios. It also plots displacement versus time with and without air resistance.

The close agreement between the numerical and analytic values shows that the Feynman algorithm can be extended to deal with velocity-dependent forces without adding complexity. We can also modify the program to test the assertion that objects of different mass dropped from the same height will strike the ground at the same time (something that Galileo is said to have demonstrated at the leaning tower of Pisa). The effect of air resistance on an object is most conveniently introduced through its terminal velocity. For spheres, the square of the terminal velocity is proportional to the radius times the mean density: multiplying either by 4 with the other constant doubles the terminal velocity. A 5.125 ounce baseball with a 9.125 inch circumference has a mean density of 691 kg per cubic meter (it floats), and a terminal velocity of 34.7 m/s. A ball the same size made of steel, density 7900 kg per cubic meter, will have a terminal velocity of 117 m/s. At the other extreme, a table-tennis ball has a terminal velocity of 9.38 m/s. We can use these terminal velocities to predict what will happen when we drop the three objects from a common height. If we choose a height of 19.6 m, without air resistance the objects fall for 2 seconds and reach a final velocity of 19.6 m/s. This final velocity is a small fraction of the terminal velocity of the steel ball, but it is over half the terminal velocity of the baseball, and twice the terminal velocity of the table-tennis ball. We expect, therefore, that the steel ball will be virtually unaffected by air resistance, the baseball will be affected a little, and the table-tennis ball will be affected a great deal. The program finds that the iron ball is delayed less than 5 milliseconds by air restistance, whereas the baseball is delayed over 50 milliseconds. This time difference would be difficult to measure with a stopwatch, but what it means is the baseball still has about a meter to fall when the iron ball hits the ground (provided they were released at exactly the same time). The table-tennis ball, of course, is left far behind, and hits the ground at a velocity of 9.32 m/s (over 99% of its terminal velocity).

If we include turbulent drag, we get a good first approximation to the equation of motion of a 'real' baseball or golfball. Our equation is still only a first approximation because we have not attempted to deal with the effects of spin. Spin introduces a force transverse to the motion, and this can be good news or bad news. Golfers who hook or slice are well acquainted with the bad news. The good news is that spin provides lift. The lift enables a drive to be hit at a lower angle than otherwise, and this in turn increases the momentum transfer between the clubhead and the ball.

The program finds the minimum initial velocity a baseball requires to travel 450 feet before returning to the elevation from which it starts. In order to write Newton's law, we must first resolve the drag force into x and y components. (A common error at this point is to use the squares of the x and y velocities in the equations for the x and y accelerations.) The acceleration equations are coupled (the equation for the x acceleration includes the y velocity and conversely), and have no analytic solution. The acceleration equations in the program are not written in terms of the terminal velocity of a baseball, but the terminal velocity can be calculated from the given data, and is 34.7 m/s.

The program is complicated by the fact that we are trying to find the minimum velocity required for a specified horizontal range. Had we been given the initial velocity (magnitude and direction) and asked for the horizontal range, we would have only needed the Feynman algorithm. In our problem we have to try different initial speeds and launch angles until we find the combination that has the lowest initial speed for a range of 450 feet. We do this in two stages. For every trial initial speed, we vary the launch angle to find the one that maximizes the range. The routine that does this steps the angle up and down across the angle for maximum range in progressively smaller steps. When the optimum angle has been determined the trajectory is plotted. The second stage, varying the velocity to find the value which gives a range of 450 feet, uses a bisection algorithm. The bisection algorithm starts with velocity values that bracket the desired range, and progressively narrows the difference between them until they differ by less than a specified amount.