(i) Start with the left-hand side (LHS):
\(\left( \frac{1}{\cos x} - \tan x \right)^2 = \left( \frac{1}{\cos x} - \frac{\sin x}{\cos x} \right)^2 = \left( \frac{1 - \sin x}{\cos x} \right)^2\)
\(= \frac{(1 - \sin x)^2}{\cos^2 x}\)
Using the identity \(\cos^2 x = 1 - \sin^2 x\), we have:
\(\frac{(1 - \sin x)^2}{1 - \sin^2 x} = \frac{(1 - \sin x)(1 - \sin x)}{(1 - \sin x)(1 + \sin x)}\)
\(= \frac{1 - \sin x}{1 + \sin x}\)
This matches the right-hand side (RHS), proving the identity.
(ii) Using the result from part (i), we have:
\(\frac{1 - \sin 2x}{1 + \sin 2x} = \frac{1}{3}\)
Cross-multiply to get:
\(3(1 - \sin 2x) = 1 + \sin 2x\)
\(3 - 3\sin 2x = 1 + \sin 2x\)
\(2 = 4\sin 2x\)
\(\sin 2x = \frac{1}{2}\)
Solving \(\sin 2x = \frac{1}{2}\), we find:
\(2x = \frac{\pi}{6}\) or \(2x = \frac{5\pi}{6}\)
Thus, \(x = \frac{\pi}{12}\) or \(x = \frac{5\pi}{12}\).