The function \(\mathrm{f}\) is defined by
\(\mathrm{f}:x\mapsto \sqrt{3}\cos x-\sin x\), \(x\in \mathbb{R}\), \(-\pi \le x\le \pi \).
Express \(\mathrm{f}\left( x \right)\) as \(R\cos \left( x+\alpha \right)\), where \(R\) and \(\alpha \) are constants to be found.[1]
Sketch the graph of \(y=\mathrm{f}\left( x \right)\), stating clearly the exact coordinates of the end-points and turning points. Hence explain why \({{\mathrm{f}}^{-1}}\left( x \right)\) does not exist.[2]
If the domain of \(\mathrm{f}\) is further restricted to \(-\frac{\pi }{6}\le x\le k\), state the maximum value of \(k\) for which \({{\mathrm{f}}^{-1}}\) exist.[1]
Using the value of \(k\) found in part (iii), find \({{\mathrm{f}}^{-1}}\left( x \right)\) and state the domain of \({{\mathrm{f}}^{-1}}\).[3]
Hence sketch, on the same diagram, the graphs of \(y=\mathrm{f}\left( x \right)\), \(y={{\mathrm{f}}^{-1}}\left( x \right)\) and \(y={{\mathrm{f}}^{-1}}\mathrm{f}\left( x \right)\).[3]
The function \(\mathrm{g}\) is defined by
\(\mathrm{g}\left( x \right)=\frac{1}{1-x}\), \(x\in \mathbb{R}\), \(x\ne 0\), \(x\ne 1\).
Given that \({{\mathrm{g}}^{2}}\left( x \right)=\frac{x-1}{x}\) and \({{\mathrm{g}}^{3}}\left( x \right)=x\) for \(x\in \mathbb{R}\), \(x\ne 0\), \(x\ne 1\), determine the value of \({{\mathrm{g}}^{2018}}\left( 2 \right)\).[2]