Ball Thrown from a Moving Car with Linear Air Drag
Problem
Problem Statement A car moves horizontally with constant velocity. A ball is thrown vertically upward from the car. The ball is subjected to gravity and air resistance proportional to its velocity. Model the position and velocity of the ball over time and determine whether it returns to the car. --- Given Car velocity (constant): v_c = 20\ \text{m/s} Initial vertical velocity of the ball (relative to car): v_{y0} = 10\ \text{m/s} Gravitational acceleration: g = 9.8\ \text{m/s}^2 Ball mass: m = 0.2\ \text{kg} Linear drag coefficient: k = 0.1\ \text{kg/s} Initial conditions: x(0) = 0,\quad y(0) = 0 v_x(0) = 20,\quad v_y(0) = 10 --- Forces Acting on the Ball Gravity: \vec{F}_g = (0,\,-mg) Air resistance (linear drag): \vec{F}_d = -k\vec{v} --- Equations of Motion (Vector Form) m\frac{d\vec{v}}{dt} = -k\vec{v} + (0,-mg) --- Component Form Horizontal direction m\frac{dv_x}{dt} = -k v_x Vertical direction m\frac{dv_y}{dt} = -k v_y - mg --- Velocity Solutions Horizontal velocity v_x(t) = v_c\,e^{-(k/m)t} v_x(t) = 20\,e^{-0.5t} --- Vertical velocity v_y(t) = \left(v_{y0} + \frac{mg}{k}\right)e^{-(k/m)t} - \frac{mg}{k} v_y(t) = (10 + 19.6)e^{-0.5t} - 19.6 --- Position Equations Horizontal position x(t) = \int v_x(t)\,dt x(t) = \frac{m v_c}{k}\left(1 - e^{-(k/m)t}\right) x(t) = 40\left(1 - e^{-0.5t}\right) --- Vertical position y(t) = \int v_y(t)\,dt y(t) = \left(\frac{m}{k}\right)\left(v_{y0} + \frac{mg}{k}\right) \left(1 - e^{-(k/m)t}\right) - \frac{mg}{k}t y(t) = 59.2(1 - e^{-0.5t}) - 19.6t --- Car Motion x_c(t) = v_c t = 20t --- Key Simulation Result The ball does NOT return to the car. Why: Horizontal velocity decays exponentially Car continues at constant speed Relative horizontal displacement increases --- Condition to Check in Simulation Ball lands when: y(t_f) = 0 At that time: x_b(t_f) < x_c(t_f) ✔ Ball falls behind the car --- What Your Simulation Must Show 1. Exponentially decaying horizontal velocity 2. Asymmetric vertical motion (slower rise, faster fall) 3. Ball landing behind the car 4. Energy loss over time --- Numerical Integration Form (for code) Use this if you’re stepping frame-by-frame: \frac{dx}{dt} = v_x \frac{dy}{dt} = v_y \frac{dv_x}{dt} = -\frac{k}{m}v_x \frac{dv_y}{dt} = -g - \frac{k}{m}v_y ✔ Perfect for Euler / Verlet / RK4 --- Upgrade to Realistic Drag (Optional v2) Replace drag force with: \vec{F}_d = -c|\vec{v}|\vec{v} Then: \frac{dv_x}{dt} = -\frac{c}{m}|\vec{v}|v_x \frac{dv_y}{dt} = -g - \frac{c}{m}|\vec{v}|v_y (No closed-form solution → numerical only) --- Keywords for Your Prototype Linear drag model Non-conservative force Exponential velocity decay Coupled differential equations Numerical integration
Explanation
This visualization shows a car moving at constant horizontal speed while a ball is thrown vertically upward from it, subject to gravity and linear air drag. You can adjust the drag, initial speed, and view the ball’s trajectory, the car’s motion, and how the ball falls behind the car as its horizontal velocity decays exponentially. The path is computed by numerically integrating the coupled differential equations for position and velocity.