5 It is given that \(I = \int _ { 0 } ^ { \frac { 1 } { 2 } \pi } \frac { \cos \theta } { 1 + \cos \theta } \mathrm { d } \theta\).
- By using the substitution \(t = \tan \frac { 1 } { 2 } \theta\), show that \(I = \int _ { 0 } ^ { 1 } \left( \frac { 2 } { 1 + t ^ { 2 } } - 1 \right) \mathrm { d } t\).
- Hence find \(I\) in terms of \(\pi\).