Let \(f\) be the probability density function for a continuous random variable \(X\), where
\begin{align*}
f(x)=\left\{\begin{array}{cl}
k\, \sin (x) & 0 \leq x<\dfrac{\pi}{4} \\
k\, \cos (x) & \dfrac{\pi}{4} \leq x \leq \dfrac{\pi}{2} \\
0 & \text {otherwise }
\end{array}\right.
\end{align*}
and \(k\) is a positive real number.
The value of \(k\) is
- \(\dfrac{1}{\sqrt{2}}\)
- \(\dfrac{1}{2-\sqrt{2}}\)
- \(\sqrt{2}+2\)
- \(2-\sqrt{2}\)