Exercises 4.2
9. A 24 ft ladder is leaning against a house while the base is pulled away at a constant rate of 1 ft/s. At what rate is the top of the ladder sliding down the side of the house when the base is:
(a) 1 foot from the house?
(b) 10 feet from the house?
(c) 23 feet from the house?
(d) 24 feet from the house?

The ladder and house makes up a right triangle: \(x^2 + y^2 = 24^2\)
where x is the horizontal distance the ladder is from the wall and y is the vertical distance the ladder is up the wall
Taking the derivative with respect to time gives us:
2x dx/dt + 2y dy/dt = 0
dy/dt = -x/y dx/dt
where dy/dt is the rate the top of the ladder is sliding down the side of the house
(a): The ladder is 1 foot from the house:

x <- 1
y <- sqrt(24^2-x^2)
dxdt <- 1
dydt <- -x*dxdt/y
dydt
## [1] -0.04170288

dy/dt = -0.0417 ft/sec
(b) 10 feet from the house?

x <- 10
y <- sqrt(24^2-x^2)
dxdt <- 1
dydt <- -x*dxdt/y
dydt
## [1] -0.4583492

dy/dt = -.458 ft/sec
(c) 23 feet from the house?

x <- 23
y <- sqrt(24^2-x^2)
dxdt <- 1
dydt <- -x*dxdt/y
dydt
## [1] -3.354895

dy/dt = -3.35 ft/sec
(d) 24 feet from the house?
At that point, the ladder is completely horizontal and there is no vertical height.

x <- 24
y <- sqrt(24^2-x^2)
dxdt <- 1
dydt <- -x*dxdt/y
dydt
## [1] -Inf

As the ladder approaches being horizontal and the vertical height approaches zero, dy/dt approaches infinity.