Application of the Derivative

Exercise 4.2 #3

  1. Water flows onto a flat surface at a rate of 5cm3/s forming a circular puddle 10mm deep. How fast is the radius growing when the radius is:
  1. 1 cm?
  2. 10 cm?
  3. 100 cm?
#function for claculating the growing rate
growing.rate = function(r,h,rate){
  Pi = 3.142857  # Aproximation of Pi
  return(rate / 4 * Pi * h  * r)
}

#(a) 1 cm?  
radius=1
paste0('For radius of 1cm the speed is ' , round(growing.rate(radius,1,5), 4) )
## [1] "For radius of 1cm the speed is 3.9286"

#(b) 10 cm?  
radius=10
paste0('For radius of 10cm the speed is ' , round(growing.rate(radius,1,5), 4) )
## [1] "For radius of 10cm the speed is 39.2857"

#(c) 100 cm?  
radius=100
paste0('For radius of 100cm the speed is ' , round(growing.rate(radius,1,5), 4) )
## [1] "For radius of 100cm the speed is 392.8571"