PHYS 220 — HW #4

This assignment is due at the beginning of lecture on Monday, 23 Feb.


The equations of motion for a golf ball in a realistic atmosphere are given by (be careful of signs!):

The drag force is the same "quadratic" drag force we encountered in Lab #3 and lecture. S and ω represent a coefficient used to estimate the Magnus force on a spinning ball and the rotation rate of that ball.

  1. Write out the figurative representation of the vector containing the variables in the problem as vars = [ ... ].
  2. Using valid MATLAB code, write the single line of code for the derivative function (if you defined an auxiliary variable for ease of writing out that line, provide it as well) dvarsdt = [ ... ].
  3. List the parameters you need to pass into your derivative function.

The following problem concerns error analysis/control. You're modelling a non-linear oscillator that has a characteristic amplitude of 45°. You're currently running your simulation with a timestep Δto = 0.05 s. For the problem at hand you desire a fractional error of 0.5% of the amplitude scale.

  1. At some point in your simulation you estimate a local truncation error of -0.09°. Calculate Δt1 required for the following methods:
    1. Euler method
    2. Mid-point method (rk2)
    3. Runge-Kutta method (rk4)
  2. Further into the simulation you estimate a local truncation error of 0.9°. Calculate Δt1 required for the following methods:
    1. Euler method
    2. Mid-point method (rk2)
    3. Runge-Kutta method (rk4)
  3. Comment on the results found in 4 & 5, above.