I'm attempting to solve this problem, and I'm not sure how to (sort of) backtrack the PDF when I have the expectation.
Let $Y$ be a continuous R.V. given by the PDF: $f_Y(y)=2(1-y)$ where $y\in [0,1]$
Let $U=Y^2$
I'm asked to find the PDF and expected value of $U$.
I found the expected value using the following: $$ E[g(x)]=\int g(x)\cdot f(x)dx \rightarrow E[Y^2]=\int_0^1y^2f_Y(y)dy=2\int_0^1 (y^2-y^3)dy $$ $$ = \ldots =\frac{1}{6}=E[U] $$
However, I'm not completely sure I know how to get to $U$'s PDF,
What I've got so far is the understanding that the support of $U$ is the same as of $Y$ ($[0,1]$) and so we can write that $$ E[U]=\frac{1}{6}=\int_0^1 uf_U(u)du $$
In general knowing the expectation will not help you determine the density of a random variable.
For this example, finding the CDF of $U$ and then taking the derivative is straightforward.
$$P(U \le u) = P(Y^2 \le u) = P(Y \le \sqrt{u}) = \int_0^{\sqrt{u}} 2(1-y) \, dy = 2\sqrt{u} - u.$$ $$\frac{d}{du} P(U \le u) = \frac{1}{\sqrt{u}} - 1.$$
As a sanity check, the expectation is $$\int_0^1 u (u^{-1/2} - 1) \, du = \left[\frac{2}{3}u^{3/2} - \frac{1}{2}u^2\right]_{u=0}^1 = \frac{1}{6}.$$