Projectile with Air Drag
A ball thrown through air, computed step by step with a drag force that grows as the square of the speed, beside the parabola it would follow without air.
Without air, a thrown ball follows a parabola, and a formula gives its range: \frac{w^2\sin(2b)}{g} for the launch speed w and the launch angle b . With air there is no such formula. The drag force on a ball grows as the square of its speed s and points against its velocity (u, v) , so the accelerations are u' = -c\,s\,u and v' = -g - c\,s\,v , and the only way to follow the flight is to compute it step by step. This document does that, live.
The state is the list S : position, then velocity. Every 30 milliseconds an action moves it forward by h = 0.03 seconds with the fourth-order Runge–Kutta method, which takes four estimates of the slope and combines them. The flight therefore plays in real time. When the ball reaches the ground, the action launches it again and keeps the finished flight as the faint curve.
The blue curve is the flight without air. With the values of this document (30 m/s at 50° , and c = 0.01 per metre) the ball lands after 54 metres instead of 90, and the path is not symmetric: the ball comes down more steeply than it went up. Edit the angle a (in degrees), the speed w and the drag c ; the change takes effect at the next launch. A larger c is a lighter ball, or a larger ball of the same mass; with c = 0 the ball follows the parabola. A ball that falls for long enough approaches the speed \sqrt{g/c} , about 31 m/s here, at which drag equals weight. The document keeps the last 240 steps of a flight (7.2 seconds), which is enough for every angle at this speed. Without air the longest throw is at 45° ; with drag it is at a lower angle.
After a JSXGraph example by The Center of Mobile Learning with Digital Technology.
JavaScript is required to view the interactive plot.