By differentiating \(\frac { 1 } { \cos \theta }\), show that if \(y = \sec \theta\) then \(\frac { \mathrm { d } y } { \mathrm {~d} \theta } = \tan \theta \sec \theta\).
Hence show that
$$\frac { \mathrm { d } ^ { 2 } y } { \mathrm {~d} \theta ^ { 2 } } = a \sec ^ { 3 } \theta + b \sec \theta$$
giving the values of \(a\) and \(b\).
Find the exact value of
$$\int _ { 0 } ^ { \frac { 1 } { 4 } \pi } \left( 1 + \tan ^ { 2 } \theta - 3 \sec \theta \tan \theta \right) d \theta$$