<s>[INST] Find $a$ such that $P(X\le a)=\frac 1 2$ 
Given probability density function $f(x)=\begin{cases} 1.5(1-x^2),&0<x<1\\0& \mbox{otherwise}\end{cases}$, calculate for which '$a$', $P(X\le a)=\frac 1 2$ (the solution is $2\cos\left(\frac{4\pi}{9}\right))$.

I calculated the integral and got $P(X\le a)=\displaystyle\int_0^af_X(t)dt=1.5a\left(1-\frac {a^2}{3}\right) \stackrel?= \frac 1 2$. I substituted $a=\cos\theta$ and then got $$\frac 1 2=1.5\cos\theta-0.5\cos^3\theta$$$$1=3\cos\theta -\cos\theta(\cos^2\theta)=3\cos\theta-\cos\theta(\cos^2\theta)=3\cos\theta-\cos\theta\left(\frac {1-\cos 2\theta} 2\right)$$ and then using some identites I got $$-2.75\cos\theta-0.25\cos3\theta+1=0$$ or after multiplying by (-4 )$$11\cos\theta+\cos3\theta-4=0$$ How can I solve this equation?
 [/INST] We have the equation $a^3-3a+1=0$. Of course it can be solved numerically. But we show how cosines get into the game.
Let $a=2b$. The equation becomes $8b^3-6b+1=0$, or equivalently $4b^3 -3b=-\frac{1}{2}$. 
Recall the identity $\cos 3\theta=4\cos^3\theta-3\cos\theta$. So we can rewrite our equation as $\cos3\theta=-\frac{1}{2}$. This has $3$ solutions, the primary one being $3\theta=\frac{2\pi}{3}$. But we also have the possibilities $3\theta=\frac{4\pi}{3}$ and $\frac{8\pi}{3}$. That gives $\theta$ equal to one of $\frac{2\pi}{9}$, $\frac{4\pi}{9}$ and $\frac{8\pi}{9}$. 
Now we need to pick out the one that works. This turns out to be $\theta=\frac{4\pi}{9}$, giving solution $a=2\cos\left(\frac{4\pi}{9}\right)$.
Remark: Amusing! It is not the first time I have done a calculation much like this one, except for using $-\frac{1}{2}$ instead of $\frac{1}{2}$. With that small change, it is part of the standard argument that one cannot trisect the $60^\circ$ angle with straightedge and compass. Had never imagined giving the calculation as part of the solution of a "probability" problem!
The "trigonometric method" for solving cubics with $3$ real roots  (the casus irreducibilis) is due to François Viète.
</s>