Problems 10
  1. Theory.
    1. Find the file on you box which contains the declaration of the object gsl_multiroot_function and read the declaration.
      Hint: the file is gsl_multiroots.h;
  2. Practice.
    1. Multidimentional root finding 'without derivatives': firing projectiles at a target.
      • Consider a cannon that fires cannonballs with muzzle velocity v at angle θ from zenith and azimuth φ.
        The coordinates of the projectile as function of elapsed time are given as (check it)
        z(t)=v cos(θ) t - gt²/2,
        x(t)=v sin(θ) sin(φ) t,
        y(t)=v sin(θ) cos(φ) t.
      • Suppose you want to hit a target with coordinates [xtarget, ytarget, ztarget=0]
      • Build a program that calculates the aiming angles to hit the target using gsl_multiroot_fsolver_hybrids algorithm.
      • Make a plot which illustrates the progress of the algorithm.
    2. Compare with an algorithm with derivatives.
    3. Generalize to ztarget≠0.
    4. (optional) Add the wind-resistance drag force to the equation of motion of the cannonball in the form Fdrag=-γvv, where boldface denotes vectors, and γ is the wind-resistance parameter of the cannonball.
    5. (optional) Add the atmospheric wind.
    6. Do the Problems-9 exercise-2 again, but now define the function to minimize outside of the main function and pass the data to fit through the void* params object.