7 The probability density function, f , of a random variable \(X\) is given by
$$f ( x ) = \begin{cases} k ( 1 + \cos x ) & 0 \leqslant x \leqslant \pi
0 & \text { otherwise } \end{cases}$$
where \(k\) is a constant.
- Show that \(k = \frac { 1 } { \pi }\).
- Verify that the median of \(X\) lies between 0.83 and 0.84 .
- Find the exact value of \(\mathrm { E } ( X )\).
If you use the following lined page to complete the answer(s) to any question(s), the question number(s) must be clearly shown.