4 The variables \(x\) and \(\theta\) are related by the differential equation
$$\sin 2 \theta \frac { \mathrm {~d} x } { \mathrm {~d} \theta } = ( x + 1 ) \cos 2 \theta$$
where \(0 < \theta < \frac { 1 } { 2 } \pi\). When \(\theta = \frac { 1 } { 12 } \pi , x = 0\). Solve the differential equation, obtaining an expression for \(x\) in terms of \(\theta\), and simplifying your answer as far as possible.