#frac{d}{dx}(sqrt{x^2-1}cot (7-x))#
Applying product rule, #(fcdot g)^'=f^'cdot g+fcdot g^'#
#f=sqrt{x^2-1},g=cot (7-x)#
#=frac{d}{dx}(sqrt{x^2-1})cot (7-x)+frac{d}{dx}(cot (7-x))sqrt{x^2-1}#
We know,
#frac{d}{dx}(sqrt{x^2-1})=frac{x}{sqrt{x^2-1}}#
#frac{d}{dx}(cot (7-x))=frac{1}{sin ^2(7-x)}#
[Applying chain rule #frac{df(u)}{dx}=frac{df}{du}cdot frac{du}{dx}#
let #7-x=u#
#=frac{d}{du}(cot (u))frac{d}{dx}(7-x)#
we know,#frac{d}{du}(cot (u))=-frac{1}{sin ^2(u)}#
and,#frac{d}{dx}(7-x)=-1#
so,#=frac{1}{sin ^2(7-x)}#]
Finally,
#=frac{x}{sqrt{x^2-1}}cot (7-x)+frac{1}{sin ^2(7-x)}sqrt{x^2-1}#
simplifying it,
#=frac{xcot (-x+7)}{\sqrt{x^2-1}}+frac{sqrt{x^2-1}}{sin ^2(-x+7)}#