A random variable \(X\) has the probability density function \(f(x)\) given by
\(f(x)= \begin{cases}
\dfrac{k}{x^2} & 1 \leq x \leq 2 \\
\ \\
0 & \text {elsewhere }
\end{cases}\)
where \(k\) is a positive real number.
Show that \(k = 2\). (2 marks)