$U \sim \text{unif}(0, 1)$ and $3X^2 - 2X^3 - U = 0$. What is the p.d.f. of $X$? 
Let $U \sim \text{unif}(0, 1)$ and let $X$ be the root of the equation $3t^2 − 2t^3 − U = 0$. Show that $X$ has p.d.f.
$$f(x) = \begin{cases}6x(1-x) & 0\le x\le 1 \\ 0 & \text{otherwise} \end{cases}$$

Since $U \sim \text{unif}(0, 1)$, we have for $0\le a,b\le 1$, $P(a\le U\le b) = \frac{1}{b-a}$. We also have $3X^2 - 2X^3 - U = 0$. To find the p.d.f. of $X$, I first try to find the c.d.f. of $X$ (and differentiate it later). In fact one can check that $3x^2 - 2x^3$ is an increasing function in $0 \le x \le 1$. So,
$$P(X \le x) = P(3X^2 - 2X^3 \le 3x^2 - 2x^3)\\ = P(U \le 3x^2 - 2x^3) = \int_0^{3x^2 - 2x^3} \,dx = 3x^2 - 2x^3$$
Then
$$P(X \le x) = \begin{cases}3x^2 - 2x^3 & 0 \le x < 1 \\
1 &x \ge 1 \\0 &x < 0 \end{cases}$$
which gives the desired result on differentiation. I am wondering if there are any more direct approaches to this problem, i.e. without going through the c.d.f. if possible?
 A: Here's a more direct approach (with extra words added in to explain it). Let $X$ be our unknown random variable with cdf $F_X(x)$. We know from Inverse Transform Sampling that the following relation holds
$$
X\overset{d}{=} F_X^{-1}(U),\quad U\sim\operatorname{Uniform(0,1)},
$$
where $\overset{d}{=}$ denotes equality in distribution. So it must be that $F_X(X)\overset{d}{=}U$ and thus, looking at your question $F_X(x)=3x^2-2x^3$. This answer, however, is not complete because we also need the support of $X$. Differentiating $F_X$ gives
$$
f(x)=6x(1-x),
$$
which is only nonnegative on the interval $x\in[0,1]$. Hence,
$$
F(x)=(3x^2-2x^3)1_{x\in[0,1]}+1_{x>1}.
$$
A: There are many solutions to this problem, that is one can cook up different random variables $X$ whose distributions are such that $F(X)\sim U(0,1)$.
A simple analysis shows that

*

*$F^{-1}([0,1])=\{x: F(x)\in[0,1]\}=[-1/2,3/2]$.

*$F:[-1/2,0]\rightarrow[0,1]$ is strictly monotone decreasing and onto.

*$F:[0,1]\rightarrow[0,1]$ is strictly monotone increasing and onto.

*$F:[1,3/2]\rightarrow[0,1]$ is monotone decreasing and onto.

The graph below illustrates this.

Since
$$\{x:F(x)\leq u\}=\big(\{x:F(x)\leq u\}\cap[-1/2,0]\big)\cup \big(\{x:F(x)\leq u\}\cap(0,1]\big)\cup \big(\{x:F(x)\leq u\}\cap(1,3/2]\big)$$
We may consider random variables $X_1$, $X_2$ and $X_3$ taking values in $[-1/2,0]$, $(0,1]$ and $(1,3/2]$ such that $F(X_j)\sim U(0,1)$. The law of the random variables $X_j$ are given by
\begin{align}
P[X_1\leq x] &=P[F(X_1)\geq F(x)]=1-F(x)\qquad x\in[-1/2,0]\\
P[X_2\leq x] &= P[F(X_2)\leq F(x)]=F(x)\qquad x\in(0,1]\\
P[X_3\leq x] &= P[F(X_3)\geq F(x)]=1-F(x)\qquad x\in(1,3/2]
\end{align}
To build a random variable $X$ over $[-1/2,3/2]$ such that $F(X)\sim U(0,1)$ we can set $X=X_1\mathbb{1}(X\in[-1/2,0]) + X_2\mathbb{1}(X\in(0,1]) + X_3\mathbb{1}(X\in(1,3/2])$ and use any  mixture of the laws of the  $X_j$s. For example, assigning $1/3$ probability to each of the sets $[-1/2,0]$, $(0,1]$ and $(1,3/2]$ we get
\begin{align}
P[X\leq x]=\left\{\begin{matrix}
\frac13 (1-F(x))\mathbb{1}_{[-1/2,0]}(x)\\
(\frac13 + \frac{1}{3}F(x))\mathbb{1}_{(0,1]}(x)\\
(\frac23 + \frac13(1-F(x))\mathbb{1}_{(1,3/2]}(x)\\
\mathbb{1}_{(3/2,\infty)}(x)
\end{matrix}
\right.
\end{align}
A more general solution would be
\begin{align}
P[X\leq x]=\left\{\begin{matrix}
\alpha(1-F(x))\mathbb{1}_{[-1/2,0]}(x)\\
(\alpha + \beta F(x))\mathbb{1}_{(0,1]}(x)\\
(\alpha +\beta  + \delta(1-F(x))\mathbb{1}_{(1,3/2]}(x)\\
\mathbb{1}_{(\tfrac{3}{2},\infty)}(x)
\end{matrix}
\right.
\end{align}
where $0\leq\alpha,\beta,\delta$ and $\alpha+\beta+\delta=1$.
The solution in the OP corresponds to $\beta=1$.
