\[ Exercise\ 8\ page \ 395\]

A 20m rope with mass density of 0.5kg/m hangs over the edge of a 10m building. How much work is done pulling the rope to the top?

W = fd : (work(W) = distance(d)force(f))

d = h* f d= 0.5 x delta h(height)

W = h x 0.5 x delta h

Now we need to integrate the above between 0 and 20.

h=10

fh <- function(h){ 0.5*h }
integrate(fh, lower = 0, upper = 20)
## 100 with absolute error < 1.1e-12