Assume that $X$ and $U$ are two random variables such that:
$X|U=u \sim \mathsf{Unif}(0,u)$ and $U \sim \mathsf{Unif}(0,1)$
(1) Are $X$ and $U$ independent?
(2) Find $\mathsf E[X]$
Task (1) I'm having difficulties with this task since it's the only one of it's kind in my book.
So my idea is to use;
$X$ and $Y$ are independent if
$f_{XU}(x,u)=f_X(x)·f_U(u)$
Now since $U\sim\mathsf{Unif}(0,1)$ its PDF is given by:
$f_U(u)=1, u \in [0,1]$
Since $X|U=u \sim\mathsf{Unif}(0,u)$ its PDF is given by:
(First doubt arises here)
$f_{X|U}(x|u)=\frac{1}{u}, x \in [0,u]$
Having these I can rewrite this formula:
$f_{X|Y}(x|y)=\frac{f_{XY}(x,y)}{f_Y(y)}$
$f_{X|Y}(x|y)·f_Y(y)=f_{XY}(x,y)$
Thus;
$f_{XY}(x,y)=\frac{1}{u}·1$
To find the marginal PDF i integrate the above using $u's$ limits:
$\int_0^1\frac{1}{u}·1 du=0$
Now the above makes no sense. Something has gone wrong and hours of trying a lot of different things haven't solved it.
Task (2) Since I need the marginal PDF for $X$ to solve this I haven't solved it yet.


We are informed that $X\mid U\sim\mathcal U(0;U)$ and $U\sim\mathcal U(0;1)$.
We thus know for certain that $X<U$, so there is clearly dependency.
That is all you really need.
Anyway, by your proposed method you do correctly have the joint pdf:
$$f_{X,U}(x,u)~{=f_X(x\mid u)f_U(u)\\=\tfrac 1u \cdot\mathbf 1_{0<x<u<1}}$$
Since you have been given the distribution for $U$, so of course its marginal-pdf is: $$f_U(u)=\mathbf 1_{0<u<1}$$
But for the $X$ mariginal-pdf you should have (since $f_{X\mid U}(x\mid u)=0$ whenever $u\leqslant x$):
$$f_X(x) {= \int_\Bbb R f_{X\mid U}(x\mid u)f_U(u)\mathsf d u\\ = \left(\int_0^x 0~\mathsf du + \int_x^1 \tfrac 1u~\mathsf du\right)\cdot \mathbf 1_{0<x<1}\\=-\ln(x)\cdot\mathbf 1_{0<x<1}}$$
Always carefully consider the support.
PS: You do not need any of this for the second task. Just make use of the Law of Iterated Expectation :
$$\mathsf E(X)~=~\mathsf E(\,\mathsf E(X\mid U)\,)$$