Chapter 4 Section 4.2: Question 7 page 179

An F-22 aircraft is flyign at 500 mph weieht an elevation of 10,000 feet on a straight-line path that will take it directly over an anti-aircraft gun.

How fast must the gun be able to turn to accuratley track the aircraft when the plane is:

  1. 1 mile away?
  2. 1/5 mile away?
  3. Directly overhead?

First we want to convert the speed into feet/second to use the same units as the elevation:

mph <- 500
seconds_in_one_hr <- 3600 
feet_in_one_mile <- 5280

speed <- (500 * 5280) / 3600

Information we have:

speed in feet/second or \(\frac{dx}{dt}\) : 733.33 feet/second

elevation: 10,000 feet

miles the plane is away from the anti-aircraft gun:

Next we can create a function that takes the argument distance (distance away from the gun) and returns how fast the gun must be able to turn in radians/second to track the aircraft

gun_speed <- function(miles_away, elevation, speed){
  feet_away <- miles_away * 5280
  x <- feet_away/elevation
  
  # Get the tangent of theata 
  theta_radians <- atan(x)
  
  # Find the derivtive of the function tan(theta) at the distance 
  
  y <- cos(theta_radians) ** 2
  z <- (y * speed) / elevation
  return(z)
}

One mile away

one_mile_away <- gun_speed(1, 10000, 733.33)

round(one_mile_away, 4)
## [1] 0.0573

1/5 mile away

one_fifth_mile <- gun_speed(.2, 10000, 733.33)

round(one_fifth_mile, 4)
## [1] 0.0725

Directly overhead

directly_over <- gun_speed(0, 10000, 733.33)

round(directly_over, 4)
## [1] 0.0733

The above function computes the rate the gun has to turn as follows (using - plane is 1 mile away)

\[ \frac{dx}{dt} = 733.33 ft/s \\ tan{\theta} = \frac{x}{10,000} \\ at~one~mile~away~theta = tan^{-1} (\frac{5,280}{10,000}) \\ \theta = 27.83~degrees; \\ Now~the~derivative~of~tan{\theta}~can~be~caluculated\\ \frac{d}{dt}tan{\theta} = \frac{d}{dt}(\frac{x}{10,000}) \\ sec^2\theta\frac{d\theta}{dt} = (\frac{1}{10,000})\frac{dx}{dt} \\ \frac{d\theta}{dt} = \frac{cos^2(27.83)}{10,000} . \frac{dx}{dt} = 0.0573 \]