The various forces involved in the problem are shown in figure.
As the object is in equilibrium at every stage, therefore,
`mg=Tcostheta and F=Tsin theta`
`(F)/(mg)=(Tsintheta)/(Tcostheta)=tantheta`
`F=mg tan theta` ….(i)
Work done by the force,
`W=int_(0)^(theta)vecF.dvecs=int_(0)^(theta)F ds cos theta`
`=int_(0)^(theta)mg tantheta xx(ld theta). costheta`
`=mgl int_(0)^(theta)sind theta=mgl[-costheta]_(0)^(theta)`
`=-mgl(cos theta-cos 0^(@))`
`W=mgl(1-costheta)`