1. A boat is being pulled into a dock at a constant rate of 30ft/min by a winch located 10ft above the deck of the boat.

At what rate is the boat approaching the dock when the boat is: (a) 50 feet out? (b) 15 feet out? (c) 1 foot from the dock? (d) What happens when the length of rope pulling in the boat is less than 10 feet long?

There are a few things we must consider for this problem:

Step1: We know that the winch is pulling at a rate of 30ft/min. As such, we can note that our y rate with respect to t is: \(\frac{dy}{dt}= -30\)

Step2: Given the Pythagorean theorem equation we can take the derivative of both sides. By doing so it will remove the constant from our equation.

left.der = D(expression(y^2),'y')
right.der = D(expression(x^2+10^2),'x')
print(left.der)
## 2 * y
print(right.der)
## 2 * x

The result will look like this: \(2y\frac{dy}{dt}= 2x\frac{dx}{dt}\)

Step3: We now solve for \(\frac{dx}{dt}\) algebraically:
\[\begin{align*} \frac{2y\frac{dy}{dt}}{2x} = \frac{2x\frac{dx}{dt}}{2x} \\ \frac{dx}{dt} = \frac{y}{x}\frac{dy}{dt}\\ \end{align*}\]

Step5: Lastly, we solve for \(y\) for every value of \(x\). Once we have all our values, what’s remaining is to substitute our values in our rate equation. Given our equation we can create a custom function

Answer a:

x.rate <- function(x) {
  #Solve for y
  y <- sqrt((x^2)+(10^2))
  #print(y)
  
  #solve for dx/dt
  dx.dt <- (y/x)*(-30)
  return(dx.dt)
}

x.rate(50)
## [1] -30.59412

Answer b:

x.rate(15)
## [1] -36.05551

Answer c:

x.rate(1)
## [1] -301.4963

Answer d:
As the winch retracts (y), the x rate will slow as it nears the dock. The best way to infer this is by considering that the fastest speed the winch can pull is 30ft/min if there is only a horizontal vector component. Because of the height difference we can expect some of the retraction to be transferred to the vertical vector component as the boat approaches.