Show that for every $p$, $0\leq p\leq 1$, the function $f(x)$ = $p\sin(x) +(1-p)\cos(x)$, $0\leq x \leq \pi/2 $, and $f(x)=0$ otherwise, is a density function. Find its CDF and use it to find all the medians.
I was able to prove it a density function and also was able to get the CDF which is $(p +\sin(x) -p(\sin(x) + \cos(x))$ ; $0\leq x \leq \pi/2$ and $1$ for $ x\geq \pi/2$ and $zero$ elsewhere. (I hope I am correct)
I don't understand the last part. What do they mean by finding all the medians? I tried putting the CDF equal to $0.5$. I still can't figure it out. I have an equation with two variable $p$ and $x$. How can I solve this?
Using Mathematica, I found the solutions to $p + \sin x - p(\sin x+\cos x)=\frac12$ to be $$ \tan ^{-1}\left(\frac{2 p \left(\sqrt{p^2 (4 (p-1) p+3)}+2 (p-1) p\right)-\sqrt{p^2 (4 (p-1) p+3)}}{p (4 p-3)}\right) $$ and $$ \tan ^{-1}\left(\frac{\sqrt{p^2 (4 (p-1) p+3)}-2 p \left(\sqrt{p^2 (4 (p-1) p+3)}-2 (p-1) p\right)}{p (4 p-3)}\right). $$