<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] 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.
</s>