We have f(x)=cotx−2cosecx=sinxcosx−2
So, f′(x)=sin2xsinx(−sinx)−(cosx−2)cosx=sin2x−1+2cosx ∴f′(x)=0⇒cosx=21⇒x=4π∈(0,π) ∴f(x)↑ on (0,4π) and f(x)↓ on (4π,π)
Graph of f(x)−cotx−2cosecx in (0,π)
Also, Limx→0+f(x)=Limx→0+(sinxcosx−2)→−∞ and Limx→π−f(x)=Limx→π−(sinxcosx−2)→−∞ and f(x) is also continuous on (0,π)
Clearly f(x)<0∀x∈(0,π) ∴ At x=4π (a local maximum point), so f(x) takes its absolute maximum value also at x=4π.
Hence, absolute maximum value of f(x=4π)=1−2(2)=1−2=−1.