285. The random variable $X$ is given by the probability density function $f(x)=2 \cos 2x$ in the interval $(0, \pi / 4)$; outside this interval, $f(x)=0$. Find: a) the mode; b) the median of $X$.
Solution. a) It is easy to verify that the function $f(x)=2 \cos 2 x$ in the open interval $(0, \pi / 4)$ does not have a maximum, therefore $X$ does not have a mode.

b) Let's find the median $M_{e}(X)=m_{e}$, based on the definition of the median!

$P\left(Xm_{e}\right)$, or equivalently, $P\left(X<m_{e}\right)=1 / 2$.

Considering that by condition the possible values of $X$ are positive, we can rewrite this equality as:

$$
P\left(0<X<m_{e}\right)=1 / 2, \text { or } 2 \int_{0}^{m_{e}} \cos 2 x \mathrm{~d} x=\sin 2 m_{e}=1 / 2
$$

From this, $2 m_{e}=\arcsin 1 / 2=\pi / 6$. Therefore, the sought median $m_{e}=\pi / 12$.