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?
 A: 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.
A: All you should do is just finding roots of the following polynomial which lie within $[0,1]$
$$
1.5a\left(1-\frac {a^2}{3}\right)-\frac 1 2 \\
\Rightarrow a^3-3a+1
$$
Now you can solve it using methods available for solving cubic polynomials or you can write it in this way :
$$
\begin{align}
a^3-3a+1 &= (a-x_1)(a-x_2)(a-x_3)\\ &= a^3 -(x_1 + x_2+x_3)a^2+(x_1x_2+x_1x_3+x_2x_3)a-x_1x_2x_3
\end{align}
$$
By equating coefficients of $a^n, \quad n=0,1,2,3$ on two sides , You will find that :
$$
\begin{cases}
x_1 \approx -1.8794\\
x_2 \approx 0.3473\\
x_3 \approx 1.5321
\end{cases}
$$
And obviously the second one is desired one (why?).

Also following the method you've used in question: set $ a = 2\cos \theta\\$
  $$
\begin{align}
(2\cos \theta)^3-3(2\cos \theta) + 1 
& = 2 (4\cos^3 \theta-3\cos \theta) + 1\\
&= 2\cos 3\theta + 1\\
& = 0
\end{align}\\
\Rightarrow \cos 3\theta = -\frac12 \Rightarrow \theta
= \frac{2\pi}9 (3n \pm 1) , \qquad n \in \mathbb Z
$$

Note that taking $a=2\cos \theta$ restrict the solutions to the interval $[-2,2]$ and since  $a \in [0,1]$ are desired (otherwise the first equality doesn't hold) this substitution would not miss any desired solutions.
A: It would appear that the answer $\cos(4\pi/9)$ is incorrect; Wolfram indicates a positive real solution in the desired range at about $0.347$. You could solve for the roots explicitly, as well.
