Let $f(x) = k\cos x$, $x \in [\frac {-\pi}2, \frac {\pi}2]$ and $f(x)=0$ otherwise.
I said that for $f$ to be a repartition function then it has to satisfy these conditions: $f(x) \geq 0$ and $\int_{-\infty}^{\infty}f(x)dx=1\implies 2k=1\implies k = \frac 12$.
Now I have to determine the distribution function $F_X(x).$ In my text book the answer is:
$$F_X(x)=\left\{\begin{array}{l}0\;\;,\;x\;\;<\;-\frac{\mathrm\pi}2\\\frac{1+\sin\;x}2,\;-\frac{\mathrm\pi}2\;\leq x<\frac{\mathrm\pi}2\\1,\;x\;\geq\;\frac{\mathrm\pi}2\end{array}\right.$$
But why is that? Couldn't the answer just be: $$F_X(x)=\left\{\begin{array}{l}0\;\;,\;x\;\;<\;-\frac{\mathrm\pi}2\\\frac{\cos x}2,\;-\frac{\mathrm\pi}2\;\leq x<\frac{\mathrm\pi}2\\1,\;x\;\geq\;\frac{\mathrm\pi}2\end{array}\right.$$
How would I calculate: $P(X \in [0, \frac {\pi}4] | X > \frac {\pi}6)$ and $P(X > 0 | X\in [\frac {-\pi}4, \frac {\pi}4])$?
Note that for $-\frac{\mathrm\pi}2\;\leq x<\frac{\mathrm\pi}2$, $$F_X(x)=\int_{-\infty}^x f(t)\,dt=0+\frac{1}{2}\int_{-\pi/2}^x \cos(t)\, dt= \frac{1}{2}\left[\sin(t)\right]_{-\pi/2}^x=\frac{1+\sin(x)}2.$$ Moreover, recall that $F_X(x)=P(X\in(-\infty,x])$, and, by definition (see wiki), $$P(X \in B | X \in A)=\frac{\int_{A\cap B} f(x)\,dx}{\int_{A} f(x)\,dx}.$$ So, for example, $$P(X \in [0, \pi/4 | X > \pi/6)= \frac{\int_{(\pi/6,\pi/4]} f(x)\,dx}{\int_{(\pi/6,+\infty)} f(x)\,dx}= \frac{F_X(\pi/4)-F_X(\pi/6)}{1-F_X(\pi/6)}.$$
Can you take it from here?