Using R, provide the solution for any exercise in either Chapter 4 or Chapter 7 of the calculus textbook. If you are unsure of your solution, post your concerns.
Pg.169 Ex.9 A 24ft ladder is leaning against a house while the base is pulled away at a constant rate of 1ft/s.
At what rate is the top of the ladder sliding down the side of the house when the base is:
Set \(y\) to be the height of the wall from the top of the ladder to the ground, \(x\) to be the length of the ground from the corner between the wall and ground to the other end of the ladder.
Based on the question, \(x^2\) + \(y^2\) = 24\(^2\), \(\frac{dx}{dt}\) = \(\frac{1ft}{s}\).
Find the rate at which the top of the ladder sliding down the side of the house, or \(\frac{dy}{dt}\).
\(y\) = \(\sqrt{24^2 - x^2}\)
Differentiate \(x^2\) + \(y^2\) = 24\(^2\) \(\Rightarrow\) \(2x\frac{dx}{dt}\) + \(2y\frac{dy}{dt}\) = \(0\)
\(2y\frac{dy}{dt}\) = \(-2x\frac{dx}{dt}\)
\(\frac{dy}{dt}\) = \(-\frac{2x}{2y}\frac{dx}{dt}\) = \(-\frac{x}{y}\frac{dx}{dt}\) = \(-\frac{x}{\sqrt{24^2 - x^2}}\frac{dx}{dt}\)
find_dydt <- function(x){
dxdt <- 1
dydt <- -(x/sqrt((24^2-x^2)))*dxdt
return(dydt)
}
(a) 1 foot from the house?
\(\frac{dy}{dt}\) = \(-\frac{1}{\sqrt{24^2 - 1^2}}\frac{dx}{dt}\) = \(-\frac{1}{\sqrt{575}}\frac{1ft}{s}\) = \(-\frac{\sqrt{23}}{115}\)ft/s
#from above equation
-sqrt(23)/115
## [1] -0.04170288
#from function
x <- 1
find_dydt(x)
## [1] -0.04170288
(b) 10 feet from the house?
\(\frac{dy}{dt}\) = \(-\frac{10}{\sqrt{24^2 - 10^2}}\frac{dx}{dt}\) = \(-\frac{10}{2\sqrt{119}}\frac{1ft}{s}\) = \(-\frac{5\sqrt{119}}{119}\)ft/s
#from above equation
-5*sqrt(119)/119
## [1] -0.4583492
#from function
x <- 10
find_dydt(x)
## [1] -0.4583492
(c) 23 feet from the house?
\(\frac{dy}{dt}\) = \(-\frac{23}{\sqrt{24^2 - 23^2}}\frac{dx}{dt}\) = \(\frac{23}{\sqrt{47}}\frac{1ft}{s}\) = \(-\frac{23\sqrt{47}}{47}\)ft/s
#from above equation
-23*sqrt(47)/47
## [1] -3.354895
#from function
x <- 23
find_dydt(x)
## [1] -3.354895
(d) 24 feet from the house?
\(\frac{dy}{dt}\) = \(-\frac{24}{\sqrt{24^2 - 24^2}}\frac{dx}{dt}\) = NaN
#from function
x <- 24
find_dydt(x)
## [1] -Inf
Since the top of the ladder is sliding down, all \(\frac{dy}{dt}\) is negative. For the last question, \(x\) = 24 means that the ladder is lying on the ground, so \(\frac{dy}{dt}\) does not exist.