Find the derivative of $\arccos\frac{b+a\cos x}{a+b\cos x}$ Find the derivative of $\arccos\dfrac{b+a\cos x}{a+b\cos x}$
is there a smart way to find this derivative
i tried by the conventional chain rule way, and it got very complicated 
 A: It is not too complicated if one goes through the chain rule of derivatives.
$$\begin{split}\arccos \left( {\frac{{b + a\cos x}}{{a + b\cos x}}} \right) &= \arccos \left( u \right) = F\left( {u\left( x \right)} \right)\\
u &= \frac{{b + a\cos x}}{{a + b\cos x}}\\
\frac{{dF}}{{dx}} &= \frac{{dF}}{{du}}\frac{{du}}{{dx}}
\end{split}
$$
$$\frac{{dF}}{{du}} =  - \frac{1}{{\sqrt {1 - {u^2}} }} =  - \frac{1}{{\sqrt {1 - {{\left( {\frac{{b + a\cos x}}{{a + b\cos x}}} \right)}^2}} }}
$$
$$
\begin{split}
\frac{{du}}{{dx}} &= \frac{{\left( { - a\sin x} \right)\left( {a + b\cos x} \right) - \left( {b + a\cos x} \right)\left( { - b\sin x} \right)}}{{{{\left( {a + b\cos x} \right)}^2}}}\\
&= \frac{1}{{{{\left( {a + b\cos x} \right)}^2}}}\left[ { - {a^2}\sin x - ab\sin x\cos x + {b^2}sinx + ab\sin x\cos x} \right]\\ &= \frac{1}{{{{\left( {a + b\cos x} \right)}^2}}}\left[ { - {a^2}\sin x + {b^2}sinx} \right]\\
&= \frac{{\left( {{b^2} - {a^2}} \right)\sin x}}{{{{\left( {a + b\cos x} \right)}^2}}}\end{split}
$$
$$
\begin{split}
\frac{{dF}}{{dx}} = \frac{{dF}}{{du}}\frac{{du}}{{dx}} &=  - \frac{1}{{\sqrt {1 - {{\left( {\frac{{b + a\cos x}}{{a + b\cos x}}} \right)}^2}} }}\frac{{\left( {{b^2} - {a^2}} \right)\sin x}}{{{{\left( {a + b\cos x} \right)}^2}}}\\ &=  - \frac{1}{{\sqrt {{{\left( {a + b\cos x} \right)}^2} - {{\left( {b + a\cos x} \right)}^2}} }}\frac{{\left( {{b^2} - {a^2}} \right)\sin x}}{{\left|{a + b\cos x}\right|}} \\&= {\mathop{\rm sgn}} \left( {\sin x} \right)\frac{{\sqrt {{a^2} - {b^2}} }}{{\left| {a + b\cos x} \right|}}
\end{split}
$$
A: No clever way in my view but with some order one finds
$$f'(x)=-\frac{\sqrt{|a^2-b^2|}}{a+b\cos x}$$
